summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-05-16 23:50:15 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-06-05 15:32:15 -0400
commit8a2ac260bb89dc34bd31d694e885164a3b78c4d9 (patch)
tree55386fef484641e65ab1c6967683aa5c0355c33b /net
parent9dde64232586bd35c8454615266d209106b73c0f (diff)
downloadop-kernel-dev-8a2ac260bb89dc34bd31d694e885164a3b78c4d9.zip
op-kernel-dev-8a2ac260bb89dc34bd31d694e885164a3b78c4d9.tar.gz
mac80211: clean up ieee80211_set_channel
There's no need for ieee80211_set_channel to check whether a change in configuration happened since ieee80211_hw_config() auto-detects it. Additionally, it's wrong to pretend the HT config for the BSS changed, it didn't, the BSS can't be up & running (AP beaconing etc.) when the channel type is changed anyway. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/cfg.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index f099cf4..bb04f4a 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1684,9 +1684,6 @@ static int ieee80211_set_channel(struct wiphy *wiphy,
{
struct ieee80211_local *local = wiphy_priv(wiphy);
struct ieee80211_sub_if_data *sdata = NULL;
- struct ieee80211_channel *old_oper;
- enum nl80211_channel_type old_oper_type;
- enum nl80211_channel_type old_vif_oper_type= NL80211_CHAN_NO_HT;
if (netdev)
sdata = IEEE80211_DEV_TO_SUB_IF(netdev);
@@ -1704,24 +1701,13 @@ static int ieee80211_set_channel(struct wiphy *wiphy,
break;
}
- if (sdata)
- old_vif_oper_type = sdata->vif.bss_conf.channel_type;
- old_oper_type = local->_oper_channel_type;
-
if (!ieee80211_set_channel_type(local, sdata, channel_type))
return -EBUSY;
- old_oper = local->oper_channel;
local->oper_channel = chan;
- /* Update driver if changes were actually made. */
- if ((old_oper != local->oper_channel) ||
- (old_oper_type != local->_oper_channel_type))
- ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
-
- if (sdata && sdata->vif.type != NL80211_IFTYPE_MONITOR &&
- old_vif_oper_type != sdata->vif.bss_conf.channel_type)
- ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_HT);
+ /* auto-detects changes */
+ ieee80211_hw_config(local, 0);
return 0;
}
OpenPOWER on IntegriCloud