aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-07-14 20:13:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:15 -0400
commit984d021d56f036e5ffbef191cb5e498cf159784d (patch)
treeb5f5c4acbd87407125d88f4ec61b9df8b22283b0
parentdd1901830ca7baaaae2e58f549f770f215c6f3af (diff)
ath9k: remove unused min rate calculation code
This is not used, and when we need to get the lowest rate we should simply use mac80211's own rate_lowest_index(sband, sta). Cc: Derek Smithies <derek@indranet.co.nz> Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c33
1 files changed, 9 insertions, 24 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index a23b66bdbe92..7b37b2798dfc 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -817,28 +817,17 @@ 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, u16 stepdown)
821 u16 min_rate)
822{ 821{
823 u32 j; 822 u32 j;
824 u8 nextindex = 0; 823 u8 nextindex = 0;
825 824
826 if (min_rate) { 825 for (j = stepdown; j > 0; j--) {
827 for (j = RATE_TABLE_SIZE; j > 0; j--) { 826 if (ath_rc_get_nextlowervalid_txrate(rate_table,
828 if (ath_rc_get_nextlowervalid_txrate(rate_table, 827 ath_rc_priv, rix, &nextindex))
829 ath_rc_priv, rix, &nextindex)) 828 rix = nextindex;
830 rix = nextindex; 829 else
831 else 830 break;
832 break;
833 }
834 } else {
835 for (j = stepdown; j > 0; j--) {
836 if (ath_rc_get_nextlowervalid_txrate(rate_table,
837 ath_rc_priv, rix, &nextindex))
838 rix = nextindex;
839 else
840 break;
841 }
842 } 831 }
843 return rix; 832 return rix;
844} 833}
@@ -882,7 +871,7 @@ static void ath_rc_ratefind(struct ath_softc *sc,
882 * after the probe rate 871 * after the probe rate
883 */ 872 */
884 nrix = ath_rc_rate_getidx(sc, ath_rc_priv, 873 nrix = ath_rc_rate_getidx(sc, ath_rc_priv,
885 rate_table, nrix, 1, 0); 874 rate_table, nrix, 1);
886 ath_rc_rate_set_series(rate_table, &rates[i++], txrc, 875 ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
887 try_per_rate, nrix, 0); 876 try_per_rate, nrix, 0);
888 877
@@ -895,16 +884,12 @@ static void ath_rc_ratefind(struct ath_softc *sc,
895 884
896 /* Fill in the other rates for multirate retry */ 885 /* Fill in the other rates for multirate retry */
897 for ( ; i < 4; i++) { 886 for ( ; i < 4; i++) {
898 u8 min_rate;
899
900 /* Use twice the number of tries for the last MRR segment. */ 887 /* Use twice the number of tries for the last MRR segment. */
901 if (i + 1 == 4) 888 if (i + 1 == 4)
902 try_per_rate = 4; 889 try_per_rate = 4;
903 890
904 min_rate = (((i + 1) == 4) && 0);
905
906 nrix = ath_rc_rate_getidx(sc, ath_rc_priv, 891 nrix = ath_rc_rate_getidx(sc, ath_rc_priv,
907 rate_table, nrix, 1, min_rate); 892 rate_table, nrix, 1);
908 /* All other rates in the series have RTS enabled */ 893 /* All other rates in the series have RTS enabled */
909 ath_rc_rate_set_series(rate_table, &rates[i], txrc, 894 ath_rc_rate_set_series(rate_table, &rates[i], txrc,
910 try_per_rate, nrix, 1); 895 try_per_rate, nrix, 1);