Message ID | 20240905023511.362-1-quic_kangyang@quicinc.com |
---|---|
Headers | show |
Series | wifi: ath12k: add 11d scan offload support and handle country code for WCN7850 | expand |
On 9/4/2024 7:35 PM, Kang Yang wrote: > From: Wen Gong <quic_wgong@quicinc.com> > > Add handler to send WMI_SET_CURRENT_COUNTRY_CMDID to firmware, which > is used for WCN7850 to update country code. > > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 > > Signed-off-by: Wen Gong <quic_wgong@quicinc.com> > Signed-off-by: Kang Yang <quic_kangyang@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
On 9/4/2024 7:35 PM, Kang Yang wrote: > From: Wen Gong <quic_wgong@quicinc.com> > > When userspace try to set country code by NL80211_REGDOM_SET_BY_USER > hint(like iw reg set XX), it will pass new country code to ath12k. > Then ath12k will set this new country code to firmware by > WMI_SET_INIT_COUNTRY_CMDID. But for WCN7850, this WMI command won't > take effect. > > For AP based chips(QCN92xx), WMI_SET_INIT_COUNTRY_CMDID is the correct > command. However, for STATION based chips(WCN7850), it need to use > WMI_SET_CURRENT_COUNTRY_CMDID. > > Add flag current_cc_support in hardware parameters. It is used to > distinguish AP/STA platform. After that, the firmware will work > normal and the regulatory feature works well for WCN7850. > > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 > > Signed-off-by: Wen Gong <quic_wgong@quicinc.com> > Signed-off-by: Kang Yang <quic_kangyang@quicinc.com> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
From: Kang Yang <kangyang@qti-qualcomm.corp-partner.google.com> This patch-set is mainly does four things: 1. Add handler to send WMI_SET_CURRENT_COUNTRY_CMDID to firmware. 2. Implement 11d scan offload, and report country code to firmware by WMI command WMI_SET_CURRENT_COUNTRY_CMDID. 3. Use WMI_SET_CURRENT_COUNTRY_CMDID to set country code for WCN7850. 4. Store country code, and update it to firmware after device recovery. With this patch-set, WCN7850 can do 11d offload scan and update country code to firmware successfully. Note: This patch-set is an old patch-set in public review written by Wen Gong. Just continue sending it for him. Link: https://patchwork.kernel.org/project/linux-wireless/cover/20230914090746.23560-1-quic_wgong@quicinc.com/ v3: 1. use wiphy::mtx lock instead of adding a new lock(patch#2). 2. rename struct according to wmi naming convention(patch#1, #2). 3. update copyright in reg.h 4. modifiy patch#3, #4 due to struct name change. 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. Wen Gong (4): wifi: ath12k: add configure country code for WCN7850 wifi: ath12k: add 11d scan offload support wifi: ath12k: use correct WMI command to set country code for WCN7850 wifi: ath12k: store and send country code to firmware after recovery drivers/net/wireless/ath/ath12k/core.c | 34 ++++- 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 | 167 ++++++++++++++++++++++++- drivers/net/wireless/ath/ath12k/mac.h | 7 ++ drivers/net/wireless/ath/ath12k/reg.c | 70 ++++++++--- drivers/net/wireless/ath/ath12k/reg.h | 4 +- drivers/net/wireless/ath/ath12k/wmi.c | 158 ++++++++++++++++++++++- drivers/net/wireless/ath/ath12k/wmi.h | 38 ++++++ 10 files changed, 477 insertions(+), 22 deletions(-) base-commit: ec6d091977c2c19283e39f27529b100cc17a3320