diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-03-25 08:59:23 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-04-26 13:02:11 +0200 |
commit | 1974da8b31e6ea9c96c21505ffcb546fa59add23 (patch) | |
tree | eae61a75a51d0cc209c0b42e1ccd458185ef1956 /net/mac80211/tx.c | |
parent | 96fc6efb9ad9d0cd8cbb4462f0eb2a07092649e6 (diff) | |
download | linux-1974da8b31e6ea9c96c21505ffcb546fa59add23.tar.bz2 |
mac80211: when using iTXQ, select the queue in ieee80211_subif_start_xmit
When using iTXQ, the network stack does not need the real queue number, since
mac80211 is using its internal queues anyway. In that case we can defer
selecting the queue and remove a redundant station lookup in the tx path to save
some CPU cycles.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index c49fd1e961d0..5a89733723e7 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3797,6 +3797,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb, u32 info_flags) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); + struct ieee80211_local *local = sdata->local; struct sta_info *sta; struct sk_buff *next; @@ -3810,7 +3811,15 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb, if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) goto out_free; - if (!IS_ERR_OR_NULL(sta)) { + if (IS_ERR(sta)) + sta = NULL; + + if (local->ops->wake_tx_queue) { + u16 queue = __ieee80211_select_queue(sdata, sta, skb); + skb_set_queue_mapping(skb, queue); + } + + if (sta) { struct ieee80211_fast_tx *fast_tx; sk_pacing_shift_update(skb->sk, sdata->local->hw.tx_sk_pacing_shift); |