All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Brian Norris <briannorris@chromium.org>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Wen Gong <wgong@codeaurora.org>
Subject: Re: [PATCH] Revert "ath: add support for special 0x0 regulatory domain"
Date: Sat, 23 Apr 2022 12:52:37 +0200	[thread overview]
Message-ID: <YmPadTu8CfEARfWs@xps> (raw)
In-Reply-To: <20200527165718.129307-1-briannorris@chromium.org>

[-- Attachment #1: Type: text/plain, Size: 5013 bytes --]

On Wed, May 27, 2020 at 09:57:18AM -0700, Brian Norris wrote:
> This reverts commit 2dc016599cfa9672a147528ca26d70c3654a5423.
> 
> Users are reporting regressions in regulatory domain detection and
> channel availability.
> 
> The problem this was trying to resolve was fixed in firmware anyway:
> 
>     QCA6174 hw3.0: sdio-4.4.1: add firmware.bin_WLAN.RMH.4.4.1-00042
>     https://github.com/kvalo/ath10k-firmware/commit/4d382787f0efa77dba40394e0bc604f8eff82552
> 
> Link: https://bbs.archlinux.org/viewtopic.php?id=254535
> Link: http://lists.infradead.org/pipermail/ath10k/2020-April/014871.html
> Link: http://lists.infradead.org/pipermail/ath10k/2020-May/015152.html
> Fixes: 2dc016599cfa ("ath: add support for special 0x0 regulatory domain")
> Cc: <stable@vger.kernel.org>
> Cc: Wen Gong <wgong@codeaurora.org>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---
>  drivers/net/wireless/ath/regd.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
> index bee9110b91f3..20f4f8ea9f89 100644
> --- a/drivers/net/wireless/ath/regd.c
> +++ b/drivers/net/wireless/ath/regd.c
> @@ -666,14 +666,14 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
>  
>  /*
>   * Some users have reported their EEPROM programmed with
> - * 0x8000 or 0x0 set, this is not a supported regulatory
> - * domain but since we have more than one user with it we
> - * need a solution for them. We default to 0x64, which is
> - * the default Atheros world regulatory domain.
> + * 0x8000 set, this is not a supported regulatory domain
> + * but since we have more than one user with it we need
> + * a solution for them. We default to 0x64, which is the
> + * default Atheros world regulatory domain.
>   */
>  static void ath_regd_sanitize(struct ath_regulatory *reg)
>  {
> -	if (reg->current_rd != COUNTRY_ERD_FLAG && reg->current_rd != 0)
> +	if (reg->current_rd != COUNTRY_ERD_FLAG)
>  		return;
>  	printk(KERN_DEBUG "ath: EEPROM regdomain sanitized\n");
>  	reg->current_rd = 0x64;
> -- 
> 2.27.0.rc0.183.gde8f92d652-goog
> 

This revert is in fact causing problems on my machine. I have a QCA9984,
which exports two network interfaces. While I was able to still use one
of both NICs for 2.4GHz, I couldn't really use the other card to set up
a 5GHz AP anymore because all frequencies were restricted. This has
started with v5.17.1, to which this revert was backported.

Reverting this patch again fixes the issue on my system. So it seems
like there still are cards out there in the wild which have a value of
0x0 as their regulatory domain.

Quoting from your other mail:

> My understanding was that no QCA modules *should* be shipped with a
> value of 0 in this field. The instance I'm aware of was more or less a
> manufacturing error I think, and we got Qualcomm to patch it over in
> software.

This sounds like the issue should've already been fixed in firmware,
right? To the best of my knowledge I'm using the latest that's currently
available, which seems to contradict this. I've added the relevant dmesg
snippets though in case I'm mistaken:

    ath10k_pci 0000:03:00.0: enabling device (0000 -> 0002)
    ath10k_pci 0000:03:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
    ath10k_pci 0000:04:00.0: enabling device (0000 -> 0002)
    ath10k_pci 0000:04:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
    ath10k_pci 0000:03:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
    ath10k_pci 0000:03:00.0: kconfig debug 0 debugfs 0 tracing 0 dfs 1 testmode 0
    ath10k_pci 0000:03:00.0: firmware ver 10.4-3.9.0.2-00131 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps,peer-fixed-rate,iram-recovery crc32 23bd9e43
    ath10k_pci 0000:04:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
    ath10k_pci 0000:04:00.0: kconfig debug 0 debugfs 0 tracing 0 dfs 1 testmode 0
    ath10k_pci 0000:04:00.0: firmware ver 10.4-3.9.0.2-00131 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps,peer-fixed-rate,iram-recovery crc32 23bd9e43
    ath10k_pci 0000:03:00.0: board_file api 2 bmi_id 0:1 crc32 85498734
    ath10k_pci 0000:04:00.0: board_file api 2 bmi_id 0:2 crc32 85498734
    ath10k_pci 0000:03:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 0 hwcrypto 1
    ath: EEPROM regdomain sanitized
    ath: EEPROM regdomain: 0x64
    ath: EEPROM indicates we should expect a direct regpair map
    ath: Country alpha2 being used: 00
    ath: Regpair used: 0x64
    ath10k_pci 0000:04:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 0 hwcrypto 1
    ath: EEPROM regdomain sanitized
    ath: EEPROM regdomain: 0x64
    ath: EEPROM indicates we should expect a direct regpair map
    ath: Country alpha2 being used: 00
    ath: Regpair used: 0x64

Patrick

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID
From: Patrick Steinhardt <ps@pks.im>
To: Brian Norris <briannorris@chromium.org>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Wen Gong <wgong@codeaurora.org>
Subject: Re: [PATCH] Revert "ath: add support for special 0x0 regulatory domain"
Date: Sat, 23 Apr 2022 12:52:37 +0200	[thread overview]
Message-ID: <YmPadTu8CfEARfWs@xps> (raw)
In-Reply-To: <20200527165718.129307-1-briannorris@chromium.org>


[-- Attachment #1.1: Type: text/plain, Size: 5013 bytes --]

On Wed, May 27, 2020 at 09:57:18AM -0700, Brian Norris wrote:
> This reverts commit 2dc016599cfa9672a147528ca26d70c3654a5423.
> 
> Users are reporting regressions in regulatory domain detection and
> channel availability.
> 
> The problem this was trying to resolve was fixed in firmware anyway:
> 
>     QCA6174 hw3.0: sdio-4.4.1: add firmware.bin_WLAN.RMH.4.4.1-00042
>     https://github.com/kvalo/ath10k-firmware/commit/4d382787f0efa77dba40394e0bc604f8eff82552
> 
> Link: https://bbs.archlinux.org/viewtopic.php?id=254535
> Link: http://lists.infradead.org/pipermail/ath10k/2020-April/014871.html
> Link: http://lists.infradead.org/pipermail/ath10k/2020-May/015152.html
> Fixes: 2dc016599cfa ("ath: add support for special 0x0 regulatory domain")
> Cc: <stable@vger.kernel.org>
> Cc: Wen Gong <wgong@codeaurora.org>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---
>  drivers/net/wireless/ath/regd.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
> index bee9110b91f3..20f4f8ea9f89 100644
> --- a/drivers/net/wireless/ath/regd.c
> +++ b/drivers/net/wireless/ath/regd.c
> @@ -666,14 +666,14 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
>  
>  /*
>   * Some users have reported their EEPROM programmed with
> - * 0x8000 or 0x0 set, this is not a supported regulatory
> - * domain but since we have more than one user with it we
> - * need a solution for them. We default to 0x64, which is
> - * the default Atheros world regulatory domain.
> + * 0x8000 set, this is not a supported regulatory domain
> + * but since we have more than one user with it we need
> + * a solution for them. We default to 0x64, which is the
> + * default Atheros world regulatory domain.
>   */
>  static void ath_regd_sanitize(struct ath_regulatory *reg)
>  {
> -	if (reg->current_rd != COUNTRY_ERD_FLAG && reg->current_rd != 0)
> +	if (reg->current_rd != COUNTRY_ERD_FLAG)
>  		return;
>  	printk(KERN_DEBUG "ath: EEPROM regdomain sanitized\n");
>  	reg->current_rd = 0x64;
> -- 
> 2.27.0.rc0.183.gde8f92d652-goog
> 

This revert is in fact causing problems on my machine. I have a QCA9984,
which exports two network interfaces. While I was able to still use one
of both NICs for 2.4GHz, I couldn't really use the other card to set up
a 5GHz AP anymore because all frequencies were restricted. This has
started with v5.17.1, to which this revert was backported.

Reverting this patch again fixes the issue on my system. So it seems
like there still are cards out there in the wild which have a value of
0x0 as their regulatory domain.

Quoting from your other mail:

> My understanding was that no QCA modules *should* be shipped with a
> value of 0 in this field. The instance I'm aware of was more or less a
> manufacturing error I think, and we got Qualcomm to patch it over in
> software.

This sounds like the issue should've already been fixed in firmware,
right? To the best of my knowledge I'm using the latest that's currently
available, which seems to contradict this. I've added the relevant dmesg
snippets though in case I'm mistaken:

    ath10k_pci 0000:03:00.0: enabling device (0000 -> 0002)
    ath10k_pci 0000:03:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
    ath10k_pci 0000:04:00.0: enabling device (0000 -> 0002)
    ath10k_pci 0000:04:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
    ath10k_pci 0000:03:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
    ath10k_pci 0000:03:00.0: kconfig debug 0 debugfs 0 tracing 0 dfs 1 testmode 0
    ath10k_pci 0000:03:00.0: firmware ver 10.4-3.9.0.2-00131 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps,peer-fixed-rate,iram-recovery crc32 23bd9e43
    ath10k_pci 0000:04:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
    ath10k_pci 0000:04:00.0: kconfig debug 0 debugfs 0 tracing 0 dfs 1 testmode 0
    ath10k_pci 0000:04:00.0: firmware ver 10.4-3.9.0.2-00131 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps,peer-fixed-rate,iram-recovery crc32 23bd9e43
    ath10k_pci 0000:03:00.0: board_file api 2 bmi_id 0:1 crc32 85498734
    ath10k_pci 0000:04:00.0: board_file api 2 bmi_id 0:2 crc32 85498734
    ath10k_pci 0000:03:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 0 hwcrypto 1
    ath: EEPROM regdomain sanitized
    ath: EEPROM regdomain: 0x64
    ath: EEPROM indicates we should expect a direct regpair map
    ath: Country alpha2 being used: 00
    ath: Regpair used: 0x64
    ath10k_pci 0000:04:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 0 hwcrypto 1
    ath: EEPROM regdomain sanitized
    ath: EEPROM regdomain: 0x64
    ath: EEPROM indicates we should expect a direct regpair map
    ath: Country alpha2 being used: 00
    ath: Regpair used: 0x64

Patrick

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  parent reply	other threads:[~2022-04-23 10:52 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 16:57 Brian Norris
2020-05-27 16:57 ` Brian Norris
2020-05-28 12:02 ` Julian Calaby
2020-05-28 12:02   ` Julian Calaby
     [not found]   ` <CAJ-Vmomx0UFEa1w2HsGMQsZb+K8hyK=Zz9cKSo7tHv5GiMc1yw@mail.gmail.com>
2020-06-02 18:35     ` Brian Norris
2020-06-02 18:35       ` Brian Norris
2022-03-07 17:45 ` Kalle Valo
2022-03-07 17:45   ` Kalle Valo
2022-04-23 10:52 ` Patrick Steinhardt [this message]
2022-04-23 10:52   ` Patrick Steinhardt
2022-04-25 18:54   ` Brian Norris
2022-04-25 18:54     ` Brian Norris
2022-05-09 18:16     ` Cale Collins
2022-05-09 18:16       ` Cale Collins
2022-05-11 22:52       ` Cale Collins
2022-05-11 22:52         ` Cale Collins
2022-08-30 21:56         ` Brian Norris
2022-08-30 21:56           ` Brian Norris
2022-09-19 17:24           ` Tim Harvey
2022-09-19 17:24             ` Tim Harvey
2022-09-19 23:42             ` Sergey Ryazanov
2022-09-19 23:42               ` Sergey Ryazanov
2022-09-20  5:42               ` Sebastian Gottschall
2022-09-20  5:42                 ` Sebastian Gottschall
2020-07-30 12:49 Alvin Šipraga
2020-07-30 12:49 ` Alvin Šipraga
2020-08-27  7:59 ` Alvin Šipraga
2020-08-27  7:59   ` Alvin Šipraga
2020-08-27 10:12   ` Kalle Valo
2020-08-27 10:12     ` Kalle Valo
2020-08-27 10:25     ` Alvin Šipraga
2020-08-27 10:25       ` Alvin Šipraga
2020-10-22 17:21 Félix Sipma
     [not found] ` <CANe27jKpYm29QOjYOZ_jwHiRxuWx66J+th8-zgbXK4geiCU0_Q@mail.gmail.com>
2020-10-29 14:06   ` Félix Sipma
2020-10-30  7:20     ` Jouni Malinen
2020-10-30  8:51       ` Félix Sipma
2020-12-20  1:32         ` Julian Phillips
2020-10-30 13:23       ` Alvin Sipraga
2020-12-21 13:43         ` sparks71
2020-12-21 12:15 sparks71

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YmPadTu8CfEARfWs@xps \
    --to=ps@pks.im \
    --cc=ath10k@lists.infradead.org \
    --cc=briannorris@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wgong@codeaurora.org \
    --subject='Re: [PATCH] Revert "ath: add support for special 0x0 regulatory domain"' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.