aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/base.c
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2009-01-22 08:44:20 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:01:12 -0500
commit8902ff4e5666c04ca5829c9fd7fc28d73e81ee90 (patch)
tree9d401dde66920f1dc159ad6b19e2635655259ee0 /drivers/net/wireless/ath5k/base.c
parent5ef4017a72f77f0bc07d8efb35c140b42e064f70 (diff)
ath5k: use short preamble when possible
ath5k previously ignored TX_RC_SHORT_PREAMBLE and did not use config->use_short_preamble, so the long preamble was always used for transmitted packets. Changes-licensed-under: 3-Clause-BSD Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/base.c')
-rw-r--r--drivers/net/wireless/ath5k/base.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 747b49682c5d..fc0ff713401c 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -1179,6 +1179,8 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
1179 struct ieee80211_rate *rate; 1179 struct ieee80211_rate *rate;
1180 unsigned int mrr_rate[3], mrr_tries[3]; 1180 unsigned int mrr_rate[3], mrr_tries[3];
1181 int i, ret; 1181 int i, ret;
1182 u16 hw_rate;
1183 u8 rc_flags;
1182 1184
1183 flags = AR5K_TXDESC_INTREQ | AR5K_TXDESC_CLRDMASK; 1185 flags = AR5K_TXDESC_INTREQ | AR5K_TXDESC_CLRDMASK;
1184 1186
@@ -1186,9 +1188,15 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
1186 bf->skbaddr = pci_map_single(sc->pdev, skb->data, skb->len, 1188 bf->skbaddr = pci_map_single(sc->pdev, skb->data, skb->len,
1187 PCI_DMA_TODEVICE); 1189 PCI_DMA_TODEVICE);
1188 1190
1191 rate = ieee80211_get_tx_rate(sc->hw, info);
1192
1189 if (info->flags & IEEE80211_TX_CTL_NO_ACK) 1193 if (info->flags & IEEE80211_TX_CTL_NO_ACK)
1190 flags |= AR5K_TXDESC_NOACK; 1194 flags |= AR5K_TXDESC_NOACK;
1191 1195
1196 rc_flags = info->control.rates[0].flags;
1197 hw_rate = (rc_flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) ?
1198 rate->hw_value_short : rate->hw_value;
1199
1192 pktlen = skb->len; 1200 pktlen = skb->len;
1193 1201
1194 if (info->control.hw_key) { 1202 if (info->control.hw_key) {
@@ -1198,7 +1206,7 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
1198 ret = ah->ah_setup_tx_desc(ah, ds, pktlen, 1206 ret = ah->ah_setup_tx_desc(ah, ds, pktlen,
1199 ieee80211_get_hdrlen_from_skb(skb), AR5K_PKT_TYPE_NORMAL, 1207 ieee80211_get_hdrlen_from_skb(skb), AR5K_PKT_TYPE_NORMAL,
1200 (sc->power_level * 2), 1208 (sc->power_level * 2),
1201 ieee80211_get_tx_rate(sc->hw, info)->hw_value, 1209 hw_rate,
1202 info->control.rates[0].count, keyidx, 0, flags, 0, 0); 1210 info->control.rates[0].count, keyidx, 0, flags, 0, 0);
1203 if (ret) 1211 if (ret)
1204 goto err_unmap; 1212 goto err_unmap;