Skip to contentSkip to conversation

ath11k: wmi: remove redundant configuration values from init

PATCH In review Kalle Valo 1 participant 3 messages Sep 17, 2020 – Sep 22, 2020 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore

Kalle Valo

author
#0 lore raw

PATCH 1/1 ath11k: wmi: remove redundant configuration values from init

In commit 2d4bcbed5b7d ("ath11k: initialize wmi config based on hw_params") the wmi config initialisation was moved to hw_ops->wmi_init_config() but the old initialisation values were accidentally left to ath11k_wmi_cmd_init(). This is very confusing, so remove the redundant values.

And this was actually so confusing that in commit aa2092a9bab3 ("ath11k: add raw mode and software crypto support") I actually it caused a bug: when ATH11K_FLAG_RAW_MODE was enabled rx_decap_mode was assigned back to TARGET_DECAP_MODE_NATIVE_WIFI in ath11k_init_wmi_config_ipq8074(). Fix this at the same time.

Compile tested only.

Fixes 2d4bcbed5b7d ("ath11k: initialize wmi config based on hw_params")
---
 drivers/net/wireless/ath/ath11k/hw.c  |  7 ++++-
 drivers/net/wireless/ath/ath11k/wmi.c | 49 -----------------------------------
 2 files changed, 6 insertions(+), 50 deletions(-)
drivers/net/wireless/ath/ath11k/hw.c +6 -1
index 4d7d2dc691d2..11a411b76fe4 100644
@@ -103,7 +103,12 @@ static void ath11k_init_wmi_config_ipq8074(struct ath11k_base *ab,
 	config->rx_timeout_pri[1] = TARGET_RX_TIMEOUT_LO_PRI;
 	config->rx_timeout_pri[2] = TARGET_RX_TIMEOUT_LO_PRI;
 	config->rx_timeout_pri[3] = TARGET_RX_TIMEOUT_HI_PRI;
-	config->rx_decap_mode = TARGET_DECAP_MODE_NATIVE_WIFI;
+
+	if (test_bit(ATH11K_FLAG_RAW_MODE, &ab->dev_flags))
+		config->rx_decap_mode = TARGET_DECAP_MODE_RAW;
+	else
+		config->rx_decap_mode = TARGET_DECAP_MODE_NATIVE_WIFI;
+
 	config->scan_max_pending_req = TARGET_SCAN_MAX_PENDING_REQS;
 	config->bmiss_offload_max_vdev = TARGET_BMISS_OFFLOAD_MAX_VDEV;
 	config->roam_offload_max_vdev = TARGET_ROAM_OFFLOAD_MAX_VDEV;
drivers/net/wireless/ath/ath11k/wmi.c +0 -49

55 lines not on this page · raw message

Signature · 7 lines
2.7.4


-- 
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
author
#1 lore raw
Quoted 11 lines · Kalle Valo

In commit 2d4bcbed5b7d ("ath11k: initialize wmi config based on hw_params") the wmi config initialisation was moved to hw_ops->wmi_init_config() but the old initialisation values were accidentally left to ath11k_wmi_cmd_init(). This is very confusing, so remove the redundant values.

And this was actually so confusing that in commit aa2092a9bab3 ("ath11k: add raw mode and software crypto support") I actually it caused a bug: when ATH11K_FLAG_RAW_MODE was enabled rx_decap_mode was assigned back to TARGET_DECAP_MODE_NATIVE_WIFI in ath11k_init_wmi_config_ipq8074(). Fix this at the same time.

Quoted 4 lines

Compile tested only.

Fixes 2d4bcbed5b7d ("ath11k: initialize wmi config based on hw_params")

Patch applied to ath-next branch of ath.git, thanks.

c695faf745f9 ath11k: wmi: remove redundant configuration values from init

Signature · 9 lines
https://patchwork.kernel.org/patch/11782889/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


-- 
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
author
#2 lore raw
In reply to Kalle Valo
Quoted 11 lines · Kalle Valo

In commit 2d4bcbed5b7d ("ath11k: initialize wmi config based on hw_params") the wmi config initialisation was moved to hw_ops->wmi_init_config() but the old initialisation values were accidentally left to ath11k_wmi_cmd_init(). This is very confusing, so remove the redundant values.

And this was actually so confusing that in commit aa2092a9bab3 ("ath11k: add raw mode and software crypto support") I actually it caused a bug: when ATH11K_FLAG_RAW_MODE was enabled rx_decap_mode was assigned back to TARGET_DECAP_MODE_NATIVE_WIFI in ath11k_init_wmi_config_ipq8074(). Fix this at the same time.

Quoted 4 lines

Compile tested only.

Fixes 2d4bcbed5b7d ("ath11k: initialize wmi config based on hw_params")

Patch applied to ath-next branch of ath.git, thanks.

c695faf745f9 ath11k: wmi: remove redundant configuration values from init

Signature · 3 lines
https://patchwork.kernel.org/patch/11782889/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches