mac80211/ath11k: temporarily disable DBS mode

This commit is contained in:
aiamadeus 2025-01-24 23:28:03 +08:00
parent f8b9349cb8
commit 64ed83cc0e
5 changed files with 6 additions and 226 deletions

View File

@ -1,219 +0,0 @@
From f019f4dff2e4cb8704dc608496e3f2829de3e919 Mon Sep 17 00:00:00 2001
From: Carl Huang <quic_cjhuang@quicinc.com>
Date: Wed, 14 Feb 2024 10:38:10 +0200
Subject: [PATCH] wifi: ath11k: support 2 station interfaces
Add hardware parameter support_dual_stations to indicate whether 2 station
interfaces are supported. For chips which support this feature, limit total
number of AP interface and mesh point to 1. The max interfaces are 3 for such
chips.
The chips affected are:
QCA6390 hw2.0
WCN6855 hw2.0
WCN6855 hw2.1
Other chips are not affected.
For affected chips, remove radar_detect_widths because now
num_different_channels is set to 2. radar_detect_widths can be set only when
num_different_channels is 1, see mac80211 function wiphy_verify_combinations
for details. This means that in affectected chips DFS cannot be enabled in AP
mode.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20230714023801.2621802-2-quic_cjhuang@quicinc.com
---
drivers/net/wireless/ath/ath11k/core.c | 14 ++++--
drivers/net/wireless/ath/ath11k/hw.c | 2 +-
drivers/net/wireless/ath/ath11k/hw.h | 1 +
drivers/net/wireless/ath/ath11k/mac.c | 62 +++++++++++++++++---------
4 files changed, 53 insertions(+), 26 deletions(-)
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -121,6 +121,7 @@ static const struct ath11k_hw_params ath
.tcl_ring_retry = true,
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
.smp2p_wow_exit = false,
+ .support_dual_stations = false,
},
{
.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -204,6 +205,7 @@ static const struct ath11k_hw_params ath
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
.smp2p_wow_exit = false,
.support_fw_mac_sequence = false,
+ .support_dual_stations = false,
},
{
.name = "qca6390 hw2.0",
@@ -254,7 +256,7 @@ static const struct ath11k_hw_params ath
.coldboot_cal_ftm = false,
.cbcal_restart_fw = false,
.fw_mem_mode = 0,
- .num_vdevs = 16 + 1,
+ .num_vdevs = 2 + 1,
.num_peers = 512,
.supports_suspend = true,
.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
@@ -289,6 +291,7 @@ static const struct ath11k_hw_params ath
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
.smp2p_wow_exit = false,
.support_fw_mac_sequence = true,
+ .support_dual_stations = true,
},
{
.name = "qcn9074 hw1.0",
@@ -371,6 +374,7 @@ static const struct ath11k_hw_params ath
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
.smp2p_wow_exit = false,
.support_fw_mac_sequence = false,
+ .support_dual_stations = false,
},
{
.name = "wcn6855 hw2.0",
@@ -421,7 +425,7 @@ static const struct ath11k_hw_params ath
.coldboot_cal_ftm = false,
.cbcal_restart_fw = false,
.fw_mem_mode = 0,
- .num_vdevs = 16 + 1,
+ .num_vdevs = 2 + 1,
.num_peers = 512,
.supports_suspend = true,
.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
@@ -456,6 +460,7 @@ static const struct ath11k_hw_params ath
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
.smp2p_wow_exit = false,
.support_fw_mac_sequence = true,
+ .support_dual_stations = true,
},
{
.name = "wcn6855 hw2.1",
@@ -504,7 +509,7 @@ static const struct ath11k_hw_params ath
.coldboot_cal_ftm = false,
.cbcal_restart_fw = false,
.fw_mem_mode = 0,
- .num_vdevs = 16 + 1,
+ .num_vdevs = 2 + 1,
.num_peers = 512,
.supports_suspend = true,
.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
@@ -539,6 +544,7 @@ static const struct ath11k_hw_params ath
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
.smp2p_wow_exit = false,
.support_fw_mac_sequence = true,
+ .support_dual_stations = true,
},
{
.name = "wcn6750 hw1.0",
@@ -620,6 +626,7 @@ static const struct ath11k_hw_params ath
.tx_ring_size = DP_TCL_DATA_RING_SIZE_WCN6750,
.smp2p_wow_exit = true,
.support_fw_mac_sequence = true,
+ .support_dual_stations = false,
},
{
.hw_rev = ATH11K_HW_IPQ5018_HW10,
@@ -701,6 +708,7 @@ static const struct ath11k_hw_params ath
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
.smp2p_wow_exit = false,
.support_fw_mac_sequence = false,
+ .support_dual_stations = false,
},
};
--- a/drivers/net/wireless/ath/ath11k/hw.c
+++ b/drivers/net/wireless/ath/ath11k/hw.c
@@ -58,7 +58,7 @@ static void ath11k_hw_wcn6855_tx_mesh_en
static void ath11k_init_wmi_config_qca6390(struct ath11k_base *ab,
struct target_resource_config *config)
{
- config->num_vdevs = 4;
+ config->num_vdevs = ab->hw_params.num_vdevs;
config->num_peers = 16;
config->num_tids = 32;
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -226,6 +226,7 @@ struct ath11k_hw_params {
u32 tx_ring_size;
bool smp2p_wow_exit;
bool support_fw_mac_sequence;
+ bool support_dual_stations;
};
struct ath11k_hw_ops {
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -9287,28 +9287,46 @@ static int ath11k_mac_setup_iface_combin
return -ENOMEM;
}
- limits[0].max = 1;
- limits[0].types |= BIT(NL80211_IFTYPE_STATION);
+ if (ab->hw_params.support_dual_stations) {
+ limits[0].max = 2;
+ limits[0].types |= BIT(NL80211_IFTYPE_STATION);
- limits[1].max = 16;
- limits[1].types |= BIT(NL80211_IFTYPE_AP);
+ limits[1].max = 1;
+ limits[1].types |= BIT(NL80211_IFTYPE_AP);
+ if (IS_ENABLED(CPTCFG_MAC80211_MESH) &&
+ ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT))
+ limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT);
- if (IS_ENABLED(CPTCFG_MAC80211_MESH) &&
- ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT))
- limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT);
-
- combinations[0].limits = limits;
- combinations[0].n_limits = n_limits;
- combinations[0].max_interfaces = 16;
- combinations[0].num_different_channels = 1;
- combinations[0].beacon_int_infra_match = true;
- combinations[0].beacon_int_min_gcd = 100;
- combinations[0].radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
- BIT(NL80211_CHAN_WIDTH_20) |
- BIT(NL80211_CHAN_WIDTH_40) |
- BIT(NL80211_CHAN_WIDTH_80) |
- BIT(NL80211_CHAN_WIDTH_80P80) |
- BIT(NL80211_CHAN_WIDTH_160);
+ combinations[0].limits = limits;
+ combinations[0].n_limits = 2;
+ combinations[0].max_interfaces = ab->hw_params.num_vdevs;
+ combinations[0].num_different_channels = 2;
+ combinations[0].beacon_int_infra_match = true;
+ combinations[0].beacon_int_min_gcd = 100;
+ } else {
+ limits[0].max = 1;
+ limits[0].types |= BIT(NL80211_IFTYPE_STATION);
+
+ limits[1].max = 16;
+ limits[1].types |= BIT(NL80211_IFTYPE_AP);
+
+ if (IS_ENABLED(CPTCFG_MAC80211_MESH) &&
+ ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT))
+ limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT);
+
+ combinations[0].limits = limits;
+ combinations[0].n_limits = 2;
+ combinations[0].max_interfaces = 16;
+ combinations[0].num_different_channels = 1;
+ combinations[0].beacon_int_infra_match = true;
+ combinations[0].beacon_int_min_gcd = 100;
+ combinations[0].radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |
+ BIT(NL80211_CHAN_WIDTH_20) |
+ BIT(NL80211_CHAN_WIDTH_40) |
+ BIT(NL80211_CHAN_WIDTH_80) |
+ BIT(NL80211_CHAN_WIDTH_80P80) |
+ BIT(NL80211_CHAN_WIDTH_160);
+ }
ar->hw->wiphy->iface_combinations = combinations;
ar->hw->wiphy->n_iface_combinations = 1;

View File

@ -27,9 +27,9 @@ Link: https://msgid.link/20240109021336.4143-3-quic_bqiang@quicinc.com
--- a/drivers/net/wireless/ath/ath11k/core.c --- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -710,6 +710,92 @@ static const struct ath11k_hw_params ath @@ -702,6 +702,91 @@ static const struct ath11k_hw_params ath
.smp2p_wow_exit = false,
.support_fw_mac_sequence = false, .support_fw_mac_sequence = false,
.support_dual_stations = false,
}, },
+ { + {
+ .name = "qca2066 hw2.1", + .name = "qca2066 hw2.1",
@ -115,7 +115,6 @@ Link: https://msgid.link/20240109021336.4143-3-quic_bqiang@quicinc.com
+ .tx_ring_size = DP_TCL_DATA_RING_SIZE, + .tx_ring_size = DP_TCL_DATA_RING_SIZE,
+ .smp2p_wow_exit = false, + .smp2p_wow_exit = false,
+ .support_fw_mac_sequence = true, + .support_fw_mac_sequence = true,
+ .support_dual_stations = true,
+ }, + },
}; };

View File

@ -31,7 +31,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
{ {
.hw_rev = ATH11K_HW_IPQ8074, .hw_rev = ATH11K_HW_IPQ8074,
.name = "ipq8074 hw2.0", .name = "ipq8074 hw2.0",
@@ -2134,7 +2134,8 @@ static void ath11k_core_reset(struct wor @@ -2125,7 +2125,8 @@ static void ath11k_core_reset(struct wor
static int ath11k_init_hw_params(struct ath11k_base *ab) static int ath11k_init_hw_params(struct ath11k_base *ab)
{ {
const struct ath11k_hw_params *hw_params = NULL; const struct ath11k_hw_params *hw_params = NULL;
@ -41,7 +41,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
for (i = 0; i < ARRAY_SIZE(ath11k_hw_params); i++) { for (i = 0; i < ARRAY_SIZE(ath11k_hw_params); i++) {
hw_params = &ath11k_hw_params[i]; hw_params = &ath11k_hw_params[i];
@@ -2150,7 +2151,31 @@ static int ath11k_init_hw_params(struct @@ -2141,7 +2142,31 @@ static int ath11k_init_hw_params(struct
ab->hw_params = *hw_params; ab->hw_params = *hw_params;

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath11k/core.c --- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -169,8 +169,8 @@ static struct ath11k_hw_params ath11k_hw @@ -168,8 +168,8 @@ static struct ath11k_hw_params ath11k_hw
.supports_shadow_regs = false, .supports_shadow_regs = false,
.idle_ps = false, .idle_ps = false,
.supports_sta_ps = false, .supports_sta_ps = false,

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath11k/ahb.c --- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -1008,17 +1008,29 @@ @@ -1008,17 +1008,29 @@ static int ath11k_ahb_fw_resources_init(
goto err_iommu_free; goto err_iommu_free;
} }