diff options
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 800c15aff6e7..65a34fddeb00 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -266,10 +266,13 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw, | |||
266 | bool short_preamble; | 266 | bool short_preamble; |
267 | int erp; | 267 | int erp; |
268 | u16 dur; | 268 | u16 dur; |
269 | struct ieee80211_supported_band *sband; | ||
270 | |||
271 | sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; | ||
269 | 272 | ||
270 | short_preamble = sdata->bss_conf.use_short_preamble; | 273 | short_preamble = sdata->bss_conf.use_short_preamble; |
271 | 274 | ||
272 | rate = frame_txctl->rts_cts_rate; | 275 | rate = &sband->bitrates[frame_txctl->rts_cts_rate_idx]; |
273 | 276 | ||
274 | erp = 0; | 277 | erp = 0; |
275 | if (sdata->flags & IEEE80211_SDATA_OPERATING_GMODE) | 278 | if (sdata->flags & IEEE80211_SDATA_OPERATING_GMODE) |
@@ -300,10 +303,13 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, | |||
300 | bool short_preamble; | 303 | bool short_preamble; |
301 | int erp; | 304 | int erp; |
302 | u16 dur; | 305 | u16 dur; |
306 | struct ieee80211_supported_band *sband; | ||
307 | |||
308 | sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; | ||
303 | 309 | ||
304 | short_preamble = sdata->bss_conf.use_short_preamble; | 310 | short_preamble = sdata->bss_conf.use_short_preamble; |
305 | 311 | ||
306 | rate = frame_txctl->rts_cts_rate; | 312 | rate = &sband->bitrates[frame_txctl->rts_cts_rate_idx]; |
307 | erp = 0; | 313 | erp = 0; |
308 | if (sdata->flags & IEEE80211_SDATA_OPERATING_GMODE) | 314 | if (sdata->flags & IEEE80211_SDATA_OPERATING_GMODE) |
309 | erp = rate->flags & IEEE80211_RATE_ERP_G; | 315 | erp = rate->flags & IEEE80211_RATE_ERP_G; |