aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/wireless/ath/ath11k/core.c
diff options
context:
space:
mode:
authorWen Gong <quic_wgong@quicinc.com>2022-01-18 23:13:55 -0500
committerKalle Valo <quic_kvalo@quicinc.com>2022-01-28 14:36:26 +0200
commit0d6e997b76216ca104167a2a0fb79823a7fa9e97 (patch)
treeebb0e84f51f6ae59c5e70c827cebfca15b36d5e5 /drivers/net/wireless/ath/ath11k/core.c
parentath11k: set WMI_PEER_40MHZ while peer assoc for 6 GHz (diff)
downloadwireguard-linux-0d6e997b76216ca104167a2a0fb79823a7fa9e97.tar.xz
wireguard-linux-0d6e997b76216ca104167a2a0fb79823a7fa9e97.zip
ath11k: avoid firmware crash when reg set for QCA6390/WCN6855
For the NL80211_REGDOM_SET_BY_USER hint from cfg80211, it set the new alpha2 code to ath11k, then ath11k send WMI_SET_INIT_COUNTRY_CMDID to firmware for all chips currently. When test with WCN6855/QCA6390 chips, this WMI CMD leads firmware crash. For AP based chips(ipq8074/qcn9074), WMI_SET_INIT_COUNTRY_CMDID is used to send to firmware, for STATION based chips(WCN6855/QCA6390), it need to use another WMI CMD 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 QCA6390/WCN6855. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2 Signed-off-by: Wen Gong <quic_wgong@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220119041355.32014-1-quic_wgong@quicinc.com
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/core.c')
-rw-r--r--drivers/net/wireless/ath/ath11k/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 1ad77bd721b9..7c508e9baa6d 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -98,6 +98,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.wakeup_mhi = false,
.supports_rssi_stats = false,
.fw_wmi_diag_event = false,
+ .current_cc_support = false,
},
{
.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -162,6 +163,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.wakeup_mhi = false,
.supports_rssi_stats = false,
.fw_wmi_diag_event = false,
+ .current_cc_support = false,
},
{
.name = "qca6390 hw2.0",
@@ -225,6 +227,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.wakeup_mhi = true,
.supports_rssi_stats = true,
.fw_wmi_diag_event = true,
+ .current_cc_support = true,
},
{
.name = "qcn9074 hw1.0",
@@ -288,6 +291,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.wakeup_mhi = false,
.supports_rssi_stats = false,
.fw_wmi_diag_event = false,
+ .current_cc_support = false,
},
{
.name = "wcn6855 hw2.0",
@@ -351,6 +355,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.wakeup_mhi = true,
.supports_rssi_stats = true,
.fw_wmi_diag_event = true,
+ .current_cc_support = true,
},
{
.name = "wcn6855 hw2.1",
@@ -413,6 +418,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.wakeup_mhi = true,
.supports_rssi_stats = true,
.fw_wmi_diag_event = true,
+ .current_cc_support = true,
},
};