summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-07-28 04:40:49 +0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-29 00:24:02 +0400
commit4552124543141debf40a94b67155e57aa6bb34d6 (patch)
treec2080f8be1a08c92a40bb05464800c05d4806152 /net
parenta0daa0e7592ada797d6835f11529097aabc27ad2 (diff)
downloadlinux-4552124543141debf40a94b67155e57aa6bb34d6.tar.xz
mac80211: inform drivers about the off-channel status on channel changes
For some drivers it can be useful to know whether the channel they're supposed to switch to is going to be used for short off-channel work or scanning, or whether the hardware is expected to stay on it for a while longer. This is important for various kinds of calibration work, which takes longer to complete and should keep some persistent state, even if the channel temporarily changes. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 0e95c750ded9..7cc4f913a431 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -107,12 +107,15 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
if (scan_chan) {
chan = scan_chan;
channel_type = NL80211_CHAN_NO_HT;
+ local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL;
} else if (local->tmp_channel) {
chan = scan_chan = local->tmp_channel;
channel_type = local->tmp_channel_type;
+ local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL;
} else {
chan = local->oper_channel;
channel_type = local->_oper_channel_type;
+ local->hw.conf.flags &= ~IEEE80211_CONF_OFFCHANNEL;
}
if (chan != local->hw.conf.channel ||