Search Linux Wireless

[PATCH] wcn36xx: Ensure software scans scan on operational channel

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

 



We need to ensure that the operational channel is scanned, because if the
AP deauthenticates us for whatever reason, subsequent scans will not work.

This fixes an issue I'm seeing on wcn3680 where my AP de-authenticates my
device but on a subsequent scan of available channels the channel we were
initially connected to fails to show up. In this case I either need to
shift the AP to another channel or reboot the device.

Ensuring the operational channel is scanned means we can never get into
that situation.

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

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index fb8978a3c11e..51fed732328e 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -416,17 +416,10 @@ static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed)
 		wcn36xx_dbg(WCN36XX_DBG_MAC, "wcn36xx_config channel switch=%d\n",
 			    ch);
 
-		if (wcn->sw_scan_opchannel == ch) {
-			/* If channel is the initial operating channel, we may
-			 * want to receive/transmit regular data packets, then
-			 * simply stop the scan session and exit PS mode.
-			 */
-			wcn36xx_smd_finish_scan(wcn, HAL_SYS_MODE_SCAN,
-						wcn->sw_scan_vif, ch);
-		} else if (wcn->sw_scan) {
-			/* A scan is ongoing, do not change the operating
-			 * channel, but start a scan session on the channel.
-			 */
+		if (wcn->sw_scan) {
+			if (wcn->sw_scan_opchannel != ch)
+				wcn36xx_change_opchannel(wcn, ch);
+
 			wcn36xx_smd_init_scan(wcn, HAL_SYS_MODE_SCAN,
 					      wcn->sw_scan_vif);
 			wcn36xx_smd_start_scan(wcn, ch);
-- 
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