diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-10-15 16:41:02 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-10-15 16:41:03 -0700 |
| commit | 9b0be45d4d52fd223994e151f169743a97abd290 (patch) | |
| tree | a86a5baaa73f5bd9eb5f7522378ed184e482b973 /include | |
| parent | f5e575a787014ed581ff59986b464efb39b26f1d (diff) | |
| parent | a4190accbf7e05496754004bb701fb3e7d04e57f (diff) | |
| download | linux-9b0be45d4d52fd223994e151f169743a97abd290.tar.gz linux-9b0be45d4d52fd223994e151f169743a97abd290.zip | |
Merge tag 'wireless-next-2026-10-15' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next
Johannes Berg says:
====================
Lots of updates:
- mt76
- mt7625 NAN fixes
- mt7996 connection monitor fix
- offchannel/scan improvements
- MLO fixes
- rtw88
- RTL8723BS support
- SDIO TX performance improvements
- rtw89
- P2P_DEVICE support
- BT-coex updates
- mm81x
- monitor mode support
- rx improvements
- fix persistent NO_IR flag bug
- iwlwifi
- UHR sniffer support
- support for newer UEFI/BIOS
- cfg80211/mac80211
- latency improvements (e.g. some lockless ops)
- RTNL reduction & locking cleanups
* tag 'wireless-next-2026-10-15' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (462 commits)
wifi: cfg80211: fix potential requested_regd leak
wifi: cfg80211: reject WEP/TKIP with multi-link
wifi: cfg80211: track SSID regardless of country data
wifi: mac80211: tests: fix stack variable bug
wifi: iwlwifi: mld: include VI packets in low latency detection
wifi: iwlwifi: trans: remove the unused write8 operation
wifi: iwlwifi: support SCD_QUEUE_CONFIG_CMD version 4
wifi: iwlwifi: mvm: uninline iwl_mvm_ftm_start versions
wifi: iwlwifi: mvm: fix beacon flags compiler warning
wifi: iwlwifi: mld: fix const in iwl_mld_mu_mimo_iface_iterator
wifi: iwlwifi: mld: avoid const in iwl_mld_chan_load_update_iter()
wifi: iwlwifi: pcie: correctly read WFPM_OTP_CFG1_ADDR
wifi: iwlwifi: mvm: remove dead sta check in rx_monitor_no_data
wifi: iwlwifi: mld: don't enable RSS if there is one queue.
wifi: iwlwifi: move context info APIs to a separate file
wifi: iwlwifi: fw: api: fix D3 sequence counter docs
wifi: iwlwifi: mvm: fix the VHT MCS sent to a v1 firmware
wifi: iwlwifi: bump maximum core version for BZ/SC/DR to 109
wifi: iwlwifi: dbg: validate the index before accessing an array
wifi: iwlwifi: don't mask ucode_ver in iwl_sar_geo_support()
...
====================
Link: https://patch.msgid.link/20261015105035.137870-3-johannes@sipsolutions.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/cfg80211.h | 93 | ||||
| -rw-r--r-- | include/net/mac80211.h | 25 | ||||
| -rw-r--r-- | include/uapi/linux/nl80211.h | 16 |
3 files changed, 110 insertions, 24 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 05c625d9e076..f773856c1818 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -21,6 +21,7 @@ #include <linux/nl80211.h> #include <linux/if_ether.h> #include <linux/ieee80211.h> +#include <linux/refcount.h> #include <linux/net.h> #include <linux/rfkill.h> #include <net/regulatory.h> @@ -1410,7 +1411,7 @@ struct cfg80211_mbssid_config { /** * struct cfg80211_mbssid_elems - Multiple BSSID elements * - * @cnt: Number of elements in array %elems. + * @cnt: Number of elements in array @elem. * * @elem: Array of multiple BSSID element(s) to be added into Beacon frames. * @elem.data: Data for multiple BSSID elements. @@ -1427,7 +1428,7 @@ struct cfg80211_mbssid_elems { /** * struct cfg80211_rnr_elems - Reduced neighbor report (RNR) elements * - * @cnt: Number of elements in array %elems. + * @cnt: Number of elements in array @elem. * * @elem: Array of RNR element(s) to be added into Beacon frames. * @elem.data: Data for RNR elements. @@ -2908,7 +2909,7 @@ struct cfg80211_ssid { * @scan_start_tsf: scan start time in terms of the TSF of the BSS that the * wireless device that requested the scan is connected to. If this * information is not available, this field is left zero. - * @tsf_bssid: the BSSID according to which %scan_start_tsf is set. + * @tsf_bssid: the BSSID according to which @scan_start_tsf is set. * @aborted: set to true if the scan was aborted for any reason, * userspace will be notified of that */ @@ -3168,8 +3169,8 @@ enum cfg80211_signal_type { * ktime_get_boottime_ns() is likely appropriate. * @parent_tsf: the time at the start of reception of the first octet of the * timestamp field of the frame. The time is the TSF of the BSS specified - * by %parent_bssid. - * @parent_bssid: the BSS according to which %parent_tsf is set. This is set to + * by @parent_bssid. + * @parent_bssid: the BSS according to which @parent_tsf is set. This is set to * the BSS that requested the scan in which the beacon/probe was received. * @chains: bitmask for filled values in @chain_signal. * @chain_signal: per-chain signal strength of last received BSS in dBm. @@ -4246,9 +4247,9 @@ struct cfg80211_nan_channel { * * This struct defines NAN local schedule parameters * - * @schedule: a mapping of time slots to chandef indexes in %nan_channels. + * @schedule: a mapping of time slots to chandef indexes in @nan_channels. * An unscheduled slot will be set to %NL80211_NAN_SCHED_NOT_AVAIL_SLOT. - * @n_channels: number of channel definitions in %nan_channels. + * @n_channels: number of channel definitions in @nan_channels. * @nan_avail_blob: pointer to NAN Availability attribute blob. * See %NL80211_ATTR_NAN_AVAIL_BLOB for more details. * @nan_avail_blob_len: length of the @nan_avail_blob in bytes. @@ -4276,7 +4277,7 @@ struct cfg80211_nan_local_sched { * This struct defines the set of NAN local schedule channels that must not * be evacuated for concurrent operations. * - * @n_channels: number of channel definitions in %chandefs. + * @n_channels: number of channel definitions in @chandefs. * @chandefs: array of channel definitions that must not be evacuated. Each * must match a channel of the current local schedule. */ @@ -4949,6 +4950,9 @@ struct mgmt_frame_regs { * @start_ap: Start acting in AP mode defined by the parameters. * @change_beacon: Change the beacon parameters for an access point mode * interface. This should reject the call when AP mode wasn't started. + * @update_beacon: Update the beacon and other templates like @change_beacon, + * but called without the wiphy mutex held. May return -EAGAIN to have + * it fall back to @change_beacon with the wiphy mutex held. * @stop_ap: Stop being an AP, including stopping beaconing. * * @add_station: Add a new station. @@ -4959,7 +4963,13 @@ struct mgmt_frame_regs { * them, also against the existing state! Drivers must call * cfg80211_check_station_change() to validate the information. * @get_station: get station information for the station identified by @mac + * @get_station_unlocked: Like @get_station, but called without the wiphy + * mutex. Return -EAGAIN to get @get_station called with the wiphy mutex + * held instead. * @dump_station: dump station callback -- resume dump at index @idx + * @dump_station_unlocked: Like @dump_station, but called without the wiphy + * mutex. Return -EAGAIN to get @dump_station called with the wiphy mutex + * held instead. * * @add_mpath: add a fixed mesh path * @del_mpath: delete a given mesh path @@ -5083,6 +5093,13 @@ struct mgmt_frame_regs { * This allows the operation to be terminated prior to timeout based on * the duration value. * @mgmt_tx: Transmit a management frame. + * @mgmt_tx_unlocked: Like @mgmt_tx, but called without the wiphy mutex, + * currently limited to AP/GO/NAN. The driver may -EAGAIN to get + * @mgmt_tx with the wiphy mutex held for the same operation, + * although if the device is removed concurrently that might not + * happen and userspace sees -ENODEV. + * Note this cannot acquire the wiphy mutex or RTNL, that would + * deadlock against unregistering the wdev. * @mgmt_tx_cancel_wait: Cancel the wait time from transmitting a management * frame on another channel * @@ -5138,7 +5155,10 @@ struct mgmt_frame_regs { * * @probe_peer: probe a connected peer (AP: STA MAC required; STA: no MAC), * must use the @cookie as provided which is later passed to - * cfg80211_probe_status(). + * cfg80211_probe_status(). Called without the wiphy mutex, so the + * interface type may have changed/be changing and the MAC may be + * %NULL even in AP mode (if runtime type changes are supported), + * drivers must check for that. * * @set_noack_map: Set the NoAck Map for the TIDs. * @@ -5257,6 +5277,7 @@ struct mgmt_frame_regs { * @tx_control_port: TX a control port frame (EAPoL). The noencrypt parameter * tells the driver that the frame should not be encrypted. A @cookie * value of 0 means the caller does not want TX status reporting. + * Called without the wiphy mutex. * * @get_ftm_responder_stats: Retrieve FTM responder statistics, if available. * Statistics should be cumulative, currently no way to reset is provided. @@ -5364,6 +5385,8 @@ struct cfg80211_ops { struct cfg80211_ap_settings *settings); int (*change_beacon)(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ap_update *info); + int (*update_beacon)(struct wiphy *wiphy, struct net_device *dev, + struct cfg80211_ap_update *info); int (*stop_ap)(struct wiphy *wiphy, struct net_device *dev, unsigned int link_id); @@ -5378,8 +5401,16 @@ struct cfg80211_ops { struct station_parameters *params); int (*get_station)(struct wiphy *wiphy, struct wireless_dev *wdev, const u8 *mac, struct station_info *sinfo); + int (*get_station_unlocked)(struct wiphy *wiphy, + struct wireless_dev *wdev, + const u8 *mac, + struct station_info *sinfo); int (*dump_station)(struct wiphy *wiphy, struct wireless_dev *wdev, int idx, u8 *mac, struct station_info *sinfo); + int (*dump_station_unlocked)(struct wiphy *wiphy, + struct wireless_dev *wdev, + int idx, u8 *mac, + struct station_info *sinfo); int (*add_mpath)(struct wiphy *wiphy, struct net_device *dev, const u8 *dst, const u8 *next_hop); @@ -5504,6 +5535,10 @@ struct cfg80211_ops { int (*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_mgmt_tx_params *params, u64 cookie); + int (*mgmt_tx_unlocked)(struct wiphy *wiphy, + struct wireless_dev *wdev, + struct cfg80211_mgmt_tx_params *params, + u64 cookie); int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie); @@ -6362,7 +6397,8 @@ struct wiphy_nan_capa { * @mtx: mutex for the data (structures) of this device * @reg_notifier: the driver's regulatory notification callback, * note that if your driver uses wiphy_apply_custom_regulatory() - * the reg_notifier's request can be passed as NULL + * the reg_notifier's request can be passed as NULL. + * This is called under wiphy mutex. * @regd: the driver's regulatory domain, if one was requested via * the regulatory_hint() API. This can be used by the driver * on the reg_notifier() if it chooses to ignore future @@ -7220,6 +7256,9 @@ enum ieee80211_ap_reg_power { * @netdev: (private) Used to reference back to the netdev, may be %NULL * @identifier: (private) Identifier used in nl80211 to identify this * wireless device if it has no netdev + * @refcnt: (private) references held by nl80211 if there's no netdev, + * to ensure cfg80211_unregister_wdev() cannot return while + * unlocked ops are running * @u: union containing data specific to @iftype * @connected: indicates if connected or not (STA mode) * @wext: (private) Used by the internal wireless extensions compat code @@ -7242,8 +7281,9 @@ enum ieee80211_ap_reg_power { * @mgmt_registrations_need_update: mgmt registrations were updated, * need to propagate the update to the driver * @address: The address for this device, valid only if @netdev is %NULL - * @is_running: true if this is a non-netdev device that has been started, e.g. - * the P2P Device. + * @is_running: true if the device has been started, e.g. the P2P Device; + * for netdevs, tracked under the wiphy mutex from NETDEV_UP until + * NETDEV_GOING_DOWN * @ps: powersave mode is enabled * @ps_timeout: dynamic powersave timeout * @unexpected_nlportid: (private) netlink port ID of application @@ -7284,6 +7324,7 @@ struct wireless_dev { struct net_device *netdev; u32 identifier; + refcount_t refcnt; struct list_head mgmt_registrations; u8 mgmt_registrations_need_update:1; @@ -7407,8 +7448,6 @@ static inline const u8 *wdev_address(struct wireless_dev *wdev) static inline bool wdev_running(struct wireless_dev *wdev) { - if (wdev->netdev) - return netif_running(wdev->netdev); return wdev->is_running; } @@ -8161,9 +8200,9 @@ int regulatory_set_wiphy_regd(struct wiphy *wiphy, * @wiphy: the wireless device we want to process the regulatory domain on * @rd: the regulatory domain information to use for this wiphy * - * This functions requires the RTNL and the wiphy mutex to be held and - * applies the new regdomain synchronously to this wiphy. For more details - * see regulatory_set_wiphy_regd(). + * This functions requires the wiphy mutex to be held and applies the new + * regdomain synchronously to this wiphy. For more details see + * regulatory_set_wiphy_regd(). * * Return: 0 on success. -EINVAL, -EPERM */ @@ -8198,6 +8237,8 @@ void wiphy_apply_custom_regulatory(struct wiphy *wiphy, * it wants to follow we respect that unless a country IE has been received * and processed already. * + * Must be called within an RCU read-side critical section. + * * Return: A valid pointer, or, when an error occurs, for example if no rule * can be found, the return value is encoded using ERR_PTR(). Use IS_ERR() to * check and PTR_ERR() to obtain the numeric return value. The numeric return @@ -8236,20 +8277,20 @@ bool regulatory_pre_cac_allowed(struct wiphy *wiphy); */ /** - * reg_query_regdb_wmm - Query internal regulatory db for wmm rule - * Regulatory self-managed driver can use it to proactively - * + * reg_query_regdb_wmm - Query internal regulatory db for WMM rules * @alpha2: the ISO/IEC 3166 alpha2 wmm rule to be queried. * @freq: the frequency (in MHz) to be queried. - * @rule: pointer to store the wmm rule from the regulatory db. + * @rule: pointer to store the WMM rule from the regulatory db. * - * Self-managed wireless drivers can use this function to query + * Self-managed wireless drivers can use this function to query * the internal regulatory database to check whether the given - * ISO/IEC 3166 alpha2 country and freq have wmm rule limitations. + * ISO/IEC 3166 alpha2 country and freq have WMM rule limitations. * * Drivers should check the return value, its possible you can get * an -ENODATA. * + * This uses RCU internally so can be called in just about any context. + * * Return: 0 on success. -ENODATA. */ int reg_query_regdb_wmm(char *alpha2, int freq, @@ -9809,6 +9850,7 @@ void cfg80211_cqm_beacon_loss_notify(struct net_device *dev, gfp_t gfp); * @gfp: context flags * * This function is called when a radar is detected on the current chanenl. + * Must be called with the wiphy mutex held. */ void __cfg80211_radar_event(struct wiphy *wiphy, struct cfg80211_chan_def *chandef, @@ -9854,7 +9896,7 @@ void cfg80211_sta_opmode_change_notify(struct net_device *dev, const u8 *mac, * * This function is called when a Channel availability check (CAC) is finished * or aborted. This must be called to notify the completion of a CAC process, - * also by full-MAC drivers. + * also by full-MAC drivers. Must be called with the wiphy mutex held. */ void cfg80211_cac_event(struct net_device *netdev, const struct cfg80211_chan_def *chandef, @@ -10166,6 +10208,9 @@ u32 cfg80211_calculate_bitrate(struct rate_info *rate); * when the driver wishes to unregister the wdev, e.g. when the hardware device * is unbound from the driver. * + * Note that unlocked operations can run concurrently until this returns, so be + * careful about ordering. + * * Context: Requires the RTNL and wiphy mutex to be held. */ void cfg80211_unregister_wdev(struct wireless_dev *wdev); diff --git a/include/net/mac80211.h b/include/net/mac80211.h index a24d849b8f9c..a1a6409b44c1 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -4369,6 +4369,13 @@ struct ieee80211_prep_tx_info { * Statistics that the driver doesn't fill will be filled by mac80211. * The callback can sleep. * + * @sta_statistics_atomic: Like @sta_statistics, but called under RCU, so it + * must be atomic. This is called instead of @sta_statistics if available, + * but may return -EAGAIN to fall back to @sta_statistics with the wiphy + * mutex held. + * Note that it's not guaranteed this will always be called first, some + * (internal) calls may call @sta_statistics directly. + * * @link_sta_statistics: Get link statistics for this station. For example with * beacon filtering, the statistics kept by mac80211 might not be * accurate, so let the driver pre-fill the statistics. The driver can @@ -4378,6 +4385,9 @@ struct ieee80211_prep_tx_info { * Statistics that the driver doesn't fill will be filled by mac80211. * The callback can sleep. * + * @link_sta_statistics_atomic: Like @link_sta_statistics, with the same + * locking/retry semantics as @sta_statistics_atomic. Must be atomic. + * * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), * bursting) for a hardware TX queue. * Returns a negative error code on failure. @@ -4586,6 +4596,9 @@ struct ieee80211_prep_tx_info { * just "paused" for scanning/ROC, which is indicated by the beacon being * disabled/enabled via @bss_info_changed. * @stop_ap: Stop operation on the AP interface. + * @update_beacon: Update the templates indicated by @changed (beacon, probe + * response, FILS discovery and/or unsolicitated bcast probe response) + * without the wiphy mutex held. This callback must not sleep. * * @reconfig_complete: Called after a call to ieee80211_restart_hw() and * during resume, when the reconfiguration has completed. @@ -4783,6 +4796,10 @@ struct ieee80211_ops { struct ieee80211_bss_conf *link_conf); void (*stop_ap)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *link_conf); + void (*update_beacon)(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf, + u64 changed); u64 (*prepare_multicast)(struct ieee80211_hw *hw, struct netdev_hw_addr_list *mc_list); @@ -4876,6 +4893,10 @@ struct ieee80211_ops { struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct station_info *sinfo); + int (*sta_statistics_atomic)(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + struct station_info *sinfo); int (*conf_tx)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, unsigned int link_id, u16 ac, @@ -4891,6 +4912,10 @@ struct ieee80211_ops { struct ieee80211_vif *vif, struct ieee80211_link_sta *link_sta, struct link_station_info *link_sinfo); + int (*link_sta_statistics_atomic)(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_link_sta *link_sta, + struct link_station_info *link_sinfo); /** * @ampdu_action: diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 341f8395d1af..b56a96f57bec 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -1458,6 +1458,16 @@ * keep their non-evacuable marking, removed channels lose it, and newly * added channels are evacuable by default; issue this command again to * change the non-evacuable set. + * @NL80211_CMD_UPDATE_BEACON: Update the beacon and other templates of an AP + * interface, but only that. Same attributes as %NL80211_CMD_SET_BEACON, + * %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL are required, + * configuration changes such as %NL80211_ATTR_FTM_RESPONDER rejected. + * This doesn't acquire the wiphy mutex internally, so it's faster, but + * cannot update any other configuration. + * For MLO a single link is set with %NL80211_ATTR_MLO_LINK_ID as usual + * and multiple can be nested in %NL80211_ATTR_MLO_LINKS but then the + * update isn't atomic if any failures happen. + * Only supported with %NL80211_EXT_FEATURE_UPDATE_BEACON. * @NL80211_CMD_MAX: highest used command number * @__NL80211_CMD_AFTER_LAST: internal use */ @@ -1738,6 +1748,8 @@ enum nl80211_commands { NL80211_CMD_NAN_SET_NON_EVAC_CHANNELS, + NL80211_CMD_UPDATE_BEACON, + /* add new commands above here */ /* used to define NL80211_CMD_MAX below */ @@ -7178,6 +7190,9 @@ enum nl80211_feature_flags { * offload in station mode, including Fast Transition or Opportunistic * Key Caching. * + * @NL80211_EXT_FEATURE_UPDATE_BEACON: Driver supports + * %NL80211_CMD_UPDATE_BEACON. + * * @NUM_NL80211_EXT_FEATURES: number of extended features. * @MAX_NL80211_EXT_FEATURES: highest extended feature index. */ @@ -7261,6 +7276,7 @@ enum nl80211_ext_feature_index { NL80211_EXT_FEATURE_SET_KEY_LTF_SEED, NL80211_EXT_FEATURE_PROBE_AP, NL80211_EXT_FEATURE_FAST_ROAM_OFFLOAD, + NL80211_EXT_FEATURE_UPDATE_BEACON, /* add new features before the definition below */ NUM_NL80211_EXT_FEATURES, |
