1 From: Alexander Wetzel <alexander@wetzel-home.de>
2 Date: Sun, 9 Oct 2022 18:30:40 +0200
3 Subject: [PATCH] wifi: mac80211: Drop support for TX push path
5 All drivers are now using mac80211 internal queues (iTXQs).
6 Drop mac80211 internal support for the old push path.
8 Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
9 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 --- a/net/mac80211/cfg.c
13 +++ b/net/mac80211/cfg.c
14 @@ -4357,9 +4357,6 @@ static int ieee80211_get_txq_stats(struc
15 struct ieee80211_sub_if_data *sdata;
18 - if (!local->ops->wake_tx_queue)
21 spin_lock_bh(&local->fq.lock);
24 --- a/net/mac80211/debugfs.c
25 +++ b/net/mac80211/debugfs.c
26 @@ -663,9 +663,7 @@ void debugfs_hw_add(struct ieee80211_loc
27 DEBUGFS_ADD_MODE(force_tx_status, 0600);
28 DEBUGFS_ADD_MODE(aql_enable, 0600);
29 DEBUGFS_ADD(aql_pending);
31 - if (local->ops->wake_tx_queue)
32 - DEBUGFS_ADD_MODE(aqm, 0600);
33 + DEBUGFS_ADD_MODE(aqm, 0600);
35 DEBUGFS_ADD_MODE(airtime_flags, 0600);
37 --- a/net/mac80211/debugfs_netdev.c
38 +++ b/net/mac80211/debugfs_netdev.c
39 @@ -677,8 +677,7 @@ static void add_common_files(struct ieee
40 DEBUGFS_ADD(rc_rateidx_vht_mcs_mask_5ghz);
41 DEBUGFS_ADD(hw_queues);
43 - if (sdata->local->ops->wake_tx_queue &&
44 - sdata->vif.type != NL80211_IFTYPE_P2P_DEVICE &&
45 + if (sdata->vif.type != NL80211_IFTYPE_P2P_DEVICE &&
46 sdata->vif.type != NL80211_IFTYPE_NAN)
49 --- a/net/mac80211/debugfs_sta.c
50 +++ b/net/mac80211/debugfs_sta.c
51 @@ -1057,10 +1057,8 @@ void ieee80211_sta_debugfs_add(struct st
52 DEBUGFS_ADD_COUNTER(rx_fragments, deflink.rx_stats.fragments);
53 DEBUGFS_ADD_COUNTER(tx_filtered, deflink.status_stats.filtered);
55 - if (local->ops->wake_tx_queue) {
57 - DEBUGFS_ADD(airtime);
60 + DEBUGFS_ADD(airtime);
62 if (wiphy_ext_feature_isset(local->hw.wiphy,
63 NL80211_EXT_FEATURE_AQL))
64 --- a/net/mac80211/ieee80211_i.h
65 +++ b/net/mac80211/ieee80211_i.h
66 @@ -2300,7 +2300,6 @@ void ieee80211_wake_queue_by_reason(stru
67 void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
68 enum queue_stop_reason reason,
70 -void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue);
71 void ieee80211_add_pending_skb(struct ieee80211_local *local,
73 void ieee80211_add_pending_skbs(struct ieee80211_local *local,
74 --- a/net/mac80211/iface.c
75 +++ b/net/mac80211/iface.c
76 @@ -460,12 +460,6 @@ static void ieee80211_do_stop(struct iee
78 ieee80211_scan_cancel(local);
81 - * Stop TX on this interface first.
83 - if (!local->ops->wake_tx_queue && sdata->dev)
84 - netif_tx_stop_all_queues(sdata->dev);
86 ieee80211_roc_purge(local, sdata);
88 switch (sdata->vif.type) {
89 @@ -813,25 +807,6 @@ static void ieee80211_uninit(struct net_
90 ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev));
93 -#if LINUX_VERSION_IS_GEQ(5,2,0)
94 -static u16 ieee80211_netdev_select_queue(struct net_device *dev,
95 - struct sk_buff *skb,
96 - struct net_device *sb_dev)
97 -#elif LINUX_VERSION_IS_GEQ(4,19,0)
98 -static u16 ieee80211_netdev_select_queue(struct net_device *dev,
99 - struct sk_buff *skb,
100 - struct net_device *sb_dev,
101 - select_queue_fallback_t fallback)
103 -static u16 ieee80211_netdev_select_queue(struct net_device *dev,
104 - struct sk_buff *skb,
106 - select_queue_fallback_t fallback)
109 - return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb);
113 ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
115 @@ -845,7 +820,6 @@ static const struct net_device_ops ieee8
116 .ndo_start_xmit = ieee80211_subif_start_xmit,
117 .ndo_set_rx_mode = ieee80211_set_multicast_list,
118 .ndo_set_mac_address = ieee80211_change_mac,
119 - .ndo_select_queue = ieee80211_netdev_select_queue,
120 .ndo_get_stats64 = ieee80211_get_stats64,
123 @@ -967,7 +941,6 @@ static const struct net_device_ops ieee8
124 .ndo_start_xmit = ieee80211_subif_start_xmit_8023,
125 .ndo_set_rx_mode = ieee80211_set_multicast_list,
126 .ndo_set_mac_address = ieee80211_change_mac,
127 - .ndo_select_queue = ieee80211_netdev_select_queue,
128 .ndo_get_stats64 = ieee80211_get_stats64,
129 #if LINUX_VERSION_IS_GEQ(5,13,0)
130 .ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
131 @@ -1471,35 +1444,6 @@ int ieee80211_do_open(struct wireless_de
133 ieee80211_recalc_ps(local);
135 - if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
136 - sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
137 - local->ops->wake_tx_queue) {
138 - /* XXX: for AP_VLAN, actually track AP queues */
140 - netif_tx_start_all_queues(dev);
142 - unsigned long flags;
143 - int n_acs = IEEE80211_NUM_ACS;
146 - if (local->hw.queues < IEEE80211_NUM_ACS)
149 - spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
150 - if (sdata->vif.cab_queue == IEEE80211_INVAL_HW_QUEUE ||
151 - (local->queue_stop_reasons[sdata->vif.cab_queue] == 0 &&
152 - skb_queue_empty(&local->pending[sdata->vif.cab_queue]))) {
153 - for (ac = 0; ac < n_acs; ac++) {
154 - int ac_queue = sdata->vif.hw_queue[ac];
156 - if (local->queue_stop_reasons[ac_queue] == 0 &&
157 - skb_queue_empty(&local->pending[ac_queue]))
158 - netif_start_subqueue(dev, ac);
161 - spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
164 set_bit(SDATA_STATE_RUNNING, &sdata->state);
167 @@ -1529,17 +1473,12 @@ static void ieee80211_if_setup(struct ne
170 dev->priv_flags &= ~IFF_TX_SKB_SHARING;
171 + dev->priv_flags |= IFF_NO_QUEUE;
172 dev->netdev_ops = &ieee80211_dataif_ops;
173 dev->needs_free_netdev = true;
174 dev->priv_destructor = ieee80211_if_free;
177 -static void ieee80211_if_setup_no_queue(struct net_device *dev)
179 - ieee80211_if_setup(dev);
180 - dev->priv_flags |= IFF_NO_QUEUE;
183 static void ieee80211_iface_process_skb(struct ieee80211_local *local,
184 struct ieee80211_sub_if_data *sdata,
186 @@ -2124,9 +2063,7 @@ int ieee80211_if_add(struct ieee80211_lo
187 struct net_device *ndev = NULL;
188 struct ieee80211_sub_if_data *sdata = NULL;
189 struct txq_info *txqi;
190 - void (*if_setup)(struct net_device *dev);
196 @@ -2149,30 +2086,18 @@ int ieee80211_if_add(struct ieee80211_lo
200 - if (local->ops->wake_tx_queue &&
201 - type != NL80211_IFTYPE_AP_VLAN &&
202 + if (type != NL80211_IFTYPE_AP_VLAN &&
203 (type != NL80211_IFTYPE_MONITOR ||
204 (params->flags & MONITOR_FLAG_ACTIVE)))
205 txq_size += sizeof(struct txq_info) +
206 local->hw.txq_data_size;
208 - if (local->ops->wake_tx_queue) {
209 - if_setup = ieee80211_if_setup_no_queue;
211 - if_setup = ieee80211_if_setup;
212 - if (local->hw.queues >= IEEE80211_NUM_ACS)
213 - txqs = IEEE80211_NUM_ACS;
216 ndev = alloc_netdev_mqs(size + txq_size,
217 name, name_assign_type,
218 - if_setup, txqs, 1);
219 + ieee80211_if_setup, 1, 1);
223 - if (!local->ops->wake_tx_queue && local->hw.wiphy->tx_queue_len)
224 - ndev->tx_queue_len = local->hw.wiphy->tx_queue_len;
226 dev_net_set(ndev, wiphy_net(local->hw.wiphy));
228 ndev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
229 --- a/net/mac80211/main.c
230 +++ b/net/mac80211/main.c
231 @@ -627,7 +627,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
233 if (WARN_ON(!ops->tx || !ops->start || !ops->stop || !ops->config ||
234 !ops->add_interface || !ops->remove_interface ||
235 - !ops->configure_filter))
236 + !ops->configure_filter || !ops->wake_tx_queue))
239 if (WARN_ON(ops->sta_state && (ops->sta_add || ops->sta_remove)))
240 @@ -716,9 +716,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
242 wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
244 - if (ops->wake_tx_queue)
245 - wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_TXQS);
247 + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_TXQS);
248 wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_RRM);
250 wiphy->bss_priv_size = sizeof(struct ieee80211_bss);
251 @@ -831,10 +829,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
252 atomic_set(&local->agg_queue_stop[i], 0);
254 tasklet_setup(&local->tx_pending_tasklet, ieee80211_tx_pending);
256 - if (ops->wake_tx_queue)
257 - tasklet_setup(&local->wake_txqs_tasklet, ieee80211_wake_txqs);
259 + tasklet_setup(&local->wake_txqs_tasklet, ieee80211_wake_txqs);
260 tasklet_setup(&local->tasklet, ieee80211_tasklet_handler);
262 skb_queue_head_init(&local->skb_queue);
263 --- a/net/mac80211/rx.c
264 +++ b/net/mac80211/rx.c
265 @@ -1573,9 +1573,6 @@ static void sta_ps_start(struct sta_info
267 ieee80211_clear_fast_xmit(sta);
269 - if (!sta->sta.txq[0])
272 for (tid = 0; tid < IEEE80211_NUM_TIDS; tid++) {
273 struct ieee80211_txq *txq = sta->sta.txq[tid];
274 struct txq_info *txqi = to_txq_info(txq);
275 --- a/net/mac80211/sta_info.c
276 +++ b/net/mac80211/sta_info.c
277 @@ -140,17 +140,15 @@ static void __cleanup_single_sta(struct
278 atomic_dec(&ps->num_sta_ps);
281 - if (sta->sta.txq[0]) {
282 - for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
283 - struct txq_info *txqi;
284 + for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
285 + struct txq_info *txqi;
287 - if (!sta->sta.txq[i])
289 + if (!sta->sta.txq[i])
292 - txqi = to_txq_info(sta->sta.txq[i]);
293 + txqi = to_txq_info(sta->sta.txq[i]);
295 - ieee80211_txq_purge(local, txqi);
297 + ieee80211_txq_purge(local, txqi);
300 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
301 @@ -428,8 +426,7 @@ void sta_info_free(struct ieee80211_loca
303 sta_dbg(sta->sdata, "Destroyed STA %pM\n", sta->sta.addr);
305 - if (sta->sta.txq[0])
306 - kfree(to_txq_info(sta->sta.txq[0]));
307 + kfree(to_txq_info(sta->sta.txq[0]));
308 kfree(rcu_dereference_raw(sta->sta.rates));
309 #ifdef CPTCFG_MAC80211_MESH
311 @@ -530,6 +527,8 @@ __sta_info_alloc(struct ieee80211_sub_if
312 struct ieee80211_local *local = sdata->local;
313 struct ieee80211_hw *hw = &local->hw;
314 struct sta_info *sta;
319 sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp);
320 @@ -600,21 +599,18 @@ __sta_info_alloc(struct ieee80211_sub_if
322 sta->last_connected = ktime_get_seconds();
324 - if (local->ops->wake_tx_queue) {
326 - int size = sizeof(struct txq_info) +
327 - ALIGN(hw->txq_data_size, sizeof(void *));
328 + size = sizeof(struct txq_info) +
329 + ALIGN(hw->txq_data_size, sizeof(void *));
331 - txq_data = kcalloc(ARRAY_SIZE(sta->sta.txq), size, gfp);
334 + txq_data = kcalloc(ARRAY_SIZE(sta->sta.txq), size, gfp);
338 - for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
339 - struct txq_info *txq = txq_data + i * size;
340 + for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
341 + struct txq_info *txq = txq_data + i * size;
343 - /* might not do anything for the bufferable MMPDU TXQ */
344 - ieee80211_txq_init(sdata, sta, txq, i);
346 + /* might not do anything for the (bufferable) MMPDU TXQ */
347 + ieee80211_txq_init(sdata, sta, txq, i);
350 if (sta_prepare_rate_control(local, sta, gfp))
351 @@ -688,8 +684,7 @@ __sta_info_alloc(struct ieee80211_sub_if
355 - if (sta->sta.txq[0])
356 - kfree(to_txq_info(sta->sta.txq[0]));
357 + kfree(to_txq_info(sta->sta.txq[0]));
359 sta_info_free_link(&sta->deflink);
360 #ifdef CPTCFG_MAC80211_MESH
361 @@ -1965,9 +1960,6 @@ ieee80211_sta_ps_deliver_response(struct
365 - if (!sta->sta.txq[0])
368 for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
369 if (!sta->sta.txq[tid] ||
370 !(driver_release_tids & BIT(tid)) ||
371 @@ -2452,7 +2444,7 @@ static void sta_set_tidstats(struct sta_
372 tidstats->tx_msdu_failed = sta->deflink.status_stats.msdu_failed[tid];
375 - if (local->ops->wake_tx_queue && tid < IEEE80211_NUM_TIDS) {
376 + if (tid < IEEE80211_NUM_TIDS) {
377 spin_lock_bh(&local->fq.lock);
380 @@ -2780,9 +2772,6 @@ unsigned long ieee80211_sta_last_active(
382 static void sta_update_codel_params(struct sta_info *sta, u32 thr)
384 - if (!sta->sdata->local->ops->wake_tx_queue)
387 if (thr && thr < STA_SLOW_THRESHOLD * sta->local->num_sta) {
388 sta->cparams.target = MS2TIME(50);
389 sta->cparams.interval = MS2TIME(300);
390 --- a/net/mac80211/tdls.c
391 +++ b/net/mac80211/tdls.c
392 @@ -1016,7 +1016,6 @@ ieee80211_tdls_prep_mgmt_packet(struct w
393 skb->priority = 256 + 5;
396 - skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, skb));
399 * Set the WLAN_TDLS_TEARDOWN flag to indicate a teardown in progress.
400 --- a/net/mac80211/tx.c
401 +++ b/net/mac80211/tx.c
402 @@ -1606,9 +1606,6 @@ int ieee80211_txq_setup_flows(struct iee
403 bool supp_vht = false;
404 enum nl80211_band band;
406 - if (!local->ops->wake_tx_queue)
409 ret = fq_init(fq, 4096);
412 @@ -1656,9 +1653,6 @@ void ieee80211_txq_teardown_flows(struct
414 struct fq *fq = &local->fq;
416 - if (!local->ops->wake_tx_queue)
422 @@ -1675,8 +1669,7 @@ static bool ieee80211_queue_skb(struct i
423 struct ieee80211_vif *vif;
424 struct txq_info *txqi;
426 - if (!local->ops->wake_tx_queue ||
427 - sdata->vif.type == NL80211_IFTYPE_MONITOR)
428 + if (sdata->vif.type == NL80211_IFTYPE_MONITOR)
431 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
432 @@ -4201,12 +4194,7 @@ void __ieee80211_subif_start_xmit(struct
436 - if (local->ops->wake_tx_queue) {
437 - u16 queue = __ieee80211_select_queue(sdata, sta, skb);
438 - skb_set_queue_mapping(skb, queue);
442 + skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb));
443 ieee80211_aggr_check(sdata, sta, skb);
445 sk_pacing_shift_update(skb->sk, sdata->local->hw.tx_sk_pacing_shift);
446 @@ -4517,11 +4505,7 @@ static void ieee80211_8023_xmit(struct i
447 struct tid_ampdu_tx *tid_tx;
450 - if (local->ops->wake_tx_queue) {
451 - u16 queue = __ieee80211_select_queue(sdata, sta, skb);
452 - skb_set_queue_mapping(skb, queue);
455 + skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb));
457 if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)) &&
458 test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state))
459 @@ -4775,9 +4759,6 @@ void ieee80211_tx_pending(struct tasklet
464 - if (skb_queue_empty(&local->pending[i]))
465 - ieee80211_propagate_queue_wake(local, i);
467 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
469 @@ -5970,10 +5951,9 @@ int ieee80211_tx_control_port(struct wip
473 - u16 queue = __ieee80211_select_queue(sdata, sta, skb);
474 + u16 queue = ieee80211_select_queue(sdata, sta, skb);
476 skb_set_queue_mapping(skb, queue);
480 * for MLO STA, the SA should be the AP MLD address, but
481 --- a/net/mac80211/util.c
482 +++ b/net/mac80211/util.c
483 @@ -444,39 +444,6 @@ void ieee80211_wake_txqs(struct tasklet_
484 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
487 -void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue)
489 - struct ieee80211_sub_if_data *sdata;
490 - int n_acs = IEEE80211_NUM_ACS;
492 - if (local->ops->wake_tx_queue)
495 - if (local->hw.queues < IEEE80211_NUM_ACS)
498 - list_for_each_entry_rcu(sdata, &local->interfaces, list) {
504 - if (sdata->vif.cab_queue != IEEE80211_INVAL_HW_QUEUE &&
505 - local->queue_stop_reasons[sdata->vif.cab_queue] != 0)
508 - for (ac = 0; ac < n_acs; ac++) {
509 - int ac_queue = sdata->vif.hw_queue[ac];
511 - if (ac_queue == queue ||
512 - (sdata->vif.cab_queue == queue &&
513 - local->queue_stop_reasons[ac_queue] == 0 &&
514 - skb_queue_empty(&local->pending[ac_queue])))
515 - netif_wake_subqueue(sdata->dev, ac);
520 static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
521 enum queue_stop_reason reason,
523 @@ -507,11 +474,7 @@ static void __ieee80211_wake_queue(struc
524 /* someone still has this queue stopped */
527 - if (skb_queue_empty(&local->pending[queue])) {
529 - ieee80211_propagate_queue_wake(local, queue);
532 + if (!skb_queue_empty(&local->pending[queue]))
533 tasklet_schedule(&local->tx_pending_tasklet);
536 @@ -521,12 +484,10 @@ static void __ieee80211_wake_queue(struc
537 * release someone's lock, but it is fine because all the callers of
538 * __ieee80211_wake_queue call it right before releasing the lock.
540 - if (local->ops->wake_tx_queue) {
541 - if (reason == IEEE80211_QUEUE_STOP_REASON_DRIVER)
542 - tasklet_schedule(&local->wake_txqs_tasklet);
544 - _ieee80211_wake_txqs(local, flags);
546 + if (reason == IEEE80211_QUEUE_STOP_REASON_DRIVER)
547 + tasklet_schedule(&local->wake_txqs_tasklet);
549 + _ieee80211_wake_txqs(local, flags);
552 void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
553 @@ -554,8 +515,6 @@ static void __ieee80211_stop_queue(struc
556 struct ieee80211_local *local = hw_to_local(hw);
557 - struct ieee80211_sub_if_data *sdata;
558 - int n_acs = IEEE80211_NUM_ACS;
560 trace_stop_queue(local, queue, reason);
562 @@ -567,27 +526,7 @@ static void __ieee80211_stop_queue(struc
564 local->q_stop_reasons[queue][reason]++;
566 - if (__test_and_set_bit(reason, &local->queue_stop_reasons[queue]))
569 - if (local->hw.queues < IEEE80211_NUM_ACS)
573 - list_for_each_entry_rcu(sdata, &local->interfaces, list) {
579 - for (ac = 0; ac < n_acs; ac++) {
580 - if (!local->ops->wake_tx_queue &&
581 - (sdata->vif.hw_queue[ac] == queue ||
582 - sdata->vif.cab_queue == queue))
583 - netif_stop_subqueue(sdata->dev, ac);
587 + set_bit(reason, &local->queue_stop_reasons[queue]);
590 void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
591 --- a/net/mac80211/wme.c
592 +++ b/net/mac80211/wme.c
593 @@ -122,6 +122,9 @@ u16 ieee80211_select_queue_80211(struct
594 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
597 + /* Ensure hash is set prior to potential SW encryption */
600 if ((info->control.flags & IEEE80211_TX_CTRL_DONT_REORDER) ||
601 local->hw.queues < IEEE80211_NUM_ACS)
603 @@ -141,13 +144,16 @@ u16 ieee80211_select_queue_80211(struct
604 return ieee80211_downgrade_queue(sdata, NULL, skb);
607 -u16 __ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
608 - struct sta_info *sta, struct sk_buff *skb)
609 +u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
610 + struct sta_info *sta, struct sk_buff *skb)
612 const struct ethhdr *eth = (void *)skb->data;
613 struct mac80211_qos_map *qos_map;
616 + /* Ensure hash is set prior to potential SW encryption */
619 /* all mesh/ocb stations are required to support WME */
620 if ((sdata->vif.type == NL80211_IFTYPE_MESH_POINT &&
621 !is_multicast_ether_addr(eth->h_dest)) ||
622 @@ -178,59 +184,6 @@ u16 __ieee80211_select_queue(struct ieee
623 return ieee80211_downgrade_queue(sdata, sta, skb);
627 -/* Indicate which queue to use. */
628 -u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
629 - struct sk_buff *skb)
631 - struct ieee80211_local *local = sdata->local;
632 - struct sta_info *sta = NULL;
633 - const u8 *ra = NULL;
636 - /* when using iTXQ, we can do this later */
637 - if (local->ops->wake_tx_queue)
640 - if (local->hw.queues < IEEE80211_NUM_ACS || skb->len < 6) {
641 - skb->priority = 0; /* required for correct WPA/11i MIC */
646 - switch (sdata->vif.type) {
647 - case NL80211_IFTYPE_AP_VLAN:
648 - sta = rcu_dereference(sdata->u.vlan.sta);
652 - case NL80211_IFTYPE_AP:
655 - case NL80211_IFTYPE_STATION:
656 - /* might be a TDLS station */
657 - sta = sta_info_get(sdata, skb->data);
661 - ra = sdata->deflink.u.mgd.bssid;
663 - case NL80211_IFTYPE_ADHOC:
670 - if (!sta && ra && !is_multicast_ether_addr(ra))
671 - sta = sta_info_get(sdata, ra);
673 - ret = __ieee80211_select_queue(sdata, sta, skb);
680 * ieee80211_set_qos_hdr - Fill in the QoS header if there is one.
682 --- a/net/mac80211/wme.h
683 +++ b/net/mac80211/wme.h
685 u16 ieee80211_select_queue_80211(struct ieee80211_sub_if_data *sdata,
687 struct ieee80211_hdr *hdr);
688 -u16 __ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
689 - struct sta_info *sta, struct sk_buff *skb);
690 u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
691 - struct sk_buff *skb);
692 + struct sta_info *sta, struct sk_buff *skb);
693 void ieee80211_set_qos_hdr(struct ieee80211_sub_if_data *sdata,
694 struct sk_buff *skb);