diff options
Diffstat (limited to 'net/mac80211/chan.c')
-rw-r--r-- | net/mac80211/chan.c | 11 |
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); |