aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00mac.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-04-21 13:00:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-07 15:02:21 -0400
commite58c6aca99357d7f85f18e0b661d8c5a87f926a9 (patch)
tree8f7f5c3b78a1beae3121d8fbe95d21a21e361df9 /drivers/net/wireless/rt2x00/rt2x00mac.c
parent62e70cf8568151a41e8525ddf0e56c0380a71cfd (diff)
rt2x00: Use rt2x00 queue numbering
Use the rt2x00 queue enumeration as much as possible, removing the usage of the mac80211 queue numbering wherever it is possible. This makes it easier for mac80211 to change it queue identification scheme without having to deal with big changes in the rt2x00 code. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index e078e0ad0d06..d4ceab7646e7 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -81,6 +81,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
81{ 81{
82 struct rt2x00_dev *rt2x00dev = hw->priv; 82 struct rt2x00_dev *rt2x00dev = hw->priv;
83 struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; 83 struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data;
84 enum data_queue_qid qid = mac80211_queue_to_qid(control->queue);
84 struct data_queue *queue; 85 struct data_queue *queue;
85 struct skb_frame_desc *skbdesc; 86 struct skb_frame_desc *skbdesc;
86 u16 frame_control; 87 u16 frame_control;
@@ -101,14 +102,13 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
101 */ 102 */
102 if (control->flags & IEEE80211_TXCTL_SEND_AFTER_DTIM && 103 if (control->flags & IEEE80211_TXCTL_SEND_AFTER_DTIM &&
103 test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags)) 104 test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags))
104 queue = rt2x00queue_get_queue(rt2x00dev, RT2X00_BCN_QUEUE_ATIM); 105 queue = rt2x00queue_get_queue(rt2x00dev, QID_ATIM);
105 else 106 else
106 queue = rt2x00queue_get_queue(rt2x00dev, control->queue); 107 queue = rt2x00queue_get_queue(rt2x00dev, qid);
107 if (unlikely(!queue)) { 108 if (unlikely(!queue)) {
108 ERROR(rt2x00dev, 109 ERROR(rt2x00dev,
109 "Attempt to send packet over invalid queue %d.\n" 110 "Attempt to send packet over invalid queue %d.\n"
110 "Please file bug report to %s.\n", 111 "Please file bug report to %s.\n", qid, DRV_PROJECT);
111 control->queue, DRV_PROJECT);
112 dev_kfree_skb_any(skb); 112 dev_kfree_skb_any(skb);
113 return NETDEV_TX_OK; 113 return NETDEV_TX_OK;
114 } 114 }
@@ -154,7 +154,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
154 ieee80211_stop_queue(rt2x00dev->hw, control->queue); 154 ieee80211_stop_queue(rt2x00dev->hw, control->queue);
155 155
156 if (rt2x00dev->ops->lib->kick_tx_queue) 156 if (rt2x00dev->ops->lib->kick_tx_queue)
157 rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, control->queue); 157 rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, qid);
158 158
159 return NETDEV_TX_OK; 159 return NETDEV_TX_OK;
160} 160}
@@ -187,8 +187,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
187{ 187{
188 struct rt2x00_dev *rt2x00dev = hw->priv; 188 struct rt2x00_dev *rt2x00dev = hw->priv;
189 struct rt2x00_intf *intf = vif_to_intf(conf->vif); 189 struct rt2x00_intf *intf = vif_to_intf(conf->vif);
190 struct data_queue *queue = 190 struct data_queue *queue = rt2x00queue_get_queue(rt2x00dev, QID_BEACON);
191 rt2x00queue_get_queue(rt2x00dev, RT2X00_BCN_QUEUE_BEACON);
192 struct queue_entry *entry = NULL; 191 struct queue_entry *entry = NULL;
193 unsigned int i; 192 unsigned int i;
194 193