1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Fri, 26 May 2023 10:23:59 +0200
3 Subject: [PATCH] Add ucode support, use ucode for the main ubus object
5 This implements vastly improved dynamic configuration reload support.
6 It can handle configuration changes on individual wifi interfaces, as well
7 as adding/removing interfaces.
10 +++ b/hostapd/Makefile
11 @@ -169,9 +169,21 @@ OBJS += ../src/eapol_auth/eapol_auth_sm.
14 CFLAGS += -DUBUS_SUPPORT
15 -OBJS += ../src/utils/uloop.o
16 OBJS += ../src/ap/ubus.o
17 -LIBS += -lubox -lubus
23 +CFLAGS += -DUCODE_SUPPORT
24 +OBJS += ../src/utils/ucode.o
25 +OBJS += ../src/ap/ucode.o
30 +OBJS += ../src/utils/uloop.o
34 ifdef CONFIG_CODE_COVERAGE
35 --- a/hostapd/ctrl_iface.c
36 +++ b/hostapd/ctrl_iface.c
37 @@ -5490,6 +5490,7 @@ try_again:
41 + interface->ctrl_iface_recv = hostapd_ctrl_iface_receive_process;
42 wpa_msg_register_cb(hostapd_ctrl_iface_msg_cb);
45 @@ -5591,6 +5592,7 @@ fail:
48 interface->global_ctrl_sock = s;
49 + interface->ctrl_iface_recv = hostapd_ctrl_iface_receive_process;
50 eloop_register_read_sock(s, hostapd_global_ctrl_iface_receive,
55 @@ -1024,6 +1024,7 @@ int main(int argc, char *argv[])
58 hostapd_global_ctrl_iface_init(&interfaces);
59 + hostapd_ucode_init(&interfaces);
61 if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
62 wpa_printf(MSG_ERROR, "Failed to start eloop");
63 @@ -1033,6 +1034,7 @@ int main(int argc, char *argv[])
67 + hostapd_ucode_free();
68 hostapd_global_ctrl_iface_deinit(&interfaces);
69 /* Deinitialize all interfaces */
70 for (i = 0; i < interfaces.count; i++) {
71 --- a/src/ap/ap_drv_ops.h
72 +++ b/src/ap/ap_drv_ops.h
73 @@ -404,6 +404,23 @@ static inline int hostapd_drv_stop_ap(st
74 return hapd->driver->stop_ap(hapd->drv_priv, link_id);
77 +static inline int hostapd_drv_if_rename(struct hostapd_data *hapd,
78 + enum wpa_driver_if_type type,
80 + const char *new_name)
82 + if (!hapd->driver || !hapd->driver->if_rename || !hapd->drv_priv)
84 + return hapd->driver->if_rename(hapd->drv_priv, type, ifname, new_name);
87 +static inline int hostapd_drv_set_first_bss(struct hostapd_data *hapd)
89 + if (!hapd->driver || !hapd->driver->set_first_bss || !hapd->drv_priv)
91 + return hapd->driver->set_first_bss(hapd->drv_priv);
94 static inline int hostapd_drv_channel_info(struct hostapd_data *hapd,
95 struct wpa_channel_info *ci)
97 --- a/src/ap/hostapd.c
98 +++ b/src/ap/hostapd.c
99 @@ -255,6 +255,8 @@ int hostapd_reload_config(struct hostapd
100 struct hostapd_config *newconf, *oldconf;
103 + hostapd_ucode_reload_bss(hapd);
105 if (iface->config_fname == NULL) {
106 /* Only in-memory config in use - assume it has been updated */
107 hostapd_clear_old(iface);
108 @@ -475,6 +477,7 @@ void hostapd_free_hapd_data(struct hosta
109 hapd->beacon_set_done = 0;
111 wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
112 + hostapd_ucode_free_bss(hapd);
113 hostapd_ubus_free_bss(hapd);
114 accounting_deinit(hapd);
115 hostapd_deinit_wpa(hapd);
116 @@ -716,6 +719,7 @@ void hostapd_cleanup_iface_partial(struc
117 static void hostapd_cleanup_iface(struct hostapd_iface *iface)
119 wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
120 + hostapd_ucode_free_iface(iface);
121 eloop_cancel_timeout(hostapd_interface_setup_failure_handler, iface,
124 @@ -1305,6 +1309,7 @@ static int hostapd_start_beacon(struct h
125 hapd->driver->set_operstate(hapd->drv_priv, 1);
127 hostapd_ubus_add_bss(hapd);
128 + hostapd_ucode_add_bss(hapd);
132 @@ -1327,8 +1332,7 @@ static int hostapd_start_beacon(struct h
133 * initialized. Most of the modules that are initialized here will be
134 * deinitialized in hostapd_cleanup().
136 -static int hostapd_setup_bss(struct hostapd_data *hapd, int first,
138 +int hostapd_setup_bss(struct hostapd_data *hapd, int first, bool start_beacon)
140 struct hostapd_bss_config *conf = hapd->conf;
141 u8 ssid[SSID_MAX_LEN + 1];
142 @@ -2871,7 +2875,7 @@ hostapd_alloc_bss_data(struct hostapd_if
146 -static void hostapd_bss_deinit(struct hostapd_data *hapd)
147 +void hostapd_bss_deinit(struct hostapd_data *hapd)
151 @@ -3920,7 +3924,8 @@ int hostapd_remove_iface(struct hapd_int
152 hapd_iface = interfaces->iface[i];
153 if (hapd_iface == NULL)
155 - if (!os_strcmp(hapd_iface->conf->bss[0]->iface, buf)) {
156 + if (!os_strcmp(hapd_iface->phy, buf) ||
157 + !os_strcmp(hapd_iface->conf->bss[0]->iface, buf)) {
158 wpa_printf(MSG_INFO, "Remove interface '%s'", buf);
159 hapd_iface->driver_ap_teardown =
160 !!(hapd_iface->drv_flags &
161 --- a/src/ap/hostapd.h
162 +++ b/src/ap/hostapd.h
164 #include "ap_config.h"
165 #include "drivers/driver.h"
169 #define OCE_STA_CFON_ENABLED(hapd) \
170 ((hapd->conf->oce & OCE_STA_CFON) && \
171 @@ -52,6 +53,10 @@ struct hapd_interfaces {
172 struct hostapd_config * (*config_read_cb)(const char *config_fname);
173 int (*ctrl_iface_init)(struct hostapd_data *hapd);
174 void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
175 + int (*ctrl_iface_recv)(struct hostapd_data *hapd,
176 + char *buf, char *reply, int reply_size,
177 + struct sockaddr_storage *from,
178 + socklen_t fromlen);
179 int (*for_each_interface)(struct hapd_interfaces *interfaces,
180 int (*cb)(struct hostapd_iface *iface,
181 void *ctx), void *ctx);
182 @@ -191,6 +196,7 @@ struct hostapd_data {
183 struct hostapd_config *iconf;
184 struct hostapd_bss_config *conf;
185 struct hostapd_ubus_bss ubus;
186 + struct hostapd_ucode_bss ucode;
187 int interface_added; /* virtual interface added for this BSS */
188 unsigned int started:1;
189 unsigned int disabled:1;
190 @@ -548,6 +554,7 @@ struct hostapd_mld {
192 struct hostapd_iface {
193 struct hapd_interfaces *interfaces;
194 + struct hostapd_ucode_iface ucode;
197 struct hostapd_config *conf;
198 @@ -753,6 +760,8 @@ struct hostapd_iface * hostapd_init(stru
199 struct hostapd_iface *
200 hostapd_interface_init_bss(struct hapd_interfaces *interfaces, const char *phy,
201 const char *config_fname, int debug);
202 +int hostapd_setup_bss(struct hostapd_data *hapd, int first, bool start_beacon);
203 +void hostapd_bss_deinit(struct hostapd_data *hapd);
204 void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
206 void hostapd_interface_deinit_free(struct hostapd_iface *iface);
207 --- a/src/drivers/driver.h
208 +++ b/src/drivers/driver.h
209 @@ -3890,6 +3890,25 @@ struct wpa_driver_ops {
213 + * if_rename - Rename a virtual interface
214 + * @priv: Private driver interface data
215 + * @type: Interface type
216 + * @ifname: Interface name of the virtual interface to be renamed
217 + * (NULL when renaming the AP BSS interface)
218 + * @new_name: New interface name of the virtual interface
219 + * Returns: 0 on success, -1 on failure
221 + int (*if_rename)(void *priv, enum wpa_driver_if_type type,
222 + const char *ifname, const char *new_name);
225 + * set_first_bss - Make a virtual interface the first (primary) bss
226 + * @priv: Private driver interface data
227 + * Returns: 0 on success, -1 on failure
229 + int (*set_first_bss)(void *priv);
232 * set_sta_vlan - Bind a station into a specific interface (AP only)
233 * @priv: Private driver interface data
234 * @ifname: Interface (main or virtual BSS or VLAN)
235 @@ -6590,6 +6609,7 @@ union wpa_event_data {
239 + * @count: Count until channel switch activates
240 * @freq: Frequency of new channel in MHz
241 * @ht_enabled: Whether this is an HT channel
242 * @ch_offset: Secondary channel offset
243 @@ -6600,6 +6620,7 @@ union wpa_event_data {
244 * @punct_bitmap: Puncturing bitmap
251 --- a/src/drivers/driver_nl80211.c
252 +++ b/src/drivers/driver_nl80211.c
253 @@ -75,6 +75,16 @@ enum nlmsgerr_attrs {
257 +static void handle_nl_debug_hook(struct nl_msg *msg, int tx)
259 + const struct nlmsghdr *nlh;
261 + if (!wpa_netlink_hook)
264 + nlh = nlmsg_hdr(msg);
265 + wpa_netlink_hook(tx, nlh, nlh->nlmsg_len);
268 static struct nl_sock * nl_create_handle(struct nl_cb *cb, const char *dbg)
270 @@ -429,6 +439,11 @@ static int no_seq_check(struct nl_msg *m
274 +static int debug_handler(struct nl_msg *msg, void *arg)
276 + handle_nl_debug_hook(msg, 0);
280 static void nl80211_nlmsg_clear(struct nl_msg *msg)
282 @@ -502,6 +517,8 @@ int send_and_recv(struct nl80211_global
286 + handle_nl_debug_hook(msg, 1);
290 s_nl_cb = nl_socket_get_cb(nl_handle);
291 @@ -536,6 +553,7 @@ int send_and_recv(struct nl80211_global
293 err.err_info = err_info;
295 + nl_cb_set(cb, NL_CB_MSG_IN, NL_CB_CUSTOM, debug_handler, NULL);
296 nl_cb_err(cb, NL_CB_CUSTOM, error_handler, &err);
297 nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, finish_handler, &err.err);
298 if (ack_handler_custom) {
299 @@ -939,6 +957,7 @@ nl80211_get_wiphy_data_ap(struct i802_bs
303 + nl_cb_set(w->nl_cb, NL_CB_MSG_IN, NL_CB_CUSTOM, debug_handler, NULL);
304 nl_cb_set(w->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM,
306 nl_cb_set(w->nl_cb, NL_CB_VALID, NL_CB_CUSTOM,
307 @@ -1353,7 +1372,7 @@ static void wpa_driver_nl80211_event_rtm
309 wpa_printf(MSG_DEBUG, "nl80211: Interface down (%s/%s)",
311 - if (os_strcmp(drv->first_bss->ifname, ifname) != 0) {
312 + if (drv->first_bss->ifindex != ifi->ifi_index) {
313 wpa_printf(MSG_DEBUG,
314 "nl80211: Not the main interface (%s) - do not indicate interface down",
315 drv->first_bss->ifname);
316 @@ -1389,7 +1408,7 @@ static void wpa_driver_nl80211_event_rtm
318 wpa_printf(MSG_DEBUG, "nl80211: Interface up (%s/%s)",
320 - if (os_strcmp(drv->first_bss->ifname, ifname) != 0) {
321 + if (drv->first_bss->ifindex != ifi->ifi_index) {
322 wpa_printf(MSG_DEBUG,
323 "nl80211: Not the main interface (%s) - do not indicate interface up",
324 drv->first_bss->ifname);
325 @@ -2035,6 +2054,7 @@ static int wpa_driver_nl80211_init_nl_gl
326 genl_family_put(family);
327 nl_cache_free(cache);
329 + nl_cb_set(global->nl_cb, NL_CB_MSG_IN, NL_CB_CUSTOM, debug_handler, NULL);
330 nl_cb_set(global->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM,
332 nl_cb_set(global->nl_cb, NL_CB_VALID, NL_CB_CUSTOM,
333 @@ -2205,6 +2225,7 @@ static int nl80211_init_bss(struct i802_
337 + nl_cb_set(bss->nl_cb, NL_CB_MSG_IN, NL_CB_CUSTOM, debug_handler, NULL);
338 nl_cb_set(bss->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM,
340 nl_cb_set(bss->nl_cb, NL_CB_VALID, NL_CB_CUSTOM,
341 @@ -8561,6 +8582,7 @@ static void *i802_init(struct hostapd_da
342 char master_ifname[IFNAMSIZ];
343 int ifindex, br_ifindex = 0;
347 bss = wpa_driver_nl80211_drv_init(hapd, params->ifname,
348 params->global_priv, 1,
349 @@ -8620,21 +8642,17 @@ static void *i802_init(struct hostapd_da
350 (params->num_bridge == 0 || !params->bridge[0]))
351 add_ifidx(drv, br_ifindex, drv->ifindex);
353 - if (bss->added_if_into_bridge || bss->already_in_bridge) {
356 - drv->rtnl_sk = nl_socket_alloc();
357 - if (drv->rtnl_sk == NULL) {
358 - wpa_printf(MSG_ERROR, "nl80211: Failed to allocate nl_sock");
361 + drv->rtnl_sk = nl_socket_alloc();
362 + if (drv->rtnl_sk == NULL) {
363 + wpa_printf(MSG_ERROR, "nl80211: Failed to allocate nl_sock");
367 - err = nl_connect(drv->rtnl_sk, NETLINK_ROUTE);
369 - wpa_printf(MSG_ERROR, "nl80211: Failed to connect nl_sock to NETLINK_ROUTE: %s",
373 + err = nl_connect(drv->rtnl_sk, NETLINK_ROUTE);
375 + wpa_printf(MSG_ERROR, "nl80211: Failed to connect nl_sock to NETLINK_ROUTE: %s",
380 if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
381 @@ -9003,6 +9021,50 @@ static int wpa_driver_nl80211_if_remove(
385 +static int wpa_driver_nl80211_if_rename(struct i802_bss *bss,
386 + enum wpa_driver_if_type type,
387 + const char *ifname, const char *new_name)
389 + struct wpa_driver_nl80211_data *drv = bss->drv;
390 + struct ifinfomsg ifi = {
391 + .ifi_family = AF_UNSPEC,
392 + .ifi_index = bss->ifindex,
394 + struct nl_msg *msg;
398 + ifi.ifi_index = if_nametoindex(ifname);
400 + msg = nlmsg_alloc_simple(RTM_SETLINK, 0);
404 + if (nlmsg_append(msg, &ifi, sizeof(ifi), NLMSG_ALIGNTO) < 0)
407 + if (nla_put_string(msg, IFLA_IFNAME, new_name))
410 + res = nl_send_auto_complete(drv->rtnl_sk, msg);
414 + res = nl_wait_for_ack(drv->rtnl_sk);
416 + wpa_printf(MSG_INFO,
417 + "nl80211: Renaming device %s to %s failed: %s",
418 + ifname ? ifname : bss->ifname, new_name, nl_geterror(res));
422 + if (type == WPA_IF_AP_BSS && !ifname)
423 + os_strlcpy(bss->ifname, new_name, sizeof(bss->ifname));
430 static int cookie_handler(struct nl_msg *msg, void *arg)
432 @@ -10786,6 +10848,37 @@ static bool nl80211_is_drv_shared(void *
433 #endif /* CONFIG_IEEE80211BE */
436 +static int driver_nl80211_if_rename(void *priv, enum wpa_driver_if_type type,
437 + const char *ifname, const char *new_name)
439 + struct i802_bss *bss = priv;
440 + return wpa_driver_nl80211_if_rename(bss, type, ifname, new_name);
444 +static int driver_nl80211_set_first_bss(void *priv)
446 + struct i802_bss *bss = priv, *tbss;
447 + struct wpa_driver_nl80211_data *drv = bss->drv;
449 + if (drv->first_bss == bss)
452 + for (tbss = drv->first_bss; tbss; tbss = tbss->next) {
453 + if (tbss->next != bss)
456 + tbss->next = bss->next;
457 + bss->next = drv->first_bss;
458 + drv->first_bss = bss;
459 + drv->ctx = bss->ctx;
467 static int driver_nl80211_send_mlme(void *priv, const u8 *data,
468 size_t data_len, int noack,
470 @@ -14009,6 +14102,8 @@ const struct wpa_driver_ops wpa_driver_n
471 .set_acl = wpa_driver_nl80211_set_acl,
472 .if_add = wpa_driver_nl80211_if_add,
473 .if_remove = driver_nl80211_if_remove,
474 + .if_rename = driver_nl80211_if_rename,
475 + .set_first_bss = driver_nl80211_set_first_bss,
476 .send_mlme = driver_nl80211_send_mlme,
477 .get_hw_feature_data = nl80211_get_hw_feature_data,
478 .sta_add = wpa_driver_nl80211_sta_add,
479 --- a/src/drivers/driver_nl80211_event.c
480 +++ b/src/drivers/driver_nl80211_event.c
481 @@ -1196,6 +1196,7 @@ static void mlme_event_ch_switch(struct
482 struct nlattr *bw, struct nlattr *cf1,
484 struct nlattr *punct_bitmap,
485 + struct nlattr *count,
488 struct i802_bss *bss;
489 @@ -1259,6 +1260,8 @@ static void mlme_event_ch_switch(struct
490 data.ch_switch.cf1 = nla_get_u32(cf1);
492 data.ch_switch.cf2 = nla_get_u32(cf2);
494 + data.ch_switch.count = nla_get_u32(count);
497 data.ch_switch.link_id = nla_get_u8(link);
498 @@ -3985,6 +3988,7 @@ static void do_process_drv_event(struct
499 tb[NL80211_ATTR_CENTER_FREQ1],
500 tb[NL80211_ATTR_CENTER_FREQ2],
501 tb[NL80211_ATTR_PUNCT_BITMAP],
502 + tb[NL80211_ATTR_CH_SWITCH_COUNT],
505 case NL80211_CMD_CH_SWITCH_NOTIFY:
506 @@ -3997,6 +4001,7 @@ static void do_process_drv_event(struct
507 tb[NL80211_ATTR_CENTER_FREQ1],
508 tb[NL80211_ATTR_CENTER_FREQ2],
509 tb[NL80211_ATTR_PUNCT_BITMAP],
513 case NL80211_CMD_DISCONNECT:
514 --- a/src/utils/wpa_debug.c
515 +++ b/src/utils/wpa_debug.c
516 @@ -26,6 +26,10 @@ static FILE *wpa_debug_tracing_file = NU
517 #define WPAS_TRACE_PFX "wpas <%d>: "
518 #endif /* CONFIG_DEBUG_LINUX_TRACING */
520 +void (*wpa_printf_hook)(int level, const char *fmt, va_list ap);
521 +void (*wpa_hexdump_hook)(int level, const char *title, const void *buf,
523 +void (*wpa_netlink_hook)(int tx, const void *data, size_t len);
525 int wpa_debug_level = MSG_INFO;
526 int wpa_debug_show_keys = 0;
527 @@ -210,6 +214,12 @@ void _wpa_printf(int level, const char *
531 + if (wpa_printf_hook) {
533 + wpa_printf_hook(level, fmt, ap);
537 if (level >= wpa_debug_level) {
538 #ifdef CONFIG_ANDROID_LOG
540 @@ -260,6 +270,9 @@ void _wpa_hexdump(int level, const char
544 + if (wpa_hexdump_hook)
545 + wpa_hexdump_hook(level, title, buf, len);
547 #ifdef CONFIG_DEBUG_LINUX_TRACING
548 if (wpa_debug_tracing_file != NULL) {
549 fprintf(wpa_debug_tracing_file,
550 --- a/src/utils/wpa_debug.h
551 +++ b/src/utils/wpa_debug.h
556 +extern void (*wpa_printf_hook)(int level, const char *fmt, va_list ap);
557 +extern void (*wpa_hexdump_hook)(int level, const char *title,
558 + const void *buf, size_t len);
559 +extern void (*wpa_netlink_hook)(int tx, const void *data, size_t len);
560 extern int wpa_debug_level;
561 extern int wpa_debug_show_keys;
562 extern int wpa_debug_timestamp;
563 --- a/wpa_supplicant/Makefile
564 +++ b/wpa_supplicant/Makefile
565 @@ -194,8 +194,20 @@ endif
567 CFLAGS += -DUBUS_SUPPORT
574 +CFLAGS += -DUCODE_SUPPORT
575 +OBJS += ../src/utils/ucode.o
581 OBJS += ../src/utils/uloop.o
582 -LIBS += -lubox -lubus
586 ifdef CONFIG_CODE_COVERAGE
587 @@ -1053,6 +1065,9 @@ OBJS += ../src/ap/ctrl_iface_ap.o
589 OBJS += ../src/ap/ubus.o
592 +OBJS += ../src/ap/ucode.o
596 CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
597 --- a/wpa_supplicant/events.c
598 +++ b/wpa_supplicant/events.c
599 @@ -5965,6 +5965,7 @@ void supplicant_event(void *ctx, enum wp
600 event_to_string(event), event);
601 #endif /* CONFIG_NO_STDOUT_DEBUG */
603 + wpas_ucode_event(wpa_s, event, data);
607 --- a/wpa_supplicant/wpa_supplicant.c
608 +++ b/wpa_supplicant/wpa_supplicant.c
609 @@ -1060,6 +1060,7 @@ void wpa_supplicant_set_state(struct wpa
610 sme_sched_obss_scan(wpa_s, 0);
612 wpa_s->wpa_state = state;
613 + wpas_ucode_update_state(wpa_s);
616 if (state == WPA_COMPLETED && wpa_s->current_ssid != wpa_s->bgscan_ssid)
617 @@ -7730,6 +7731,7 @@ struct wpa_supplicant * wpa_supplicant_a
618 #endif /* CONFIG_P2P */
620 wpas_ubus_add_bss(wpa_s);
621 + wpas_ucode_add_bss(wpa_s);
625 @@ -7757,6 +7759,7 @@ int wpa_supplicant_remove_iface(struct w
626 struct wpa_supplicant *parent = wpa_s->parent;
627 #endif /* CONFIG_MESH */
629 + wpas_ucode_free_bss(wpa_s);
630 wpas_ubus_free_bss(wpa_s);
632 /* Remove interface from the global list of interfaces */
633 @@ -8067,6 +8070,7 @@ struct wpa_global * wpa_supplicant_init(
635 eloop_register_timeout(WPA_SUPPLICANT_CLEANUP_INTERVAL, 0,
636 wpas_periodic, global, NULL);
637 + wpas_ucode_init(global);
641 @@ -8105,12 +8109,8 @@ int wpa_supplicant_run(struct wpa_global
642 eloop_register_signal_terminate(wpa_supplicant_terminate, global);
643 eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
645 - wpas_ubus_add(global);
649 - wpas_ubus_free(global);
654 @@ -8143,6 +8143,8 @@ void wpa_supplicant_deinit(struct wpa_gl
656 wpas_notify_supplicant_deinitialized(global);
660 eap_peer_unregister_methods();
662 eap_server_unregister_methods();
663 --- a/wpa_supplicant/wpa_supplicant_i.h
664 +++ b/wpa_supplicant/wpa_supplicant_i.h
667 #include "pasn/pasn_common.h"
671 extern const char *const wpa_supplicant_version;
672 extern const char *const wpa_supplicant_license;
673 @@ -697,6 +698,7 @@ struct wpa_supplicant {
674 unsigned char perm_addr[ETH_ALEN];
676 struct wpas_ubus_bss ubus;
677 + struct wpas_ucode_bss ucode;
678 #ifdef CONFIG_MATCH_IFACE
680 #endif /* CONFIG_MATCH_IFACE */