* [PATCH 0/2] wifi: nl80211: Document sta-info nested attribute
@ 2026-08-21 7:47 Hilal Rahmatullah
2026-08-21 7:47 ` [PATCH 1/2] wifi: nl80211: add " Hilal Rahmatullah
2026-08-21 7:47 ` [PATCH 2/2] net: ynl: allow u8 sub-type for indexed array Hilal Rahmatullah
0 siblings, 2 replies; 3+ messages in thread
From: Hilal Rahmatullah @ 2026-08-21 7:47 UTC (permalink / raw)
To: Donald Hunter, Jakub Kicinski, David S. Miller, Eric Dumazet,
Paolo Abeni, Simon Horman
Cc: netdev, linux-kernel, Hilal Rahmatullah
There are many undocumented attribute in nl80211 specification
documentation, this patch series aims to document
NL80211_ATTR_STA_INFO nested attribute from the previous
binary type.
This patch merges/supersedes 2 related patches.
Link: https://lore.kernel.org/netdev/20260820110904.28645-1-hilalrahmatullah11@gmail.com
Link: https://lore.kernel.org/netdev/20260820072141.15779-1-hilalrahmatullah11@gmail.com
Signed-off-by: Hilal Rahmatullah <hilalrahmatullah11@gmail.com>
---
Hilal Rahmatullah (2):
wifi: nl80211: add sta-info nested attribute
net: ynl: allow u8 sub-type for indexed array
Documentation/netlink/specs/nl80211.yaml | 368 ++++++++++++++++++++++++++++++-
tools/net/ynl/pyynl/ynl_gen_c.py | 2 +-
2 files changed, 368 insertions(+), 2 deletions(-)
---
base-commit: 3d6d817622b0a9721e3cc404df3469171582be13
change-id: 20260821-work-b9d257341ca7
Best regards,
--
Hilal Rahmatullah <hilalrahmatullah11@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] wifi: nl80211: add sta-info nested attribute
2026-08-21 7:47 [PATCH 0/2] wifi: nl80211: Document sta-info nested attribute Hilal Rahmatullah
@ 2026-08-21 7:47 ` Hilal Rahmatullah
2026-08-21 7:47 ` [PATCH 2/2] net: ynl: allow u8 sub-type for indexed array Hilal Rahmatullah
1 sibling, 0 replies; 3+ messages in thread
From: Hilal Rahmatullah @ 2026-08-21 7:47 UTC (permalink / raw)
To: Donald Hunter, Jakub Kicinski, David S. Miller, Eric Dumazet,
Paolo Abeni, Simon Horman
Cc: netdev, linux-kernel, Hilal Rahmatullah
Add NL80211_ATTR_STA_INFO nested attribute definition, along with
its related attributes and enum.
Signed-off-by: Hilal Rahmatullah <hilalrahmatullah11@gmail.com>
---
Documentation/netlink/specs/nl80211.yaml | 368 ++++++++++++++++++++++++++++++-
1 file changed, 367 insertions(+), 1 deletion(-)
diff --git a/Documentation/netlink/specs/nl80211.yaml b/Documentation/netlink/specs/nl80211.yaml
index 802097128bda..cc5ef34f8dec 100644
--- a/Documentation/netlink/specs/nl80211.yaml
+++ b/Documentation/netlink/specs/nl80211.yaml
@@ -211,6 +211,76 @@ definitions:
- ht20
- ht40minus
- ht40plus
+ -
+ name: eht-gi
+ type: enum
+ name-prefix: nl80211-rate-info-eht-gi-
+ entries:
+ - 0-8
+ - 1-6
+ - 3-2
+ -
+ name: eht-ru-alloc
+ type: enum
+ name-prefix: nl80211-rate-info-he-ru-alloc-
+ entries:
+ - "26"
+ - "52"
+ - 52p26
+ - "106"
+ - 106p26
+ - "242"
+ - "484"
+ - 484p242
+ - "996"
+ - 996p484
+ - 996p484p242
+ - 2x996
+ - 2x996p484
+ - 3x996
+ - 3x996p484
+ - 4x996
+ -
+ name: he-gi
+ type: enum
+ name-prefix: nl80211-rate-info-he-gi-
+ entries:
+ - 0-8
+ - 1-6
+ - 3-2
+ -
+ name: he-ru-alloc
+ type: enum
+ name-prefix: nl80211-rate-info-he-ru-alloc-
+ entries:
+ - "26"
+ - "52"
+ - "106"
+ - "242"
+ - "484"
+ - "996"
+ - 2x996
+ -
+ name: mesh-power-mode
+ type: enum
+ name-prefix: nl80211-mesh-power-
+ entries:
+ - unknown
+ - active
+ - light-sleep
+ - deep-sleep
+ -
+ name: plink-state
+ type: enum
+ name-prefix: nl80211-plink-
+ entries:
+ - listen
+ - opn-snt
+ - opn-rcvd
+ - cnf-rcvd
+ - estab
+ - holding
+ - blocked
-
name: sta-flag-update
type: struct
@@ -297,7 +367,8 @@ attribute-sets:
type: u32
-
name: sta-info
- type: binary # TODO: nest
+ type: nest
+ nested-attributes: sta-info-attrs
-
name: wiphy-bands
type: nest
@@ -1601,6 +1672,111 @@ attribute-sets:
name: nan
type: nest
nested-attributes: frame-type-attrs
+ -
+ name: rate-info-attrs
+ enum-name: nl80211-rate-info
+ name-prefix: nl80211-rate-info-
+ attributes:
+ -
+ name: bitrate
+ type: u16
+ -
+ name: mcs
+ type: u8
+ -
+ name: 40-mhz-width
+ type: flag
+ -
+ name: short-gi
+ type: flag
+ -
+ name: bitrate32
+ type: u32
+ -
+ name: vht-mcs
+ type: u8
+ -
+ name: vht-nss
+ type: u8
+ -
+ name: 80-mhz-width
+ type: flag
+ -
+ name: 80p80-mhz-width
+ type: unused
+ -
+ name: 160-mhz-width
+ type: flag
+ -
+ name: 10-mhz-width
+ type: flag
+ -
+ name: 5-mhz-width
+ type: flag
+ -
+ name: he-mcs
+ type: u8
+ -
+ name: he-nss
+ type: u8
+ -
+ name: he-gi
+ type: u8
+ enum: he-gi
+ -
+ name: he-dcm
+ type: u8
+ -
+ name: he-ru-alloc
+ type: u8
+ enum: he-ru-alloc
+ -
+ name: 320-mhz-width
+ type: flag
+ -
+ name: eht-mcs
+ type: u8
+ -
+ name: eht-nss
+ type: u8
+ -
+ name: eht-gi
+ type: u8
+ enum: eht-gi
+ -
+ name: eht-ru-alloc
+ type: u8
+ enum: eht-ru-alloc
+ -
+ name: s1g-mcs
+ type: u8
+ -
+ name: s1g-nss
+ type: u8
+ -
+ name: 1-mhz-width
+ type: flag
+ -
+ name: 2-mhz-width
+ type: flag
+ -
+ name: 4-mhz-width
+ type: flag
+ -
+ name: 8-mhz-width
+ type: flag
+ -
+ name: 16-mhz-width
+ type: flag
+ -
+ name: uhr-mcs
+ type: u8
+ -
+ name: uhr-elr
+ type: flag
+ -
+ name: uhr-im
+ type: flag
-
name: sar-attributes
enum-name: nl80211-sar-attrs
@@ -1631,6 +1807,172 @@ attribute-sets:
-
name: end-freq
type: u32
+ -
+ name: sta-bss-param-attrs
+ enum-name: nl80211-sta-bss-param
+ name-prefix: nl80211-sta-bss-param-
+ attributes:
+ -
+ name: cts-prot
+ type: flag
+ -
+ name: short-preamble
+ type: flag
+ -
+ name: short-slot-time
+ type: flag
+ -
+ name: dtim-period
+ type: u8
+ -
+ name: beacon-interval
+ type: u16
+ -
+ name: sta-info-attrs
+ enum-name: nl80211-sta-info
+ name-prefix: nl80211-sta-info-
+ attributes:
+ -
+ name: inactive-time
+ type: u32
+ -
+ name: rx-bytes
+ type: u32
+ -
+ name: tx-bytes
+ type: u32
+ -
+ name: llid
+ type: u16
+ -
+ name: plid
+ type: u16
+ -
+ name: plink-state
+ type: u8
+ enum: plink-state
+ -
+ name: signal
+ type: u8
+ -
+ name: tx-bitrate
+ type: nest
+ nested-attributes: rate-info-attrs
+ -
+ name: rx-packets
+ type: u32
+ -
+ name: tx-packets
+ type: u32
+ -
+ name: tx-retries
+ type: u32
+ -
+ name: tx-failed
+ type: u32
+ -
+ name: signal-avg
+ type: u8
+ -
+ name: rx-bitrate
+ type: nest
+ nested-attributes: rate-info-attrs
+ -
+ name: bss-param
+ type: nest
+ nested-attributes: sta-bss-param-attrs
+ -
+ name: connected-time
+ type: u32
+ -
+ name: sta-flags
+ type: binary
+ struct: sta-flag-update
+ -
+ name: beacon-loss
+ type: u32
+ -
+ name: t-offset
+ type: s64
+ -
+ name: local-pm
+ type: u32
+ enum: mesh-power-mode
+ -
+ name: peer-pm
+ type: u32
+ enum: mesh-power-mode
+ -
+ name: nonpeer-pm
+ type: u32
+ enum: mesh-power-mode
+ -
+ name: rx-bytes64
+ type: u64
+ -
+ name: tx-bytes64
+ type: u64
+ -
+ name: chain-signal
+ type: indexed-array
+ sub-type: u8
+ -
+ name: chain-signal-avg
+ type: indexed-array
+ sub-type: u8
+ -
+ name: expected-throughput
+ type: u32
+ -
+ name: rx-drop-misc
+ type: u64
+ -
+ name: beacon-rx
+ type: u64
+ -
+ name: beacon-signal-avg
+ type: u8
+ -
+ name: tid-stats
+ type: indexed-array
+ sub-type: nest
+ nested-attributes: tid-stats-attrs
+ -
+ name: rx-duration
+ type: u64
+ -
+ name: pad
+ type: binary
+ -
+ name: ack-signal
+ type: u8
+ -
+ name: ack-signal-avg
+ type: s8
+ -
+ name: rx-mpdus
+ type: u32
+ -
+ name: fcs-error-count
+ type: u32
+ -
+ name: connected-to-gate
+ type: u8
+ -
+ name: tx-duration
+ type: u64
+ -
+ name: airtime-weight
+ type: u16
+ -
+ name: airtime-link-metric
+ type: u32
+ -
+ name: assoc-at-boottime
+ type: u64
+ -
+ name: connected-to-as
+ type: u8
-
name: supported-iftypes
enum-name: nl80211-iftype
@@ -1672,6 +2014,30 @@ attribute-sets:
-
name: nan
type: flag
+ -
+ name: tid-stats-attrs
+ enum-name: nl80211-tid-stats
+ name-prefix: nl80211-tid-stats-
+ attributes:
+ -
+ name: rx-msdu
+ type: u64
+ -
+ name: tx-msdu
+ type: u64
+ -
+ name: tx-msdu-retries
+ type: u64
+ -
+ name: tx-msdu-failed
+ type: u64
+ -
+ name: pad
+ type: binary
+ -
+ name: txq-stats
+ type: nest
+ nested-attributes: txq-stats-attrs
-
name: txq-stats-attrs
name-prefix: nl80211-txq-stats-
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] net: ynl: allow u8 sub-type for indexed array
2026-08-21 7:47 [PATCH 0/2] wifi: nl80211: Document sta-info nested attribute Hilal Rahmatullah
2026-08-21 7:47 ` [PATCH 1/2] wifi: nl80211: add " Hilal Rahmatullah
@ 2026-08-21 7:47 ` Hilal Rahmatullah
1 sibling, 0 replies; 3+ messages in thread
From: Hilal Rahmatullah @ 2026-08-21 7:47 UTC (permalink / raw)
To: Donald Hunter, Jakub Kicinski, David S. Miller, Eric Dumazet,
Paolo Abeni, Simon Horman
Cc: netdev, linux-kernel, Hilal Rahmatullah
add u8 to the supported sub-type for indexed array,
it is needed for NL80211_STA_INFO_CHAIN_SIGNAL serialization.
Signed-off-by: Hilal Rahmatullah <hilalrahmatullah11@gmail.com>
---
tools/net/ynl/pyynl/ynl_gen_c.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/net/ynl/pyynl/ynl_gen_c.py b/tools/net/ynl/pyynl/ynl_gen_c.py
index cdc3646f2642..7373a48d5516 100755
--- a/tools/net/ynl/pyynl/ynl_gen_c.py
+++ b/tools/net/ynl/pyynl/ynl_gen_c.py
@@ -1158,7 +1158,7 @@ class AttrSet(SpecAttrSet):
elif elem['type'] == 'nest':
t = TypeNest(self.family, self, elem, value)
elif elem['type'] == 'indexed-array' and 'sub-type' in elem:
- if elem["sub-type"] in ['binary', 'nest', 'u32']:
+ if elem["sub-type"] in ['binary', 'nest', 'u32', 'u8']:
t = TypeIndexedArray(self.family, self, elem, value)
else:
raise Exception(f'new_attr: unsupported sub-type {elem["sub-type"]}')
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-21 7:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 7:47 [PATCH 0/2] wifi: nl80211: Document sta-info nested attribute Hilal Rahmatullah
2026-08-21 7:47 ` [PATCH 1/2] wifi: nl80211: add " Hilal Rahmatullah
2026-08-21 7:47 ` [PATCH 2/2] net: ynl: allow u8 sub-type for indexed array Hilal Rahmatullah
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.