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 @@ -4346,9 +4346,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 @@ -2294,7 +2294,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,13 +807,6 @@ static void ieee80211_uninit(struct net_
90 ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev));
93 -static u16 ieee80211_netdev_select_queue(struct net_device *dev,
94 - struct sk_buff *skb,
95 - struct net_device *sb_dev)
97 - return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb);
101 ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
103 @@ -833,7 +820,6 @@ static const struct net_device_ops ieee8
104 .ndo_start_xmit = ieee80211_subif_start_xmit,
105 .ndo_set_rx_mode = ieee80211_set_multicast_list,
106 .ndo_set_mac_address = ieee80211_change_mac,
107 - .ndo_select_queue = ieee80211_netdev_select_queue,
108 .ndo_get_stats64 = ieee80211_get_stats64,
111 @@ -941,7 +927,6 @@ static const struct net_device_ops ieee8
112 .ndo_start_xmit = ieee80211_subif_start_xmit_8023,
113 .ndo_set_rx_mode = ieee80211_set_multicast_list,
114 .ndo_set_mac_address = ieee80211_change_mac,
115 - .ndo_select_queue = ieee80211_netdev_select_queue,
116 .ndo_get_stats64 = ieee80211_get_stats64,
117 .ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
119 @@ -1443,35 +1428,6 @@ int ieee80211_do_open(struct wireless_de
121 ieee80211_recalc_ps(local);
123 - if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
124 - sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
125 - local->ops->wake_tx_queue) {
126 - /* XXX: for AP_VLAN, actually track AP queues */
128 - netif_tx_start_all_queues(dev);
130 - unsigned long flags;
131 - int n_acs = IEEE80211_NUM_ACS;
134 - if (local->hw.queues < IEEE80211_NUM_ACS)
137 - spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
138 - if (sdata->vif.cab_queue == IEEE80211_INVAL_HW_QUEUE ||
139 - (local->queue_stop_reasons[sdata->vif.cab_queue] == 0 &&
140 - skb_queue_empty(&local->pending[sdata->vif.cab_queue]))) {
141 - for (ac = 0; ac < n_acs; ac++) {
142 - int ac_queue = sdata->vif.hw_queue[ac];
144 - if (local->queue_stop_reasons[ac_queue] == 0 &&
145 - skb_queue_empty(&local->pending[ac_queue]))
146 - netif_start_subqueue(dev, ac);
149 - spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
152 set_bit(SDATA_STATE_RUNNING, &sdata->state);
155 @@ -1501,17 +1457,12 @@ static void ieee80211_if_setup(struct ne
158 dev->priv_flags &= ~IFF_TX_SKB_SHARING;
159 + dev->priv_flags |= IFF_NO_QUEUE;
160 dev->netdev_ops = &ieee80211_dataif_ops;
161 dev->needs_free_netdev = true;
162 dev->priv_destructor = ieee80211_if_free;
165 -static void ieee80211_if_setup_no_queue(struct net_device *dev)
167 - ieee80211_if_setup(dev);
168 - dev->priv_flags |= IFF_NO_QUEUE;
171 static void ieee80211_iface_process_skb(struct ieee80211_local *local,
172 struct ieee80211_sub_if_data *sdata,
174 @@ -2096,9 +2047,7 @@ int ieee80211_if_add(struct ieee80211_lo
175 struct net_device *ndev = NULL;
176 struct ieee80211_sub_if_data *sdata = NULL;
177 struct txq_info *txqi;
178 - void (*if_setup)(struct net_device *dev);
184 @@ -2121,30 +2070,18 @@ int ieee80211_if_add(struct ieee80211_lo
188 - if (local->ops->wake_tx_queue &&
189 - type != NL80211_IFTYPE_AP_VLAN &&
190 + if (type != NL80211_IFTYPE_AP_VLAN &&
191 (type != NL80211_IFTYPE_MONITOR ||
192 (params->flags & MONITOR_FLAG_ACTIVE)))
193 txq_size += sizeof(struct txq_info) +
194 local->hw.txq_data_size;
196 - if (local->ops->wake_tx_queue) {
197 - if_setup = ieee80211_if_setup_no_queue;
199 - if_setup = ieee80211_if_setup;
200 - if (local->hw.queues >= IEEE80211_NUM_ACS)
201 - txqs = IEEE80211_NUM_ACS;
204 ndev = alloc_netdev_mqs(size + txq_size,
205 name, name_assign_type,
206 - if_setup, txqs, 1);
207 + ieee80211_if_setup, 1, 1);
211 - if (!local->ops->wake_tx_queue && local->hw.wiphy->tx_queue_len)
212 - ndev->tx_queue_len = local->hw.wiphy->tx_queue_len;
214 dev_net_set(ndev, wiphy_net(local->hw.wiphy));
216 ndev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
217 --- a/net/mac80211/main.c
218 +++ b/net/mac80211/main.c
219 @@ -630,7 +630,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
221 if (WARN_ON(!ops->tx || !ops->start || !ops->stop || !ops->config ||
222 !ops->add_interface || !ops->remove_interface ||
223 - !ops->configure_filter))
224 + !ops->configure_filter || !ops->wake_tx_queue))
227 if (WARN_ON(ops->sta_state && (ops->sta_add || ops->sta_remove)))
228 @@ -719,9 +719,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
230 wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
232 - if (ops->wake_tx_queue)
233 - wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_TXQS);
235 + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_TXQS);
236 wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_RRM);
238 wiphy->bss_priv_size = sizeof(struct ieee80211_bss);
239 @@ -834,10 +832,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
240 atomic_set(&local->agg_queue_stop[i], 0);
242 tasklet_setup(&local->tx_pending_tasklet, ieee80211_tx_pending);
244 - if (ops->wake_tx_queue)
245 - tasklet_setup(&local->wake_txqs_tasklet, ieee80211_wake_txqs);
247 + tasklet_setup(&local->wake_txqs_tasklet, ieee80211_wake_txqs);
248 tasklet_setup(&local->tasklet, ieee80211_tasklet_handler);
250 skb_queue_head_init(&local->skb_queue);
251 --- a/net/mac80211/rx.c
252 +++ b/net/mac80211/rx.c
253 @@ -1571,9 +1571,6 @@ static void sta_ps_start(struct sta_info
255 ieee80211_clear_fast_xmit(sta);
257 - if (!sta->sta.txq[0])
260 for (tid = 0; tid < IEEE80211_NUM_TIDS; tid++) {
261 struct ieee80211_txq *txq = sta->sta.txq[tid];
262 struct txq_info *txqi = to_txq_info(txq);
263 --- a/net/mac80211/sta_info.c
264 +++ b/net/mac80211/sta_info.c
265 @@ -140,17 +140,15 @@ static void __cleanup_single_sta(struct
266 atomic_dec(&ps->num_sta_ps);
269 - if (sta->sta.txq[0]) {
270 - for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
271 - struct txq_info *txqi;
272 + for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
273 + struct txq_info *txqi;
275 - if (!sta->sta.txq[i])
277 + if (!sta->sta.txq[i])
280 - txqi = to_txq_info(sta->sta.txq[i]);
281 + txqi = to_txq_info(sta->sta.txq[i]);
283 - ieee80211_txq_purge(local, txqi);
285 + ieee80211_txq_purge(local, txqi);
288 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
289 @@ -425,8 +423,7 @@ void sta_info_free(struct ieee80211_loca
291 sta_dbg(sta->sdata, "Destroyed STA %pM\n", sta->sta.addr);
293 - if (sta->sta.txq[0])
294 - kfree(to_txq_info(sta->sta.txq[0]));
295 + kfree(to_txq_info(sta->sta.txq[0]));
296 kfree(rcu_dereference_raw(sta->sta.rates));
297 #ifdef CPTCFG_MAC80211_MESH
299 @@ -527,6 +524,8 @@ __sta_info_alloc(struct ieee80211_sub_if
300 struct ieee80211_local *local = sdata->local;
301 struct ieee80211_hw *hw = &local->hw;
302 struct sta_info *sta;
307 sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp);
308 @@ -597,21 +596,18 @@ __sta_info_alloc(struct ieee80211_sub_if
310 sta->last_connected = ktime_get_seconds();
312 - if (local->ops->wake_tx_queue) {
314 - int size = sizeof(struct txq_info) +
315 - ALIGN(hw->txq_data_size, sizeof(void *));
316 + size = sizeof(struct txq_info) +
317 + ALIGN(hw->txq_data_size, sizeof(void *));
319 - txq_data = kcalloc(ARRAY_SIZE(sta->sta.txq), size, gfp);
322 + txq_data = kcalloc(ARRAY_SIZE(sta->sta.txq), size, gfp);
326 - for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
327 - struct txq_info *txq = txq_data + i * size;
328 + for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
329 + struct txq_info *txq = txq_data + i * size;
331 - /* might not do anything for the bufferable MMPDU TXQ */
332 - ieee80211_txq_init(sdata, sta, txq, i);
334 + /* might not do anything for the (bufferable) MMPDU TXQ */
335 + ieee80211_txq_init(sdata, sta, txq, i);
338 if (sta_prepare_rate_control(local, sta, gfp))
339 @@ -685,8 +681,7 @@ __sta_info_alloc(struct ieee80211_sub_if
343 - if (sta->sta.txq[0])
344 - kfree(to_txq_info(sta->sta.txq[0]));
345 + kfree(to_txq_info(sta->sta.txq[0]));
347 sta_info_free_link(&sta->deflink);
348 #ifdef CPTCFG_MAC80211_MESH
349 @@ -1960,9 +1955,6 @@ ieee80211_sta_ps_deliver_response(struct
353 - if (!sta->sta.txq[0])
356 for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
357 if (!sta->sta.txq[tid] ||
358 !(driver_release_tids & BIT(tid)) ||
359 @@ -2447,7 +2439,7 @@ static void sta_set_tidstats(struct sta_
360 tidstats->tx_msdu_failed = sta->deflink.status_stats.msdu_failed[tid];
363 - if (local->ops->wake_tx_queue && tid < IEEE80211_NUM_TIDS) {
364 + if (tid < IEEE80211_NUM_TIDS) {
365 spin_lock_bh(&local->fq.lock);
368 @@ -2775,9 +2767,6 @@ unsigned long ieee80211_sta_last_active(
370 static void sta_update_codel_params(struct sta_info *sta, u32 thr)
372 - if (!sta->sdata->local->ops->wake_tx_queue)
375 if (thr && thr < STA_SLOW_THRESHOLD * sta->local->num_sta) {
376 sta->cparams.target = MS2TIME(50);
377 sta->cparams.interval = MS2TIME(300);
378 --- a/net/mac80211/tdls.c
379 +++ b/net/mac80211/tdls.c
380 @@ -1016,7 +1016,6 @@ ieee80211_tdls_prep_mgmt_packet(struct w
381 skb->priority = 256 + 5;
384 - skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, skb));
387 * Set the WLAN_TDLS_TEARDOWN flag to indicate a teardown in progress.
388 --- a/net/mac80211/tx.c
389 +++ b/net/mac80211/tx.c
390 @@ -1600,9 +1600,6 @@ int ieee80211_txq_setup_flows(struct iee
391 bool supp_vht = false;
392 enum nl80211_band band;
394 - if (!local->ops->wake_tx_queue)
397 ret = fq_init(fq, 4096);
400 @@ -1650,9 +1647,6 @@ void ieee80211_txq_teardown_flows(struct
402 struct fq *fq = &local->fq;
404 - if (!local->ops->wake_tx_queue)
410 @@ -1669,8 +1663,7 @@ static bool ieee80211_queue_skb(struct i
411 struct ieee80211_vif *vif;
412 struct txq_info *txqi;
414 - if (!local->ops->wake_tx_queue ||
415 - sdata->vif.type == NL80211_IFTYPE_MONITOR)
416 + if (sdata->vif.type == NL80211_IFTYPE_MONITOR)
419 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
420 @@ -4193,12 +4186,7 @@ void __ieee80211_subif_start_xmit(struct
424 - if (local->ops->wake_tx_queue) {
425 - u16 queue = __ieee80211_select_queue(sdata, sta, skb);
426 - skb_set_queue_mapping(skb, queue);
430 + skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb));
431 ieee80211_aggr_check(sdata, sta, skb);
433 sk_pacing_shift_update(skb->sk, sdata->local->hw.tx_sk_pacing_shift);
434 @@ -4509,11 +4497,7 @@ static void ieee80211_8023_xmit(struct i
435 struct tid_ampdu_tx *tid_tx;
438 - if (local->ops->wake_tx_queue) {
439 - u16 queue = __ieee80211_select_queue(sdata, sta, skb);
440 - skb_set_queue_mapping(skb, queue);
443 + skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb));
445 if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)) &&
446 test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state))
447 @@ -4767,9 +4751,6 @@ void ieee80211_tx_pending(struct tasklet
452 - if (skb_queue_empty(&local->pending[i]))
453 - ieee80211_propagate_queue_wake(local, i);
455 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
457 @@ -5962,10 +5943,9 @@ int ieee80211_tx_control_port(struct wip
461 - u16 queue = __ieee80211_select_queue(sdata, sta, skb);
462 + u16 queue = ieee80211_select_queue(sdata, sta, skb);
464 skb_set_queue_mapping(skb, queue);
468 * for MLO STA, the SA should be the AP MLD address, but
469 --- a/net/mac80211/util.c
470 +++ b/net/mac80211/util.c
471 @@ -444,39 +444,6 @@ void ieee80211_wake_txqs(struct tasklet_
472 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
475 -void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue)
477 - struct ieee80211_sub_if_data *sdata;
478 - int n_acs = IEEE80211_NUM_ACS;
480 - if (local->ops->wake_tx_queue)
483 - if (local->hw.queues < IEEE80211_NUM_ACS)
486 - list_for_each_entry_rcu(sdata, &local->interfaces, list) {
492 - if (sdata->vif.cab_queue != IEEE80211_INVAL_HW_QUEUE &&
493 - local->queue_stop_reasons[sdata->vif.cab_queue] != 0)
496 - for (ac = 0; ac < n_acs; ac++) {
497 - int ac_queue = sdata->vif.hw_queue[ac];
499 - if (ac_queue == queue ||
500 - (sdata->vif.cab_queue == queue &&
501 - local->queue_stop_reasons[ac_queue] == 0 &&
502 - skb_queue_empty(&local->pending[ac_queue])))
503 - netif_wake_subqueue(sdata->dev, ac);
508 static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
509 enum queue_stop_reason reason,
511 @@ -507,11 +474,7 @@ static void __ieee80211_wake_queue(struc
512 /* someone still has this queue stopped */
515 - if (skb_queue_empty(&local->pending[queue])) {
517 - ieee80211_propagate_queue_wake(local, queue);
520 + if (!skb_queue_empty(&local->pending[queue]))
521 tasklet_schedule(&local->tx_pending_tasklet);
524 @@ -521,12 +484,10 @@ static void __ieee80211_wake_queue(struc
525 * release someone's lock, but it is fine because all the callers of
526 * __ieee80211_wake_queue call it right before releasing the lock.
528 - if (local->ops->wake_tx_queue) {
529 - if (reason == IEEE80211_QUEUE_STOP_REASON_DRIVER)
530 - tasklet_schedule(&local->wake_txqs_tasklet);
532 - _ieee80211_wake_txqs(local, flags);
534 + if (reason == IEEE80211_QUEUE_STOP_REASON_DRIVER)
535 + tasklet_schedule(&local->wake_txqs_tasklet);
537 + _ieee80211_wake_txqs(local, flags);
540 void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
541 @@ -554,8 +515,6 @@ static void __ieee80211_stop_queue(struc
544 struct ieee80211_local *local = hw_to_local(hw);
545 - struct ieee80211_sub_if_data *sdata;
546 - int n_acs = IEEE80211_NUM_ACS;
548 trace_stop_queue(local, queue, reason);
550 @@ -567,27 +526,7 @@ static void __ieee80211_stop_queue(struc
552 local->q_stop_reasons[queue][reason]++;
554 - if (__test_and_set_bit(reason, &local->queue_stop_reasons[queue]))
557 - if (local->hw.queues < IEEE80211_NUM_ACS)
561 - list_for_each_entry_rcu(sdata, &local->interfaces, list) {
567 - for (ac = 0; ac < n_acs; ac++) {
568 - if (!local->ops->wake_tx_queue &&
569 - (sdata->vif.hw_queue[ac] == queue ||
570 - sdata->vif.cab_queue == queue))
571 - netif_stop_subqueue(sdata->dev, ac);
575 + set_bit(reason, &local->queue_stop_reasons[queue]);
578 void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
579 --- a/net/mac80211/wme.c
580 +++ b/net/mac80211/wme.c
581 @@ -122,6 +122,9 @@ u16 ieee80211_select_queue_80211(struct
582 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
585 + /* Ensure hash is set prior to potential SW encryption */
588 if ((info->control.flags & IEEE80211_TX_CTRL_DONT_REORDER) ||
589 local->hw.queues < IEEE80211_NUM_ACS)
591 @@ -141,13 +144,16 @@ u16 ieee80211_select_queue_80211(struct
592 return ieee80211_downgrade_queue(sdata, NULL, skb);
595 -u16 __ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
596 - struct sta_info *sta, struct sk_buff *skb)
597 +u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
598 + struct sta_info *sta, struct sk_buff *skb)
600 const struct ethhdr *eth = (void *)skb->data;
601 struct mac80211_qos_map *qos_map;
604 + /* Ensure hash is set prior to potential SW encryption */
607 /* all mesh/ocb stations are required to support WME */
608 if ((sdata->vif.type == NL80211_IFTYPE_MESH_POINT &&
609 !is_multicast_ether_addr(eth->h_dest)) ||
610 @@ -178,59 +184,6 @@ u16 __ieee80211_select_queue(struct ieee
611 return ieee80211_downgrade_queue(sdata, sta, skb);
615 -/* Indicate which queue to use. */
616 -u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
617 - struct sk_buff *skb)
619 - struct ieee80211_local *local = sdata->local;
620 - struct sta_info *sta = NULL;
621 - const u8 *ra = NULL;
624 - /* when using iTXQ, we can do this later */
625 - if (local->ops->wake_tx_queue)
628 - if (local->hw.queues < IEEE80211_NUM_ACS || skb->len < 6) {
629 - skb->priority = 0; /* required for correct WPA/11i MIC */
634 - switch (sdata->vif.type) {
635 - case NL80211_IFTYPE_AP_VLAN:
636 - sta = rcu_dereference(sdata->u.vlan.sta);
640 - case NL80211_IFTYPE_AP:
643 - case NL80211_IFTYPE_STATION:
644 - /* might be a TDLS station */
645 - sta = sta_info_get(sdata, skb->data);
649 - ra = sdata->deflink.u.mgd.bssid;
651 - case NL80211_IFTYPE_ADHOC:
658 - if (!sta && ra && !is_multicast_ether_addr(ra))
659 - sta = sta_info_get(sdata, ra);
661 - ret = __ieee80211_select_queue(sdata, sta, skb);
668 * ieee80211_set_qos_hdr - Fill in the QoS header if there is one.
670 --- a/net/mac80211/wme.h
671 +++ b/net/mac80211/wme.h
673 u16 ieee80211_select_queue_80211(struct ieee80211_sub_if_data *sdata,
675 struct ieee80211_hdr *hdr);
676 -u16 __ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
677 - struct sta_info *sta, struct sk_buff *skb);
678 u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
679 - struct sk_buff *skb);
680 + struct sta_info *sta, struct sk_buff *skb);
681 void ieee80211_set_qos_hdr(struct ieee80211_sub_if_data *sdata,
682 struct sk_buff *skb);