aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/beacon.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-02-16 10:56:18 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-16 14:16:24 -0500
commit64b84010f9f85996a219fcc697396e7e11be3459 (patch)
tree0bcedbe1f0d6b17d58c99f1b8c28223cc855ad99 /drivers/net/wireless/ath/ath9k/beacon.c
parentbef5d1c70d132145c0fc75b3586a19841a9a82e4 (diff)
ath9k: Use the Beacon TX rate from mac80211
Instead of hardcoding the lowest rate for Beacon frames, use the rate index specified in the mac80211 TX info in AP mode. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/beacon.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index d088ebfe63a..42171d043c3 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -62,7 +62,7 @@ int ath_beaconq_config(struct ath_softc *sc)
62 * Beacons are always sent out at the lowest rate, and are not retried. 62 * Beacons are always sent out at the lowest rate, and are not retried.
63*/ 63*/
64static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp, 64static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp,
65 struct ath_buf *bf) 65 struct ath_buf *bf, int rateidx)
66{ 66{
67 struct sk_buff *skb = bf->bf_mpdu; 67 struct sk_buff *skb = bf->bf_mpdu;
68 struct ath_hw *ah = sc->sc_ah; 68 struct ath_hw *ah = sc->sc_ah;
@@ -96,9 +96,9 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp,
96 ds->ds_data = bf->bf_buf_addr; 96 ds->ds_data = bf->bf_buf_addr;
97 97
98 sband = &sc->sbands[common->hw->conf.channel->band]; 98 sband = &sc->sbands[common->hw->conf.channel->band];
99 rate = sband->bitrates[0].hw_value; 99 rate = sband->bitrates[rateidx].hw_value;
100 if (sc->sc_flags & SC_OP_PREAMBLE_SHORT) 100 if (sc->sc_flags & SC_OP_PREAMBLE_SHORT)
101 rate |= sband->bitrates[0].hw_value_short; 101 rate |= sband->bitrates[rateidx].hw_value_short;
102 102
103 ath9k_hw_set11n_txdesc(ah, ds, skb->len + FCS_LEN, 103 ath9k_hw_set11n_txdesc(ah, ds, skb->len + FCS_LEN,
104 ATH9K_PKT_TYPE_BEACON, 104 ATH9K_PKT_TYPE_BEACON,
@@ -206,7 +206,7 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw,
206 } 206 }
207 } 207 }
208 208
209 ath_beacon_setup(sc, avp, bf); 209 ath_beacon_setup(sc, avp, bf, info->control.rates[0].idx);
210 210
211 while (skb) { 211 while (skb) {
212 ath_tx_cabq(hw, skb); 212 ath_tx_cabq(hw, skb);
@@ -237,7 +237,7 @@ static void ath_beacon_start_adhoc(struct ath_softc *sc,
237 bf = avp->av_bcbuf; 237 bf = avp->av_bcbuf;
238 skb = bf->bf_mpdu; 238 skb = bf->bf_mpdu;
239 239
240 ath_beacon_setup(sc, avp, bf); 240 ath_beacon_setup(sc, avp, bf, 0);
241 241
242 /* NB: caller is known to have already stopped tx dma */ 242 /* NB: caller is known to have already stopped tx dma */
243 ath9k_hw_puttxbuf(ah, sc->beacon.beaconq, bf->bf_daddr); 243 ath9k_hw_puttxbuf(ah, sc->beacon.beaconq, bf->bf_daddr);