Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: mac80211: Drop support for TX push path

All drivers are now using mac80211 internal queues (iTXQs).
Drop mac80211 internal support for the old push path.

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Alexander Wetzel and committed by
Johannes Berg
107395f9 dfd2d876

+48 -252
-3
net/mac80211/cfg.c
··· 4340 4340 struct ieee80211_sub_if_data *sdata; 4341 4341 int ret = 0; 4342 4342 4343 - if (!local->ops->wake_tx_queue) 4344 - return 1; 4345 - 4346 4343 spin_lock_bh(&local->fq.lock); 4347 4344 rcu_read_lock(); 4348 4345
+1 -3
net/mac80211/debugfs.c
··· 663 663 DEBUGFS_ADD_MODE(force_tx_status, 0600); 664 664 DEBUGFS_ADD_MODE(aql_enable, 0600); 665 665 DEBUGFS_ADD(aql_pending); 666 - 667 - if (local->ops->wake_tx_queue) 668 - DEBUGFS_ADD_MODE(aqm, 0600); 666 + DEBUGFS_ADD_MODE(aqm, 0600); 669 667 670 668 DEBUGFS_ADD_MODE(airtime_flags, 0600); 671 669
+1 -2
net/mac80211/debugfs_netdev.c
··· 677 677 DEBUGFS_ADD(rc_rateidx_vht_mcs_mask_5ghz); 678 678 DEBUGFS_ADD(hw_queues); 679 679 680 - if (sdata->local->ops->wake_tx_queue && 681 - sdata->vif.type != NL80211_IFTYPE_P2P_DEVICE && 680 + if (sdata->vif.type != NL80211_IFTYPE_P2P_DEVICE && 682 681 sdata->vif.type != NL80211_IFTYPE_NAN) 683 682 DEBUGFS_ADD(aqm); 684 683 }
+2 -4
net/mac80211/debugfs_sta.c
··· 1072 1072 /* FIXME: Kept here as the statistics are only done on the deflink */ 1073 1073 DEBUGFS_ADD_COUNTER(tx_filtered, deflink.status_stats.filtered); 1074 1074 1075 - if (local->ops->wake_tx_queue) { 1076 - DEBUGFS_ADD(aqm); 1077 - DEBUGFS_ADD(airtime); 1078 - } 1075 + DEBUGFS_ADD(aqm); 1076 + DEBUGFS_ADD(airtime); 1079 1077 1080 1078 if (wiphy_ext_feature_isset(local->hw.wiphy, 1081 1079 NL80211_EXT_FEATURE_AQL))
-1
net/mac80211/ieee80211_i.h
··· 2307 2307 void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue, 2308 2308 enum queue_stop_reason reason, 2309 2309 bool refcounted); 2310 - void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue); 2311 2310 void ieee80211_add_pending_skb(struct ieee80211_local *local, 2312 2311 struct sk_buff *skb); 2313 2312 void ieee80211_add_pending_skbs(struct ieee80211_local *local,
+3 -66
net/mac80211/iface.c
··· 458 458 if (cancel_scan) 459 459 ieee80211_scan_cancel(local); 460 460 461 - /* 462 - * Stop TX on this interface first. 463 - */ 464 - if (!local->ops->wake_tx_queue && sdata->dev) 465 - netif_tx_stop_all_queues(sdata->dev); 466 - 467 461 ieee80211_roc_purge(local, sdata); 468 462 469 463 switch (sdata->vif.type) { ··· 805 811 ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev)); 806 812 } 807 813 808 - static u16 ieee80211_netdev_select_queue(struct net_device *dev, 809 - struct sk_buff *skb, 810 - struct net_device *sb_dev) 811 - { 812 - return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb); 813 - } 814 - 815 814 static void 816 815 ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) 817 816 { ··· 818 831 .ndo_start_xmit = ieee80211_subif_start_xmit, 819 832 .ndo_set_rx_mode = ieee80211_set_multicast_list, 820 833 .ndo_set_mac_address = ieee80211_change_mac, 821 - .ndo_select_queue = ieee80211_netdev_select_queue, 822 834 .ndo_get_stats64 = ieee80211_get_stats64, 823 835 }; 824 836 ··· 925 939 .ndo_start_xmit = ieee80211_subif_start_xmit_8023, 926 940 .ndo_set_rx_mode = ieee80211_set_multicast_list, 927 941 .ndo_set_mac_address = ieee80211_change_mac, 928 - .ndo_select_queue = ieee80211_netdev_select_queue, 929 942 .ndo_get_stats64 = ieee80211_get_stats64, 930 943 .ndo_fill_forward_path = ieee80211_netdev_fill_forward_path, 931 944 }; ··· 1426 1441 1427 1442 ieee80211_recalc_ps(local); 1428 1443 1429 - if (sdata->vif.type == NL80211_IFTYPE_MONITOR || 1430 - sdata->vif.type == NL80211_IFTYPE_AP_VLAN || 1431 - local->ops->wake_tx_queue) { 1432 - /* XXX: for AP_VLAN, actually track AP queues */ 1433 - if (dev) 1434 - netif_tx_start_all_queues(dev); 1435 - } else if (dev) { 1436 - unsigned long flags; 1437 - int n_acs = IEEE80211_NUM_ACS; 1438 - int ac; 1439 - 1440 - if (local->hw.queues < IEEE80211_NUM_ACS) 1441 - n_acs = 1; 1442 - 1443 - spin_lock_irqsave(&local->queue_stop_reason_lock, flags); 1444 - if (sdata->vif.cab_queue == IEEE80211_INVAL_HW_QUEUE || 1445 - (local->queue_stop_reasons[sdata->vif.cab_queue] == 0 && 1446 - skb_queue_empty(&local->pending[sdata->vif.cab_queue]))) { 1447 - for (ac = 0; ac < n_acs; ac++) { 1448 - int ac_queue = sdata->vif.hw_queue[ac]; 1449 - 1450 - if (local->queue_stop_reasons[ac_queue] == 0 && 1451 - skb_queue_empty(&local->pending[ac_queue])) 1452 - netif_start_subqueue(dev, ac); 1453 - } 1454 - } 1455 - spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); 1456 - } 1457 - 1458 1444 set_bit(SDATA_STATE_RUNNING, &sdata->state); 1459 1445 1460 1446 return 0; ··· 1455 1499 { 1456 1500 ether_setup(dev); 1457 1501 dev->priv_flags &= ~IFF_TX_SKB_SHARING; 1502 + dev->priv_flags |= IFF_NO_QUEUE; 1458 1503 dev->netdev_ops = &ieee80211_dataif_ops; 1459 1504 dev->needs_free_netdev = true; 1460 1505 dev->priv_destructor = ieee80211_if_free; 1461 - } 1462 - 1463 - static void ieee80211_if_setup_no_queue(struct net_device *dev) 1464 - { 1465 - ieee80211_if_setup(dev); 1466 - dev->priv_flags |= IFF_NO_QUEUE; 1467 1506 } 1468 1507 1469 1508 static void ieee80211_iface_process_skb(struct ieee80211_local *local, ··· 2045 2094 struct net_device *ndev = NULL; 2046 2095 struct ieee80211_sub_if_data *sdata = NULL; 2047 2096 struct txq_info *txqi; 2048 - void (*if_setup)(struct net_device *dev); 2049 2097 int ret, i; 2050 - int txqs = 1; 2051 2098 2052 2099 ASSERT_RTNL(); 2053 2100 ··· 2068 2119 sizeof(void *)); 2069 2120 int txq_size = 0; 2070 2121 2071 - if (local->ops->wake_tx_queue && 2072 - type != NL80211_IFTYPE_AP_VLAN && 2122 + if (type != NL80211_IFTYPE_AP_VLAN && 2073 2123 (type != NL80211_IFTYPE_MONITOR || 2074 2124 (params->flags & MONITOR_FLAG_ACTIVE))) 2075 2125 txq_size += sizeof(struct txq_info) + 2076 2126 local->hw.txq_data_size; 2077 2127 2078 - if (local->ops->wake_tx_queue) { 2079 - if_setup = ieee80211_if_setup_no_queue; 2080 - } else { 2081 - if_setup = ieee80211_if_setup; 2082 - if (local->hw.queues >= IEEE80211_NUM_ACS) 2083 - txqs = IEEE80211_NUM_ACS; 2084 - } 2085 - 2086 2128 ndev = alloc_netdev_mqs(size + txq_size, 2087 2129 name, name_assign_type, 2088 - if_setup, txqs, 1); 2130 + ieee80211_if_setup, 1, 1); 2089 2131 if (!ndev) 2090 2132 return -ENOMEM; 2091 - 2092 - if (!local->ops->wake_tx_queue && local->hw.wiphy->tx_queue_len) 2093 - ndev->tx_queue_len = local->hw.wiphy->tx_queue_len; 2094 2133 2095 2134 dev_net_set(ndev, wiphy_net(local->hw.wiphy)); 2096 2135
+3 -8
net/mac80211/main.c
··· 630 630 631 631 if (WARN_ON(!ops->tx || !ops->start || !ops->stop || !ops->config || 632 632 !ops->add_interface || !ops->remove_interface || 633 - !ops->configure_filter)) 633 + !ops->configure_filter || !ops->wake_tx_queue)) 634 634 return NULL; 635 635 636 636 if (WARN_ON(ops->sta_state && (ops->sta_add || ops->sta_remove))) ··· 719 719 if (!ops->set_key) 720 720 wiphy->flags |= WIPHY_FLAG_IBSS_RSN; 721 721 722 - if (ops->wake_tx_queue) 723 - wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_TXQS); 724 - 722 + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_TXQS); 725 723 wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_RRM); 726 724 727 725 wiphy->bss_priv_size = sizeof(struct ieee80211_bss); ··· 832 834 atomic_set(&local->agg_queue_stop[i], 0); 833 835 } 834 836 tasklet_setup(&local->tx_pending_tasklet, ieee80211_tx_pending); 835 - 836 - if (ops->wake_tx_queue) 837 - tasklet_setup(&local->wake_txqs_tasklet, ieee80211_wake_txqs); 838 - 837 + tasklet_setup(&local->wake_txqs_tasklet, ieee80211_wake_txqs); 839 838 tasklet_setup(&local->tasklet, ieee80211_tasklet_handler); 840 839 841 840 skb_queue_head_init(&local->skb_queue);
-3
net/mac80211/rx.c
··· 1571 1571 1572 1572 ieee80211_clear_fast_xmit(sta); 1573 1573 1574 - if (!sta->sta.txq[0]) 1575 - return; 1576 - 1577 1574 for (tid = 0; tid < IEEE80211_NUM_TIDS; tid++) { 1578 1575 struct ieee80211_txq *txq = sta->sta.txq[tid]; 1579 1576 struct txq_info *txqi = to_txq_info(txq);
+20 -31
net/mac80211/sta_info.c
··· 140 140 atomic_dec(&ps->num_sta_ps); 141 141 } 142 142 143 - if (sta->sta.txq[0]) { 144 - for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) { 145 - struct txq_info *txqi; 143 + for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) { 144 + struct txq_info *txqi; 146 145 147 - if (!sta->sta.txq[i]) 148 - continue; 146 + if (!sta->sta.txq[i]) 147 + continue; 149 148 150 - txqi = to_txq_info(sta->sta.txq[i]); 149 + txqi = to_txq_info(sta->sta.txq[i]); 151 150 152 - ieee80211_txq_purge(local, txqi); 153 - } 151 + ieee80211_txq_purge(local, txqi); 154 152 } 155 153 156 154 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { ··· 426 428 427 429 sta_dbg(sta->sdata, "Destroyed STA %pM\n", sta->sta.addr); 428 430 429 - if (sta->sta.txq[0]) 430 - kfree(to_txq_info(sta->sta.txq[0])); 431 + kfree(to_txq_info(sta->sta.txq[0])); 431 432 kfree(rcu_dereference_raw(sta->sta.rates)); 432 433 #ifdef CONFIG_MAC80211_MESH 433 434 kfree(sta->mesh); ··· 528 531 struct ieee80211_local *local = sdata->local; 529 532 struct ieee80211_hw *hw = &local->hw; 530 533 struct sta_info *sta; 534 + void *txq_data; 535 + int size; 531 536 int i; 532 537 533 538 sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp); ··· 599 600 600 601 sta->last_connected = ktime_get_seconds(); 601 602 602 - if (local->ops->wake_tx_queue) { 603 - void *txq_data; 604 - int size = sizeof(struct txq_info) + 605 - ALIGN(hw->txq_data_size, sizeof(void *)); 603 + size = sizeof(struct txq_info) + 604 + ALIGN(hw->txq_data_size, sizeof(void *)); 606 605 607 - txq_data = kcalloc(ARRAY_SIZE(sta->sta.txq), size, gfp); 608 - if (!txq_data) 609 - goto free; 606 + txq_data = kcalloc(ARRAY_SIZE(sta->sta.txq), size, gfp); 607 + if (!txq_data) 608 + goto free; 610 609 611 - for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) { 612 - struct txq_info *txq = txq_data + i * size; 610 + for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) { 611 + struct txq_info *txq = txq_data + i * size; 613 612 614 - /* might not do anything for the bufferable MMPDU TXQ */ 615 - ieee80211_txq_init(sdata, sta, txq, i); 616 - } 613 + /* might not do anything for the (bufferable) MMPDU TXQ */ 614 + ieee80211_txq_init(sdata, sta, txq, i); 617 615 } 618 616 619 617 if (sta_prepare_rate_control(local, sta, gfp)) ··· 684 688 return sta; 685 689 686 690 free_txq: 687 - if (sta->sta.txq[0]) 688 - kfree(to_txq_info(sta->sta.txq[0])); 691 + kfree(to_txq_info(sta->sta.txq[0])); 689 692 free: 690 693 sta_info_free_link(&sta->deflink); 691 694 #ifdef CONFIG_MAC80211_MESH ··· 1977 1982 * TIM recalculation. 1978 1983 */ 1979 1984 1980 - if (!sta->sta.txq[0]) 1981 - return; 1982 - 1983 1985 for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) { 1984 1986 if (!sta->sta.txq[tid] || 1985 1987 !(driver_release_tids & BIT(tid)) || ··· 2476 2484 tidstats->tx_msdu_failed = sta->deflink.status_stats.msdu_failed[tid]; 2477 2485 } 2478 2486 2479 - if (local->ops->wake_tx_queue && tid < IEEE80211_NUM_TIDS) { 2487 + if (tid < IEEE80211_NUM_TIDS) { 2480 2488 spin_lock_bh(&local->fq.lock); 2481 2489 rcu_read_lock(); 2482 2490 ··· 2804 2812 2805 2813 static void sta_update_codel_params(struct sta_info *sta, u32 thr) 2806 2814 { 2807 - if (!sta->sdata->local->ops->wake_tx_queue) 2808 - return; 2809 - 2810 2815 if (thr && thr < STA_SLOW_THRESHOLD * sta->local->num_sta) { 2811 2816 sta->cparams.target = MS2TIME(50); 2812 2817 sta->cparams.interval = MS2TIME(300);
-1
net/mac80211/tdls.c
··· 1016 1016 skb->priority = 256 + 5; 1017 1017 break; 1018 1018 } 1019 - skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, skb)); 1020 1019 1021 1020 /* 1022 1021 * Set the WLAN_TDLS_TEARDOWN flag to indicate a teardown in progress.
+4 -24
net/mac80211/tx.c
··· 1599 1599 bool supp_vht = false; 1600 1600 enum nl80211_band band; 1601 1601 1602 - if (!local->ops->wake_tx_queue) 1603 - return 0; 1604 - 1605 1602 ret = fq_init(fq, 4096); 1606 1603 if (ret) 1607 1604 return ret; ··· 1646 1649 { 1647 1650 struct fq *fq = &local->fq; 1648 1651 1649 - if (!local->ops->wake_tx_queue) 1650 - return; 1651 - 1652 1652 kfree(local->cvars); 1653 1653 local->cvars = NULL; 1654 1654 ··· 1662 1668 struct ieee80211_vif *vif; 1663 1669 struct txq_info *txqi; 1664 1670 1665 - if (!local->ops->wake_tx_queue || 1666 - sdata->vif.type == NL80211_IFTYPE_MONITOR) 1671 + if (sdata->vif.type == NL80211_IFTYPE_MONITOR) 1667 1672 return false; 1668 1673 1669 1674 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) ··· 4177 4184 if (IS_ERR(sta)) 4178 4185 sta = NULL; 4179 4186 4180 - if (local->ops->wake_tx_queue) { 4181 - u16 queue = __ieee80211_select_queue(sdata, sta, skb); 4182 - skb_set_queue_mapping(skb, queue); 4183 - skb_get_hash(skb); 4184 - } 4185 - 4187 + skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb)); 4186 4188 ieee80211_aggr_check(sdata, sta, skb); 4187 4189 4188 4190 sk_pacing_shift_update(skb->sk, sdata->local->hw.tx_sk_pacing_shift); ··· 4483 4495 struct tid_ampdu_tx *tid_tx; 4484 4496 u8 tid; 4485 4497 4486 - if (local->ops->wake_tx_queue) { 4487 - u16 queue = __ieee80211_select_queue(sdata, sta, skb); 4488 - skb_set_queue_mapping(skb, queue); 4489 - skb_get_hash(skb); 4490 - } 4498 + skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb)); 4491 4499 4492 4500 if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)) && 4493 4501 test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state)) ··· 4737 4753 if (!txok) 4738 4754 break; 4739 4755 } 4740 - 4741 - if (skb_queue_empty(&local->pending[i])) 4742 - ieee80211_propagate_queue_wake(local, i); 4743 4756 } 4744 4757 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); 4745 4758 ··· 5929 5948 } 5930 5949 5931 5950 if (!IS_ERR(sta)) { 5932 - u16 queue = __ieee80211_select_queue(sdata, sta, skb); 5951 + u16 queue = ieee80211_select_queue(sdata, sta, skb); 5933 5952 5934 5953 skb_set_queue_mapping(skb, queue); 5935 - skb_get_hash(skb); 5936 5954 5937 5955 /* 5938 5956 * for MLO STA, the SA should be the AP MLD address, but
+5 -48
net/mac80211/util.c
··· 446 446 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); 447 447 } 448 448 449 - void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue) 450 - { 451 - struct ieee80211_sub_if_data *sdata; 452 - int n_acs = IEEE80211_NUM_ACS; 453 - 454 - if (local->ops->wake_tx_queue) 455 - return; 456 - 457 - if (local->hw.queues < IEEE80211_NUM_ACS) 458 - n_acs = 1; 459 - 460 - list_for_each_entry_rcu(sdata, &local->interfaces, list) { 461 - int ac; 462 - 463 - if (!sdata->dev) 464 - continue; 465 - 466 - if (sdata->vif.cab_queue != IEEE80211_INVAL_HW_QUEUE && 467 - local->queue_stop_reasons[sdata->vif.cab_queue] != 0) 468 - continue; 469 - 470 - for (ac = 0; ac < n_acs; ac++) { 471 - int ac_queue = sdata->vif.hw_queue[ac]; 472 - 473 - if (ac_queue == queue || 474 - (sdata->vif.cab_queue == queue && 475 - local->queue_stop_reasons[ac_queue] == 0 && 476 - skb_queue_empty(&local->pending[ac_queue]))) 477 - netif_wake_subqueue(sdata->dev, ac); 478 - } 479 - } 480 - } 481 - 482 449 static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue, 483 450 enum queue_stop_reason reason, 484 451 bool refcounted, ··· 476 509 /* someone still has this queue stopped */ 477 510 return; 478 511 479 - if (skb_queue_empty(&local->pending[queue])) { 480 - rcu_read_lock(); 481 - ieee80211_propagate_queue_wake(local, queue); 482 - rcu_read_unlock(); 483 - } else 512 + if (!skb_queue_empty(&local->pending[queue])) 484 513 tasklet_schedule(&local->tx_pending_tasklet); 485 514 486 515 /* ··· 486 523 * release someone's lock, but it is fine because all the callers of 487 524 * __ieee80211_wake_queue call it right before releasing the lock. 488 525 */ 489 - if (local->ops->wake_tx_queue) { 490 - if (reason == IEEE80211_QUEUE_STOP_REASON_DRIVER) 491 - tasklet_schedule(&local->wake_txqs_tasklet); 492 - else 493 - _ieee80211_wake_txqs(local, flags); 494 - } 526 + if (reason == IEEE80211_QUEUE_STOP_REASON_DRIVER) 527 + tasklet_schedule(&local->wake_txqs_tasklet); 528 + else 529 + _ieee80211_wake_txqs(local, flags); 495 530 } 496 531 497 532 void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue, ··· 546 585 for (ac = 0; ac < n_acs; ac++) { 547 586 if (sdata->vif.hw_queue[ac] == queue || 548 587 sdata->vif.cab_queue == queue) { 549 - if (!local->ops->wake_tx_queue) { 550 - netif_stop_subqueue(sdata->dev, ac); 551 - continue; 552 - } 553 588 spin_lock(&local->fq.lock); 554 589 sdata->vif.txqs_stopped[ac] = true; 555 590 spin_unlock(&local->fq.lock);
+8 -55
net/mac80211/wme.c
··· 122 122 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 123 123 u8 *p; 124 124 125 + /* Ensure hash is set prior to potential SW encryption */ 126 + skb_get_hash(skb); 127 + 125 128 if ((info->control.flags & IEEE80211_TX_CTRL_DONT_REORDER) || 126 129 local->hw.queues < IEEE80211_NUM_ACS) 127 130 return 0; ··· 144 141 return ieee80211_downgrade_queue(sdata, NULL, skb); 145 142 } 146 143 147 - u16 __ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, 148 - struct sta_info *sta, struct sk_buff *skb) 144 + u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, 145 + struct sta_info *sta, struct sk_buff *skb) 149 146 { 150 147 struct mac80211_qos_map *qos_map; 151 148 bool qos; 149 + 150 + /* Ensure hash is set prior to potential SW encryption */ 151 + skb_get_hash(skb); 152 152 153 153 /* all mesh/ocb stations are required to support WME */ 154 154 if (sta && (sdata->vif.type == NL80211_IFTYPE_MESH_POINT || ··· 180 174 181 175 downgrade: 182 176 return ieee80211_downgrade_queue(sdata, sta, skb); 183 - } 184 - 185 - 186 - /* Indicate which queue to use. */ 187 - u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, 188 - struct sk_buff *skb) 189 - { 190 - struct ieee80211_local *local = sdata->local; 191 - struct sta_info *sta = NULL; 192 - const u8 *ra = NULL; 193 - u16 ret; 194 - 195 - /* when using iTXQ, we can do this later */ 196 - if (local->ops->wake_tx_queue) 197 - return 0; 198 - 199 - if (local->hw.queues < IEEE80211_NUM_ACS || skb->len < 6) { 200 - skb->priority = 0; /* required for correct WPA/11i MIC */ 201 - return 0; 202 - } 203 - 204 - rcu_read_lock(); 205 - switch (sdata->vif.type) { 206 - case NL80211_IFTYPE_AP_VLAN: 207 - sta = rcu_dereference(sdata->u.vlan.sta); 208 - if (sta) 209 - break; 210 - fallthrough; 211 - case NL80211_IFTYPE_AP: 212 - ra = skb->data; 213 - break; 214 - case NL80211_IFTYPE_STATION: 215 - /* might be a TDLS station */ 216 - sta = sta_info_get(sdata, skb->data); 217 - if (sta) 218 - break; 219 - 220 - ra = sdata->vif.cfg.ap_addr; 221 - break; 222 - case NL80211_IFTYPE_ADHOC: 223 - ra = skb->data; 224 - break; 225 - default: 226 - break; 227 - } 228 - 229 - if (!sta && ra && !is_multicast_ether_addr(ra)) 230 - sta = sta_info_get(sdata, ra); 231 - 232 - ret = __ieee80211_select_queue(sdata, sta, skb); 233 - 234 - rcu_read_unlock(); 235 - return ret; 236 177 } 237 178 238 179 /**
+1 -3
net/mac80211/wme.h
··· 13 13 u16 ieee80211_select_queue_80211(struct ieee80211_sub_if_data *sdata, 14 14 struct sk_buff *skb, 15 15 struct ieee80211_hdr *hdr); 16 - u16 __ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, 17 - struct sta_info *sta, struct sk_buff *skb); 18 16 u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, 19 - struct sk_buff *skb); 17 + struct sta_info *sta, struct sk_buff *skb); 20 18 void ieee80211_set_qos_hdr(struct ieee80211_sub_if_data *sdata, 21 19 struct sk_buff *skb); 22 20