The commit 22b980badc0f ("mt76: add functions for parsing rate power limits
from DT") added filtering of the power limits based on two properties:
* regdomain
* country
If either the country or the regdomain matches, the power limits are
applied and the search is aborted. If none of the two is defined for the
power limit, it is a global (or "fallback") power limit. The last
"fallback" power limit in the list will be returned when not matching
regdomain or country was found.
The idea is here to allow to specify "overwriting" country limits in front
of the list - just in case a regdomain is shared but a country has
additional limitations.
But this property was forgotten to be defined in commit 2de6ccebe0e7
("dt-bindings:net:wireless:mediatek,mt76: introduce power-limits node").
Signed-off-by: Sven Eckelmann (Plasma Cloud) <se@simonwunderlich.de>
---
Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
index eabceb849537c418650697da86682ef04c979193..f8f72f3f1b1dd185b4797be38b87c621ef3eac08 100644
--- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
@@ -151,6 +151,11 @@ properties:
- ETSI
- JP
+ country:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ ISO 3166-1 alpha-2 country code for power limits
+
patternProperties:
"^txpower-[256]g$":
type: object
--
2.47.3
On Fri, Sep 26, 2025 at 12:04:52PM +0200, Sven Eckelmann (Plasma Cloud) wrote:
> The commit 22b980badc0f ("mt76: add functions for parsing rate power limits
> from DT") added filtering of the power limits based on two properties:
>
> * regdomain
> * country
>
> If either the country or the regdomain matches, the power limits are
> applied and the search is aborted. If none of the two is defined for the
> power limit, it is a global (or "fallback") power limit. The last
> "fallback" power limit in the list will be returned when not matching
> regdomain or country was found.
>
> The idea is here to allow to specify "overwriting" country limits in front
> of the list - just in case a regdomain is shared but a country has
> additional limitations.
>
> But this property was forgotten to be defined in commit 2de6ccebe0e7
> ("dt-bindings:net:wireless:mediatek,mt76: introduce power-limits node").
>
> Signed-off-by: Sven Eckelmann (Plasma Cloud) <se@simonwunderlich.de>
> ---
> Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> index eabceb849537c418650697da86682ef04c979193..f8f72f3f1b1dd185b4797be38b87c621ef3eac08 100644
> --- a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> +++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
> @@ -151,6 +151,11 @@ properties:
> - ETSI
> - JP
>
> + country:
> + $ref: /schemas/types.yaml#/definitions/string
> + description:
> + ISO 3166-1 alpha-2 country code for power limits
This would be constrained to something like this?:
pattern: '^[A-Z]{2}$'
> +
> patternProperties:
> "^txpower-[256]g$":
> type: object
>
> --
> 2.47.3
>
On Mon, 2025-10-06 at 15:45 -0500, Rob Herring wrote:
>
> > + country:
> > + $ref: /schemas/types.yaml#/definitions/string
> > + description:
> > + ISO 3166-1 alpha-2 country code for power limits
>
> This would be constrained to something like this?:
>
> pattern: '^[A-Z]{2}$'
There's a "00" special case for "world roaming", so maybe that would
have to be '^([A-Z]{2}|00)$'? Not sure you'd ever want to specify that
though. We also use '99' internally for even more special cases, but I'm
pretty sure that shouldn't be specified externally.
johannes
On Monday, 6 October 2025 22:48:15 CEST Johannes Berg wrote:
> On Mon, 2025-10-06 at 15:45 -0500, Rob Herring wrote:
> >
> > > + country:
> > > + $ref: /schemas/types.yaml#/definitions/string
> > > + description:
> > > + ISO 3166-1 alpha-2 country code for power limits
> >
> > This would be constrained to something like this?:
> >
> > pattern: '^[A-Z]{2}$'
>
> There's a "00" special case for "world roaming", so maybe that would
> have to be '^([A-Z]{2}|00)$'? Not sure you'd ever want to specify that
> though. We also use '99' internally for even more special cases, but I'm
> pretty sure that shouldn't be specified externally.
Good point. I would say that 00 is already handled by the "fallback" limit
code. If it finds neither a country nor a regdomain, it just marks this entry
as "fallback".
Regards,
Sven
© 2016 - 2026 Red Hat, Inc.