All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH v2 11/12] ath11k: wmi: put hardware to DBS mode
Date: Sun, 16 Aug 2020 14:16:38 +0300	[thread overview]
Message-ID: <1597576599-8857-12-git-send-email-kvalo@codeaurora.org> (raw)
In-Reply-To: <1597576599-8857-1-git-send-email-kvalo@codeaurora.org>

From: Carl Huang <cjhuang@codeaurora.org>

For QCA6390, host puts hardware to Dual Band Simultaneous (DBS) mode by default
so both 2G and 5G bands can be used. Otherwise only the 5G band can be used.
QCA6390 doesn't provide band_to_mac configuration and firmware will do the
band_to_mac map.

Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2

Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/core.c |  2 ++
 drivers/net/wireless/ath/ath11k/hw.h   |  6 ++++++
 drivers/net/wireless/ath/ath11k/wmi.c  | 10 +++++-----
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 62fac8bbf221..b94630822d1e 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -36,6 +36,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.host_ce_config = ath11k_host_ce_config_ipq8074,
 		.ce_count = 12,
 		.single_pdev_only = false,
+		.needs_band_to_mac = true,
 	},
 	{
 		.name = "qca6390 hw2.0",
@@ -54,6 +55,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.host_ce_config = ath11k_host_ce_config_qca6390,
 		.ce_count = 9,
 		.single_pdev_only = true,
+		.needs_band_to_mac = false,
 	},
 };
 
diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
index 4651aed2eaf0..8db9534b176b 100644
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -145,6 +145,12 @@ struct ath11k_hw_params {
 	u32 ce_count;
 
 	bool single_pdev_only;
+
+	/* For example on QCA6390 struct
+	 * wmi_init_cmd_param::band_to_mac_config needs to be false as the
+	 * firmware creates the mapping.
+	 */
+	bool needs_band_to_mac;
 };
 
 extern const struct ath11k_hw_ops ipq8074_ops;
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 21f9070a1300..4e100407fea6 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -3396,13 +3396,13 @@ int ath11k_wmi_cmd_init(struct ath11k_base *ab)
 	init_param.hw_mode_id = wmi_sc->preferred_hw_mode;
 	init_param.mem_chunks = wmi_sc->mem_chunks;
 
-	if (wmi_sc->preferred_hw_mode == WMI_HOST_HW_MODE_SINGLE ||
-	    ab->hw_params.single_pdev_only)
+	if (wmi_sc->preferred_hw_mode == WMI_HOST_HW_MODE_SINGLE)
 		init_param.hw_mode_id = WMI_HOST_HW_MODE_MAX;
 
-	init_param.num_band_to_mac = ab->num_radios;
-
-	ath11k_fill_band_to_mac_param(ab, init_param.band_to_mac);
+	if (ab->hw_params.needs_band_to_mac) {
+		init_param.num_band_to_mac = ab->num_radios;
+		ath11k_fill_band_to_mac_param(ab, init_param.band_to_mac);
+	}
 
 	return ath11k_init_cmd_send(&wmi_sc->wmi[0], &init_param);
 }
-- 
2.7.4


WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@codeaurora.org>
To: ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH v2 11/12] ath11k: wmi: put hardware to DBS mode
Date: Sun, 16 Aug 2020 14:16:38 +0300	[thread overview]
Message-ID: <1597576599-8857-12-git-send-email-kvalo@codeaurora.org> (raw)
In-Reply-To: <1597576599-8857-1-git-send-email-kvalo@codeaurora.org>

From: Carl Huang <cjhuang@codeaurora.org>

For QCA6390, host puts hardware to Dual Band Simultaneous (DBS) mode by default
so both 2G and 5G bands can be used. Otherwise only the 5G band can be used.
QCA6390 doesn't provide band_to_mac configuration and firmware will do the
band_to_mac map.

Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2

Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/core.c |  2 ++
 drivers/net/wireless/ath/ath11k/hw.h   |  6 ++++++
 drivers/net/wireless/ath/ath11k/wmi.c  | 10 +++++-----
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 62fac8bbf221..b94630822d1e 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -36,6 +36,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.host_ce_config = ath11k_host_ce_config_ipq8074,
 		.ce_count = 12,
 		.single_pdev_only = false,
+		.needs_band_to_mac = true,
 	},
 	{
 		.name = "qca6390 hw2.0",
@@ -54,6 +55,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.host_ce_config = ath11k_host_ce_config_qca6390,
 		.ce_count = 9,
 		.single_pdev_only = true,
+		.needs_band_to_mac = false,
 	},
 };
 
diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
index 4651aed2eaf0..8db9534b176b 100644
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -145,6 +145,12 @@ struct ath11k_hw_params {
 	u32 ce_count;
 
 	bool single_pdev_only;
+
+	/* For example on QCA6390 struct
+	 * wmi_init_cmd_param::band_to_mac_config needs to be false as the
+	 * firmware creates the mapping.
+	 */
+	bool needs_band_to_mac;
 };
 
 extern const struct ath11k_hw_ops ipq8074_ops;
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 21f9070a1300..4e100407fea6 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -3396,13 +3396,13 @@ int ath11k_wmi_cmd_init(struct ath11k_base *ab)
 	init_param.hw_mode_id = wmi_sc->preferred_hw_mode;
 	init_param.mem_chunks = wmi_sc->mem_chunks;
 
-	if (wmi_sc->preferred_hw_mode == WMI_HOST_HW_MODE_SINGLE ||
-	    ab->hw_params.single_pdev_only)
+	if (wmi_sc->preferred_hw_mode == WMI_HOST_HW_MODE_SINGLE)
 		init_param.hw_mode_id = WMI_HOST_HW_MODE_MAX;
 
-	init_param.num_band_to_mac = ab->num_radios;
-
-	ath11k_fill_band_to_mac_param(ab, init_param.band_to_mac);
+	if (ab->hw_params.needs_band_to_mac) {
+		init_param.num_band_to_mac = ab->num_radios;
+		ath11k_fill_band_to_mac_param(ab, init_param.band_to_mac);
+	}
 
 	return ath11k_init_cmd_send(&wmi_sc->wmi[0], &init_param);
 }
-- 
2.7.4


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

  parent reply	other threads:[~2020-08-16 11:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-16 11:16 [PATCH v2 00/12] ath11k: CE and HAL support for QCA6390 Kalle Valo
2020-08-16 11:16 ` Kalle Valo
2020-08-16 11:16 ` [PATCH v2 01/12] ath11k: hal: create register values dynamically Kalle Valo
2020-08-16 11:16   ` Kalle Valo
2020-08-18  9:45   ` Kalle Valo
2020-08-18  9:45   ` Kalle Valo
2020-08-16 11:16 ` [PATCH v2 02/12] ath11k: hal: cleanup dynamic register macros Kalle Valo
2020-08-16 11:16   ` Kalle Valo
2020-08-16 11:16 ` [PATCH v2 03/12] ath11k: ce: support different CE configurations Kalle Valo
2020-08-16 11:16   ` Kalle Valo
2020-08-16 11:16 ` [PATCH v2 04/12] ath11k: ce: remove host_ce_config_wlan macro Kalle Valo
2020-08-16 11:16   ` Kalle Valo
2020-08-16 11:16 ` [PATCH v2 05/12] ath11k: ce: remove CE_COUNT() macro Kalle Valo
2020-08-16 11:16   ` Kalle Valo
2020-08-16 11:16 ` [PATCH v2 06/12] ath11k: hal: assign msi_addr and msi_data to srng Kalle Valo
2020-08-16 11:16   ` Kalle Valo
2020-08-16 11:16 ` [PATCH v2 07/12] ath11k: ce: get msi_addr and msi_data before srng setup Kalle Valo
2020-08-16 11:16   ` Kalle Valo
2020-08-16 11:16 ` [PATCH v2 08/12] ath11k: disable CE interrupt before hif start Kalle Valo
2020-08-16 11:16   ` Kalle Valo
2020-08-16 11:16 ` [PATCH v2 09/12] ath11k: force single pdev only for QCA6390 Kalle Valo
2020-08-16 11:16   ` Kalle Valo
2020-08-16 11:16 ` [PATCH v2 10/12] ath11k: initialize wmi config based on hw_params Kalle Valo
2020-08-16 11:16   ` Kalle Valo
2020-08-16 11:16 ` Kalle Valo [this message]
2020-08-16 11:16   ` [PATCH v2 11/12] ath11k: wmi: put hardware to DBS mode Kalle Valo
2020-08-16 11:16 ` [PATCH v2 12/12] ath11k: dp: redefine peer_map and peer_unmap Kalle Valo
2020-08-16 11:16   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1597576599-8857-12-git-send-email-kvalo@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.