Skip to content

Commit 10636bc

Browse files
Rajkumar Manoharanlinvjw
Rajkumar Manoharan
authored andcommitted
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]>
1 parent f8c141c commit 10636bc

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/wireless/ath/ath9k

1 file changed

+3
-1
lines changed

drivers/net/wireless/ath/ath9k/rc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,9 @@ static void ath_rc_init(struct ath_softc *sc,
12701270

12711271
ath_rc_priv->max_valid_rate = k;
12721272
ath_rc_sort_validrates(rate_table, ath_rc_priv);
1273-
ath_rc_priv->rate_max_phy = ath_rc_priv->valid_rate_index[k-4];
1273+
ath_rc_priv->rate_max_phy = (k > 4) ?
1274+
ath_rc_priv->valid_rate_index[k-4] :
1275+
ath_rc_priv->valid_rate_index[k-1];
12741276
ath_rc_priv->rate_table = rate_table;
12751277

12761278
ath_dbg(common, ATH_DBG_CONFIG,

0 commit comments

Comments
 (0)