1 --- a/net/mac80211/main.c
2 +++ b/net/mac80211/main.c
3 @@ -99,11 +99,13 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
6 enum nl80211_channel_type channel_type;
11 scan_chan = local->scan_channel;
13 + offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
16 channel_type = NL80211_CHAN_NO_HT;
17 @@ -117,8 +119,9 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
18 channel_type = local->_oper_channel_type;
19 local->hw.conf.flags &= ~IEEE80211_CONF_OFFCHANNEL;
21 + offchannel_flag ^= local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
23 - if (chan != local->hw.conf.channel ||
24 + if (offchannel_flag || chan != local->hw.conf.channel ||
25 channel_type != local->hw.conf.channel_type) {
26 local->hw.conf.channel = chan;
27 local->hw.conf.channel_type = channel_type;