From fa3e7c016d1e83aac3f378be350411acf732a554 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 28 Jul 2010 02:40:49 +0200 Subject: [PATCH] --- yaml --- r: 203930 b: refs/heads/master c: 4552124543141debf40a94b67155e57aa6bb34d6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/mac80211.h | 3 +++ trunk/net/mac80211/main.c | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ba07774afbc0..96b6e6c3daae 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a0daa0e7592ada797d6835f11529097aabc27ad2 +refs/heads/master: 4552124543141debf40a94b67155e57aa6bb34d6 diff --git a/trunk/include/net/mac80211.h b/trunk/include/net/mac80211.h index 20d372edec29..c7027ef51c75 100644 --- a/trunk/include/net/mac80211.h +++ b/trunk/include/net/mac80211.h @@ -625,11 +625,14 @@ struct ieee80211_rx_status { * may turn the device off as much as possible. Typically, this flag will * be set when an interface is set UP but not associated or scanning, but * it can also be unset in that case when monitor interfaces are active. + * @IEEE80211_CONF_OFFCHANNEL: The device is currently not on its main + * operating channel. */ enum ieee80211_conf_flags { IEEE80211_CONF_MONITOR = (1<<0), IEEE80211_CONF_PS = (1<<1), IEEE80211_CONF_IDLE = (1<<2), + IEEE80211_CONF_OFFCHANNEL = (1<<3), }; diff --git a/trunk/net/mac80211/main.c b/trunk/net/mac80211/main.c index 0e95c750ded9..7cc4f913a431 100644 --- a/trunk/net/mac80211/main.c +++ b/trunk/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 ||