From 43ed15e1ee01631687ed8b2e8595859802bc9f10 Mon Sep 17 00:00:00 2001 From: Carl Huang Date: Thu, 10 Dec 2020 16:05:20 +0200 Subject: ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID It's recommended to use wmi command WMI_PDEV_SET_HW_MODE_CMDID to put hardware to dbs mode instead of wmi_init command. This fixes a few strange stability issues. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1607609124-17250-3-git-send-email-kvalo@codeaurora.org --- drivers/net/wireless/ath/ath11k/core.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'drivers/net/wireless/ath/ath11k/core.c') diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index da20ed752ca5..3c28e7ad7d51 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -51,7 +51,6 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_ipq8074, .svc_to_ce_map_len = 21, .single_pdev_only = false, - .needs_band_to_mac = true, .rxdma1_enable = true, .num_rxmda_per_pdev = 1, .rx_mac_buf_ring = false, @@ -89,7 +88,6 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_ipq6018, .svc_to_ce_map_len = 19, .single_pdev_only = false, - .needs_band_to_mac = true, .rxdma1_enable = true, .num_rxmda_per_pdev = 1, .rx_mac_buf_ring = false, @@ -127,7 +125,6 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qca6390, .svc_to_ce_map_len = 14, .single_pdev_only = true, - .needs_band_to_mac = false, .rxdma1_enable = false, .num_rxmda_per_pdev = 2, .rx_mac_buf_ring = true, @@ -646,6 +643,15 @@ static int ath11k_core_start(struct ath11k_base *ab, goto err_reo_cleanup; } + /* put hardware to DBS mode */ + if (ab->hw_params.single_pdev_only) { + ret = ath11k_wmi_set_hw_mode(ab, WMI_HOST_HW_MODE_DBS); + if (ret) { + ath11k_err(ab, "failed to send dbs mode: %d\n", ret); + goto err_hif_stop; + } + } + ret = ath11k_dp_tx_htt_h2t_ver_req_msg(ab); if (ret) { ath11k_err(ab, "failed to send htt version request message: %d\n", -- cgit v1.2.3