]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Android: Convert driver_cmd BGSCAN-START/STOP to proper driver_ops
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 23 Nov 2011 15:48:31 +0000 (17:48 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 24 Nov 2013 20:46:38 +0000 (22:46 +0200)
Instead of driver specific specific command, use a cleaner design
for handling the Android BGSCAN-START/STOP commands.

wpa_supplicant/ctrl_iface.c

index a0604775a59eec282ec51c8b639a2b9a163231cf..73ef0b9f2fc7df2d86f8ca4f9ce951c3b9645fce 100644 (file)
@@ -5164,7 +5164,12 @@ static int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd,
 {
        int ret;
 
-       ret = wpa_drv_driver_cmd(wpa_s, cmd, buf, buflen);
+       if (os_strcasecmp(cmd, "BGSCAN-START") == 0)
+               ret = pno_start(wpa_s);
+       else if (os_strcasecmp(cmd, "BGSCAN-STOP") == 0)
+               ret = pno_stop(wpa_s);
+       else
+               ret = wpa_drv_driver_cmd(wpa_s, cmd, buf, buflen);
        if (ret == 0) {
                if (os_strncasecmp(cmd, "COUNTRY", 7) == 0) {
                        struct p2p_data *p2p = wpa_s->global->p2p;