Files
wlan-ap/feeds/wifi-ax/hostapd/patches/f00-011-ubus-multi-bss-chan-switch.patch
Yashvardhan 8b5e2058f3 wifi-1727: hostapd: Fix RRM channel switch issues
- 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>
2021-04-25 14:27:41 -04:00

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
}