[PATCH v2] AP: Allow downgrading to 20MHz based on OBSS results

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

 



Before operating on 40MHz in 2.4GHz, AP looks for overlapping
BSS in neighboring channels. Upon OBSS detection, AP should
downgrade to 20MHz bandwidth. This decistion is broken now
for HE40. As of now ieee80211n_check_scan skips the rollback
step for 20MHz as allowed_ht40_channel_pair returns true
when primary and secondary channels are same. Fix that.

Signed-off-by: Aloka Dixit <alokad@xxxxxxxxxxxxxx>
---
 src/ap/hw_features.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
index 83aecade3bc3..142c4e442f4e 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -314,7 +314,7 @@ static void ieee80211n_check_scan(struct hostapd_iface *iface)
 {
 	struct wpa_scan_results *scan_res;
 	int oper40;
-	int res;
+	int res = 0;
 
 	/* Check list of neighboring BSSes (from scan) to see whether 40 MHz is
 	 * allowed per IEEE Std 802.11-2012, 10.15.3.2 */
@@ -350,7 +350,9 @@ static void ieee80211n_check_scan(struct hostapd_iface *iface)
 		}
 	}
 
-	res = ieee80211n_allowed_ht40_channel_pair(iface);
+	if (iface->conf->secondary_channel)
+		res = ieee80211n_allowed_ht40_channel_pair(iface);
+
 	if (!res) {
 		iface->conf->secondary_channel = 0;
 		hostapd_set_oper_centr_freq_seg0_idx(iface->conf, 0);
-- 
2.7.4

_______________________________________________
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