mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
- Add support for multi-bss channel switch inside ubus switch_chan method - Fix hostapd crash occuring while sending channel switch event to cloud. - Fix memory leak. Signed-off-by: Yashvardhan <yashvardhan@netexperience.com>
25 lines
768 B
Diff
25 lines
768 B
Diff
--- a/src/ap/ubus.c
|
|
+++ b/src/ap/ubus.c
|
|
@@ -722,6 +722,7 @@ hostapd_switch_chan(struct ubus_context
|
|
struct blob_attr *tb[__CSA_MAX];
|
|
struct hostapd_data *hapd = get_hapd_from_object(obj);
|
|
struct csa_settings css;
|
|
+ int i;
|
|
|
|
blobmsg_parse(csa_policy, __CSA_MAX, tb, blob_data(msg), blob_len(msg));
|
|
|
|
@@ -746,9 +747,10 @@ hostapd_switch_chan(struct ubus_context
|
|
SET_CSA_SETTING(CSA_VHT, freq_params.vht_enabled, bool);
|
|
SET_CSA_SETTING(CSA_BLOCK_TX, block_tx, bool);
|
|
|
|
-
|
|
- if (hostapd_switch_channel(hapd, &css) != 0)
|
|
- return UBUS_STATUS_NOT_SUPPORTED;
|
|
+ for (i = 0; i < hapd->iface->num_bss; i++) {
|
|
+ if (hostapd_switch_channel(hapd->iface->bss[i], &css) != 0)
|
|
+ return UBUS_STATUS_NOT_SUPPORTED;
|
|
+ }
|
|
return UBUS_STATUS_OK;
|
|
#undef SET_CSA_SETTING
|
|
}
|