diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-10-09 12:18:51 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-01 00:00:07 +0100 |
commit | e8975581f63870be42ff4662b293d1b0c8c21350 (patch) | |
tree | 3d0d67e73d009ea6480b459585c0a70fc35fa9da /net/mac80211/scan.c | |
parent | mac80211: kill hw.conf.antenna_sel_{rx,tx} (diff) | |
download | linux-e8975581f63870be42ff4662b293d1b0c8c21350.tar.xz linux-e8975581f63870be42ff4662b293d1b0c8c21350.zip |
mac80211: introduce hw config change flags
This makes mac80211 notify the driver which configuration
actually changed, e.g. channel etc.
No driver changes, this is just plumbing, driver authors are
expected to act on this if they want to.
Also remove the HW CONFIG debug printk, it's incorrect, often
we configure something else.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 0989b1c062e3..7372d7abb8c0 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -448,12 +448,17 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw) if (local->hw_scanning) { local->hw_scanning = false; - ieee80211_hw_config(local); + /* + * Somebody might have requested channel change during scan + * that we won't have acted upon, try now. ieee80211_hw_config + * will set the flag based on actual changes. + */ + ieee80211_hw_config(local, 0); goto done; } local->sw_scanning = false; - ieee80211_hw_config(local); + ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); netif_tx_lock_bh(local->mdev); netif_addr_lock(local->mdev); @@ -540,7 +545,8 @@ void ieee80211_scan_work(struct work_struct *work) if (!skip) { local->scan_channel = chan; - if (ieee80211_hw_config(local)) + if (ieee80211_hw_config(local, + IEEE80211_CONF_CHANGE_CHANNEL)) skip = 1; } |