mbox series

[v2,0/4] wifi: ath12k: add 11d scan offload support and handle country code for WCN7850

Message ID 20230914090746.23560-1-quic_wgong@quicinc.com (mailing list archive)
Headers show
Series wifi: ath12k: add 11d scan offload support and handle country code for WCN7850 | expand

Message

Wen Gong Sept. 14, 2023, 9:07 a.m. UTC
v2: change per Jeff.
    1. change alpha2 length from 3 to 2.
    2. change wmi_11d_new_cc_ev to wmi_11d_new_cc_event.

Add handler to send WMI_SET_CURRENT_COUNTRY_CMDID which is needed for 
11d scan offload to firmware. And add support for 11d scan offload for 
WCN7850.

Also fix firmware crash for country code set for WCN7850 and store country
code for device recovery for WCN7850.

Wen Gong (4):
  wifi: ath12k: add configure country code for WCN7850
  wifi: ath12k: add 11d scan offload support
  wifi: ath12k: avoid firmware crash when reg set for WCN7850
  wifi: ath12k: store and send country code to firmware after recovery

 drivers/net/wireless/ath/ath12k/core.c |  36 ++++-
 drivers/net/wireless/ath/ath12k/core.h |  17 +++
 drivers/net/wireless/ath/ath12k/hw.c   |   3 +
 drivers/net/wireless/ath/ath12k/hw.h   |   1 +
 drivers/net/wireless/ath/ath12k/mac.c  | 178 ++++++++++++++++++++++++-
 drivers/net/wireless/ath/ath12k/mac.h  |   7 +
 drivers/net/wireless/ath/ath12k/reg.c  |  67 ++++++++--
 drivers/net/wireless/ath/ath12k/reg.h  |   3 +-
 drivers/net/wireless/ath/ath12k/wmi.c  | 159 +++++++++++++++++++++-
 drivers/net/wireless/ath/ath12k/wmi.h  |  38 ++++++
 10 files changed, 489 insertions(+), 20 deletions(-)


base-commit: 3f257461ab0ab19806bae2bfde4c3cd88dbf050e

Comments

Kalle Valo Sept. 29, 2023, 1:11 p.m. UTC | #1
Wen Gong <quic_wgong@quicinc.com> writes:

> v2: change per Jeff.
>     1. change alpha2 length from 3 to 2.
>     2. change wmi_11d_new_cc_ev to wmi_11d_new_cc_event.
>
> Add handler to send WMI_SET_CURRENT_COUNTRY_CMDID which is needed for 
> 11d scan offload to firmware. And add support for 11d scan offload for 
> WCN7850.
>
> Also fix firmware crash for country code set for WCN7850 and store country
> code for device recovery for WCN7850.
>
> Wen Gong (4):
>   wifi: ath12k: add configure country code for WCN7850
>   wifi: ath12k: add 11d scan offload support
>   wifi: ath12k: avoid firmware crash when reg set for WCN7850
>   wifi: ath12k: store and send country code to firmware after recovery

Patches 2 & 3 had trivial conflicts with rfkill patches, fixed in the
pending branch:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=3261a8fe9de8fd5a94215eaf0c8738c3f0051105

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=0f82a7f8a8d1944faea458f992d492daa74a968e

No need to resend because of this.
Kang Yang May 24, 2024, 8:13 a.m. UTC | #2
On 9/29/2023 9:11 PM, Kalle Valo wrote:
> Wen Gong <quic_wgong@quicinc.com> writes:
> 
>> v2: change per Jeff.
>>      1. change alpha2 length from 3 to 2.
>>      2. change wmi_11d_new_cc_ev to wmi_11d_new_cc_event.
>>
>> Add handler to send WMI_SET_CURRENT_COUNTRY_CMDID which is needed for
>> 11d scan offload to firmware. And add support for 11d scan offload for
>> WCN7850.
>>
>> Also fix firmware crash for country code set for WCN7850 and store country
>> code for device recovery for WCN7850.
>>
>> Wen Gong (4):
>>    wifi: ath12k: add configure country code for WCN7850
>>    wifi: ath12k: add 11d scan offload support
>>    wifi: ath12k: avoid firmware crash when reg set for WCN7850
>>    wifi: ath12k: store and send country code to firmware after recovery
> 
> Patches 2 & 3 had trivial conflicts with rfkill patches, fixed in the
> pending branch:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=3261a8fe9de8fd5a94215eaf0c8738c3f0051105
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=0f82a7f8a8d1944faea458f992d492daa74a968e
> 
> No need to resend because of this.

Hi, kalle

	This patch-set is important to WCN7850.
	Without it, WCN7850 cannot even set country code with board-2.bin now.

	iw reg set US/CN..:

[ 4623.473098] ath12k_pci 0000:03:00.0: Regulatory Notification received 
for phy2
[ 4623.475719] ath12k_pci 0000:03:00.0: No reg rules available
[ 4623.475775] ath12k_pci 0000:03:00.0: failed to extract regulatory 
info from received event
[ 4623.475825] WARNING: CPU: 5 PID: 0 at 
drivers/net/wireless/ath/ath12k/wmi.c:5789 
ath12k_reg_chan_list_event.isra.0+0x5d4/0xb30 [ath12k]
[ 4623.476823] CPU: 5 PID: 0 Comm: swapper/5 Tainted: G        W  O 
  6.9.0-wt-ath+ #17
[ 4623.476836] Hardware name: AMD Mayan-PHX/Mayan-PHX, BIOS RMH1001gC 
05/08/2023
[ 4623.476848] RIP: 0010:ath12k_reg_chan_list_event.isra.0+0x5d4/0xb30 
[ath12k]
[ 4623.477032] Call Trace:
[ 4623.477059]  ? show_regs+0x63/0x70
[ 4623.477080]  ? __warn+0xcb/0x300
[ 4623.477096]  ? srso_alias_return_thunk+0x5/0xfbef5
[ 4623.477118]  ? ath12k_reg_chan_list_event.isra.0+0x5d4/0xb30 [ath12k]
[ 4623.477155]  ? report_bug+0x318/0x400
[ 4623.477186]  ? handle_bug+0x85/0xb0
[ 4623.477205]  ? exc_invalid_op+0x1c/0x50
[ 4623.477225]  ? asm_exc_invalid_op+0x1f/0x30
[ 4623.477263]  ? ath12k_reg_chan_list_event.isra.0+0x5d4/0xb30 [ath12k]
[ 4623.477305]  ath12k_wmi_op_rx+0x6a1/0x1900 [ath12k]
……

	Also, 11d scan need this patch-set too.

	So, what's your plan on this patch-set