aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00queue.c
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/rt2x00/rt2x00queue.c
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/rt2x00/rt2x00queue.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 19c10629c767..5cf4c2f59260 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -33,8 +33,10 @@ void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
33 struct txentry_desc *txdesc, 33 struct txentry_desc *txdesc,
34 struct ieee80211_tx_control *control) 34 struct ieee80211_tx_control *control)
35{ 35{
36 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
36 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data; 37 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data;
37 struct ieee80211_rate *rate = control->tx_rate; 38 struct ieee80211_rate *rate =
39 ieee80211_get_tx_rate(rt2x00dev->hw, control);
38 const struct rt2x00_rate *hwrate; 40 const struct rt2x00_rate *hwrate;
39 unsigned int data_length; 41 unsigned int data_length;
40 unsigned int duration; 42 unsigned int duration;
@@ -77,8 +79,9 @@ void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
77 __set_bit(ENTRY_TXD_CTS_FRAME, &txdesc->flags); 79 __set_bit(ENTRY_TXD_CTS_FRAME, &txdesc->flags);
78 __clear_bit(ENTRY_TXD_ACK, &txdesc->flags); 80 __clear_bit(ENTRY_TXD_ACK, &txdesc->flags);
79 } 81 }
80 if (control->rts_cts_rate) 82 if (control->rts_cts_rate_idx >= 0)
81 rate = control->rts_cts_rate; 83 rate =
84 ieee80211_get_rts_cts_rate(rt2x00dev->hw, control);
82 } 85 }
83 86
84 /* 87 /*