提交 675ef586 编写于 作者: M Mohamed Abbas 提交者: John W. Linville

mac80211: prevent tuning during scanning

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: NMohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
Acked-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 85249e5f
...@@ -287,7 +287,7 @@ int ieee80211_set_freq(struct ieee80211_local *local, int freqMHz) ...@@ -287,7 +287,7 @@ int ieee80211_set_freq(struct ieee80211_local *local, int freqMHz)
if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) { if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
local->oper_channel = chan; local->oper_channel = chan;
if (local->sta_sw_scanning) if (local->sta_sw_scanning || local->sta_hw_scanning)
ret = 0; ret = 0;
else else
ret = ieee80211_hw_config(local); ret = ieee80211_hw_config(local);
......
...@@ -3615,6 +3615,9 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw) ...@@ -3615,6 +3615,9 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
if (local->sta_hw_scanning) { if (local->sta_hw_scanning) {
local->sta_hw_scanning = 0; 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 */ /* Restart STA timer for HW scan case */
rcu_read_lock(); rcu_read_lock();
list_for_each_entry_rcu(sdata, &local->interfaces, list) list_for_each_entry_rcu(sdata, &local->interfaces, list)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册