aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/xmit.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-12-07 11:12:10 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-12 13:48:24 -0500
commit3706de6f58962ba74c18eb4cb1ebe034ff723037 (patch)
treef7abfd387c67b07ae27c57609a7aa819140ae103 /drivers/net/wireless/ath9k/xmit.c
parent40990ec01fcca0b86a19c13a5d3deb77da1913a7 (diff)
ath9k: Maintain rate table choice after association
A scan run after association would change sc_curmode which is used to get the current rate table. This patch fixes it by removing sc_curmode and setting the rate table in usage in cur_rate_table on association. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/xmit.c')
-rw-r--r--drivers/net/wireless/ath9k/xmit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index 9de27c681b86..353b7ed1c8a4 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -493,7 +493,7 @@ static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
493static u32 ath_pkt_duration(struct ath_softc *sc, u8 rix, struct ath_buf *bf, 493static u32 ath_pkt_duration(struct ath_softc *sc, u8 rix, struct ath_buf *bf,
494 int width, int half_gi, bool shortPreamble) 494 int width, int half_gi, bool shortPreamble)
495{ 495{
496 struct ath_rate_table *rate_table = sc->hw_rate_table[sc->sc_curmode]; 496 struct ath_rate_table *rate_table = sc->cur_rate_table;
497 u32 nbits, nsymbits, duration, nsymbols; 497 u32 nbits, nsymbits, duration, nsymbols;
498 u8 rc; 498 u8 rc;
499 int streams, pktlen; 499 int streams, pktlen;
@@ -557,7 +557,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf)
557 } 557 }
558 558
559 /* get the cix for the lowest valid rix */ 559 /* get the cix for the lowest valid rix */
560 rt = sc->hw_rate_table[sc->sc_curmode]; 560 rt = sc->cur_rate_table;
561 for (i = 3; i >= 0; i--) { 561 for (i = 3; i >= 0; i--) {
562 if (rates[i].count && (rates[i].idx >= 0)) { 562 if (rates[i].count && (rates[i].idx >= 0)) {
563 rix = rates[i].idx; 563 rix = rates[i].idx;
@@ -1240,7 +1240,7 @@ static u32 ath_lookup_rate(struct ath_softc *sc,
1240 struct ath_buf *bf, 1240 struct ath_buf *bf,
1241 struct ath_atx_tid *tid) 1241 struct ath_atx_tid *tid)
1242{ 1242{
1243 struct ath_rate_table *rate_table = sc->hw_rate_table[sc->sc_curmode]; 1243 struct ath_rate_table *rate_table = sc->cur_rate_table;
1244 struct sk_buff *skb; 1244 struct sk_buff *skb;
1245 struct ieee80211_tx_info *tx_info; 1245 struct ieee80211_tx_info *tx_info;
1246 struct ieee80211_tx_rate *rates; 1246 struct ieee80211_tx_rate *rates;
@@ -1308,7 +1308,7 @@ static int ath_compute_num_delims(struct ath_softc *sc,
1308 struct ath_buf *bf, 1308 struct ath_buf *bf,
1309 u16 frmlen) 1309 u16 frmlen)
1310{ 1310{
1311 struct ath_rate_table *rt = sc->hw_rate_table[sc->sc_curmode]; 1311 struct ath_rate_table *rt = sc->cur_rate_table;
1312 struct sk_buff *skb = bf->bf_mpdu; 1312 struct sk_buff *skb = bf->bf_mpdu;
1313 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 1313 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
1314 u32 nsymbits, nsymbols, mpdudensity; 1314 u32 nsymbits, nsymbols, mpdudensity;