hostapd: add more missing ifdefs
authorFelix Fietkau <nbd@openwrt.org>
Mon, 28 Jul 2014 22:52:39 +0000 (22:52 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 28 Jul 2014 22:52:39 +0000 (22:52 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 41863

package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch

index e491d0726a6bc87b302091ae7a82270fe27c9421..8c4e9bdcc481bb35ba8a196d9b1f075a9164231f 100644 (file)
  
 --- a/wpa_supplicant/ctrl_iface.c
 +++ b/wpa_supplicant/ctrl_iface.c
+@@ -1602,7 +1602,7 @@ static int wpa_supplicant_ctrl_iface_sta
+                       pos += ret;
+               }
+-#ifdef CONFIG_AP
++#if defined(CONFIG_AP) && defined(CONFIG_CTRL_IFACE_MIB)
+               if (wpa_s->ap_iface) {
+                       pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos,
+                                                           end - pos,
 @@ -6243,6 +6243,7 @@ char * wpa_supplicant_ctrl_iface_process
                        reply_len = -1;
        } else if (os_strncmp(buf, "NOTE ", 5) == 0) {
        } else if (os_strcmp(buf, "STA-FIRST") == 0) {
                reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
        } else if (os_strncmp(buf, "STA ", 4) == 0) {
-@@ -6669,6 +6672,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -6669,12 +6672,15 @@ char * wpa_supplicant_ctrl_iface_process
        } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
                reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
                                                   reply_size);
 +#endif
++#ifdef CONFIG_CTRL_IFACE_MIB
        } else if (os_strncmp(buf, "DEAUTHENTICATE ", 15) == 0) {
                if (ap_ctrl_iface_sta_deauthenticate(wpa_s, buf + 15))
                        reply_len = -1;
+       } else if (os_strncmp(buf, "DISASSOCIATE ", 13) == 0) {
+               if (ap_ctrl_iface_sta_disassociate(wpa_s, buf + 13))
+                       reply_len = -1;
++#endif
+       } else if (os_strncmp(buf, "CHAN_SWITCH ", 12) == 0) {
+               if (ap_ctrl_iface_chanswitch(wpa_s, buf + 12))
+                       reply_len = -1;
 --- a/src/ap/ctrl_iface_ap.c
 +++ b/src/ap/ctrl_iface_ap.c
 @@ -21,6 +21,7 @@