aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2024-01-31 16:49:11 +0100
committerJohannes Berg <johannes.berg@intel.com>2024-02-08 15:00:44 +0100
commit91cdcbbcde1092da5225cfb05c88961658a34353 (patch)
treef44d91c7afe746e708afa32e962a9c4906df82a4 /net/mac80211
parent55167a3eed53ce8b40d5bf2a3e0be4e15d2eba57 (diff)
downloadlinux-91cdcbbcde1092da5225cfb05c88961658a34353.tar.gz
wifi: mac80211: clarify vif handling in TX dequeue
The vif pointer at least looks like it can actually be NULL in some cases such as the monitor-mode vif, causing static checkers to complain with the immediate derefence. In these cases the sta pointer will also be NULL, but clarify it in the code anyway. Link: https://msgid.link/20240131164910.60066625a239.Idfb6a5a9876f9f631eae760055e1c4018259a971@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/tx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f57f7963ca377..098b32947c2b1 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3953,7 +3953,8 @@ begin:
ieee80211_free_txskb(&local->hw, skb);
goto begin;
} else {
- vif = NULL;
+ info->control.vif = NULL;
+ return skb;
}
break;
case NL80211_IFTYPE_AP_VLAN: