]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mac80211: fix variable used in for_each_sdata_link()
authorAloka Dixit <quic_alokad@quicinc.com>
Wed, 27 Nov 2024 18:02:55 +0000 (10:02 -0800)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 4 Dec 2024 15:08:03 +0000 (16:08 +0100)
Macro for_each_sdata_link() accepts input '_local' but uses 'local'
in its processing. This currently works because all the functions
calling this macro have declared 'local' as a variable themselves.
But this results in compilation error when a new caller uses
'sdata->local' instead of declaring 'local' variable.
Use '_local' instead of 'local' in for_each_sdata_link().

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
Link: https://patch.msgid.link/20241127180255.1460553-1-quic_alokad@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h

index a00096dd787b33af887db50e434a3b0b54d65624..534a20054151f4196290ba60d774b369d0984332 100644 (file)
@@ -1206,7 +1206,7 @@ struct ieee80211_sub_if_data *vif_to_sdata(struct ieee80211_vif *p)
        for (int ___link_id = 0;                                        \
             ___link_id < ARRAY_SIZE(___sdata->link);                   \
             ___link_id++)                                              \
-       if ((_link = wiphy_dereference((local)->hw.wiphy,               \
+       if ((_link = wiphy_dereference((_local)->hw.wiphy,              \
                                       ___sdata->link[___link_id])))
 
 static inline int