diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-02-08 07:15:55 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-15 03:41:35 -0500 |
commit | f2d9330ee820b01e2b1caf46370bc7963d259908 (patch) | |
tree | 3260e8a0a10ff4ee8192018abfaba8a766251da2 | |
parent | 08e6effa1187cc5f401a1cc286ce84f0a581b35a (diff) |
mac80211: clean up channel use in ieee80211_config_ht_tx
The channel use is confusing, some uses the channel
context and some the bss_conf.chandef. The latter is
fine, so get rid of the channel context part.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/mac80211/mlme.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 03f278880dba..8fdf1e1aee5e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -181,7 +181,6 @@ static u32 ieee80211_config_ht_tx(struct ieee80211_sub_if_data *sdata, | |||
181 | { | 181 | { |
182 | struct ieee80211_local *local = sdata->local; | 182 | struct ieee80211_local *local = sdata->local; |
183 | struct ieee80211_supported_band *sband; | 183 | struct ieee80211_supported_band *sband; |
184 | struct ieee80211_chanctx_conf *chanctx_conf; | ||
185 | struct ieee80211_channel *chan; | 184 | struct ieee80211_channel *chan; |
186 | u32 changed = 0; | 185 | u32 changed = 0; |
187 | u16 ht_opmode; | 186 | u16 ht_opmode; |
@@ -190,23 +189,16 @@ static u32 ieee80211_config_ht_tx(struct ieee80211_sub_if_data *sdata, | |||
190 | if (WARN_ON_ONCE(!sta)) | 189 | if (WARN_ON_ONCE(!sta)) |
191 | return 0; | 190 | return 0; |
192 | 191 | ||
193 | rcu_read_lock(); | 192 | chan = sdata->vif.bss_conf.chandef.chan; |
194 | chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); | ||
195 | if (WARN_ON(!chanctx_conf)) { | ||
196 | rcu_read_unlock(); | ||
197 | return 0; | ||
198 | } | ||
199 | chan = chanctx_conf->def.chan; | ||
200 | rcu_read_unlock(); | ||
201 | sband = local->hw.wiphy->bands[chan->band]; | 193 | sband = local->hw.wiphy->bands[chan->band]; |
202 | 194 | ||
203 | switch (sdata->vif.bss_conf.chandef.width) { | 195 | switch (sdata->vif.bss_conf.chandef.width) { |
204 | case NL80211_CHAN_WIDTH_40: | 196 | case NL80211_CHAN_WIDTH_40: |
205 | if (sdata->vif.bss_conf.chandef.chan->center_freq > | 197 | if (chan->center_freq > |
206 | sdata->vif.bss_conf.chandef.center_freq1 && | 198 | sdata->vif.bss_conf.chandef.center_freq1 && |
207 | chan->flags & IEEE80211_CHAN_NO_HT40MINUS) | 199 | chan->flags & IEEE80211_CHAN_NO_HT40MINUS) |
208 | disable_40 = true; | 200 | disable_40 = true; |
209 | if (sdata->vif.bss_conf.chandef.chan->center_freq < | 201 | if (chan->center_freq < |
210 | sdata->vif.bss_conf.chandef.center_freq1 && | 202 | sdata->vif.bss_conf.chandef.center_freq1 && |
211 | chan->flags & IEEE80211_CHAN_NO_HT40PLUS) | 203 | chan->flags & IEEE80211_CHAN_NO_HT40PLUS) |
212 | disable_40 = true; | 204 | disable_40 = true; |