Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313992
b: refs/heads/master
c: 8a2ac26
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jun 5, 2012
1 parent 347677c commit bd1ffbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9dde64232586bd35c8454615266d209106b73c0f
refs/heads/master: 8a2ac260bb89dc34bd31d694e885164a3b78c4d9
18 changes: 2 additions & 16 deletions trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down

0 comments on commit bd1ffbb

Please sign in to comment.