OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 18... Line 18...
18 #include "utils/list.h" 18 #include "utils/list.h"
19 #include "ap_config.h" 19 #include "ap_config.h"
20 #include "drivers/driver.h" 20 #include "drivers/driver.h"
21 +#include "ubus.h" 21 +#include "ubus.h"
Line 22... Line 22...
22 22
23 #define OCE_STA_CFON_ENABLED(hapd) \ 23 struct wpa_ctrl_dst;
24 ((hapd->conf->oce & OCE_STA_CFON) && \ 24 struct radius_server_data;
25 @@ -136,6 +137,7 @@ struct hostapd_data { 25 @@ -129,6 +130,7 @@ struct hostapd_data {
26 struct hostapd_iface *iface; 26 struct hostapd_iface *iface;
27 struct hostapd_config *iconf; 27 struct hostapd_config *iconf;
28 struct hostapd_bss_config *conf; 28 struct hostapd_bss_config *conf;
29 + struct hostapd_ubus_bss ubus; 29 + struct hostapd_ubus_bss ubus;
30 int interface_added; /* virtual interface added for this BSS */ 30 int interface_added; /* virtual interface added for this BSS */
31 unsigned int started:1; 31 unsigned int started:1;
-   32 unsigned int disabled:1;
-   33 @@ -392,6 +394,8 @@ struct hostapd_iface {
-   34 struct hostapd_config *conf;
-   35 char phy[16]; /* Name of the PHY (radio) */
-   36
-   37 + struct hostapd_ubus_iface ubus;
-   38 +
-   39 enum hostapd_iface_state {
-   40 HAPD_IFACE_UNINITIALIZED,
32 unsigned int disabled:1; 41 HAPD_IFACE_DISABLED,
33 @@ -547,6 +549,7 @@ hostapd_alloc_bss_data(struct hostapd_if 42 @@ -544,6 +548,7 @@ hostapd_alloc_bss_data(struct hostapd_if
34 struct hostapd_bss_config *bss); 43 struct hostapd_bss_config *bss);
35 int hostapd_setup_interface(struct hostapd_iface *iface); 44 int hostapd_setup_interface(struct hostapd_iface *iface);
36 int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err); 45 int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
37 +void hostapd_set_own_neighbor_report(struct hostapd_data *hapd); 46 +void hostapd_set_own_neighbor_report(struct hostapd_data *hapd);
38 void hostapd_interface_deinit(struct hostapd_iface *iface); 47 void hostapd_interface_deinit(struct hostapd_iface *iface);
39 void hostapd_interface_free(struct hostapd_iface *iface); 48 void hostapd_interface_free(struct hostapd_iface *iface);
40 struct hostapd_iface * hostapd_alloc_iface(void); 49 struct hostapd_iface * hostapd_alloc_iface(void);
41 --- a/src/ap/hostapd.c 50 --- a/src/ap/hostapd.c
42 +++ b/src/ap/hostapd.c 51 +++ b/src/ap/hostapd.c
43 @@ -373,6 +373,7 @@ static void hostapd_free_hapd_data(struc 52 @@ -312,6 +312,7 @@ static void hostapd_free_hapd_data(struc
Line 44... Line 53...
44 hapd->started = 0; 53 hapd->started = 0;
45 54
46 wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface); 55 wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
47 + hostapd_ubus_free_bss(hapd); 56 + hostapd_ubus_free_bss(hapd);
48 iapp_deinit(hapd->iapp); 57 iapp_deinit(hapd->iapp);
49 hapd->iapp = NULL; 58 hapd->iapp = NULL;
50 accounting_deinit(hapd); 59 accounting_deinit(hapd);
51 @@ -1295,6 +1296,8 @@ static int hostapd_setup_bss(struct host 60 @@ -1189,6 +1190,8 @@ static int hostapd_setup_bss(struct host
Line 52... Line 61...
52 if (hapd->driver && hapd->driver->set_operstate) 61 if (hapd->driver && hapd->driver->set_operstate)
53 hapd->driver->set_operstate(hapd->drv_priv, 1); 62 hapd->driver->set_operstate(hapd->drv_priv, 1);
54 63
55 + hostapd_ubus_add_bss(hapd); 64 + hostapd_ubus_add_bss(hapd);
Line 56... Line 65...
56 + 65 +
57 return 0; 66 return 0;
Line 58... Line 67...
58 } 67 }
59 68
60 @@ -1709,7 +1712,7 @@ static enum nr_chan_width hostapd_get_nr 69 @@ -1603,7 +1606,7 @@ static enum nr_chan_width hostapd_get_nr
61 #endif /* NEED_AP_MLME */ 70 #endif /* NEED_AP_MLME */
62 71
63 72
64 -static void hostapd_set_own_neighbor_report(struct hostapd_data *hapd) 73 -static void hostapd_set_own_neighbor_report(struct hostapd_data *hapd)
65 +void hostapd_set_own_neighbor_report(struct hostapd_data *hapd) 74 +void hostapd_set_own_neighbor_report(struct hostapd_data *hapd)
Line 66... Line 75...
66 { 75 {
67 #ifdef NEED_AP_MLME 76 #ifdef NEED_AP_MLME
68 u16 capab = hostapd_own_capab_info(hapd); 77 u16 capab = hostapd_own_capab_info(hapd);
69 @@ -1930,6 +1933,7 @@ static int hostapd_setup_interface_compl 78 @@ -1810,6 +1813,7 @@ static int hostapd_setup_interface_compl
70 if (err) 79 if (err)
Line 71... Line 80...
71 goto fail; 80 goto fail;
72 81
73 + hostapd_ubus_add_iface(iface); 82 + hostapd_ubus_add_iface(iface);
74 wpa_printf(MSG_DEBUG, "Completing interface initialization"); 83 wpa_printf(MSG_DEBUG, "Completing interface initialization");
75 if (iface->conf->channel) { 84 if (iface->conf->channel) {
76 #ifdef NEED_AP_MLME 85 #ifdef NEED_AP_MLME
77 @@ -2110,6 +2114,7 @@ dfs_offload: 86 @@ -1990,6 +1994,7 @@ dfs_offload:
78 87
79 fail: 88 fail:
80 wpa_printf(MSG_ERROR, "Interface initialization failed"); 89 wpa_printf(MSG_ERROR, "Interface initialization failed");
81 + hostapd_ubus_free_iface(iface); 90 + hostapd_ubus_free_iface(iface);
82 hostapd_set_state(iface, HAPD_IFACE_DISABLED); 91 hostapd_set_state(iface, HAPD_IFACE_DISABLED);
83 wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED); 92 wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
84 #ifdef CONFIG_FST 93 #ifdef CONFIG_FST
85 @@ -2576,6 +2581,7 @@ void hostapd_interface_deinit_free(struc 94 @@ -2444,6 +2449,7 @@ void hostapd_interface_deinit_free(struc
86 (unsigned int) iface->conf->num_bss); 95 (unsigned int) iface->conf->num_bss);
87 driver = iface->bss[0]->driver; 96 driver = iface->bss[0]->driver;
Line 88... Line 97...
88 drv_priv = iface->bss[0]->drv_priv; 97 drv_priv = iface->bss[0]->drv_priv;
89 + hostapd_ubus_free_iface(iface); 98 + hostapd_ubus_free_iface(iface);
90 hostapd_interface_deinit(iface); 99 hostapd_interface_deinit(iface);
Line 106... Line 115...
106 - int res, reply_res; 115 - int res, reply_res;
107 + int res, reply_res, ubus_resp; 116 + int res, reply_res, ubus_resp;
108 u16 fc; 117 u16 fc;
109 const u8 *challenge = NULL; 118 const u8 *challenge = NULL;
110 u32 session_timeout, acct_interim_interval; 119 u32 session_timeout, acct_interim_interval;
111 @@ -1775,6 +1776,11 @@ static void handle_auth(struct hostapd_d 120 @@ -1698,6 +1699,11 @@ static void handle_auth(struct hostapd_d
112 char *identity = NULL; 121 char *identity = NULL;
113 char *radius_cui = NULL; 122 char *radius_cui = NULL;
114 u16 seq_ctrl; 123 u16 seq_ctrl;
115 + struct hostapd_ubus_request req = { 124 + struct hostapd_ubus_request req = {
116 + .type = HOSTAPD_UBUS_AUTH_REQ, 125 + .type = HOSTAPD_UBUS_AUTH_REQ,
Line 118... Line 127...
118 + .frame_info = fi, 127 + .frame_info = fi,
119 + }; 128 + };
Line 120... Line 129...
120 129
121 if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) { 130 if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
122 wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)", 131 wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)",
123 @@ -1935,6 +1941,13 @@ static void handle_auth(struct hostapd_d 132 @@ -1858,6 +1864,13 @@ static void handle_auth(struct hostapd_d
124 resp = WLAN_STATUS_UNSPECIFIED_FAILURE; 133 resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
125 goto fail; 134 goto fail;
126 } 135 }
127 + ubus_resp = hostapd_ubus_handle_event(hapd, &req); 136 + ubus_resp = hostapd_ubus_handle_event(hapd, &req);
Line 132... Line 141...
132 + goto fail; 141 + goto fail;
133 + } 142 + }
134 if (res == HOSTAPD_ACL_PENDING) 143 if (res == HOSTAPD_ACL_PENDING)
135 return; 144 return;
Line 136... Line 145...
136 145
Line 137... Line 146...
137 @@ -3287,12 +3300,12 @@ void fils_hlp_timeout(void *eloop_ctx, v 146 @@ -3129,12 +3142,12 @@ void fils_hlp_timeout(void *eloop_ctx, v
138 147
139 static void handle_assoc(struct hostapd_data *hapd, 148 static void handle_assoc(struct hostapd_data *hapd,
140 const struct ieee80211_mgmt *mgmt, size_t len, 149 const struct ieee80211_mgmt *mgmt, size_t len,
Line 147... Line 156...
147 - int left, i; 156 - int left, i;
148 + int left, i, ubus_resp; 157 + int left, i, ubus_resp;
149 struct sta_info *sta; 158 struct sta_info *sta;
150 u8 *tmp = NULL; 159 u8 *tmp = NULL;
151 struct hostapd_sta_wpa_psk_short *psk = NULL; 160 struct hostapd_sta_wpa_psk_short *psk = NULL;
152 @@ -3301,6 +3314,11 @@ static void handle_assoc(struct hostapd_ 161 @@ -3143,6 +3156,11 @@ static void handle_assoc(struct hostapd_
153 #ifdef CONFIG_FILS 162 #ifdef CONFIG_FILS
154 int delay_assoc = 0; 163 int delay_assoc = 0;
155 #endif /* CONFIG_FILS */ 164 #endif /* CONFIG_FILS */
156 + struct hostapd_ubus_request req = { 165 + struct hostapd_ubus_request req = {
157 + .type = HOSTAPD_UBUS_ASSOC_REQ, 166 + .type = HOSTAPD_UBUS_ASSOC_REQ,
Line 159... Line 168...
159 + .frame_info = fi, 168 + .frame_info = fi,
160 + }; 169 + };
Line 161... Line 170...
161 170
162 if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_req) : 171 if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_req) :
163 sizeof(mgmt->u.assoc_req))) { 172 sizeof(mgmt->u.assoc_req))) {
164 @@ -3472,6 +3490,14 @@ static void handle_assoc(struct hostapd_ 173 @@ -3314,6 +3332,14 @@ static void handle_assoc(struct hostapd_
165 } 174 }
Line 166... Line 175...
166 #endif /* CONFIG_MBO */ 175 #endif /* CONFIG_MBO */
167 176
Line 174... Line 183...
174 + } 183 + }
175 + 184 +
176 /* 185 /*
177 * sta->capability is used in check_assoc_ies() for RRM enabled 186 * sta->capability is used in check_assoc_ies() for RRM enabled
178 * capability element. 187 * capability element.
179 @@ -3685,6 +3711,7 @@ static void handle_disassoc(struct hosta 188 @@ -3527,6 +3553,7 @@ static void handle_disassoc(struct hosta
180 wpa_printf(MSG_DEBUG, "disassocation: STA=" MACSTR " reason_code=%d", 189 wpa_printf(MSG_DEBUG, "disassocation: STA=" MACSTR " reason_code=%d",
181 MAC2STR(mgmt->sa), 190 MAC2STR(mgmt->sa),
182 le_to_host16(mgmt->u.disassoc.reason_code)); 191 le_to_host16(mgmt->u.disassoc.reason_code));
183 + hostapd_ubus_notify(hapd, "disassoc", mgmt->sa); 192 + hostapd_ubus_notify(hapd, "disassoc", mgmt->sa);
Line 184... Line 193...
184 193
185 sta = ap_get_sta(hapd, mgmt->sa); 194 sta = ap_get_sta(hapd, mgmt->sa);
186 if (sta == NULL) { 195 if (sta == NULL) {
187 @@ -3750,6 +3777,8 @@ static void handle_deauth(struct hostapd 196 @@ -3592,6 +3619,8 @@ static void handle_deauth(struct hostapd
188 " reason_code=%d", 197 " reason_code=%d",
Line 189... Line 198...
189 MAC2STR(mgmt->sa), le_to_host16(mgmt->u.deauth.reason_code)); 198 MAC2STR(mgmt->sa), le_to_host16(mgmt->u.deauth.reason_code));
190 199
191 + hostapd_ubus_notify(hapd, "deauth", mgmt->sa); 200 + hostapd_ubus_notify(hapd, "deauth", mgmt->sa);
192 + 201 +
193 sta = ap_get_sta(hapd, mgmt->sa); 202 sta = ap_get_sta(hapd, mgmt->sa);
194 if (sta == NULL) { 203 if (sta == NULL) {
Line 195... Line 204...
195 wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR " trying " 204 wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR " trying "
196 @@ -4077,7 +4106,7 @@ int ieee802_11_mgmt(struct hostapd_data 205 @@ -3911,7 +3940,7 @@ int ieee802_11_mgmt(struct hostapd_data
197 206
198 207
199 if (stype == WLAN_FC_STYPE_PROBE_REQ) { 208 if (stype == WLAN_FC_STYPE_PROBE_REQ) {
Line 200... Line 209...
200 - handle_probe_req(hapd, mgmt, len, ssi_signal); 209 - handle_probe_req(hapd, mgmt, len, ssi_signal);
201 + handle_probe_req(hapd, mgmt, len, fi); 210 + handle_probe_req(hapd, mgmt, len, fi);
202 return 1; 211 return 1;
203 } 212 }
204 213
205 @@ -4097,17 +4126,17 @@ int ieee802_11_mgmt(struct hostapd_data 214 @@ -3931,17 +3960,17 @@ int ieee802_11_mgmt(struct hostapd_data
Line 223... Line 232...
223 ret = 1; 232 ret = 1;
224 break; 233 break;
225 case WLAN_FC_STYPE_DISASSOC: 234 case WLAN_FC_STYPE_DISASSOC:
226 --- a/src/ap/beacon.c 235 --- a/src/ap/beacon.c
227 +++ b/src/ap/beacon.c 236 +++ b/src/ap/beacon.c
228 @@ -725,7 +725,7 @@ void sta_track_claim_taxonomy_info(struc 237 @@ -720,7 +720,7 @@ void sta_track_claim_taxonomy_info(struc
Line 229... Line 238...
229 238
230 void handle_probe_req(struct hostapd_data *hapd, 239 void handle_probe_req(struct hostapd_data *hapd,
231 const struct ieee80211_mgmt *mgmt, size_t len, 240 const struct ieee80211_mgmt *mgmt, size_t len,
232 - int ssi_signal) 241 - int ssi_signal)
233 + struct hostapd_frame_info *fi) 242 + struct hostapd_frame_info *fi)
234 { 243 {
235 u8 *resp; 244 u8 *resp;
236 struct ieee802_11_elems elems; 245 struct ieee802_11_elems elems;
237 @@ -734,6 +734,7 @@ void handle_probe_req(struct hostapd_dat 246 @@ -729,6 +729,7 @@ void handle_probe_req(struct hostapd_dat
238 size_t i, resp_len; 247 size_t i, resp_len;
239 int noack; 248 int noack;
240 enum ssid_match_result res; 249 enum ssid_match_result res;
241 + int ssi_signal = fi->ssi_signal; 250 + int ssi_signal = fi->ssi_signal;
242 int ret; 251 int ret;
243 u16 csa_offs[2]; 252 u16 csa_offs[2];
244 size_t csa_offs_len; 253 size_t csa_offs_len;
245 @@ -742,6 +743,12 @@ void handle_probe_req(struct hostapd_dat 254 @@ -737,6 +738,11 @@ void handle_probe_req(struct hostapd_dat
246 struct hostapd_sta_wpa_psk_short *psk = NULL; 255 struct hostapd_sta_wpa_psk_short *psk = NULL;
247 char *identity = NULL; 256 char *identity = NULL;
248 char *radius_cui = NULL; 257 char *radius_cui = NULL;
249 + struct hostapd_ubus_request req = { 258 + struct hostapd_ubus_request req = {
250 + .type = HOSTAPD_UBUS_PROBE_REQ, 259 + .type = HOSTAPD_UBUS_PROBE_REQ,
251 + .mgmt_frame = mgmt, 260 + .mgmt_frame = mgmt,
252 + .frame_info = fi, -  
253 + .elems = &elems, 261 + .frame_info = fi,
Line 254... Line 262...
254 + }; 262 + };
255 263
256 if (len < IEEE80211_HDRLEN) 264 if (len < IEEE80211_HDRLEN)
257 return; 265 return;
258 @@ -919,6 +926,12 @@ void handle_probe_req(struct hostapd_dat 266 @@ -914,6 +920,12 @@ void handle_probe_req(struct hostapd_dat
Line 259... Line 267...
259 } 267 }
260 #endif /* CONFIG_P2P */ 268 #endif /* CONFIG_P2P */
Line 305... Line 313...
305 #ifdef CONFIG_P2P 313 #ifdef CONFIG_P2P
306 if (elems.p2p) { 314 if (elems.p2p) {
307 wpabuf_free(sta->p2p_ie); 315 wpabuf_free(sta->p2p_ie);
308 --- a/src/ap/sta_info.c 316 --- a/src/ap/sta_info.c
309 +++ b/src/ap/sta_info.c 317 +++ b/src/ap/sta_info.c
310 @@ -416,6 +416,7 @@ void ap_handle_timer(void *eloop_ctx, vo 318 @@ -412,6 +412,7 @@ void ap_handle_timer(void *eloop_ctx, vo
311 HOSTAPD_LEVEL_INFO, "deauthenticated due to " 319 HOSTAPD_LEVEL_INFO, "deauthenticated due to "
312 "local deauth request"); 320 "local deauth request");
313 ap_free_sta(hapd, sta); 321 ap_free_sta(hapd, sta);
314 + hostapd_ubus_notify(hapd, "local-deauth", sta->addr); 322 + hostapd_ubus_notify(hapd, "local-deauth", sta->addr);
315 return; 323 return;
316 } 324 }
Line 317... Line 325...
317 325
318 @@ -563,6 +564,7 @@ skip_poll: 326 @@ -559,6 +560,7 @@ skip_poll:
319 hapd, sta, 327 hapd, sta,
320 WLAN_REASON_PREV_AUTH_NOT_VALID); 328 WLAN_REASON_PREV_AUTH_NOT_VALID);
321 ap_free_sta(hapd, sta); 329 ap_free_sta(hapd, sta);
322 + hostapd_ubus_notify(hapd, "inactive-deauth", sta->addr); 330 + hostapd_ubus_notify(hapd, "inactive-deauth", sta->addr);
323 break; 331 break;
324 } 332 }
325 } 333 }
326 @@ -1224,6 +1226,7 @@ void ap_sta_set_authorized(struct hostap 334 @@ -1220,6 +1222,7 @@ void ap_sta_set_authorized(struct hostap
327 buf, ip_addr); 335 buf, ip_addr);
328 } else { 336 } else {
329 wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED "%s", buf); 337 wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED "%s", buf);
Line 339... Line 347...
339 MAC2STR(addr)); 347 MAC2STR(addr));
340 + hostapd_ubus_notify(hapd, "key-mismatch", addr); 348 + hostapd_ubus_notify(hapd, "key-mismatch", addr);
341 } 349 }
Line 342... Line -...
342 -  
343 -  
344 --- a/wpa_supplicant/Makefile -  
345 +++ b/wpa_supplicant/Makefile -  
346 @@ -189,6 +189,12 @@ ifdef CONFIG_EAPOL_TEST -  
347 CFLAGS += -Werror -DEAPOL_TEST -  
348 endif -  
349 -  
350 +ifdef CONFIG_UBUS -  
351 +CFLAGS += -DUBUS_SUPPORT -  
352 +OBJS += ubus.o -  
353 +LIBS += -lubox -lubus -  
354 +endif -  
355 + -  
356 ifdef CONFIG_CODE_COVERAGE -  
357 CFLAGS += -O0 -fprofile-arcs -ftest-coverage -  
358 LIBS += -lgcov -  
359 @@ -915,6 +921,9 @@ endif -  
360 ifdef CONFIG_IEEE80211AX -  
361 OBJS += ../src/ap/ieee802_11_he.o -  
362 endif -  
363 +ifdef CONFIG_UBUS -  
364 +OBJS += ../src/ap/ubus.o -  
365 +endif -  
366 endif -  
367 ifdef CONFIG_WNM_AP -  
368 CFLAGS += -DCONFIG_WNM_AP -  
369 --- a/wpa_supplicant/wpa_supplicant.c -  
370 +++ b/wpa_supplicant/wpa_supplicant.c -  
371 @@ -6080,6 +6080,8 @@ struct wpa_supplicant * wpa_supplicant_a -  
372 } -  
373 #endif /* CONFIG_P2P */ -  
374 -  
375 + wpas_ubus_add_bss(wpa_s); -  
376 + -  
377 return wpa_s; -  
378 } -  
379 -  
380 @@ -6106,6 +6108,8 @@ int wpa_supplicant_remove_iface(struct w -  
381 struct wpa_supplicant *parent = wpa_s->parent; -  
382 #endif /* CONFIG_MESH */ -  
383 -  
384 + wpas_ubus_free_bss(wpa_s); -  
385 + -  
386 /* Remove interface from the global list of interfaces */ -  
387 prev = global->ifaces; -  
388 if (prev == wpa_s) { -  
389 --- a/wpa_supplicant/wpa_supplicant_i.h -  
390 +++ b/wpa_supplicant/wpa_supplicant_i.h -  
391 @@ -17,6 +17,7 @@ -  
392 #include "wps/wps_defs.h" -  
393 #include "config_ssid.h" -  
394 #include "wmm_ac.h" -  
395 +#include "ubus.h" -  
396 -  
397 extern const char *const wpa_supplicant_version; -  
398 extern const char *const wpa_supplicant_license; -  
399 @@ -500,6 +501,7 @@ struct wpa_supplicant { -  
400 unsigned char own_addr[ETH_ALEN]; -  
401 unsigned char perm_addr[ETH_ALEN]; -  
402 char ifname[100]; -  
403 + struct wpas_ubus_bss ubus; -  
404 #ifdef CONFIG_MATCH_IFACE -  
405 int matched; -  
406 #endif /* CONFIG_MATCH_IFACE */ -  
407 --- a/wpa_supplicant/wps_supplicant.c -  
408 +++ b/wpa_supplicant/wps_supplicant.c -  
409 @@ -33,6 +33,7 @@ -  
410 #include "p2p/p2p.h" -  
411 #include "p2p_supplicant.h" -  
412 #include "wps_supplicant.h" -  
413 +#include "ubus.h" -  
414 -  
415 -  
416 #ifndef WPS_PIN_SCAN_IGNORE_SEL_REG -  
417 @@ -388,6 +389,8 @@ static int wpa_supplicant_wps_cred(void -  
418 wpa_hexdump_key(MSG_DEBUG, "WPS: Received Credential attribute", -  
419 cred->cred_attr, cred->cred_attr_len); -  
420 -  
421 + wpas_ubus_notify(wpa_s, cred); -  
422 + -  
423 if (wpa_s->conf->wps_cred_processing == 1) -