All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] wifi: ath12k: Add support to set mlo_capable_flags from QMI PHY capability
@ 2024-04-18 12:56 Raj Kumar Bhagat
  2024-04-18 12:56 ` [PATCH 1/2] wifi: ath12k: read single_chip_mlo_support parameter " Raj Kumar Bhagat
  2024-04-18 12:56 ` [PATCH 2/2] wifi: ath12k: set mlo_capable_flags based on " Raj Kumar Bhagat
  0 siblings, 2 replies; 6+ messages in thread
From: Raj Kumar Bhagat @ 2024-04-18 12:56 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, Raj Kumar Bhagat

Currently, mlo_capable_flags is set to zero if dualmac device is
detected based on One Time Programmable (OTP) register value.
This is not generic and in future dualmac devices may support
Single Link Operation (SLO) and Multi Link Operation (MLO).

Hence, add support to read 'single_chip_mlo_support' parameter from
the QMI PHY capability response message. Also set mlo_capable_flags
based on 'single_chip_mlo_support'

Raj Kumar Bhagat (2):
  wifi: ath12k: read single_chip_mlo_support parameter from QMI PHY
    capability
  wifi: ath12k: set mlo_capable_flags based on QMI PHY capability

 drivers/net/wireless/ath/ath12k/mhi.c |  1 -
 drivers/net/wireless/ath/ath12k/qmi.c | 40 +++++++++++++++++++++++----
 drivers/net/wireless/ath/ath12k/qmi.h |  2 ++
 3 files changed, 37 insertions(+), 6 deletions(-)


base-commit: 448ef71a317cc00e2ec0c1edcefbdf6df4b3e46b
-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] wifi: ath12k: read single_chip_mlo_support parameter from QMI PHY capability
  2024-04-18 12:56 [PATCH 0/2] wifi: ath12k: Add support to set mlo_capable_flags from QMI PHY capability Raj Kumar Bhagat
@ 2024-04-18 12:56 ` Raj Kumar Bhagat
  2024-04-22 14:42   ` Jeff Johnson
  2024-04-24 15:34   ` Kalle Valo
  2024-04-18 12:56 ` [PATCH 2/2] wifi: ath12k: set mlo_capable_flags based on " Raj Kumar Bhagat
  1 sibling, 2 replies; 6+ messages in thread
From: Raj Kumar Bhagat @ 2024-04-18 12:56 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, Raj Kumar Bhagat

New parameter 'single_chip_mlo_support' was added in QMI PHY
capability response message. This is an optional parameter added
in QCN9274 firmware. This parameter states if the firmware
supports Single-Link Operation (SLO) and Multi-Link Operation (MLO)
within the same device.

If single_chip_mlo_support = 1, then intra device SLO/MLO is supported
in the firmware.
If single_chip_mlo_support = 0, then intra device SLO/MLO is not
supported in the firmware.

Hence, add support to read 'single_chip_mlo_support' parameter from
the QMI PHY capability response message.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00209-QCAHKSWPL_SILICONZ-1

Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/qmi.c | 24 ++++++++++++++++++++++--
 drivers/net/wireless/ath/ath12k/qmi.h |  2 ++
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c
index db8ba5fec2ae..a555839dae8e 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.c
+++ b/drivers/net/wireless/ath/ath12k/qmi.c
@@ -582,6 +582,24 @@ static const struct qmi_elem_info qmi_wlanfw_phy_cap_resp_msg_v01_ei[] = {
 		.offset		= offsetof(struct qmi_wlanfw_phy_cap_resp_msg_v01,
 					   board_id),
 	},
+	{
+		.data_type      = QMI_OPT_FLAG,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u8),
+		.array_type     = NO_ARRAY,
+		.tlv_type       = 0x13,
+		.offset         = offsetof(struct qmi_wlanfw_phy_cap_resp_msg_v01,
+					   single_chip_mlo_support_valid),
+	},
+	{
+		.data_type      = QMI_UNSIGNED_1_BYTE,
+		.elem_len       = 1,
+		.elem_size      = sizeof(u8),
+		.array_type     = NO_ARRAY,
+		.tlv_type       = 0x13,
+		.offset         = offsetof(struct qmi_wlanfw_phy_cap_resp_msg_v01,
+					   single_chip_mlo_support),
+	},
 	{
 		.data_type	= QMI_EOTI,
 		.array_type	= NO_ARRAY,
@@ -2160,9 +2178,11 @@ static void ath12k_qmi_phy_cap_send(struct ath12k_base *ab)
 
 	ab->qmi.num_radios = resp.num_phy;
 
-	ath12k_dbg(ab, ATH12K_DBG_QMI, "phy capability resp valid %d num_phy %d valid %d board_id %d\n",
+	ath12k_dbg(ab, ATH12K_DBG_QMI,
+		   "phy capability resp valid %d num_phy %d valid %d board_id %d valid %d single_chip_mlo_support %d\n",
 		   resp.num_phy_valid, resp.num_phy,
-		   resp.board_id_valid, resp.board_id);
+		   resp.board_id_valid, resp.board_id,
+		   resp.single_chip_mlo_support_valid, resp.single_chip_mlo_support);
 
 	return;
 
diff --git a/drivers/net/wireless/ath/ath12k/qmi.h b/drivers/net/wireless/ath/ath12k/qmi.h
index 6ee33c9851c6..f7a5eb11ce44 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.h
+++ b/drivers/net/wireless/ath/ath12k/qmi.h
@@ -265,6 +265,8 @@ struct qmi_wlanfw_phy_cap_resp_msg_v01 {
 	u8 num_phy;
 	u8 board_id_valid;
 	u32 board_id;
+	u8 single_chip_mlo_support_valid;
+	u8 single_chip_mlo_support;
 };
 
 #define QMI_WLANFW_IND_REGISTER_REQ_MSG_V01_MAX_LEN		54
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] wifi: ath12k: set mlo_capable_flags based on QMI PHY capability
  2024-04-18 12:56 [PATCH 0/2] wifi: ath12k: Add support to set mlo_capable_flags from QMI PHY capability Raj Kumar Bhagat
  2024-04-18 12:56 ` [PATCH 1/2] wifi: ath12k: read single_chip_mlo_support parameter " Raj Kumar Bhagat
@ 2024-04-18 12:56 ` Raj Kumar Bhagat
  2024-04-22 14:42   ` Jeff Johnson
  1 sibling, 1 reply; 6+ messages in thread
From: Raj Kumar Bhagat @ 2024-04-18 12:56 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, Raj Kumar Bhagat

Currently, mlo_capable_flags is set to zero if dualmac device is
detected based on One Time Programmable (OTP) register value.
This is not generic and in future dualmac devices may support
Single Link Operation (SLO) and Multi Link Operation (MLO).

Thus, set mlo_capable_flags based on 'single_chip_mlo_support'
parameter from QMI PHY capability response message from the firmware.
Also, add check on mlo_capable_flags to disable MLO parameter in the
host capability QMI request message.

If the firmware does not respond with this optional parameter
'single_chip_mlo_support' in QMI PHY capability response, default
ab->mlo_capable_flags is used.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00209-QCAHKSWPL_SILICONZ-1

Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/mhi.c |  1 -
 drivers/net/wireless/ath/ath12k/qmi.c | 16 +++++++++++++---
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/mhi.c b/drivers/net/wireless/ath/ath12k/mhi.c
index fd519c87ae24..50b9e44504f7 100644
--- a/drivers/net/wireless/ath/ath12k/mhi.c
+++ b/drivers/net/wireless/ath/ath12k/mhi.c
@@ -385,7 +385,6 @@ int ath12k_mhi_register(struct ath12k_pci *ab_pci)
 				   "failed to read board id\n");
 		} else if (board_id & OTP_VALID_DUALMAC_BOARD_ID_MASK) {
 			dualmac = true;
-			ab->mlo_capable_flags = 0;
 			ath12k_dbg(ab, ATH12K_DBG_BOOT,
 				   "dualmac fw selected for board id: %x\n", board_id);
 		}
diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c
index a555839dae8e..a286715f98fb 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.c
+++ b/drivers/net/wireless/ath/ath12k/qmi.c
@@ -2023,6 +2023,12 @@ static void ath12k_host_cap_parse_mlo(struct ath12k_base *ab,
 	u8 hw_link_id = 0;
 	int i;
 
+	if (!(ab->mlo_capable_flags & ATH12K_INTRA_DEVICE_MLO_SUPPORT)) {
+		ath12k_dbg(ab, ATH12K_DBG_QMI,
+			   "intra device MLO is disabled hence skip QMI MLO cap");
+		return;
+	}
+
 	if (!ab->qmi.num_radios || ab->qmi.num_radios == U8_MAX) {
 		ab->mlo_capable_flags = 0;
 
@@ -2144,9 +2150,6 @@ static void ath12k_qmi_phy_cap_send(struct ath12k_base *ab)
 	struct qmi_txn txn;
 	int ret;
 
-	if (!ab->mlo_capable_flags)
-		goto out;
-
 	ret = qmi_txn_init(&ab->qmi.handle, &txn,
 			   qmi_wlanfw_phy_cap_resp_msg_v01_ei, &resp);
 	if (ret < 0)
@@ -2171,6 +2174,13 @@ static void ath12k_qmi_phy_cap_send(struct ath12k_base *ab)
 		goto out;
 	}
 
+	if (resp.single_chip_mlo_support_valid) {
+		if (resp.single_chip_mlo_support)
+			ab->mlo_capable_flags |= ATH12K_INTRA_DEVICE_MLO_SUPPORT;
+		else
+			ab->mlo_capable_flags &= ~ATH12K_INTRA_DEVICE_MLO_SUPPORT;
+	}
+
 	if (!resp.num_phy_valid) {
 		ret = -ENODATA;
 		goto out;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] wifi: ath12k: read single_chip_mlo_support parameter from QMI PHY capability
  2024-04-18 12:56 ` [PATCH 1/2] wifi: ath12k: read single_chip_mlo_support parameter " Raj Kumar Bhagat
@ 2024-04-22 14:42   ` Jeff Johnson
  2024-04-24 15:34   ` Kalle Valo
  1 sibling, 0 replies; 6+ messages in thread
From: Jeff Johnson @ 2024-04-22 14:42 UTC (permalink / raw)
  To: Raj Kumar Bhagat, ath12k; +Cc: linux-wireless

On 4/18/2024 5:56 AM, Raj Kumar Bhagat wrote:
> New parameter 'single_chip_mlo_support' was added in QMI PHY
> capability response message. This is an optional parameter added
> in QCN9274 firmware. This parameter states if the firmware
> supports Single-Link Operation (SLO) and Multi-Link Operation (MLO)
> within the same device.
> 
> If single_chip_mlo_support = 1, then intra device SLO/MLO is supported
> in the firmware.
> If single_chip_mlo_support = 0, then intra device SLO/MLO is not
> supported in the firmware.
> 
> Hence, add support to read 'single_chip_mlo_support' parameter from
> the QMI PHY capability response message.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00209-QCAHKSWPL_SILICONZ-1

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

> 
> Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] wifi: ath12k: set mlo_capable_flags based on QMI PHY capability
  2024-04-18 12:56 ` [PATCH 2/2] wifi: ath12k: set mlo_capable_flags based on " Raj Kumar Bhagat
@ 2024-04-22 14:42   ` Jeff Johnson
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Johnson @ 2024-04-22 14:42 UTC (permalink / raw)
  To: Raj Kumar Bhagat, ath12k; +Cc: linux-wireless

On 4/18/2024 5:56 AM, Raj Kumar Bhagat wrote:
> Currently, mlo_capable_flags is set to zero if dualmac device is
> detected based on One Time Programmable (OTP) register value.
> This is not generic and in future dualmac devices may support
> Single Link Operation (SLO) and Multi Link Operation (MLO).
> 
> Thus, set mlo_capable_flags based on 'single_chip_mlo_support'
> parameter from QMI PHY capability response message from the firmware.
> Also, add check on mlo_capable_flags to disable MLO parameter in the
> host capability QMI request message.
> 
> If the firmware does not respond with this optional parameter
> 'single_chip_mlo_support' in QMI PHY capability response, default
> ab->mlo_capable_flags is used.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00209-QCAHKSWPL_SILICONZ-1

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

> 
> Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] wifi: ath12k: read single_chip_mlo_support parameter from QMI PHY capability
  2024-04-18 12:56 ` [PATCH 1/2] wifi: ath12k: read single_chip_mlo_support parameter " Raj Kumar Bhagat
  2024-04-22 14:42   ` Jeff Johnson
@ 2024-04-24 15:34   ` Kalle Valo
  1 sibling, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2024-04-24 15:34 UTC (permalink / raw)
  To: Raj Kumar Bhagat; +Cc: ath12k, linux-wireless, Raj Kumar Bhagat

Raj Kumar Bhagat <quic_rajkbhag@quicinc.com> wrote:

> New parameter 'single_chip_mlo_support' was added in QMI PHY
> capability response message. This is an optional parameter added
> in QCN9274 firmware. This parameter states if the firmware
> supports Single-Link Operation (SLO) and Multi-Link Operation (MLO)
> within the same device.
> 
> If single_chip_mlo_support = 1, then intra device SLO/MLO is supported
> in the firmware.
> If single_chip_mlo_support = 0, then intra device SLO/MLO is not
> supported in the firmware.
> 
> Hence, add support to read 'single_chip_mlo_support' parameter from
> the QMI PHY capability response message.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00209-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

2 patches applied to ath-next branch of ath.git, thanks.

ae6ec4a38aa4 wifi: ath12k: read single_chip_mlo_support parameter from QMI PHY capability
da3cbd88e780 wifi: ath12k: set mlo_capable_flags based on QMI PHY capability

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20240418125609.3867730-2-quic_rajkbhag@quicinc.com/

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-24 15:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18 12:56 [PATCH 0/2] wifi: ath12k: Add support to set mlo_capable_flags from QMI PHY capability Raj Kumar Bhagat
2024-04-18 12:56 ` [PATCH 1/2] wifi: ath12k: read single_chip_mlo_support parameter " Raj Kumar Bhagat
2024-04-22 14:42   ` Jeff Johnson
2024-04-24 15:34   ` Kalle Valo
2024-04-18 12:56 ` [PATCH 2/2] wifi: ath12k: set mlo_capable_flags based on " Raj Kumar Bhagat
2024-04-22 14:42   ` Jeff Johnson

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.