Skip to content

Commit

Permalink
mac80211: prevent tuning during scanning
Browse files Browse the repository at this point in the history
Postpone calling ieee80211_hw_config if hardware scanning is active.
This is similar to solution for software scanning where channel setting
is delayed until scan complete.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Mohamed Abbas authored and John W. Linville committed Mar 25, 2008
1 parent 85249e5 commit 675ef58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/ieee80211_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ int ieee80211_set_freq(struct ieee80211_local *local, int freqMHz)
if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
local->oper_channel = chan;

if (local->sta_sw_scanning)
if (local->sta_sw_scanning || local->sta_hw_scanning)
ret = 0;
else
ret = ieee80211_hw_config(local);
Expand Down
3 changes: 3 additions & 0 deletions net/mac80211/ieee80211_sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -3615,6 +3615,9 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)

if (local->sta_hw_scanning) {
local->sta_hw_scanning = 0;
if (ieee80211_hw_config(local))
printk(KERN_DEBUG "%s: failed to restore operational "
"channel after scan\n", dev->name);
/* Restart STA timer for HW scan case */
rcu_read_lock();
list_for_each_entry_rcu(sdata, &local->interfaces, list)
Expand Down

0 comments on commit 675ef58

Please sign in to comment.