Search Linux Wireless

[PATCH] wcn36xx: Set sw-scan chan to 0 when not associated

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

 



A patch in ath/pending rewrites the software scan for the wcn36xx to
accommodate multiplexing with data, link monitoring and so on.

However if a device disassociates from an AP then the last operating
channel will not be re-scanned.

After some discussion and testing on this topic

https://www.spinics.net/lists/linux-wireless/msg201242.html
https://www.spinics.net/lists/linux-wireless/msg201254.html

this patch implements a relatively simple fix. It sets the initial software
scan channel to 0 if we are not associated with an AP or to the current
operating channel if we are assciated with an AP.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
---
 drivers/net/wireless/ath/wcn36xx/main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index fb8978a3c11e..87fdc073c957 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -697,10 +697,14 @@ static void wcn36xx_sw_scan_start(struct ieee80211_hw *hw,
 				  const u8 *mac_addr)
 {
 	struct wcn36xx *wcn = hw->priv;
+	struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
 
 	wcn->sw_scan = true;
 	wcn->sw_scan_vif = vif;
-	wcn->sw_scan_opchannel = WCN36XX_HW_CHANNEL(wcn);
+	if (vif_priv->sta_assoc)
+		wcn->sw_scan_opchannel = WCN36XX_HW_CHANNEL(wcn);
+	else
+		wcn->sw_scan_opchannel = 0;
 }
 
 static void wcn36xx_sw_scan_complete(struct ieee80211_hw *hw,
-- 
2.27.0




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux