mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
rc80211_minstrel: fix contention window calculation
The contention window is supposed to be a power of two minus one, i.e. 15, 31, 63, 127... minstrel_rate_init() forgets to subtract 1, so the sequence becomes 15, 32, 66, 134... Bug reported by Dan Halperin <[email protected]> Signed-off-by: Pavel Roskin <[email protected]> Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
de32cce132
commit
8c6c03fe23
1 changed files with 1 additions and 1 deletions
|
|
@ -418,7 +418,7 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband,
|
|||
|
||||
/* contention window */
|
||||
tx_time_single += t_slot + min(cw, mp->cw_max);
|
||||
cw = (cw + 1) << 1;
|
||||
cw = (cw << 1) | 1;
|
||||
|
||||
tx_time += tx_time_single;
|
||||
tx_time_cts += tx_time_single + mi->sp_ack_dur;
|
||||
|
|
|
|||
Loading…
Reference in a new issue