diff options
-rw-r--r-- | net/mac80211/rc80211_minstrel.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index 2b3b490a6073..3824990d340b 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c | |||
@@ -395,13 +395,15 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband, | |||
395 | { | 395 | { |
396 | struct minstrel_sta_info *mi = priv_sta; | 396 | struct minstrel_sta_info *mi = priv_sta; |
397 | struct minstrel_priv *mp = priv; | 397 | struct minstrel_priv *mp = priv; |
398 | struct minstrel_rate *mr_ctl; | 398 | struct ieee80211_local *local = hw_to_local(mp->hw); |
399 | struct ieee80211_rate *ctl_rate; | ||
399 | unsigned int i, n = 0; | 400 | unsigned int i, n = 0; |
400 | unsigned int t_slot = 9; /* FIXME: get real slot time */ | 401 | unsigned int t_slot = 9; /* FIXME: get real slot time */ |
401 | 402 | ||
402 | mi->lowest_rix = rate_lowest_index(sband, sta); | 403 | mi->lowest_rix = rate_lowest_index(sband, sta); |
403 | mr_ctl = &mi->r[rix_to_ndx(mi, mi->lowest_rix)]; | 404 | ctl_rate = &sband->bitrates[mi->lowest_rix]; |
404 | mi->sp_ack_dur = mr_ctl->ack_time; | 405 | mi->sp_ack_dur = ieee80211_frame_duration(local, 10, ctl_rate->bitrate, |
406 | !!(ctl_rate->flags & IEEE80211_RATE_ERP_G), 1); | ||
405 | 407 | ||
406 | for (i = 0; i < sband->n_bitrates; i++) { | 408 | for (i = 0; i < sband->n_bitrates; i++) { |
407 | struct minstrel_rate *mr = &mi->r[n]; | 409 | struct minstrel_rate *mr = &mi->r[n]; |
@@ -416,7 +418,7 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband, | |||
416 | 418 | ||
417 | mr->rix = i; | 419 | mr->rix = i; |
418 | mr->bitrate = sband->bitrates[i].bitrate / 5; | 420 | mr->bitrate = sband->bitrates[i].bitrate / 5; |
419 | calc_rate_durations(mi, hw_to_local(mp->hw), mr, | 421 | calc_rate_durations(mi, local, mr, |
420 | &sband->bitrates[i]); | 422 | &sband->bitrates[i]); |
421 | 423 | ||
422 | /* calculate maximum number of retransmissions before | 424 | /* calculate maximum number of retransmissions before |