diff mbox

mac80211: fix an oops in ieee80211_scan_state_set_channel

Message ID 200907251725.52084.helmut.schaa@googlemail.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Helmut Schaa July 25, 2009, 3:25 p.m. UTC
Fix an oops in ieee80211_scan_state_set_channel which was triggered
if the last scanned channel was skipped (for example due to regulatory
restrictions) by returning to the decision state after each skipped
channel.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Larry Finger July 25, 2009, 4:17 p.m. UTC | #1
Helmut Schaa wrote:
> Fix an oops in ieee80211_scan_state_set_channel which was triggered
> if the last scanned channel was skipped (for example due to regulatory
> restrictions) by returning to the decision state after each skipped
> channel.
> 
> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
> ---

Better late than never, but this patch does fix the problem for me.

Larry

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index b376775..147772a 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -605,8 +605,11 @@  static void ieee80211_scan_state_set_channel(struct ieee80211_local *local,
        /* advance state machine to next channel/band */
        local->scan_channel_idx++;
 
-       if (skip)
+       if (skip) {
+               /* if we skip this channel return to the decision state */
+               local->next_scan_state = SCAN_DECISION;
                return;
+       }
 
        /*
         * Probe delay is used to update the NAV, cf. 11.1.3.2.2