aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-07-14 20:13:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-24 15:05:15 -0400
commit20f57215a2ff75f7c2e4004b7583e1fec925679e (patch)
treef81efaadb59a21cf724f63fcc90867eb858681fc
parent7466c524a42110e921e79b390b58bfc6ca6d249e (diff)
ath9k: remove pointless wrapper ath_rc_rate_getidx()
This is just calling another helper, so just use the other helper directly. This should make it clear that when do not find the next rate we stick to the current one. 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.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index 64cb697805b8..03e7df42675f 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -814,19 +814,6 @@ static void ath_rc_rate_set_rtscts(struct ath_softc *sc,
814 tx_info->control.rts_cts_rate_idx = cix; 814 tx_info->control.rts_cts_rate_idx = cix;
815} 815}
816 816
817static u8 ath_rc_rate_getidx(struct ath_softc *sc,
818 struct ath_rate_priv *ath_rc_priv,
819 const struct ath_rate_table *rate_table,
820 u8 rix)
821{
822 u8 nextindex = 0;
823 if (ath_rc_get_nextlowervalid_txrate(rate_table,
824 ath_rc_priv, rix, &nextindex))
825 return nextindex;
826 else
827 return rix;
828}
829
830static void ath_rc_ratefind(struct ath_softc *sc, 817static void ath_rc_ratefind(struct ath_softc *sc,
831 struct ath_rate_priv *ath_rc_priv, 818 struct ath_rate_priv *ath_rc_priv,
832 struct ieee80211_tx_rate_control *txrc) 819 struct ieee80211_tx_rate_control *txrc)
@@ -865,8 +852,8 @@ static void ath_rc_ratefind(struct ath_softc *sc,
865 /* Get the next tried/allowed rate. No RTS for the next series 852 /* Get the next tried/allowed rate. No RTS for the next series
866 * after the probe rate 853 * after the probe rate
867 */ 854 */
868 nrix = ath_rc_rate_getidx(sc, ath_rc_priv, 855 ath_rc_get_nextlowervalid_txrate(rate_table, ath_rc_priv,
869 rate_table, nrix); 856 rix, &nrix);
870 ath_rc_rate_set_series(rate_table, &rates[i++], txrc, 857 ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
871 try_per_rate, nrix, 0); 858 try_per_rate, nrix, 0);
872 859
@@ -883,8 +870,8 @@ static void ath_rc_ratefind(struct ath_softc *sc,
883 if (i + 1 == 4) 870 if (i + 1 == 4)
884 try_per_rate = 4; 871 try_per_rate = 4;
885 872
886 nrix = ath_rc_rate_getidx(sc, ath_rc_priv, 873 ath_rc_get_nextlowervalid_txrate(rate_table, ath_rc_priv,
887 rate_table, nrix); 874 rix, &nrix);
888 /* All other rates in the series have RTS enabled */ 875 /* All other rates in the series have RTS enabled */
889 ath_rc_rate_set_series(rate_table, &rates[i], txrc, 876 ath_rc_rate_set_series(rate_table, &rates[i], txrc,
890 try_per_rate, nrix, 1); 877 try_per_rate, nrix, 1);