wifi: cfg80211: allow zero HE OBSS PD offsets
PATCH 1/1 wifi: cfg80211: allow zero HE OBSS PD offsets
From: Dominic White <[email protected]>
IEEE Std 802.11 permits the OBSS PD offset fields in the Spatial Reuse Parameter Set element to have a value of zero. (IEEE Std 802.11-2024, 26.10.2.4)
The standard specifies the offsets as unsigned values added to -82 dBm, with field presence signalled independently. The valid offset range is therefore 0..20.
nl80211 currently rejects zero for all three HE OBSS PD offset attributes during nested netlink policy validation, before the values reach cfg80211 or the driver. Allow zero while retaining the upper bound and the existing minimum/maximum relationship validation.
--- net/wireless/nl80211.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
net/wireless/nl80211.c +3 -3
@@ -529,11 +529,11 @@ nl80211_pmsr_attr_policy[NL80211_PMSR_ATTR_MAX + 1] = {static const struct nla_policy he_obss_pd_policy[NL80211_HE_OBSS_PD_ATTR_MAX +1 ] = { [NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET ] = -NLA_POLICY_RANGE (NLA_U8 ,1 ,20 ), +NLA_POLICY_RANGE (NLA_U8 ,0 ,20 ), [NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET ] = -NLA_POLICY_RANGE (NLA_U8 ,1 ,20 ), +NLA_POLICY_RANGE (NLA_U8 ,0 ,20 ), [NL80211_HE_OBSS_PD_ATTR_NON_SRG_MAX_OFFSET ] = -NLA_POLICY_RANGE (NLA_U8 ,1 ,20 ), +NLA_POLICY_RANGE (NLA_U8 ,0 ,20 ), [NL80211_HE_OBSS_PD_ATTR_BSS_COLOR_BITMAP ] =NLA_POLICY_EXACT_LEN (8 ), [NL80211_HE_OBSS_PD_ATTR_PARTIAL_BSSID_BITMAP] =
base-commit: 89a312991dc6e638a36adc43ccb91dbc25504c04
Signature · 1 line
2.50.1 (Apple Git-155)
Johannes Berg
maintainerQuoted 9 lines · On Thu, 2026-09-03 at 10:18 +0200, [email protected] wrote:
From: Dominic White <[email protected]>
IEEE Std 802.11 permits the OBSS PD offset fields in the Spatial Reuse Parameter Set element to have a value of zero. (IEEE Std 802.11-2024, 26.10.2.4)
The standard specifies the offsets as unsigned values added to -82 dBm, with field presence signalled independently. The valid offset range is therefore 0..20.
However, leaving the attribute unset automatically results in zero, so functionally it's not really needed.
johannes
Hi Johannes,
Thanks. I followed up with a hostapd workaround, which Jouni has now applied:
https://git.w1.fi/cgit/hostap/commit/?id=5b156e272a0266ca6be0f394192bad42b0ff176c
Regards,
Dominic