From d9ecaa0a31732014a128e3b03243de54bbbd8394 Mon Sep 17 00:00:00 2001 From: Dominic White Date: Thu, 3 Sep 2026 10:18:04 +0200 Subject: [PATCH] wifi: cfg80211: allow zero HE OBSS PD offsets 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. Fixes: 796e90f42b7e ("cfg80211: add support for parsing OBBS_PD attributes") Signed-off-by: Dominic White Link: https://patch.msgid.link/20260903081804.96532-1-github@singe.za.net Signed-off-by: Johannes Berg --- net/wireless/nl80211.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index a182404557e0..572da1d8f3d9 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -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] =