3 @@ -226,6 +226,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
10 ifeq ($(CONFIG_CTRL_IFACE), udp)
11 CFLAGS += -DCONFIG_CTRL_IFACE_UDP
13 --- a/hostapd/ctrl_iface.c
14 +++ b/hostapd/ctrl_iface.c
15 @@ -3370,6 +3370,7 @@ static int hostapd_ctrl_iface_receive_pr
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 @@ -3411,6 +3412,7 @@ static int hostapd_ctrl_iface_receive_pr
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, NULL))
31 --- a/wpa_supplicant/Makefile
32 +++ b/wpa_supplicant/Makefile
33 @@ -952,6 +952,9 @@ ifdef CONFIG_FILS
34 OBJS += ../src/ap/fils_hlp.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 @@ -2267,7 +2267,7 @@ static int wpa_supplicant_ctrl_iface_sta
50 +#if defined(CONFIG_AP) && defined(CONFIG_CTRL_IFACE_MIB)
51 if (wpa_s->ap_iface) {
52 pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos,
54 @@ -10366,6 +10366,7 @@ char * wpa_supplicant_ctrl_iface_process
56 } else if (os_strncmp(buf, "NOTE ", 5) == 0) {
57 wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
58 +#ifdef CONFIG_CTRL_IFACE_MIB
59 } else if (os_strcmp(buf, "MIB") == 0) {
60 reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
62 @@ -10378,6 +10379,7 @@ char * wpa_supplicant_ctrl_iface_process
63 reply_size - reply_len);
64 #endif /* CONFIG_MACSEC */
67 } else if (os_strncmp(buf, "STATUS", 6) == 0) {
68 reply_len = wpa_supplicant_ctrl_iface_status(
69 wpa_s, buf + 6, reply, reply_size);
70 @@ -10862,6 +10864,7 @@ char * wpa_supplicant_ctrl_iface_process
71 reply_len = wpa_supplicant_ctrl_iface_bss(
72 wpa_s, buf + 4, reply, reply_size);
74 +#ifdef CONFIG_CTRL_IFACE_MIB
75 } else if (os_strcmp(buf, "STA-FIRST") == 0) {
76 reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
77 } else if (os_strncmp(buf, "STA ", 4) == 0) {
78 @@ -10870,12 +10873,15 @@ char * wpa_supplicant_ctrl_iface_process
79 } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
80 reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
83 +#ifdef CONFIG_CTRL_IFACE_MIB
84 } else if (os_strncmp(buf, "DEAUTHENTICATE ", 15) == 0) {
85 if (ap_ctrl_iface_sta_deauthenticate(wpa_s, buf + 15))
87 } else if (os_strncmp(buf, "DISASSOCIATE ", 13) == 0) {
88 if (ap_ctrl_iface_sta_disassociate(wpa_s, buf + 13))
91 } else if (os_strncmp(buf, "CHAN_SWITCH ", 12) == 0) {
92 if (ap_ctrl_iface_chanswitch(wpa_s, buf + 12))
94 --- a/src/ap/ctrl_iface_ap.c
95 +++ b/src/ap/ctrl_iface_ap.c
100 +#ifdef CONFIG_CTRL_IFACE_MIB
102 static size_t hostapd_write_ht_mcs_bitmask(char *buf, size_t buflen,
103 size_t curr_len, const u8 *mcs_set)
104 @@ -451,6 +452,7 @@ int hostapd_ctrl_iface_sta_next(struct h
105 return hostapd_ctrl_iface_sta_mib(hapd, sta->next, buf, buflen);
110 #ifdef CONFIG_P2P_MANAGER
111 static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype,
112 @@ -806,12 +808,12 @@ int hostapd_ctrl_iface_status(struct hos
117 +#ifdef CONFIG_CTRL_IFACE_MIB
118 if (iface->conf->ieee80211n && !hapd->conf->disable_11n && mode) {
119 len = hostapd_write_ht_mcs_bitmask(buf, buflen, len,
123 +#endif /* CONFIG_CTRL_IFACE_MIB */
124 if (iface->current_rates && iface->num_rates) {
125 ret = os_snprintf(buf + len, buflen - len, "supported_rates=");
126 if (os_snprintf_error(buflen - len, ret))
127 --- a/src/ap/ieee802_1x.c
128 +++ b/src/ap/ieee802_1x.c
129 @@ -2711,6 +2711,7 @@ static const char * bool_txt(bool val)
130 return val ? "TRUE" : "FALSE";
133 +#ifdef CONFIG_CTRL_IFACE_MIB
135 int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
137 @@ -2897,6 +2898,7 @@ int ieee802_1x_get_mib_sta(struct hostap
144 static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx)
145 --- a/src/ap/wpa_auth.c
146 +++ b/src/ap/wpa_auth.c
147 @@ -4451,6 +4451,7 @@ static const char * wpa_bool_txt(int val
148 return val ? "TRUE" : "FALSE";
151 +#ifdef CONFIG_CTRL_IFACE_MIB
153 #define RSN_SUITE "%02x-%02x-%02x-%d"
154 #define RSN_SUITE_ARG(s) \
155 @@ -4601,7 +4602,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
162 void wpa_auth_countermeasures_start(struct wpa_authenticator *wpa_auth)
164 --- a/src/rsn_supp/wpa.c
165 +++ b/src/rsn_supp/wpa.c
166 @@ -2728,6 +2728,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
170 +#ifdef CONFIG_CTRL_IFACE_MIB
172 #define RSN_SUITE "%02x-%02x-%02x-%d"
173 #define RSN_SUITE_ARG(s) \
174 ((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff
175 @@ -2809,6 +2811,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
180 #endif /* CONFIG_CTRL_IFACE */
183 --- a/wpa_supplicant/ap.c
184 +++ b/wpa_supplicant/ap.c
185 @@ -1284,7 +1284,7 @@ int wpas_ap_wps_nfc_report_handover(stru
186 #endif /* CONFIG_WPS */
189 -#ifdef CONFIG_CTRL_IFACE
190 +#if defined(CONFIG_CTRL_IFACE) && defined(CONFIG_CTRL_IFACE_MIB)
192 int ap_ctrl_iface_sta_first(struct wpa_supplicant *wpa_s,
193 char *buf, size_t buflen)