[PATCH AUTOSEL 6.19] wifi: cfg80211: treat deprecated INDOOR_SP_AP_OLD control value as LPI mode

Sasha Levin
2026-02-14T21:26:54Z

From: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>

[ Upstream commit fd5bfcf430ea2fdbb3e78fd0b82ceb0ab02b72ee ]

Although value 4 (INDOOR_SP_AP_OLD) is deprecated in IEEE standards,
existing APs may still use this control value. Since this value is
based on the old specification, we cannot trust such APs implement
proper power controls.
Therefore, move IEEE80211_6GHZ_CTRL_REG_INDOOR_SP_AP_OLD case
from SP_AP to LPI_AP power type handling to prevent potential
power limit violations.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260111163601.6b5a36d3601e.I1704ee575fd25edb0d56f48a0a3169b44ef72ad0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

## Analysis of wifi: cfg80211: treat deprecated INDOOR_SP_AP_OLD control
value as LPI mode

### 1. Commit Message Analysis

The commit addresses a **power limit violation** issue in 6 GHz WiFi
regulatory handling. The key points:

- Value 4 (`INDOOR_SP_AP_OLD`) is deprecated in IEEE standards but still
used by existing APs in the field
- Since APs using this deprecated value may not implement proper power
controls, the commit treats them as LPI (Low Power Indoor) instead of
SP (Standard Power)
- This **prevents potential power limit violations** — a regulatory
compliance and safety issue

The commit is reviewed by Johannes Berg (wireless subsystem maintainer)
and signed off by Intel WiFi developers, indicating high confidence in
correctness.

### 2. Code Change Analysis

The change is extremely minimal — a single line is moved from one `case`
group to another in a `switch` statement:

```c
// BEFORE: INDOOR_SP_AP_OLD was grouped with SP_AP → returned
IEEE80211_REG_SP_AP
// AFTER: INDOOR_SP_AP_OLD is grouped with LPI_AP → returns
IEEE80211_REG_LPI_AP
```

This is a **two-line diff** (one line added, one line removed) in a
`static inline` function in a header file. The change is purely about
reclassifying a deprecated control value to use more conservative
(lower) power limits.

### 3. Classification: Bug Fix

This is a **correctness/safety fix**, not a feature:

- **Regulatory compliance**: Using SP (Standard Power) when the AP
doesn't implement proper power controls can violate regulatory power
limits for 6 GHz spectrum
- **Real-world impact**: Existing APs in the field still use this
deprecated value 4, so real users encounter this
- **Conservative approach**: Moving to LPI (Low Power Indoor) is the
safe default — it restricts power rather than allowing potentially
excessive power

This is analogous to a **hardware quirk/workaround** — dealing with
real-world devices that use a deprecated specification value.

### 4. Scope and Risk Assessment

- **Size**: Minimal — moving one `case` label from one group to another
- **Risk**: Extremely low — the change is to use MORE conservative power
limits, not less
- **Subsystem**: WiFi/cfg80211 — widely used networking subsystem
- **Side effects**: Devices connecting to APs using the deprecated value
will use lower power, which is safer. In the worst case, this means
slightly reduced range, which is far better than violating regulatory
limits.

### 5. User Impact

- **Who is affected**: Any user with a 6 GHz WiFi device connecting to
an AP that uses the deprecated `INDOOR_SP_AP_OLD` control value
- **Severity**: Without this fix, the system could transmit at Standard
Power levels when it should be using Low Power Indoor levels — this is
a **regulatory violation** that could potentially cause interference
and legal issues
- **Real-world devices**: The commit message explicitly states "existing
APs may still use this control value," confirming real hardware exists
with this behavior

### 6. Stability Indicators

- **Reviewed-by: Johannes Berg** — the wireless maintainer himself
reviewed this
- **Signed-off by multiple Intel WiFi developers** — well-tested within
the Intel WiFi team
- The fix is trivially correct — just moving a case label

### 7. Dependency Check

- No dependencies on other commits
- The `IEEE80211_6GHZ_CTRL_REG_INDOOR_SP_AP_OLD` enum value and the
`cfg80211_6ghz_power_type()` function need to exist in the stable
tree, which they should for any kernel with 6 GHz support
- The change applies cleanly as it's self-contained within a single
switch statement

### 8. Stable Kernel Rules Assessment

1. **Obviously correct and tested**: Yes — trivial case label move,
reviewed by maintainer
2. **Fixes a real bug**: Yes — incorrect power type assignment for
deprecated control value leads to regulatory violations
3. **Important issue**: Yes — regulatory compliance, potential power
limit violations
4. **Small and contained**: Yes — two-line change in one file
5. **No new features**: Correct — no new functionality, just
reclassification of an existing value
6. **Applies cleanly**: Should apply cleanly to any stable tree with 6
GHz support

### Risk vs. Benefit

- **Risk**: Near zero — the change is trivially simple and moves to a
more conservative power setting
- **Benefit**: Prevents regulatory power limit violations for users
connecting to APs with deprecated control values
- **Trade-off**: Strongly favors backporting

The fix is small, surgical, addresses a real-world regulatory compliance
issue with existing hardware, is reviewed by the wireless subsystem
maintainer, and carries virtually no regression risk.

**YES**

include/net/cfg80211.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 2900202588a54..39a04776705eb 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -10147,9 +10147,9 @@ cfg80211_6ghz_power_type(u8 control, u32 client_flags)
case IEEE80211_6GHZ_CTRL_REG_LPI_AP:
case IEEE80211_6GHZ_CTRL_REG_INDOOR_LPI_AP:
case IEEE80211_6GHZ_CTRL_REG_AP_ROLE_NOT_RELEVANT:
+ case IEEE80211_6GHZ_CTRL_REG_INDOOR_SP_AP_OLD:
return IEEE80211_REG_LPI_AP;
case IEEE80211_6GHZ_CTRL_REG_SP_AP:
- case IEEE80211_6GHZ_CTRL_REG_INDOOR_SP_AP_OLD:
return IEEE80211_REG_SP_AP;
case IEEE80211_6GHZ_CTRL_REG_VLP_AP:
return IEEE80211_REG_VLP_AP;
--
2.51.0