mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 01:52:51 +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>
24 lines
772 B
Diff
24 lines
772 B
Diff
--- a/src/ap/ubus.c
|
|
+++ b/src/ap/ubus.c
|
|
@@ -762,6 +762,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));
|
|
|
|
@@ -787,8 +788,10 @@ hostapd_switch_chan(struct ubus_context
|
|
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;
|
|
+ }
|
|
|
|
hostapd_ubus_handle_channel_switch_event(hapd->iface,HOSTAPD_UBUS_HIGH_INTERFERENCE, css.freq_params.freq);
|
|
|