diff mbox series

[v2] ath11k: change to treat alpha code na as world wide regdomain

Message ID 20211118094848.7776-1-quic_wgong@quicinc.com (mailing list archive)
State Accepted
Commit f8108250e331b8f0273c53afb9e2db5068e59b2e
Delegated to: Kalle Valo
Headers show
Series [v2] ath11k: change to treat alpha code na as world wide regdomain | expand

Commit Message

Wen Gong Nov. 18, 2021, 9:48 a.m. UTC
Some firmware versions for WCN6855 report the default regdomain with
alpha code "na" by default when load as a world wide regdomain, ath11k
should treat it as a world wide alpha code.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1

Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
---
v2: rebased to latest ath.git master ath-202111170737

 drivers/net/wireless/ath/ath11k/wmi.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)


base-commit: 63ec871bc50a306aac550e2d85f697ca2d5f5deb

Comments

Kalle Valo Nov. 22, 2021, 2:32 p.m. UTC | #1
Wen Gong <quic_wgong@quicinc.com> wrote:

> Some firmware versions for WCN6855 report the default regdomain with
> alpha code "na" by default when load as a world wide regdomain, ath11k
> should treat it as a world wide alpha code.
> 
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
> 
> Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

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

f8108250e331 ath11k: change to treat alpha code na as world wide regdomain
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 614b2f6bcc8e..2e9fb87d8bf6 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -5927,7 +5927,13 @@  static void ath11k_wmi_htc_tx_complete(struct ath11k_base *ab,
 
 static bool ath11k_reg_is_world_alpha(char *alpha)
 {
-	return alpha[0] == '0' && alpha[1] == '0';
+	if (alpha[0] == '0' && alpha[1] == '0')
+		return true;
+
+	if (alpha[0] == 'n' && alpha[1] == 'a')
+		return true;
+
+	return false;
 }
 
 static int ath11k_reg_chan_list_event(struct ath11k_base *ab, struct sk_buff *skb)