diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-05-16 18:57:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-21 21:48:14 -0400 |
commit | e2530083609148a7835b54c431f6b8956407c1f6 (patch) | |
tree | 8ed43347541444c7a72d2c79f550f69a93cad591 /drivers/net/wireless/rt2x00 | |
parent | eefce91a384a64c7bbf913eb08c4adfb911c3639 (diff) |
mac80211: use multi-queue master netdevice
This patch updates mac80211 and drivers to be multi-queue aware and
use that instead of the internal queue mapping. Also does a number
of cleanups in various pieces of the code that fall out and reduces
internal mac80211 state size.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.h | 13 |
2 files changed, 5 insertions, 18 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index b5379b027b18..c05e05b58887 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -102,7 +102,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
102 | struct rt2x00_dev *rt2x00dev = hw->priv; | 102 | struct rt2x00_dev *rt2x00dev = hw->priv; |
103 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 103 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
104 | struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; | 104 | struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; |
105 | enum data_queue_qid qid = mac80211_queue_to_qid(tx_info->queue); | 105 | enum data_queue_qid qid = skb_get_queue_mapping(skb); |
106 | struct data_queue *queue; | 106 | struct data_queue *queue; |
107 | u16 frame_control; | 107 | u16 frame_control; |
108 | 108 | ||
@@ -149,23 +149,23 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
149 | IEEE80211_TX_CTL_USE_CTS_PROTECT)) && | 149 | IEEE80211_TX_CTL_USE_CTS_PROTECT)) && |
150 | !rt2x00dev->ops->hw->set_rts_threshold) { | 150 | !rt2x00dev->ops->hw->set_rts_threshold) { |
151 | if (rt2x00queue_available(queue) <= 1) { | 151 | if (rt2x00queue_available(queue) <= 1) { |
152 | ieee80211_stop_queue(rt2x00dev->hw, tx_info->queue); | 152 | ieee80211_stop_queue(rt2x00dev->hw, qid); |
153 | return NETDEV_TX_BUSY; | 153 | return NETDEV_TX_BUSY; |
154 | } | 154 | } |
155 | 155 | ||
156 | if (rt2x00mac_tx_rts_cts(rt2x00dev, queue, skb)) { | 156 | if (rt2x00mac_tx_rts_cts(rt2x00dev, queue, skb)) { |
157 | ieee80211_stop_queue(rt2x00dev->hw, tx_info->queue); | 157 | ieee80211_stop_queue(rt2x00dev->hw, qid); |
158 | return NETDEV_TX_BUSY; | 158 | return NETDEV_TX_BUSY; |
159 | } | 159 | } |
160 | } | 160 | } |
161 | 161 | ||
162 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb)) { | 162 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb)) { |
163 | ieee80211_stop_queue(rt2x00dev->hw, tx_info->queue); | 163 | ieee80211_stop_queue(rt2x00dev->hw, qid); |
164 | return NETDEV_TX_BUSY; | 164 | return NETDEV_TX_BUSY; |
165 | } | 165 | } |
166 | 166 | ||
167 | if (rt2x00queue_full(queue)) | 167 | if (rt2x00queue_full(queue)) |
168 | ieee80211_stop_queue(rt2x00dev->hw, tx_info->queue); | 168 | ieee80211_stop_queue(rt2x00dev->hw, qid); |
169 | 169 | ||
170 | if (rt2x00dev->ops->lib->kick_tx_queue) | 170 | if (rt2x00dev->ops->lib->kick_tx_queue) |
171 | rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, qid); | 171 | rt2x00dev->ops->lib->kick_tx_queue(rt2x00dev, qid); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index f263fe422f87..4d00ced14cc7 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -80,19 +80,6 @@ enum data_queue_qid { | |||
80 | }; | 80 | }; |
81 | 81 | ||
82 | /** | 82 | /** |
83 | * mac80211_queue_to_qid - Convert mac80211 queue to rt2x00 qid | ||
84 | * @queue: mac80211 queue. | ||
85 | */ | ||
86 | static inline enum data_queue_qid mac80211_queue_to_qid(unsigned int queue) | ||
87 | { | ||
88 | /* Regular TX queues are mapped directly */ | ||
89 | if (queue < 4) | ||
90 | return queue; | ||
91 | WARN_ON(1); | ||
92 | return QID_OTHER; | ||
93 | } | ||
94 | |||
95 | /** | ||
96 | * enum skb_frame_desc_flags: Flags for &struct skb_frame_desc | 83 | * enum skb_frame_desc_flags: Flags for &struct skb_frame_desc |
97 | * | 84 | * |
98 | * @FRAME_DESC_DRIVER_GENERATED: Frame was generated inside driver | 85 | * @FRAME_DESC_DRIVER_GENERATED: Frame was generated inside driver |