[PATCH wireless-next 0/5] wifi: cfg80211: Add fragmented per-link station stats in MLO
P Praneesh
praneesh.p at oss.qualcomm.com
Sun Jun 7 10:59:07 PDT 2026
This series introduces fragmentation support for Multi-Link Operation
(MLO) station statistics in nl80211.
The current nl80211_dump_station() implementation works well for legacy
(single-link) stations, but it does not scale for MLO peers. With
multiple links per station, dumping all per-link information in a single
netlink message can exceed size limits, resulting in -EMSGSIZE errors
and incomplete dumps.
With 802.11be (Wi‑Fi 7), a single station may have multiple links, each
with its own statistics. To address this, this series introduces a
stateful dump mechanism that splits station information into multiple
messages when required.
The dump is performed in two phases:
- Phase 0: Aggregated (station-level) statistics
- Phase 1: Per-link statistics sent in separate messages
This ensures:
- Reliable delivery of complete station information for MLO peers
- Backward compatibility for legacy stations
- A scalable design for future extensions
Summary of changes:
- Drop unused per-link stats handling from nl80211_send_station()
- Introduce a helper to pack common station-level STA_INFO attributes
- Refactor nl80211_dump_station() to use a stateful dump context
- Implement per-link stats fragmentation using a two-phase approach
- Add optional MAC address filtering for per-link station dumps
Message Layout Examples:
Aggregated Stats (Phase 0)
NL80211_CMD_NEW_STATION
├─ NL80211_ATTR_IFINDEX
├─ NL80211_ATTR_MAC
├─ NL80211_ATTR_GENERATION
└─ NL80211_ATTR_STA_INFO
├─ <aggregated station attributes>
└─ ...
Note: No NL80211_ATTR_MLO_LINKS is included in this phase.
Per‑link stats are sent in Phase 1.
Per-Link Stats (Phase 1)
NL80211_CMD_NEW_STATION
├─ NL80211_ATTR_IFINDEX
├─ NL80211_ATTR_MAC (MLO MAC)
├─ NL80211_ATTR_GENERATION
└─ NL80211_ATTR_STA_INFO
└─ NL80211_ATTR_MLO_LINKS
├─ [link0]
│ ├─ NL80211_ATTR_MLO_LINK_ID = 0
│ ├─ NL80211_ATTR_MAC = <link0 MAC>
│ ├─ NL80211_STA_INFO_RX_BYTES
│ ├─ NL80211_STA_INFO_TX_BYTES
│ └─ ... more link0 stats ...
│
├─ [link1]
│ ├─ NL80211_ATTR_MLO_LINK_ID = 1
│ ├─ NL80211_ATTR_MAC = <link1 MAC>
│ ├─ NL80211_STA_INFO_RX_BYTES
│ ├─ NL80211_STA_INFO_TX_BYTES
│ └─ ... more link1 stats ...
│
└─ [link2]
├─ NL80211_ATTR_MLO_LINK_ID = 2
├─ NL80211_ATTR_MAC = <link2 MAC>
├─ NL80211_STA_INFO_RX_BYTES
├─ NL80211_STA_INFO_TX_BYTES
└─ ... more link2 stats ...
Testing:
- Verified using "iw station dump" on a 3-link MLO station
- iw requires some updates to parse fragmented per-link stats
(e.g., NL80211_ATTR_MLO_LINKS handling). Those changes will be
submitted separately.
Sample station dump output:
Single link EHT STA:
~~~~~~~~~~~~~~~~~~~
Station ff:ff:ff:0f:f8:64 (on wlan0)
authorized: yes
authenticated: yes
associated: yes
preamble: long
WMM/WME: yes
MFP: yes
TDLS peer: no
inactive time: 182068 ms
rx bytes: 1567
rx packets: 15
tx bytes: 1083
tx packets: 6
tx retries: 0
tx failed: 0
rx drop misc: 0
signal: -30 dBm
signal avg: -27 dBm
tx bitrate: 6.0 MBit/s
tx duration: 3136 us
rx bitrate: 1441.3 MBit/s 80MHz EHT-MCS 7 EHT-NSS 4 EHT-GI 0
rx duration: 0 us
last ack signal:-31 dBm
avg ack signal: -31 dBm
DTIM period: 2
beacon interval:100
connected time: 185 seconds
associated at [boottime]: 157.326s
associated at: 157326 ms
current time: 342408 ms
Link 0:
address: ff:ff:ff:0f:f8:64
inactive time: 182068 ms
rx bytes: 1567
rx packets: 15
tx bytes: 1083
tx packets: 6
tx retries: 0
tx failed: 0
rx drop misc: 0
signal: -30 dBm
signal avg: -29 dBm
tx bitrate: 6.0 MBit/s
tx duration: 1568 us
rx duration: 0 us
last ack signal:-31 dBm
avg ack signal: -31 dBm
DTIM period: 2
beacon interval:100
3 link MLO EHT STA:
~~~~~~~~~~~~~~~~~~
Station ff:ff:ff:ff:5f:23 (on wlan0)
authorized: yes
authenticated: yes
associated: yes
preamble: long
WMM/WME: yes
MFP: yes
TDLS peer: no
inactive time: 173476 ms
rx bytes: 1036
rx packets: 9
tx bytes: 1694
tx packets: 6
tx retries: 1
tx failed: 1
rx drop misc: 0
signal: -20 dBm
signal avg: -22 dBm
tx bitrate: 6.0 MBit/s
tx duration: 2476 us
rx duration: 0 us
last ack signal:-22 dBm
avg ack signal: -22 dBm
DTIM period: 2
beacon interval:100
connected time: 174 seconds
associated at [boottime]: 168.236s
associated at: 168236 ms
current time: 342412 ms
Link 0:
address: ff:ff:ff:ff:5f:23
inactive time: 173476 ms
rx bytes: 138
rx packets: 3
tx bytes: 0
tx packets: 0
tx retries: 0
tx failed: 0
rx drop misc: 0
signal: -27 dBm
signal avg: -28 dBm
tx duration: 0 us
rx duration: 0 us
DTIM period: 2
beacon interval:100
Link 1:
address: ff:ff:ff:ff:5f:24
inactive time: 173976 ms
rx bytes: 898
rx packets: 6
tx bytes: 1694
tx packets: 6
tx retries: 0
tx failed: 0
rx drop misc: 0
signal: -20 dBm
signal avg: -22 dBm
tx bitrate: 6.0 MBit/s
tx duration: 2476 us
rx bitrate: 6.0 MBit/s
rx duration: 0 us
last ack signal:-22 dBm
avg ack signal: -22 dBm
DTIM period: 2
beacon interval:100
Link 2:
address: ff:ff:ff:ff:5f:25
inactive time: 174188 ms
rx bytes: 0
rx packets: 0
tx bytes: 0
tx packets: 0
tx retries: 1
tx failed: 1
rx drop misc: 0
signal: -30 dBm
signal avg: -31 dBm
tx bitrate: 12.0 MBit/s
tx duration: 1920 us
rx duration: 0 us
DTIM period: 2
beacon interval:100
With HE AP and STA:
~~~~~~~~~~~~~~~~~~
Station ff:ff:ff:f1:f8:f4 (on wlan0)
authorized: yes
authenticated: yes
associated: yes
preamble: long
WMM/WME: yes
MFP: yes
TDLS peer: no
inactive time: 10176 ms
rx bytes: 968
rx packets: 10
tx bytes: 856
tx packets: 6
tx retries: 0
tx failed: 0
rx drop misc: 0
signal: -24 dBm
signal avg: -27 dBm
tx bitrate: 6.0 MBit/s
tx duration: 1300 us
rx bitrate: 1297.1 MBit/s 80MHz HE-MCS 6 HE-NSS 4
rx duration: 0 us
last ack signal:-30 dBm
avg ack signal: -30 dBm
DTIM period: 2
beacon interval:100
short slot time:yes
connected time: 11 seconds
associated at [boottime]: 69.552s
associated at: 69530 ms
current time: 80780 ms
P Praneesh (5):
wifi: cfg80211: Drop unused link stats handling in
nl80211_send_station()
wifi: cfg80211: Add helper to pack station-level STA_INFO
wifi: cfg80211: Refactor nl80211_dump_station() to prepare for
per-link stats
wifi: cfg80211: Fragment per-link station stats in
nl80211_dump_station()
wifi: cfg80211: support MAC address filtering in station dump for link
stats
include/uapi/linux/nl80211.h | 32 ++-
net/wireless/nl80211.c | 473 ++++++++++++++++++++++++++---------
2 files changed, 392 insertions(+), 113 deletions(-)
base-commit: 4cc0cc0b297c17c2b106d6892bd13d9c32fe66ce
--
2.43.0
More information about the ath12k
mailing list