3 @@ -163,6 +163,9 @@ endif
4 ifdef CONFIG_NO_CTRL_IFACE
5 CFLAGS += -DCONFIG_NO_CTRL_IFACE
7 +ifdef CONFIG_CTRL_IFACE_MIB
8 +CFLAGS += -DCONFIG_CTRL_IFACE_MIB
11 OBJS += ../src/ap/ctrl_iface_ap.o
13 --- a/hostapd/ctrl_iface.c
14 +++ b/hostapd/ctrl_iface.c
15 @@ -1447,6 +1447,7 @@ static void hostapd_ctrl_iface_receive(i
17 } else if (os_strcmp(buf, "STATUS-DRIVER") == 0) {
18 reply_len = hostapd_drv_status(hapd, reply, reply_size);
19 +#ifdef CONFIG_CTRL_IFACE_MIB
20 } else if (os_strcmp(buf, "MIB") == 0) {
21 reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
23 @@ -1488,6 +1489,7 @@ static void hostapd_ctrl_iface_receive(i
24 } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
25 reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
28 } else if (os_strcmp(buf, "ATTACH") == 0) {
29 if (hostapd_ctrl_iface_attach(hapd, &from, fromlen))
31 --- a/wpa_supplicant/Makefile
32 +++ b/wpa_supplicant/Makefile
33 @@ -797,6 +797,9 @@ ifdef CONFIG_WNM
34 OBJS += ../src/ap/wnm_ap.o
36 ifdef CONFIG_CTRL_IFACE
37 +ifdef CONFIG_CTRL_IFACE_MIB
38 +CFLAGS += -DCONFIG_CTRL_IFACE_MIB
40 OBJS += ../src/ap/ctrl_iface_ap.o
43 --- a/wpa_supplicant/ctrl_iface.c
44 +++ b/wpa_supplicant/ctrl_iface.c
45 @@ -6100,6 +6100,7 @@ char * wpa_supplicant_ctrl_iface_process
47 } else if (os_strncmp(buf, "NOTE ", 5) == 0) {
48 wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
49 +#ifdef CONFIG_CTRL_IFACE_MIB
50 } else if (os_strcmp(buf, "MIB") == 0) {
51 reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
53 @@ -6111,6 +6112,7 @@ char * wpa_supplicant_ctrl_iface_process
58 } else if (os_strncmp(buf, "STATUS", 6) == 0) {
59 reply_len = wpa_supplicant_ctrl_iface_status(
60 wpa_s, buf + 6, reply, reply_size);
61 @@ -6518,6 +6520,7 @@ char * wpa_supplicant_ctrl_iface_process
62 reply_len = wpa_supplicant_ctrl_iface_bss(
63 wpa_s, buf + 4, reply, reply_size);
65 +#ifdef CONFIG_CTRL_IFACE_MIB
66 } else if (os_strcmp(buf, "STA-FIRST") == 0) {
67 reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
68 } else if (os_strncmp(buf, "STA ", 4) == 0) {
69 @@ -6526,6 +6529,7 @@ char * wpa_supplicant_ctrl_iface_process
70 } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
71 reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
74 } else if (os_strncmp(buf, "DEAUTHENTICATE ", 15) == 0) {
75 if (ap_ctrl_iface_sta_deauthenticate(wpa_s, buf + 15))
77 --- a/src/ap/ctrl_iface_ap.c
78 +++ b/src/ap/ctrl_iface_ap.c
80 #include "ctrl_iface_ap.h"
81 #include "ap_drv_ops.h"
83 +#ifdef CONFIG_CTRL_IFACE_MIB
85 static int hostapd_get_sta_tx_rx(struct hostapd_data *hapd,
87 @@ -214,6 +215,7 @@ int hostapd_ctrl_iface_sta_next(struct h
88 return hostapd_ctrl_iface_sta_mib(hapd, sta->next, buf, buflen);
93 #ifdef CONFIG_P2P_MANAGER
94 static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype,
95 @@ -524,3 +526,4 @@ int hostapd_parse_csa_settings(const cha
100 --- a/src/ap/ieee802_1x.c
101 +++ b/src/ap/ieee802_1x.c
102 @@ -2124,6 +2124,7 @@ static const char * bool_txt(Boolean boo
103 return bool_val ? "TRUE" : "FALSE";
106 +#ifdef CONFIG_CTRL_IFACE_MIB
108 int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
110 @@ -2291,6 +2292,7 @@ int ieee802_1x_get_mib_sta(struct hostap
116 static void ieee802_1x_finished(struct hostapd_data *hapd,
117 struct sta_info *sta, int success,
118 --- a/src/ap/wpa_auth.c
119 +++ b/src/ap/wpa_auth.c
120 @@ -2830,6 +2830,7 @@ static const char * wpa_bool_txt(int boo
121 return bool ? "TRUE" : "FALSE";
124 +#ifdef CONFIG_CTRL_IFACE_MIB
126 #define RSN_SUITE "%02x-%02x-%02x-%d"
127 #define RSN_SUITE_ARG(s) \
128 @@ -2974,7 +2975,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
135 void wpa_auth_countermeasures_start(struct wpa_authenticator *wpa_auth)
137 --- a/src/rsn_supp/wpa.c
138 +++ b/src/rsn_supp/wpa.c
139 @@ -1910,6 +1910,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
143 +#ifdef CONFIG_CTRL_IFACE_MIB
145 #define RSN_SUITE "%02x-%02x-%02x-%d"
146 #define RSN_SUITE_ARG(s) \
147 ((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff
148 @@ -1993,6 +1995,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
153 #endif /* CONFIG_CTRL_IFACE */