aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/rc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/rc.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index 7b37b2798dfc..64cb697805b8 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -817,19 +817,14 @@ static void ath_rc_rate_set_rtscts(struct ath_softc *sc,
817static u8 ath_rc_rate_getidx(struct ath_softc *sc, 817static u8 ath_rc_rate_getidx(struct ath_softc *sc,
818 struct ath_rate_priv *ath_rc_priv, 818 struct ath_rate_priv *ath_rc_priv,
819 const struct ath_rate_table *rate_table, 819 const struct ath_rate_table *rate_table,
820 u8 rix, u16 stepdown) 820 u8 rix)
821{ 821{
822 u32 j;
823 u8 nextindex = 0; 822 u8 nextindex = 0;
824 823 if (ath_rc_get_nextlowervalid_txrate(rate_table,
825 for (j = stepdown; j > 0; j--) { 824 ath_rc_priv, rix, &nextindex))
826 if (ath_rc_get_nextlowervalid_txrate(rate_table, 825 return nextindex;
827 ath_rc_priv, rix, &nextindex)) 826 else
828 rix = nextindex; 827 return rix;
829 else
830 break;
831 }
832 return rix;
833} 828}
834 829
835static void ath_rc_ratefind(struct ath_softc *sc, 830static void ath_rc_ratefind(struct ath_softc *sc,
@@ -871,7 +866,7 @@ static void ath_rc_ratefind(struct ath_softc *sc,
871 * after the probe rate 866 * after the probe rate
872 */ 867 */
873 nrix = ath_rc_rate_getidx(sc, ath_rc_priv, 868 nrix = ath_rc_rate_getidx(sc, ath_rc_priv,
874 rate_table, nrix, 1); 869 rate_table, nrix);
875 ath_rc_rate_set_series(rate_table, &rates[i++], txrc, 870 ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
876 try_per_rate, nrix, 0); 871 try_per_rate, nrix, 0);
877 872
@@ -889,7 +884,7 @@ static void ath_rc_ratefind(struct ath_softc *sc,
889 try_per_rate = 4; 884 try_per_rate = 4;
890 885
891 nrix = ath_rc_rate_getidx(sc, ath_rc_priv, 886 nrix = ath_rc_rate_getidx(sc, ath_rc_priv,
892 rate_table, nrix, 1); 887 rate_table, nrix);
893 /* All other rates in the series have RTS enabled */ 888 /* All other rates in the series have RTS enabled */
894 ath_rc_rate_set_series(rate_table, &rates[i], txrc, 889 ath_rc_rate_set_series(rate_table, &rates[i], txrc,
895 try_per_rate, nrix, 1); 890 try_per_rate, nrix, 1);