[PATCH] CSA MBSS: CHAN_SWITCH is always failing.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When asking hostapd to switch channel in the multi-BSS configuration,
only the first (associated to the first BSS) request is executed
correctly by some driver, other BSS's request are failing.
This is because multi-BSS configuration is using same Radio and one
request seems to be suffisant to driver to switch on.

Solution in here is to return SUCCESS if there was at least one BSS
switched OK.

Signed-off-by: Baligh Gasmi <gasmibal@xxxxxxxxx>
---
 hostapd/ctrl_iface.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index f90eb22c4..cf3d65172 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -2694,6 +2694,8 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
 		return 0;
 	}
 
+	int one_success = 0;
+	int last_fail = ret;
 	for (i = 0; i < iface->num_bss; i++) {
 
 		/* Save CHAN_SWITCH VHT, HE, and EHT config */
@@ -2704,11 +2706,13 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
 		if (ret) {
 			/* FIX: What do we do if CSA fails in the middle of
 			 * submitting multi-BSS CSA requests? */
-			return ret;
+			last_fail = ret;
+		} else {
+			one_success = 1;
 		}
 	}
 
-	return 0;
+	return one_success ? 0 : last_fail;
 #else /* NEED_AP_MLME */
 	return -1;
 #endif /* NEED_AP_MLME */
-- 
2.39.2


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux