diff mbox series

[OpenWrt-Devel] ath10k-ct: limit available channels via DT

Message ID 20190304170357.31604-1-mail@david-bauer.net
State Accepted, archived
Delegated to: Christian Lamparter
Headers show
Series [OpenWrt-Devel] ath10k-ct: limit available channels via DT | expand

Commit Message

David Bauer March 4, 2019, 5:03 p.m. UTC
This backports upstream commit

34d5629 ath10k: limit available channels via DT ieee80211-freq-limit

to the 4.19 ath10k-ct version. Without this patch, disabled channels
are still listed as a supported configuration for the radio.

The identical patch was also backported by OpenWRT to the non-ct driver.
It can be dropped as soon as we switch to an ath10k-ct version based on
4.20 or higher.

Signed-off-by: David Bauer <mail@david-bauer.net>
---
 ...ilable-channels-via-DT-ieee80211-fre.patch | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch

Comments

Ben Greear March 4, 2019, 5:49 p.m. UTC | #1
I've stopped any serious development on my 4.19 kernel, and am mostly
using 4.20 now.  So, might be worth moving OpenWRT ath10k-ct to use the 4.20
kernel if it is not already doing so?

Thanks,
Ben

On 3/4/19 9:03 AM, David Bauer wrote:
> This backports upstream commit
> 
> 34d5629 ath10k: limit available channels via DT ieee80211-freq-limit
> 
> to the 4.19 ath10k-ct version. Without this patch, disabled channels
> are still listed as a supported configuration for the radio.
> 
> The identical patch was also backported by OpenWRT to the non-ct driver.
> It can be dropped as soon as we switch to an ath10k-ct version based on
> 4.20 or higher.
> 
> Signed-off-by: David Bauer <mail@david-bauer.net>
> ---
>   ...ilable-channels-via-DT-ieee80211-fre.patch | 39 +++++++++++++++++++
>   1 file changed, 39 insertions(+)
>   create mode 100644 package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
> 
> diff --git a/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
> new file mode 100644
> index 0000000000..de4f98549a
> --- /dev/null
> +++ b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
> @@ -0,0 +1,39 @@
> +From bbf0a8af2261bc7ae39b227ff6a1e9f45a008c27 Mon Sep 17 00:00:00 2001
> +From: Sven Eckelmann <sven.eckelmann@openmesh.com>
> +Date: Mon, 30 Jul 2018 17:31:41 +0200
> +Subject: [PATCH] ath10k: Limit available channels via DT ieee80211-freq-limit
> +
> +Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in
> +the RX and TX path. 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.
> +
> +There is already a DT property to limit the available channels but ath10k
> +has to manually call this functionality to limit the currrently set wiphy
> +channels further.
> +
> +Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
> +
> +Forwarded: https://patchwork.kernel.org/patch/10549245/
> +---
> + drivers/net/wireless/ath/ath10k/mac.c | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +--- a/ath10k-4.19/mac.c
> ++++ b/ath10k-4.19/mac.c
> +@@ -18,6 +18,7 @@
> +
> + #include "mac.h"
> +
> ++#include <net/cfg80211.h>
> + #include <net/mac80211.h>
> + #include <linux/etherdevice.h>
> + #include <linux/acpi.h>
> +@@ -8390,6 +8391,7 @@ int ath10k_mac_register(struct ath10k *a
> + 		ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band;
> + 	}
> +
> ++	wiphy_read_of_freq_limits(ar->hw->wiphy);
> + 	ath10k_mac_setup_ht_vht_cap(ar);
> +
> + 	ar->hw->wiphy->interface_modes =
>
David Bauer March 5, 2019, 11:20 a.m. UTC | #2
Hello Ben,

On 04.03.19 18:49, Ben Greear wrote:
> I've stopped any serious development on my 4.19 kernel, and am mostly
> using 4.20 now.  So, might be worth moving OpenWRT ath10k-ct to use the
> 4.20
> kernel if it is not already doing so?

I thought about the same - as OpenWRT 19.x is set to be branched rather
soon (to my knowledge) i was more comfortable adding that one patch
instead of switching the whole driver version.

But someone who is more familiar should make the decision here. IMHO.
either the version bump or the patch should be included in the next
stable release.

Best wishes
David

> 
> Thanks,
> Ben
> 
> On 3/4/19 9:03 AM, David Bauer wrote:
>> This backports upstream commit
>>
>> 34d5629 ath10k: limit available channels via DT ieee80211-freq-limit
>>
>> to the 4.19 ath10k-ct version. Without this patch, disabled channels
>> are still listed as a supported configuration for the radio.
>>
>> The identical patch was also backported by OpenWRT to the non-ct driver.
>> It can be dropped as soon as we switch to an ath10k-ct version based on
>> 4.20 or higher.
>>
>> Signed-off-by: David Bauer <mail@david-bauer.net>
>> ---
>>   ...ilable-channels-via-DT-ieee80211-fre.patch | 39 +++++++++++++++++++
>>   1 file changed, 39 insertions(+)
>>   create mode 100644
>> package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
>>
>>
>> diff --git
>> a/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
>> b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
>>
>> new file mode 100644
>> index 0000000000..de4f98549a
>> --- /dev/null
>> +++
>> b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
>>
>> @@ -0,0 +1,39 @@
>> +From bbf0a8af2261bc7ae39b227ff6a1e9f45a008c27 Mon Sep 17 00:00:00 2001
>> +From: Sven Eckelmann <sven.eckelmann@openmesh.com>
>> +Date: Mon, 30 Jul 2018 17:31:41 +0200
>> +Subject: [PATCH] ath10k: Limit available channels via DT
>> ieee80211-freq-limit
>> +
>> +Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special
>> filters in
>> +the RX and TX path. 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.
>> +
>> +There is already a DT property to limit the available channels but
>> ath10k
>> +has to manually call this functionality to limit the currrently set
>> wiphy
>> +channels further.
>> +
>> +Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
>> +
>> +Forwarded: https://patchwork.kernel.org/patch/10549245/
>> +---
>> + drivers/net/wireless/ath/ath10k/mac.c | 2 ++
>> + 1 file changed, 2 insertions(+)
>> +
>> +--- a/ath10k-4.19/mac.c
>> ++++ b/ath10k-4.19/mac.c
>> +@@ -18,6 +18,7 @@
>> +
>> + #include "mac.h"
>> +
>> ++#include <net/cfg80211.h>
>> + #include <net/mac80211.h>
>> + #include <linux/etherdevice.h>
>> + #include <linux/acpi.h>
>> +@@ -8390,6 +8391,7 @@ int ath10k_mac_register(struct ath10k *a
>> +         ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band;
>> +     }
>> +
>> ++    wiphy_read_of_freq_limits(ar->hw->wiphy);
>> +     ath10k_mac_setup_ht_vht_cap(ar);
>> +
>> +     ar->hw->wiphy->interface_modes =
>>
> 
>
diff mbox series

Patch

diff --git a/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
new file mode 100644
index 0000000000..de4f98549a
--- /dev/null
+++ b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
@@ -0,0 +1,39 @@ 
+From bbf0a8af2261bc7ae39b227ff6a1e9f45a008c27 Mon Sep 17 00:00:00 2001
+From: Sven Eckelmann <sven.eckelmann@openmesh.com>
+Date: Mon, 30 Jul 2018 17:31:41 +0200
+Subject: [PATCH] ath10k: Limit available channels via DT ieee80211-freq-limit
+
+Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in
+the RX and TX path. 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.
+
+There is already a DT property to limit the available channels but ath10k
+has to manually call this functionality to limit the currrently set wiphy
+channels further.
+
+Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
+
+Forwarded: https://patchwork.kernel.org/patch/10549245/
+---
+ drivers/net/wireless/ath/ath10k/mac.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/ath10k-4.19/mac.c
++++ b/ath10k-4.19/mac.c
+@@ -18,6 +18,7 @@
+ 
+ #include "mac.h"
+ 
++#include <net/cfg80211.h>
+ #include <net/mac80211.h>
+ #include <linux/etherdevice.h>
+ #include <linux/acpi.h>
+@@ -8390,6 +8391,7 @@ int ath10k_mac_register(struct ath10k *a
+ 		ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band;
+ 	}
+ 
++	wiphy_read_of_freq_limits(ar->hw->wiphy);
+ 	ath10k_mac_setup_ht_vht_cap(ar);
+ 
+ 	ar->hw->wiphy->interface_modes =