diff options
author | Rajkumar Manoharan <[email protected]> | 2011-12-10 18:59:43 +0530 |
---|---|---|
committer | John W. Linville <[email protected]> | 2011-12-12 14:23:28 -0500 |
commit | 10636bc2d60942254bda149827b922c41f4cb4af (patch) | |
tree | f5e0797bca22b5f7cfd6f828c2277df1f3c73fd1 | |
parent | f8c141c3e915e3a040d4c1badde28e23f8cbe255 (diff) |
ath9k: fix max phy rate at rate control init
The stations always chooses 1Mbps for all trasmitting frames,
whenever the AP is configured to lock the supported rates.
As the max phy rate is always set with the 4th from highest phy rate,
this assumption might be wrong if we have less than that. Fix that.
Cc: [email protected]
Cc: Paul Stewart <[email protected]>
Reported-by: Ajay Gummalla <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 8448281dd069..cc5703b853bc 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c @@ -1270,7 +1270,9 @@ static void ath_rc_init(struct ath_softc *sc, ath_rc_priv->max_valid_rate = k; ath_rc_sort_validrates(rate_table, ath_rc_priv); - ath_rc_priv->rate_max_phy = ath_rc_priv->valid_rate_index[k-4]; + ath_rc_priv->rate_max_phy = (k > 4) ? + ath_rc_priv->valid_rate_index[k-4] : + ath_rc_priv->valid_rate_index[k-1]; ath_rc_priv->rate_table = rate_table; ath_dbg(common, ATH_DBG_CONFIG, |