Skip to content

Commit

Permalink
wifi: mac80211: reload info pointer in ieee80211_tx_dequeue()
Browse files Browse the repository at this point in the history
This pointer can change here since the SKB can change, so we
actually later open-coded IEEE80211_SKB_CB() again. Reload
the pointer where needed, so the monitor-mode case using it
gets fixed, and then use info-> later as well.

Cc: stable@vger.kernel.org
Fixes: 5316821 ("mac80211: fix VLAN handling with TXQs")
Link: https://msgid.link/20240131164910.b54c28d583bc.I29450cec84ea6773cff5d9c16ff92b836c331471@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Feb 8, 2024
1 parent 0647903 commit c98d883
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
* Copyright 2013-2014 Intel Mobile Communications GmbH
* Copyright (C) 2018-2022 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* Transmit and frame generation functions.
*/
Expand Down Expand Up @@ -3927,6 +3927,7 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
goto begin;

skb = __skb_dequeue(&tx.skbs);
info = IEEE80211_SKB_CB(skb);

if (!skb_queue_empty(&tx.skbs)) {
spin_lock_bh(&fq->lock);
Expand Down Expand Up @@ -3971,7 +3972,7 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
}

encap_out:
IEEE80211_SKB_CB(skb)->control.vif = vif;
info->control.vif = vif;

if (tx.sta &&
wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) {
Expand Down

0 comments on commit c98d883

Please sign in to comment.