From: Helmut Schaa Date: Sat, 25 Jul 2009 15:25:51 +0000 (+0200) Subject: mac80211: fix an oops in ieee80211_scan_state_set_channel X-Git-Tag: v2.6.32-rc1~703^2~506^2~9 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=0ee9c13c7c92581ab005d80795cf65897213b249;p=~shefty%2Frdma-dev.git mac80211: fix an oops in ieee80211_scan_state_set_channel 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 Signed-off-by: John W. Linville --- diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index b376775e722..147772a2977 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