Search Linux Wireless

[PATCH 15/17] iwlwifi: fix scaing watchdog time out

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

 



Fix the scan watchdog time out when we associated to non-exist
network. Basically if we issue:

    $ iwconfig wlan0 ap xx:xx:xx:xx:xx:xx

and the mac address is a non-exist AP then we scan. We get scan
watchdog timeout and restart.

Signed-off-by: Mohamed Abbas <mabbas@xxxxxxxxxxxxxxx>
Signed-off-by: Zhu Yi <yi.zhu@xxxxxxxxx>
---
 drivers/net/wireless/iwl-base.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/iwl-base.c b/drivers/net/wireless/iwl-base.c
index c28a56a..8558ea8 100644
--- a/drivers/net/wireless/iwl-base.c
+++ b/drivers/net/wireless/iwl-base.c
@@ -7018,26 +7018,26 @@ static void iwl_bg_request_scan(struct work_struct *data)
 
 		scan->suspend_time = 0;
 		scan->max_out_time = 600 * 1024;
-		if (interval) {
+		if (!interval)
+			interval = suspend_time;
 #if IWL == 3945
-			/*
-			 * suspend time format:
-			 *  0-19: beacon interval in usec (time before exec.)
-			 * 20-23: 0
-			 * 24-31: number of beacons (suspend between channels)
-			 */
+		/*
+		 * suspend time format:
+		 *  0-19: beacon interval in usec (time before exec.)
+		 * 20-23: 0
+		 * 24-31: number of beacons (suspend between channels)
+		 */
 
-			extra = (suspend_time / interval) << 24;
-			scan->suspend_time = 0xFF0FFFFF &
-			    (extra | ((suspend_time % interval) * 1024));
+		extra = (suspend_time / interval) << 24;
+		scan->suspend_time = 0xFF0FFFFF &
+		    (extra | ((suspend_time % interval) * 1024));
 #else
-			extra = (suspend_time / interval) << 22;
-			scan->suspend_time = (extra |
-			    ((suspend_time % interval) * 1024));
-			IWL_DEBUG_SCAN("suspend_time 0x%X beacon interval %d\n",
-				       scan->suspend_time, interval);
+		extra = (suspend_time / interval) << 22;
+		scan->suspend_time = (extra |
+		    ((suspend_time % interval) * 1024));
+		IWL_DEBUG_SCAN("suspend_time 0x%X beacon interval %d\n",
+			       scan->suspend_time, interval);
 #endif
-		}
 	}
 
 	/* We should add the ability for user to lock to PASSIVE ONLY */
-- 
1.5.2
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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