* [PATCH] ath11k: Initialize complete alpha2 for regulatory change
@ 2020-10-21 14:05 Sven Eckelmann
2020-11-04 16:14 ` Kalle Valo
2020-11-07 8:02 ` Kalle Valo
0 siblings, 2 replies; 4+ messages in thread
From: Sven Eckelmann @ 2020-10-21 14:05 UTC (permalink / raw)
To: ath11k; +Cc: linux-wireless, Sven Eckelmann
The function ath11k_wmi_send_init_country_cmd is taking 3 byte from alpha2
of the structure wmi_init_country_params. But the function
ath11k_reg_notifier is only initializing 2 bytes. The third byte is
therefore always an uninitialized value.
The command can happen to look like
0c 00 87 02 01 00 00 00 00 00 00 00 43 41 f8 00
instead of
0c 00 87 02 01 00 00 00 00 00 00 00 43 41 00 00
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
drivers/net/wireless/ath/ath11k/reg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ath/ath11k/reg.c b/drivers/net/wireless/ath/ath11k/reg.c
index f6a1f0352989..83f75f8855eb 100644
--- a/drivers/net/wireless/ath/ath11k/reg.c
+++ b/drivers/net/wireless/ath/ath11k/reg.c
@@ -80,6 +80,7 @@ ath11k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
*/
init_country_param.flags = ALPHA_IS_SET;
memcpy(&init_country_param.cc_info.alpha2, request->alpha2, 2);
+ init_country_param.cc_info.alpha2[2] = 0;
ret = ath11k_wmi_send_init_country_cmd(ar, init_country_param);
if (ret)
--
2.28.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ath11k: Initialize complete alpha2 for regulatory change
2020-10-21 14:05 [PATCH] ath11k: Initialize complete alpha2 for regulatory change Sven Eckelmann
@ 2020-11-04 16:14 ` Kalle Valo
2020-11-04 16:18 ` Sven Eckelmann
2020-11-07 8:02 ` Kalle Valo
1 sibling, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2020-11-04 16:14 UTC (permalink / raw)
To: Sven Eckelmann; +Cc: ath11k, linux-wireless
Sven Eckelmann <sven@narfation.org> writes:
> The function ath11k_wmi_send_init_country_cmd is taking 3 byte from alpha2
> of the structure wmi_init_country_params. But the function
> ath11k_reg_notifier is only initializing 2 bytes. The third byte is
> therefore always an uninitialized value.
>
> The command can happen to look like
>
> 0c 00 87 02 01 00 00 00 00 00 00 00 43 41 f8 00
>
> instead of
>
> 0c 00 87 02 01 00 00 00 00 00 00 00 43 41 00 00
>
> Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
On what hardware and firmware did you test this? I'll add that to the
commit log. I know it doesn't matter here but I want to have that info
anyway.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath11k: Initialize complete alpha2 for regulatory change
2020-11-04 16:14 ` Kalle Valo
@ 2020-11-04 16:18 ` Sven Eckelmann
0 siblings, 0 replies; 4+ messages in thread
From: Sven Eckelmann @ 2020-11-04 16:18 UTC (permalink / raw)
To: Kalle Valo; +Cc: ath11k, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]
On Wednesday, 4 November 2020 17:14:12 CET Kalle Valo wrote:
> Sven Eckelmann <sven@narfation.org> writes:
>
> > The function ath11k_wmi_send_init_country_cmd is taking 3 byte from alpha2
> > of the structure wmi_init_country_params. But the function
> > ath11k_reg_notifier is only initializing 2 bytes. The third byte is
> > therefore always an uninitialized value.
> >
> > The command can happen to look like
> >
> > 0c 00 87 02 01 00 00 00 00 00 00 00 43 41 f8 00
> >
> > instead of
> >
> > 0c 00 87 02 01 00 00 00 00 00 00 00 43 41 00 00
> >
> > Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
> > Signed-off-by: Sven Eckelmann <sven@narfation.org>
>
> On what hardware and firmware did you test this? I'll add that to the
> commit log. I know it doesn't matter here but I want to have that info
> anyway.
Tested with:
* IPQ8074 WLAN.HK.2.1.0.1-01161-QCAHKSWPL_SILICONZ-1
* IPQ8074 WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1
* IPQ8074 WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2
* IPQ8074 WLAN.HK.2.4.0.1.r1-00019-QCAHKSWPL_SILICONZ-1
* IPQ8074 WLAN.HK.2.4.0.1.r1-00026-QCAHKSWPL_SILICONZ-2
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath11k: Initialize complete alpha2 for regulatory change
2020-10-21 14:05 [PATCH] ath11k: Initialize complete alpha2 for regulatory change Sven Eckelmann
2020-11-04 16:14 ` Kalle Valo
@ 2020-11-07 8:02 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-11-07 8:02 UTC (permalink / raw)
To: Sven Eckelmann; +Cc: ath11k, linux-wireless, Sven Eckelmann
Sven Eckelmann <sven@narfation.org> wrote:
> The function ath11k_wmi_send_init_country_cmd is taking 3 byte from alpha2
> of the structure wmi_init_country_params. But the function
> ath11k_reg_notifier is only initializing 2 bytes. The third byte is
> therefore always an uninitialized value.
>
> The command can happen to look like
>
> 0c 00 87 02 01 00 00 00 00 00 00 00 43 41 f8 00
>
> instead of
>
> 0c 00 87 02 01 00 00 00 00 00 00 00 43 41 00 00
>
> Tested-on: IPQ8074 hw2.0 WLAN.HK.2.1.0.1-01161-QCAHKSWPL_SILICONZ-1
> Tested-on: IPQ8074 hw2.0 WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1
> Tested-on: IPQ8074 hw2.0 WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2
> Tested-on: IPQ8074 hw2.0 WLAN.HK.2.4.0.1.r1-00019-QCAHKSWPL_SILICONZ-1
> Tested-on: IPQ8074 hw2.0 WLAN.HK.2.4.0.1.r1-00026-QCAHKSWPL_SILICONZ-2
>
> Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
383a32cde417 ath11k: Initialize complete alpha2 for regulatory change
--
https://patchwork.kernel.org/project/linux-wireless/patch/20201021140555.4114715-1-sven@narfation.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-07 8:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-21 14:05 [PATCH] ath11k: Initialize complete alpha2 for regulatory change Sven Eckelmann
2020-11-04 16:14 ` Kalle Valo
2020-11-04 16:18 ` Sven Eckelmann
2020-11-07 8:02 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).