aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/chan.c
diff options
context:
space:
mode:
authorKarl Beldan <karl.beldan@rivierawaves.com>2013-03-25 11:26:57 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-03-25 14:19:35 -0400
commit675a0b049abf6edf30f8dd84c5610b6edc2296c8 (patch)
tree164178c576642dc1ec8ae70d9e26a5ec33472d26 /net/mac80211/chan.c
parent219c38674c262378ec411dd8318ebfd199fbce8d (diff)
mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chan
Drivers that don't use chanctxes cannot perform VHT association because they still use a "backward compatibility" pair of {ieee80211_channel, nl80211_channel_type} in ieee80211_conf and ieee80211_local. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> [fix kernel-doc] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/chan.c')
-rw-r--r--net/mac80211/chan.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 78c0d90dd641..8024874ba95d 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -22,7 +22,7 @@ static void ieee80211_change_chanctx(struct ieee80211_local *local,
22 drv_change_chanctx(local, ctx, IEEE80211_CHANCTX_CHANGE_WIDTH); 22 drv_change_chanctx(local, ctx, IEEE80211_CHANCTX_CHANGE_WIDTH);
23 23
24 if (!local->use_chanctx) { 24 if (!local->use_chanctx) {
25 local->_oper_channel_type = cfg80211_get_chandef_type(chandef); 25 local->_oper_chandef = *chandef;
26 ieee80211_hw_config(local, 0); 26 ieee80211_hw_config(local, 0);
27 } 27 }
28} 28}
@@ -77,9 +77,7 @@ ieee80211_new_chanctx(struct ieee80211_local *local,
77 ctx->mode = mode; 77 ctx->mode = mode;
78 78
79 if (!local->use_chanctx) { 79 if (!local->use_chanctx) {
80 local->_oper_channel_type = 80 local->_oper_chandef = *chandef;
81 cfg80211_get_chandef_type(chandef);
82 local->_oper_channel = chandef->chan;
83 ieee80211_hw_config(local, 0); 81 ieee80211_hw_config(local, 0);
84 } else { 82 } else {
85 err = drv_add_chanctx(local, ctx); 83 err = drv_add_chanctx(local, ctx);
@@ -106,7 +104,10 @@ static void ieee80211_free_chanctx(struct ieee80211_local *local,
106 WARN_ON_ONCE(ctx->refcount != 0); 104 WARN_ON_ONCE(ctx->refcount != 0);
107 105
108 if (!local->use_chanctx) { 106 if (!local->use_chanctx) {
109 local->_oper_channel_type = NL80211_CHAN_NO_HT; 107 struct cfg80211_chan_def *chandef = &local->_oper_chandef;
108 chandef->width = NL80211_CHAN_WIDTH_20_NOHT;
109 chandef->center_freq1 = chandef->chan->center_freq;
110 chandef->center_freq2 = 0;
110 ieee80211_hw_config(local, 0); 111 ieee80211_hw_config(local, 0);
111 } else { 112 } else {
112 drv_remove_chanctx(local, ctx); 113 drv_remove_chanctx(local, ctx);