Skip to content

Commit

Permalink
mac80211: fix an oops in ieee80211_scan_state_set_channel
Browse files Browse the repository at this point in the history
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Helmut Schaa authored and John W. Linville committed Jul 29, 2009
1 parent c0b2bbd commit 0ee9c13
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/mac80211/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0ee9c13

Please sign in to comment.