| From: |
| Priyansha Tiwari <priyansha.tiwari-AT-oss.qualcomm.com> |
| To: |
| johannes-AT-sipsolutions.net |
| Subject: |
| [PATCH wireless-next v5 0/4] wifi: nl80211: introduce PROBE_PEER for AP and STA |
| Date: |
| Thu, 11 Jun 2026 11:52:21 +0530 |
| Message-ID: |
| <20260611062225.2144241-1-pritiwa@qti.qualcomm.com> |
| Cc: |
| veerendranath.jakkam-AT-oss.qualcomm.com, linux-wireless-AT-vger.kernel.org, quic_drohan-AT-quicinc.com |
| Archive-link: |
| Article |
From: Priyansha Tiwari <priyansha.tiwari@oss.qualcomm.com>
This series introduces a unified mechanism to probe connected peers.
It generalizes the legacy AP-only PROBE_CLIENT functionality by adding
NL80211_CMD_PROBE_PEER and enabling (feature-gated) STA-side probing.
With this, AP/GO continues to probe associated stations as before, and
STA/P2P-client can probe the connected AP for faster link health checks.
For MLO connections, mac80211 supports per-link STA probing to obtain
link-specific ACK information.
Patch 1 renames NL80211_CMD_PROBE_CLIENT to NL80211_CMD_PROBE_PEER in
the UAPI enum (keeping PROBE_CLIENT as a compatibility alias) and renames
the .probe_client cfg80211_ops callback to .probe_peer. All in-tree users
(wil6210, mwifiex, mac80211) are updated so the tree builds after this
patch. This is a pure rename with no behaviour change; documentation is
intentionally left unchanged.
Patch 2 updates the @probe_peer documentation in cfg80211_ops to describe
the STA-mode semantics, adds NL80211_EXT_FEATURE_PROBE_AP to advertise
STA-side support, extends cfg80211_probe_status() to carry an optional
peer address and a link_id (-1 for non-MLO), and extends the nl80211
handler to accept STA/P2P-client interfaces when the driver advertises
the feature (MAC attribute must be omitted; the AP is implied by the
association). All callers of cfg80211_probe_status() are updated.
Patch 3 adds per-link PROBE_PEER support in mac80211 for STA/P2P-client
mode. For STA/P2P-client, it uses IEEE80211_LINK_UNSPECIFIED together
with the associated AP/GO address and lets the driver select the link.
For non-MLO connections, mac80211 still fills info->band from the
current chanctx so legacy transmissions continue to carry the correct
band information. The link_valid/link_id bitfields in
ieee80211_tx_info.status are set before transmitting and read back in
ieee80211_report_ack_skb() to report the actual link_id to userspace.
AP/GO behaviour is unchanged.
Patch 4 makes mac80211_hwsim populate link_valid/link_id in TX status
for both the direct TX status path and the wmediumd/netlink TX status
path.
---
Changes in v5:
- Patch 3:
* Renamed peer_addr to dst_addr for clarity.
* Reworked ieee80211_probe_peer() to share more logic between
AP and STA modes by using ieee80211_vif_type_p2p(),
overriding the STA peer to the associated AP/GO address,
and pulling the common sta lookup/qos handling out of the
switch.
* Kept the remaining AP/STA difference limited to the DS bits,
while preserving the existing MLO/non-MLO address and band
handling.
Changes in v4:
- Patch 3:
* Dropped guard(rcu)() from ieee80211_probe_peer() and used
wiphy_dereference() under the already held wiphy lock.
* Simplified STA/P2P-client probing to use
IEEE80211_LINK_UNSPECIFIED together with the associated
AP/GO address for both MLO and non-MLO cases.
* Kept the non-MLO band lookup via chanctx so legacy
transmissions still carry the correct band.
* Return -ENOLINK when the associated AP STA entry is missing,
instead of falling back to non-QoS probing.
Changes in v3:
- Restructured patch split:
* Patch 1: pure rename (probe_client -> probe_peer), no doc changes
* Patch 2: documentation update for STA-mode semantics +
nl80211 API logic change + cfg80211_probe_status update
* Patch 3: mac80211 implementation
- Removed unnecessary bitfield padding (no pad2:3)
- Moved MAC-omission check for STA mode into cfg80211/nl80211
(not mac80211).
- Used switch statement in both nl80211_probe_peer() and
ieee80211_probe_peer().
- Used guard(rcu)() instead of manual rcu_read_lock/unlock
- Return -ENOLINK (not -ENOTCONN) for unconnected STA, consistent
with cfg80211 conventions
Priyansha Tiwari (4):
wifi: nl80211/cfg80211: rename probe_client to probe_peer
wifi: cfg80211/nl80211: add STA-mode peer probing
wifi: mac80211: implement STA-mode peer probing
wifi: mac80211_hwsim: report TX status link_id
drivers/net/wireless/ath/wil6210/cfg80211.c | 10 +-
.../net/wireless/marvell/mwifiex/cfg80211.c | 8 +-
.../wireless/virtual/mac80211_hwsim_main.c | 43 ++++++-
include/net/cfg80211.h | 18 +--
include/net/mac80211.h | 2 +-
include/uapi/linux/nl80211.h | 23 ++--
net/mac80211/cfg.c | 117 +++++++++---------
net/mac80211/status.c | 5 +-
net/wireless/nl80211.c | 69 +++++++----
net/wireless/rdev-ops.h | 10 +-
net/wireless/trace.h | 2 +-
11 files changed, 187 insertions(+), 120 deletions(-)
--
2.34.1