summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/xmit.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-12-07 21:42:10 +0530
committerJohn W. Linville <linville@tuxdriver.com>2008-12-12 13:48:24 -0500
commit3706de6f58962ba74c18eb4cb1ebe034ff723037 (patch)
treef7abfd387c67b07ae27c57609a7aa819140ae103 /drivers/net/wireless/ath9k/xmit.c
parent40990ec01fcca0b86a19c13a5d3deb77da1913a7 (diff)
downloadkernel-crypto-3706de6f58962ba74c18eb4cb1ebe034ff723037.tar.gz
kernel-crypto-3706de6f58962ba74c18eb4cb1ebe034ff723037.tar.xz
kernel-crypto-3706de6f58962ba74c18eb4cb1ebe034ff723037.zip
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 9de27c681b8..353b7ed1c8a 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,
static u32 ath_pkt_duration(struct ath_softc *sc, u8 rix, struct ath_buf *bf,
int width, int half_gi, bool shortPreamble)
{
- struct ath_rate_table *rate_table = sc->hw_rate_table[sc->sc_curmode];
+ struct ath_rate_table *rate_table = sc->cur_rate_table;
u32 nbits, nsymbits, duration, nsymbols;
u8 rc;
int streams, pktlen;
@@ -557,7 +557,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf)
}
/* get the cix for the lowest valid rix */
- rt = sc->hw_rate_table[sc->sc_curmode];
+ rt = sc->cur_rate_table;
for (i = 3; i >= 0; i--) {
if (rates[i].count && (rates[i].idx >= 0)) {
rix = rates[i].idx;
@@ -1240,7 +1240,7 @@ static u32 ath_lookup_rate(struct ath_softc *sc,
struct ath_buf *bf,
struct ath_atx_tid *tid)
{
- struct ath_rate_table *rate_table = sc->hw_rate_table[sc->sc_curmode];
+ struct ath_rate_table *rate_table = sc->cur_rate_table;
struct sk_buff *skb;
struct ieee80211_tx_info *tx_info;
struct ieee80211_tx_rate *rates;
@@ -1308,7 +1308,7 @@ static int ath_compute_num_delims(struct ath_softc *sc,
struct ath_buf *bf,
u16 frmlen)
{
- struct ath_rate_table *rt = sc->hw_rate_table[sc->sc_curmode];
+ struct ath_rate_table *rt = sc->cur_rate_table;
struct sk_buff *skb = bf->bf_mpdu;
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
u32 nsymbits, nsymbols, mpdudensity;