aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2011-12-10 08:29:43 -0500
committerBrad Figg <brad.figg@canonical.com>2012-01-23 18:35:59 -0500
commitff464c31955b98a894180b4edfc7fee3219cca3b (patch)
tree8e244c6674679c2f14f749687e2731cdc07b7f39 /drivers/net/wireless
parentcde3a5fc8801cd02876ebe95cd9a01cfa0beccf6 (diff)
ath9k: fix max phy rate at rate control init
BugLink: http://bugs.launchpad.net/bugs/913373 commit 10636bc2d60942254bda149827b922c41f4cb4af upstream. 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: Paul Stewart <pstew@google.com> Reported-by: Ajay Gummalla <agummalla@google.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Brad Figg <brad.figg@canonical.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c4
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 ba7f36ab0a7..ea35843dd38 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -1252,7 +1252,9 @@ static void ath_rc_init(struct ath_softc *sc,
1252 1252
1253 ath_rc_priv->max_valid_rate = k; 1253 ath_rc_priv->max_valid_rate = k;
1254 ath_rc_sort_validrates(rate_table, ath_rc_priv); 1254 ath_rc_sort_validrates(rate_table, ath_rc_priv);
1255 ath_rc_priv->rate_max_phy = ath_rc_priv->valid_rate_index[k-4]; 1255 ath_rc_priv->rate_max_phy = (k > 4) ?
1256 ath_rc_priv->valid_rate_index[k-4] :
1257 ath_rc_priv->valid_rate_index[k-1];
1256 ath_rc_priv->rate_table = rate_table; 1258 ath_rc_priv->rate_table = rate_table;
1257 1259
1258 ath_dbg(common, ATH_DBG_CONFIG, 1260 ath_dbg(common, ATH_DBG_CONFIG,