aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/wme.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-06-10 04:54:31 -0400
committerDavid S. Miller <davem@davemloft.net>2008-06-10 04:54:31 -0400
commit788c0a53164c05c5ccdb1472474372b72ba74644 (patch)
tree5f274102e3dc4bcca6cb3a695aa2c8228ad5fc4f /net/mac80211/wme.c
parente64bda89b8fe81cce9b4a20885d2c204c2d52532 (diff)
parent78cf07472f0ede8394bacc4bc02354505080cfe1 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Conflicts: drivers/net/ps3_gelic_wireless.c drivers/net/wireless/libertas/main.c
Diffstat (limited to 'net/mac80211/wme.c')
-rw-r--r--net/mac80211/wme.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index c87baf4ce979..14a9ff10a1e9 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -149,8 +149,7 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd)
149 struct ieee80211_local *local = wdev_priv(qd->dev->ieee80211_ptr); 149 struct ieee80211_local *local = wdev_priv(qd->dev->ieee80211_ptr);
150 struct ieee80211_hw *hw = &local->hw; 150 struct ieee80211_hw *hw = &local->hw;
151 struct ieee80211_sched_data *q = qdisc_priv(qd); 151 struct ieee80211_sched_data *q = qdisc_priv(qd);
152 struct ieee80211_tx_packet_data *pkt_data = 152 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
153 (struct ieee80211_tx_packet_data *) skb->cb;
154 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; 153 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
155 unsigned short fc = le16_to_cpu(hdr->frame_control); 154 unsigned short fc = le16_to_cpu(hdr->frame_control);
156 struct Qdisc *qdisc; 155 struct Qdisc *qdisc;
@@ -158,8 +157,8 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd)
158 int err, queue; 157 int err, queue;
159 u8 tid; 158 u8 tid;
160 159
161 if (pkt_data->flags & IEEE80211_TXPD_REQUEUE) { 160 if (info->flags & IEEE80211_TX_CTL_REQUEUE) {
162 queue = pkt_data->queue; 161 queue = skb_get_queue_mapping(skb);
163 rcu_read_lock(); 162 rcu_read_lock();
164 sta = sta_info_get(local, hdr->addr1); 163 sta = sta_info_get(local, hdr->addr1);
165 tid = skb->priority & QOS_CONTROL_TAG1D_MASK; 164 tid = skb->priority & QOS_CONTROL_TAG1D_MASK;
@@ -168,9 +167,9 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd)
168 if ((ampdu_queue < QD_NUM(hw)) && 167 if ((ampdu_queue < QD_NUM(hw)) &&
169 test_bit(ampdu_queue, q->qdisc_pool)) { 168 test_bit(ampdu_queue, q->qdisc_pool)) {
170 queue = ampdu_queue; 169 queue = ampdu_queue;
171 pkt_data->flags |= IEEE80211_TXPD_AMPDU; 170 info->flags |= IEEE80211_TX_CTL_AMPDU;
172 } else { 171 } else {
173 pkt_data->flags &= ~IEEE80211_TXPD_AMPDU; 172 info->flags &= ~IEEE80211_TX_CTL_AMPDU;
174 } 173 }
175 } 174 }
176 rcu_read_unlock(); 175 rcu_read_unlock();
@@ -206,9 +205,9 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd)
206 if ((ampdu_queue < QD_NUM(hw)) && 205 if ((ampdu_queue < QD_NUM(hw)) &&
207 test_bit(ampdu_queue, q->qdisc_pool)) { 206 test_bit(ampdu_queue, q->qdisc_pool)) {
208 queue = ampdu_queue; 207 queue = ampdu_queue;
209 pkt_data->flags |= IEEE80211_TXPD_AMPDU; 208 info->flags |= IEEE80211_TX_CTL_AMPDU;
210 } else { 209 } else {
211 pkt_data->flags &= ~IEEE80211_TXPD_AMPDU; 210 info->flags &= ~IEEE80211_TX_CTL_AMPDU;
212 } 211 }
213 } 212 }
214 213
@@ -220,7 +219,7 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd)
220 err = NET_XMIT_DROP; 219 err = NET_XMIT_DROP;
221 } else { 220 } else {
222 tid = skb->priority & QOS_CONTROL_TAG1D_MASK; 221 tid = skb->priority & QOS_CONTROL_TAG1D_MASK;
223 pkt_data->queue = (unsigned int) queue; 222 skb_set_queue_mapping(skb, queue);
224 qdisc = q->queues[queue]; 223 qdisc = q->queues[queue];
225 err = qdisc->enqueue(skb, qdisc); 224 err = qdisc->enqueue(skb, qdisc);
226 if (err == NET_XMIT_SUCCESS) { 225 if (err == NET_XMIT_SUCCESS) {
@@ -241,13 +240,11 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd)
241static int wme_qdiscop_requeue(struct sk_buff *skb, struct Qdisc* qd) 240static int wme_qdiscop_requeue(struct sk_buff *skb, struct Qdisc* qd)
242{ 241{
243 struct ieee80211_sched_data *q = qdisc_priv(qd); 242 struct ieee80211_sched_data *q = qdisc_priv(qd);
244 struct ieee80211_tx_packet_data *pkt_data =
245 (struct ieee80211_tx_packet_data *) skb->cb;
246 struct Qdisc *qdisc; 243 struct Qdisc *qdisc;
247 int err; 244 int err;
248 245
249 /* we recorded which queue to use earlier! */ 246 /* we recorded which queue to use earlier! */
250 qdisc = q->queues[pkt_data->queue]; 247 qdisc = q->queues[skb_get_queue_mapping(skb)];
251 248
252 if ((err = qdisc->ops->requeue(skb, qdisc)) == 0) { 249 if ((err = qdisc->ops->requeue(skb, qdisc)) == 0) {
253 qd->q.qlen++; 250 qd->q.qlen++;
@@ -271,11 +268,8 @@ static struct sk_buff *wme_qdiscop_dequeue(struct Qdisc* qd)
271 /* check all the h/w queues in numeric/priority order */ 268 /* check all the h/w queues in numeric/priority order */
272 for (queue = 0; queue < QD_NUM(hw); queue++) { 269 for (queue = 0; queue < QD_NUM(hw); queue++) {
273 /* see if there is room in this hardware queue */ 270 /* see if there is room in this hardware queue */
274 if ((test_bit(IEEE80211_LINK_STATE_XOFF, 271 if (__netif_subqueue_stopped(local->mdev, queue) ||
275 &local->state[queue])) || 272 !test_bit(queue, q->qdisc_pool))
276 (test_bit(IEEE80211_LINK_STATE_PENDING,
277 &local->state[queue])) ||
278 (!test_bit(queue, q->qdisc_pool)))
279 continue; 273 continue;
280 274
281 /* there is space - try and get a frame */ 275 /* there is space - try and get a frame */