This contains the following commits: ``` git log --oneline v6.12.52...v6.12.61 -- drivers/net/wireless/ net/mac80211/ net/wireless/ a1eb56723b32 wifi: ath12k: correctly handle mcast packets for clients c0a9c2c1b7b9 wifi: mac80211: use wiphy_hrtimer_work for csa.switch_work d4caee32a9f8 wifi: cfg80211: add an hrtimer based delayed work item 6455948c8aab wifi: mac80211: reject address change while connecting 80dc5a2ce5b7 wifi: ath11k: Clear affinity hint before calling ath11k_pcic_free_irq() in error path acd24d509227 wifi: mac80211: skip rate verification for not captured PSDUs 53cf801b8555 wifi: ath11k: zero init info->status in wmi_process_mgmt_tx_comp() e8fa86b0bd96 wifi: mac80211_hwsim: Limit destroy_on_close radio removal to netgroup 77d4afd6c78b Revert "wifi: ath10k: avoid unnecessary wait for service ready message" 07d862c7de3d wifi: ath12k: Increase DP_REO_CMD_RING_SIZE to 256 522734fc807c wifi: mac80211: Track NAN interface start/stop 8db790c2491e wifi: ath10k: Fix connection after GTK rekeying 72f1984246e6 wifi: rtw89: renew a completion for each H2C command waiting C2H event 336da4414300 wifi: rtw89: obtain RX path from ppdu status IE00 da91687f01f4 wifi: mt76: mt7996: fix memory leak on mt7996_mcu_sta_key_tlv error a534dd44b70e wifi: mt76: mt76_eeprom_override to int aa5ed215cfe8 wifi: mt76: mt7996: Temporarily disable EPCS efe2ef24feab wifi: mt76: mt7921: Add 160MHz beamformee capability for mt7922 device 5de410dfb4d9 wifi: mac80211: Fix HE capabilities element check f157d1cb2cdc wifi: iwlwifi: fw: Add ASUS to PPAG and TAS list c9df78e84e85 wifi: mac80211: Fix 6 GHz Band capabilities element advertisement in lower bands 958234997dd5 wifi: rtw89: fix BSSID comparison for non-transmitted BSSID ca18975c4de2 wifi: rtw89: wow: remove notify during WoWLAN net-detect bc1ca06998c1 wifi: rtw88: sdio: use indirect IO for device registers before power-on 8ebef59d0294 wifi: rtw89: print just once for unknown C2H events 5596a90c8952 wifi: mac80211: fix key tailroom accounting leak 23b8682f05ec wifi: mac80211: don't mark keys for inactive links as uploaded e3373f10c6a6 wifi: ath11k: avoid bit operation on key flags 50f50dd024b4 wifi: ath11k: add support for MU EDCA 2a6cd5951ba8 wifi: ath12k: free skb during idr cleanup callback 775e37df2acc wifi: ath11k: Add missing platform IDs for quirk table c4840991ee4c wifi: ath10k: Fix memory leak on unsupported WMI command a6eed58249e7 wifi: brcmfmac: fix crash while sending Action Frames in standalone AP Mode 57100b87c778 wifi: ath12k: fix read pointer after free in ath12k_mac_assign_vif_to_vdev() 4a63523d3541 wifi: cfg80211: Add missing lock in cfg80211_check_and_end_cac() e9fd43b799d2 wifi: rtw89: avoid possible TX wait initialization race b419093e5e42 wifi: mt76: mt7921u: Add VID/PID for Netgear A7500 feb1774aaf85 wifi: mt76: mt7925u: Add VID/PID for Netgear A9000 bd3ac455a88d wifi: ath11k: HAL SRNG: don't deinitialize and re-initialize again 8055133a9f64 wifi: rtw89: avoid circular locking dependency in ser_state_run() 1c873416758f wifi: mac80211: fix Rx packet handling when pubsta information is not available 6e7d9fa61d7d wifi: ath10k: avoid unnecessary wait for service ready message 8d4f6ab4c53e wifi: ath12k: fix wrong logging ID used for CE fc00890c55e3 wifi: mt76: mt7915: fix mt7981 pre-calibration e18c4e6ba36c wifi: mt76: mt7996: Convert mt7996_wed_rro_addr to LE f481404a9826 wifi: mt76: mt7996: Fix RX packets configuration for primary WED device 57519239c76c wifi: mt76: fix potential memory leak in mt76_wmac_probe() 27c8e2e4b56f wifi: iwlwifi: Remove redundant header files 605402433eb8 wifi: mwifiex: send world regulatory domain to driver ``` The removed patch was added upstream. Link: https://github.com/openwrt/openwrt/pull/21134 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
48 lines
2.1 KiB
Diff
48 lines
2.1 KiB
Diff
From 4e1916dec9850cd49dd5792200ab649061cbedc1 Mon Sep 17 00:00:00 2001
|
|
From: Maharaja Kennadyrajan <maharaja.kennadyrajan@oss.qualcomm.com>
|
|
Date: Fri, 18 Jul 2025 11:38:35 +0530
|
|
Subject: [PATCH] wifi: mac80211: Add link iteration macro for link data with
|
|
rcu_dereference
|
|
|
|
Currently, the existing macro for_each_link_data() uses sdata_dereference()
|
|
which requires the wiphy lock. This lock cannot be used in atomic or RCU
|
|
read-side contexts, such as in the RX path.
|
|
|
|
Introduce a new macro, for_each_link_data_rcu(), that iterates over link of
|
|
sdata using rcu_dereference(), making it safe to use in RCU contexts. This
|
|
allows callers to access link data without requiring the wiphy lock.
|
|
|
|
The macro takes into account the vif.valid_links bitmap and ensures only
|
|
valid links are accessed safely. Callers are responsible for ensuring that
|
|
rcu_read_lock() is held when using this macro.
|
|
|
|
Signed-off-by: Maharaja Kennadyrajan <maharaja.kennadyrajan@oss.qualcomm.com>
|
|
Link: https://patch.msgid.link/20250718060837.59371-3-maharaja.kennadyrajan@oss.qualcomm.com
|
|
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
---
|
|
net/mac80211/ieee80211_i.h | 13 +++++++++++++
|
|
1 file changed, 13 insertions(+)
|
|
|
|
--- a/net/mac80211/ieee80211_i.h
|
|
+++ b/net/mac80211/ieee80211_i.h
|
|
@@ -1222,6 +1222,19 @@ struct ieee80211_sub_if_data *vif_to_sda
|
|
((__link) = sdata_dereference((__sdata)->link[__link_id], \
|
|
(__sdata))))
|
|
|
|
+/*
|
|
+ * for_each_link_data_rcu should be used under RCU read lock.
|
|
+ */
|
|
+#define for_each_link_data_rcu(sdata, __link) \
|
|
+ /* outer loop just to define the variable ... */ \
|
|
+ for (struct ieee80211_sub_if_data *__sdata = (sdata); __sdata; \
|
|
+ __sdata = NULL /* always stop */) \
|
|
+ for (int __link_id = 0; \
|
|
+ __link_id < ARRAY_SIZE((__sdata)->link); __link_id++) \
|
|
+ if ((!(__sdata)->vif.valid_links || \
|
|
+ (__sdata)->vif.valid_links & BIT(__link_id)) && \
|
|
+ ((__link) = rcu_dereference((__sdata)->link[__link_id]))) \
|
|
+
|
|
static inline int
|
|
ieee80211_get_mbssid_beacon_len(struct cfg80211_mbssid_elems *elems,
|
|
struct cfg80211_rnr_elems *rnr_elems,
|