Commit beefee71 authored by Seevalamuthu Mariappan's avatar Seevalamuthu Mariappan Committed by Kalle Valo

ath11k: Change qcn9074 fw to operate in mode-2

In mode-2 QCN9074 firmware uses 15MB of host memory and firmware
request 1MB size segements in QMI, whereas in mode-0 firmware
uses 45MB of host memory and each segment is of 2MB size.
In mode-2 firmware operates with reduced number of vdevs and peers.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01838-QCAHKSWPL_SILICONZ-1
Signed-off-by: default avatarSeevalamuthu Mariappan <seevalam@codeaurora.org>
Signed-off-by: default avatarAnilkumar Kolli <akolli@codeaurora.org>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211209104351.9811-3-kvalo@kernel.org
parent 523aafd0
...@@ -79,6 +79,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { ...@@ -79,6 +79,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.idle_ps = false, .idle_ps = false,
.supports_sta_ps = false, .supports_sta_ps = false,
.cold_boot_calib = true, .cold_boot_calib = true,
.fw_mem_mode = 0,
.num_vdevs = 16 + 1,
.num_peers = 512,
.supports_suspend = false, .supports_suspend = false,
.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074), .hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
.fix_l1ss = true, .fix_l1ss = true,
...@@ -134,6 +137,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { ...@@ -134,6 +137,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.idle_ps = false, .idle_ps = false,
.supports_sta_ps = false, .supports_sta_ps = false,
.cold_boot_calib = true, .cold_boot_calib = true,
.fw_mem_mode = 0,
.num_vdevs = 16 + 1,
.num_peers = 512,
.supports_suspend = false, .supports_suspend = false,
.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074), .hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
.fix_l1ss = true, .fix_l1ss = true,
...@@ -188,6 +194,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { ...@@ -188,6 +194,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.idle_ps = true, .idle_ps = true,
.supports_sta_ps = true, .supports_sta_ps = true,
.cold_boot_calib = false, .cold_boot_calib = false,
.fw_mem_mode = 0,
.num_vdevs = 16 + 1,
.num_peers = 512,
.supports_suspend = true, .supports_suspend = true,
.hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074), .hal_desc_sz = sizeof(struct hal_rx_desc_ipq8074),
.fix_l1ss = true, .fix_l1ss = true,
...@@ -242,6 +251,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { ...@@ -242,6 +251,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.idle_ps = false, .idle_ps = false,
.supports_sta_ps = false, .supports_sta_ps = false,
.cold_boot_calib = false, .cold_boot_calib = false,
.fw_mem_mode = 2,
.num_vdevs = 8,
.num_peers = 128,
.supports_suspend = false, .supports_suspend = false,
.hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074), .hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074),
.fix_l1ss = true, .fix_l1ss = true,
...@@ -296,6 +308,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { ...@@ -296,6 +308,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.idle_ps = true, .idle_ps = true,
.supports_sta_ps = true, .supports_sta_ps = true,
.cold_boot_calib = false, .cold_boot_calib = false,
.fw_mem_mode = 0,
.num_vdevs = 16 + 1,
.num_peers = 512,
.supports_suspend = true, .supports_suspend = true,
.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855), .hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
.fix_l1ss = false, .fix_l1ss = false,
...@@ -349,6 +364,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { ...@@ -349,6 +364,9 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.idle_ps = true, .idle_ps = true,
.supports_sta_ps = true, .supports_sta_ps = true,
.cold_boot_calib = false, .cold_boot_calib = false,
.fw_mem_mode = 0,
.num_vdevs = 16 + 1,
.num_peers = 512,
.supports_suspend = true, .supports_suspend = true,
.hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855), .hal_desc_sz = sizeof(struct hal_rx_desc_wcn6855),
.fix_l1ss = false, .fix_l1ss = false,
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
/* Target configuration defines */ /* Target configuration defines */
/* Num VDEVS per radio */ /* Num VDEVS per radio */
#define TARGET_NUM_VDEVS(ab) (16 + 1) #define TARGET_NUM_VDEVS(ab) (ab->hw_params.num_vdevs)
#define TARGET_NUM_PEERS_PDEV(ab) (512 + TARGET_NUM_VDEVS(ab)) #define TARGET_NUM_PEERS_PDEV(ab) (ab->hw_params.num_peers + TARGET_NUM_VDEVS(ab))
/* Num of peers for Single Radio mode */ /* Num of peers for Single Radio mode */
#define TARGET_NUM_PEERS_SINGLE(ab) (TARGET_NUM_PEERS_PDEV(ab)) #define TARGET_NUM_PEERS_SINGLE(ab) (TARGET_NUM_PEERS_PDEV(ab))
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#define TARGET_NUM_PEERS_DBS_SBS(ab) (3 * TARGET_NUM_PEERS_PDEV(ab)) #define TARGET_NUM_PEERS_DBS_SBS(ab) (3 * TARGET_NUM_PEERS_PDEV(ab))
/* Max num of stations (per radio) */ /* Max num of stations (per radio) */
#define TARGET_NUM_STATIONS(ab) 512 #define TARGET_NUM_STATIONS(ab) (ab->hw_params.num_peers)
#define TARGET_NUM_PEERS(ab, x) TARGET_NUM_PEERS_##x(ab) #define TARGET_NUM_PEERS(ab, x) TARGET_NUM_PEERS_##x(ab)
#define TARGET_NUM_PEER_KEYS 2 #define TARGET_NUM_PEER_KEYS 2
...@@ -173,6 +173,9 @@ struct ath11k_hw_params { ...@@ -173,6 +173,9 @@ struct ath11k_hw_params {
bool idle_ps; bool idle_ps;
bool supports_sta_ps; bool supports_sta_ps;
bool cold_boot_calib; bool cold_boot_calib;
int fw_mem_mode;
u32 num_vdevs;
u32 num_peers;
bool supports_suspend; bool supports_suspend;
u32 hal_desc_sz; u32 hal_desc_sz;
bool fix_l1ss; bool fix_l1ss;
......
...@@ -2830,7 +2830,7 @@ int ath11k_qmi_init_service(struct ath11k_base *ab) ...@@ -2830,7 +2830,7 @@ int ath11k_qmi_init_service(struct ath11k_base *ab)
memset(&ab->qmi.target_mem, 0, sizeof(struct target_mem_chunk)); memset(&ab->qmi.target_mem, 0, sizeof(struct target_mem_chunk));
ab->qmi.ab = ab; ab->qmi.ab = ab;
ab->qmi.target_mem_mode = ATH11K_QMI_TARGET_MEM_MODE_DEFAULT; ab->qmi.target_mem_mode = ab->hw_params.fw_mem_mode;
ret = qmi_handle_init(&ab->qmi.handle, ATH11K_QMI_RESP_LEN_MAX, ret = qmi_handle_init(&ab->qmi.handle, ATH11K_QMI_RESP_LEN_MAX,
&ath11k_qmi_ops, ath11k_qmi_msg_handlers); &ath11k_qmi_ops, ath11k_qmi_msg_handlers);
if (ret < 0) { if (ret < 0) {
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#define QMI_WLANFW_MAX_DATA_SIZE_V01 6144 #define QMI_WLANFW_MAX_DATA_SIZE_V01 6144
#define ATH11K_FIRMWARE_MODE_OFF 4 #define ATH11K_FIRMWARE_MODE_OFF 4
#define ATH11K_QMI_TARGET_MEM_MODE_DEFAULT 0
#define ATH11K_COLD_BOOT_FW_RESET_DELAY (40 * HZ) #define ATH11K_COLD_BOOT_FW_RESET_DELAY (40 * HZ)
struct ath11k_base; struct ath11k_base;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment