libwifi: mtk: ubus wifi.wps callbacks
- Added wps pin callbacks.
- wps* callbacks refactored to use local set/get interface.
@Marek @janusz @anjancx please review
Tested with:
ubus call wifi.wps status '{"vif" : "wlan0"}'
ubus call wifi.wps status '{"vif" : "wlan1"}'
ubus call wifi.wps stop '{"vif" : "wlan0"}'
ubus call wifi.wps stop '{"vif" : "wlan1"}'
ubus call wifi.wps start '{"vif" : "wlan0"}'
ubus call wifi.wps start '{"vif" : "wlan1"}'
ubus call wifi.wps setpin '{"vif" : "wlan0", "pin" : "00001234"}'
ubus call wifi.wps setpin '{"vif" : "wlan1", "pin" : "00001234"}'
ubus call wifi.wps showpin '{"vif" : "wlan0"}'
ubus call wifi.wps showpin '{"vif" : "wlan1"}'
ubus call wifi.wps start '{"vif" : "wlan1","mode" : "pin", "role" : "registrar" , "pin" : "00001234"}'
On enrollee {wpa_cli wps_pin any 00001234}
? BUG:
Unexpected behavoiur (stored pin is not handed over from wifimngr to wps start. No error message. pin "00000000" is used instead) :
ubus call wifi.wps setpin '{"vif" : "wlan1", "pin" : "00001234"}'
ubus call wifi.wps showpin '{"vif" : "wlan1"}'
{
"pin": "00001234"
}
ubus call wifi.wps start '{"vif" : "wlan1","mode" : "pin"}'
Tue Jun 30 19:13:34 2020 daemon.err wifimngr[3453]: libwifi: [wlan1] iface_start_wps called 00000000
Tue Jun 30 19:13:34 2020 daemon.err wifimngr[3453]: libwifi: wlan1 hostapd_cli_set set:
Tue Jun 30 19:13:34 2020 daemon.err wifimngr[3453]: wps_pin any 00000000
Tue Jun 30 19:13:34 2020 daemon.err wifimngr[3453]: libwifi: OK