2023-06-11 12:40:34

by Christian Lamparter

[permalink] [raw]
Subject: [PATCH v1] dt-bindings: net: wireless: bcm4329-fmac: add ieee80211-freq-limit property

This is an existing optional property that ieee80211.yaml/cfg80211
provides. It's useful to further restrict supported frequencies
for a specified device through device-tree.

The driver supported this since ~2017 by
commit 0f83ff697356 ("brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT")

This property is already being used by:
arch/arm/dts/bcm4709-netgear-r8000.dts

Signed-off-by: Christian Lamparter <[email protected]>
---
.../devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
index fec1cc9b9a08..44e5f6677289 100644
--- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
@@ -15,6 +15,9 @@ description:
These chips also have a Bluetooth portion described in a separate
binding.

+allOf:
+ - $ref: ieee80211.yaml#
+
properties:
compatible:
oneOf:
@@ -63,6 +66,8 @@ properties:
description: Name for the OOB IRQ, this must be set to "host-wake".
const: host-wake

+ ieee80211-freq-limit: true
+
brcm,drive-strength:
$ref: /schemas/types.yaml#/definitions/uint32
description: Drive strength used for the SDIO pins on the device in mA.
--
2.40.1



2023-06-11 12:40:54

by Christian Lamparter

[permalink] [raw]
Subject: [PATCH v2] dt-bindings: net: wireless: ath10k: add ieee80211-freq-limit property

This is an existing optional property that ieee80211.yaml/cfg80211
provides. It's useful to further restrict supported frequencies
for a specified device through device-tree.

For testing the addition, I added the ieee80211-freq-limit
property with values from an OpenMesh A62 device. This is
because the OpenMesh A62 has "special filters in front of
the RX+TX paths to the 5GHz PHYs. These filtered channel
can in theory still be used by the hardware but the signal
strength is reduced so much that it makes no sense."

The driver supported this since ~2018 by
commit 34d5629d2ca8 ("ath10k: limit available channels via DT ieee80211-freq-limit")

Link: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=e3b8ae2b09e137ce2eae33551923daf302293a0c
Signed-off-by: Christian Lamparter <[email protected]>
---
v1->v2:
- AllOf is a list. So add it to the existing one?
- added example with link to vendor hardware reason
notes about the filtering
---
.../devicetree/bindings/net/wireless/qcom,ath10k.yaml | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
index c85ed330426d..7758a55dd328 100644
--- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml
@@ -84,6 +84,8 @@ properties:
required:
- iommus

+ ieee80211-freq-limit: true
+
qcom,ath10k-calibration-data:
$ref: /schemas/types.yaml#/definitions/uint8-array
description:
@@ -164,6 +166,7 @@ required:
additionalProperties: false

allOf:
+ - $ref: ieee80211.yaml#
- if:
properties:
compatible:
@@ -355,4 +358,5 @@ examples:
"msi14",
"msi15",
"legacy";
+ ieee80211-freq-limit = <5470000 5875000>;
};
--
2.40.1


2023-06-12 08:54:03

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2] dt-bindings: net: wireless: ath10k: add ieee80211-freq-limit property

On 11/06/2023 14:37, Christian Lamparter wrote:
> This is an existing optional property that ieee80211.yaml/cfg80211
> provides. It's useful to further restrict supported frequencies
> for a specified device through device-tree.
>
> For testing the addition, I added the ieee80211-freq-limit
> property with values from an OpenMesh A62 device. This is
> because the OpenMesh A62 has "special filters in front of
> the RX+TX paths to the 5GHz PHYs. These filtered channel
> can in theory still be used by the hardware but the signal
> strength is reduced so much that it makes no sense."
>
> The driver supported this since ~2018 by
> commit 34d5629d2ca8 ("ath10k: limit available channels via DT ieee80211-freq-limit")
>
> Link: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=e3b8ae2b09e137ce2eae33551923daf302293a0c
> Signed-off-by: Christian Lamparter <[email protected]>


Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2023-06-12 08:54:11

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v1] dt-bindings: net: wireless: bcm4329-fmac: add ieee80211-freq-limit property

On 11/06/2023 14:37, Christian Lamparter wrote:
> This is an existing optional property that ieee80211.yaml/cfg80211
> provides. It's useful to further restrict supported frequencies
> for a specified device through device-tree.
>
> The driver supported this since ~2017 by
> commit 0f83ff697356 ("brcmfmac: use wiphy_read_of_freq_limits to respect limits from DT")
>
> This property is already being used by:
> arch/arm/dts/bcm4709-netgear-r8000.dts
>
> Signed-off-by: Christian Lamparter <[email protected]>
> ---

So this is superseded?

Best regards,
Krzysztof


2023-06-12 22:43:07

by Rafał Miłecki

[permalink] [raw]
Subject: Re: [PATCH v1] dt-bindings: net: wireless: bcm4329-fmac: add ieee80211-freq-limit property

On 2023-06-11 14:37, Christian Lamparter wrote:
> This is an existing optional property that ieee80211.yaml/cfg80211
> provides. It's useful to further restrict supported frequencies
> for a specified device through device-tree.
>
> The driver supported this since ~2017 by
> commit 0f83ff697356 ("brcmfmac: use wiphy_read_of_freq_limits to
> respect limits from DT")
>
> This property is already being used by:
> arch/arm/dts/bcm4709-netgear-r8000.dts
>
> Signed-off-by: Christian Lamparter <[email protected]>

I've already submitted patch for that:
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

This patch isn't needed anymore.


> ---
> .../devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git
> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> index fec1cc9b9a08..44e5f6677289 100644
> ---
> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> +++
> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> @@ -15,6 +15,9 @@ description:
> These chips also have a Bluetooth portion described in a separate
> binding.
>
> +allOf:
> + - $ref: ieee80211.yaml#

FWIW:
This isn't enough without changing additionalProperties to
unevaluatedProperties.


> properties:
> compatible:
> oneOf:
> @@ -63,6 +66,8 @@ properties:
> description: Name for the OOB IRQ, this must be set to
> "host-wake".
> const: host-wake
>
> + ieee80211-freq-limit: true

FWIW:
You don't need it here with allOf.


> brcm,drive-strength:
> $ref: /schemas/types.yaml#/definitions/uint32
> description: Drive strength used for the SDIO pins on the device
> in mA.

2023-06-16 16:21:29

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH v2] dt-bindings: net: wireless: ath10k: add ieee80211-freq-limit property

Christian Lamparter <[email protected]> wrote:

> This is an existing optional property that ieee80211.yaml/cfg80211
> provides. It's useful to further restrict supported frequencies
> for a specified device through device-tree.
>
> For testing the addition, I added the ieee80211-freq-limit
> property with values from an OpenMesh A62 device. This is
> because the OpenMesh A62 has "special filters in front of
> the RX+TX paths to the 5GHz PHYs. These filtered channel
> can in theory still be used by the hardware but the signal
> strength is reduced so much that it makes no sense."
>
> The driver supported this since ~2018 by
> commit 34d5629d2ca8 ("ath10k: limit available channels via DT ieee80211-freq-limit")
>
> Link: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=e3b8ae2b09e137ce2eae33551923daf302293a0c
> Signed-off-by: Christian Lamparter <[email protected]>
> Acked-by: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

Patch applied to ath-next branch of ath.git, thanks.

7f6ee56ca0df dt-bindings: net: wireless: ath10k: add ieee80211-freq-limit property

--
https://patchwork.kernel.org/project/linux-wireless/patch/c33c928b7c6c9bb4e7abe84eb8df9f440add275b.1686486464.git.chunkeey@gmail.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches