Files
wlan-ap/feeds/wifi-trunk/hostapd/patches/902-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

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);