aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-05-15 06:55:27 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-21 21:48:09 -0400
commit2e92e6f2c50b4baf85cca968f0e6f1b5c0df7d39 (patch)
treee845c2f3af6d29c807c540366b97b1d886b92c91 /drivers/net/wireless/ath5k
parent36d6825b91bc492b65b6333c369cd96a2fc8c903 (diff)
mac80211: use rate index in TX control
This patch modifies struct ieee80211_tx_control to give band info and the rate index (instead of rate pointers) to drivers. This mostly serves to reduce the TX control structure size to make it fit into skb->cb so that the fragmentation code can put it there and we can think about passing it to drivers that way in the future. The rt2x00 driver update was done by Ivo, thanks. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k')
-rw-r--r--drivers/net/wireless/ath5k/base.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 3f16ad66bdb5..32ee351a7650 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -1323,7 +1323,8 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf,
1323 1323
1324 ret = ah->ah_setup_tx_desc(ah, ds, pktlen, 1324 ret = ah->ah_setup_tx_desc(ah, ds, pktlen,
1325 ieee80211_get_hdrlen_from_skb(skb), AR5K_PKT_TYPE_NORMAL, 1325 ieee80211_get_hdrlen_from_skb(skb), AR5K_PKT_TYPE_NORMAL,
1326 (sc->power_level * 2), ctl->tx_rate->hw_value, 1326 (sc->power_level * 2),
1327 ieee80211_get_tx_rate(sc->hw, ctl)->hw_value,
1327 ctl->retry_limit, keyidx, 0, flags, 0, 0); 1328 ctl->retry_limit, keyidx, 0, flags, 0, 0);
1328 if (ret) 1329 if (ret)
1329 goto err_unmap; 1330 goto err_unmap;
@@ -2046,7 +2047,8 @@ ath5k_beacon_setup(struct ath5k_softc *sc, struct ath5k_buf *bf,
2046 ret = ah->ah_setup_tx_desc(ah, ds, skb->len, 2047 ret = ah->ah_setup_tx_desc(ah, ds, skb->len,
2047 ieee80211_get_hdrlen_from_skb(skb), 2048 ieee80211_get_hdrlen_from_skb(skb),
2048 AR5K_PKT_TYPE_BEACON, (sc->power_level * 2), 2049 AR5K_PKT_TYPE_BEACON, (sc->power_level * 2),
2049 ctl->tx_rate->hw_value, 1, AR5K_TXKEYIX_INVALID, 2050 ieee80211_get_tx_rate(sc->hw, ctl)->hw_value,
2051 1, AR5K_TXKEYIX_INVALID,
2050 antenna, flags, 0, 0); 2052 antenna, flags, 0, 0);
2051 if (ret) 2053 if (ret)
2052 goto err_unmap; 2054 goto err_unmap;
@@ -2654,7 +2656,7 @@ ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
2654 memmove(skb->data, skb->data+pad, hdrlen); 2656 memmove(skb->data, skb->data+pad, hdrlen);
2655 } 2657 }
2656 2658
2657 sc->led_txrate = ctl->tx_rate->hw_value; 2659 sc->led_txrate = ieee80211_get_tx_rate(hw, ctl)->hw_value;
2658 2660
2659 spin_lock_irqsave(&sc->txbuflock, flags); 2661 spin_lock_irqsave(&sc->txbuflock, flags);
2660 if (list_empty(&sc->txbuf)) { 2662 if (list_empty(&sc->txbuf)) {