mac80211: fix scan state machine
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Sat, 24 Dec 2011 13:13:28 +0000 (18:43 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 4 Jan 2012 19:30:46 +0000 (14:30 -0500)
when we run high bandwidth UDP traffic and we trigger a scan, the scan
state machine seems to be looping in SUSPEND->RESUME->DECISION->SUSPEND
and SET_CHANNEL seems to be never called as 'tx_empty' is never true
while running UDP traffic. fix this by settting SET_CHANNEL state when
we get into RESUME state.

Cc: Leela Kella <leela@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/scan.c

index 2c5041cc71f81556dbbb970355def8f546d52542..2908e56eaa9d9b329b3894d71c378088b9397b08 100644 (file)
@@ -625,7 +625,7 @@ static void ieee80211_scan_state_resume(struct ieee80211_local *local,
        local->leave_oper_channel_time = jiffies;
 
        /* advance to the next channel to be scanned */
-       local->next_scan_state = SCAN_DECISION;
+       local->next_scan_state = SCAN_SET_CHANNEL;
 }
 
 void ieee80211_scan_work(struct work_struct *work)