mbox series

[v3,00/13] wifi: ath12k: QCN9274 dualmac bring up

Message ID 20240129065724.2310207-1-quic_rajkbhag@quicinc.com
Headers show
Series wifi: ath12k: QCN9274 dualmac bring up | expand

Message

Raj Kumar Bhagat Jan. 29, 2024, 6:57 a.m. UTC
QCN9274 Ath12k chipset can support single-mac or dualmac architecture.
Currently, Ath12k driver supports only the single-mac QCN9274
architecture.

Hence, add support for dualmac QCN9274 chipset.

Depends-On: [v2] wifi: ath12k: add firmware-2.bin support

Aaradhana Sahu (1):
  wifi: ath12k: fix firmware assert during insmod in memory segment mode

Ganesh Babu Jothiram (1):
  wifi: ath12k: Read board id to support split-PHY QCN9274

Harshitha Prem (1):
  wifi: ath12k: add support for peer meta data version

Karthikeyan Kathirvel (1):
  wifi: ath12k: subscribe required word mask from rx tlv

Karthikeyan Periyasamy (1):
  wifi: ath12k: add MAC id support in WBM error path

P Praneesh (2):
  wifi: ath12k: Add logic to write QRTR node id to scratch
  wifi: ath12k: fix PCI read and write

Raj Kumar Bhagat (4):
  wifi: ath12k: fix fetching MCBC flag for QCN9274
  wifi: ath12k: split hal_ops to support RX TLVs word mask compaction
  wifi: ath12k: remove hal_desc_sz from hw params
  wifi: ath12k: disable QMI PHY capability learn in split-phy QCN9274

Sowmiya Sree Elavalagan (1):
  wifi: ath12k: fetch correct pdev id from WMI_SERVICE_READY_EXT_EVENTID

Sriram R (1):
  wifi: ath12k: indicate NON MBSSID vdev by default during vdev start

---
v3:
- Added patch "wifi: ath12k: disable QMI PHY capability learn in
  split-phy QCN9274" to avoid firmware crash.
- Tested on WCN7850

v2:
- dropped patch [1/13] - wifi: ath12k: Update enum wmi_direct_buffer_module
  not required with FW version being used.
- defined enum wmi_vdev_mbssid_flags at proper place.
- implemented hal_ops to retrieve the corresponding compact ops.
---
 drivers/net/wireless/ath/ath12k/core.c    |  30 ++
 drivers/net/wireless/ath/ath12k/core.h    |  12 +
 drivers/net/wireless/ath/ath12k/dp.c      |  25 +-
 drivers/net/wireless/ath/ath12k/dp.h      |  17 +-
 drivers/net/wireless/ath/ath12k/dp_mon.c  |   5 +-
 drivers/net/wireless/ath/ath12k/dp_rx.c   | 158 ++++----
 drivers/net/wireless/ath/ath12k/dp_tx.c   |  20 ++
 drivers/net/wireless/ath/ath12k/fw.c      |   7 +
 drivers/net/wireless/ath/ath12k/fw.h      |   6 +
 drivers/net/wireless/ath/ath12k/hal.c     | 415 +++++++++++++++++++++-
 drivers/net/wireless/ath/ath12k/hal.h     |  20 +-
 drivers/net/wireless/ath/ath12k/hw.c      |  13 +-
 drivers/net/wireless/ath/ath12k/hw.h      |  30 +-
 drivers/net/wireless/ath/ath12k/mac.c     |  12 +-
 drivers/net/wireless/ath/ath12k/mhi.c     |  50 ++-
 drivers/net/wireless/ath/ath12k/pci.c     |  84 +++--
 drivers/net/wireless/ath/ath12k/pci.h     |   6 +-
 drivers/net/wireless/ath/ath12k/qmi.c     |   3 +
 drivers/net/wireless/ath/ath12k/qmi.h     |   1 -
 drivers/net/wireless/ath/ath12k/rx_desc.h | 116 +++++-
 drivers/net/wireless/ath/ath12k/wmi.c     |  31 +-
 drivers/net/wireless/ath/ath12k/wmi.h     |  58 ++-
 22 files changed, 949 insertions(+), 170 deletions(-)


base-commit: 17f4b952f067b1f87d14e6df4c8c216fe7a245d1
prerequisite-patch-id: 20d8782c4835d0a1e32c8cbc6ffca53a71603ed3

Comments

Jeff Johnson Jan. 30, 2024, 1:52 a.m. UTC | #1
On 1/28/2024 10:57 PM, Raj Kumar Bhagat wrote:
> QMI PHY capability learn is used to get PHY count information to
> support single/multi link operation (SLO/MLO) configuration. The
> QCN9274 dualmac firmware currently do not support SLO/MLO, if two
> PHYs are within the same chip. Due to this firmware crashes in
> split-phy QCN9274, while bringing up AP with MLO parameter enabled
> in QMI host capability request message.

Does this patch need a Fixes: tag?

> 
> The QMI PHY capability learn is not required for split-phy QCN9274,
> if SLO/MLO is not supported within the same chip. Hence, disable QMI
> PHY capability learn support in split-phy QCN9274.
> 
> 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-00188-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>
> ---
>  drivers/net/wireless/ath/ath12k/core.c | 1 +
>  drivers/net/wireless/ath/ath12k/core.h | 5 +++++
>  drivers/net/wireless/ath/ath12k/mhi.c  | 1 +
>  drivers/net/wireless/ath/ath12k/qmi.c  | 3 +++
>  4 files changed, 10 insertions(+)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
> index ca3777c684b3..0d4640ff8d6f 100644
> --- a/drivers/net/wireless/ath/ath12k/core.c
> +++ b/drivers/net/wireless/ath/ath12k/core.c
> @@ -1218,6 +1218,7 @@ struct ath12k_base *ath12k_core_alloc(struct device *dev, size_t priv_size,
>  	ab->dev = dev;
>  	ab->hif.bus = bus;
>  	ab->qmi.num_radios = U8_MAX;
> +	ab->slo_capable = true;
>  
>  	return ab;
>  
> diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
> index f0a319ea57c1..a984171e4a08 100644
> --- a/drivers/net/wireless/ath/ath12k/core.h
> +++ b/drivers/net/wireless/ath/ath12k/core.h
> @@ -842,6 +842,11 @@ struct ath12k_base {
>  
>  	const struct hal_rx_ops *hal_rx_ops;
>  
> +	/* slo_capable denotes if the single/multi link operation
> +	 * is supported within the same chip (SoC).
> +	 */
> +	bool slo_capable;
> +
>  	/* must be last */
>  	u8 drv_priv[] __aligned(sizeof(void *));
>  };
> diff --git a/drivers/net/wireless/ath/ath12k/mhi.c b/drivers/net/wireless/ath/ath12k/mhi.c
> index 50b9e44504f7..adb8c3ec1950 100644
> --- a/drivers/net/wireless/ath/ath12k/mhi.c
> +++ b/drivers/net/wireless/ath/ath12k/mhi.c
> @@ -385,6 +385,7 @@ 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->slo_capable = false;
>  			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 0f0eaadc8418..92845ffff44a 100644
> --- a/drivers/net/wireless/ath/ath12k/qmi.c
> +++ b/drivers/net/wireless/ath/ath12k/qmi.c
> @@ -2124,6 +2124,9 @@ static void ath12k_qmi_phy_cap_send(struct ath12k_base *ab)
>  	struct qmi_txn txn;
>  	int ret;
>  
> +	if (!ab->slo_capable)
> +		goto out;
> +
>  	ret = qmi_txn_init(&ab->qmi.handle, &txn,
>  			   qmi_wlanfw_phy_cap_resp_msg_v01_ei, &resp);
>  	if (ret < 0)
Raj Kumar Bhagat Jan. 30, 2024, 3:04 a.m. UTC | #2
On 1/30/2024 7:22 AM, Jeff Johnson wrote:
> On 1/28/2024 10:57 PM, Raj Kumar Bhagat wrote:
>> QMI PHY capability learn is used to get PHY count information to
>> support single/multi link operation (SLO/MLO) configuration. The
>> QCN9274 dualmac firmware currently do not support SLO/MLO, if two
>> PHYs are within the same chip. Due to this firmware crashes in
>> split-phy QCN9274, while bringing up AP with MLO parameter enabled
>> in QMI host capability request message.
> 
> Does this patch need a Fixes: tag?
> 

I do not think Fixes: tag is required, because Single-phy QCN9274 and
WCN7850 works fine. The issue is only with Split-phy QCN9274, and it not
yet part of upstream ath.git.

>>
>> The QMI PHY capability learn is not required for split-phy QCN9274,
>> if SLO/MLO is not supported within the same chip. Hence, disable QMI
>> PHY capability learn support in split-phy QCN9274.
>>
>> 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-00188-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>
>> ---
>>  drivers/net/wireless/ath/ath12k/core.c | 1 +
>>  drivers/net/wireless/ath/ath12k/core.h | 5 +++++
>>  drivers/net/wireless/ath/ath12k/mhi.c  | 1 +
>>  drivers/net/wireless/ath/ath12k/qmi.c  | 3 +++
>>  4 files changed, 10 insertions(+)
>>
>> diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
>> index ca3777c684b3..0d4640ff8d6f 100644
>> --- a/drivers/net/wireless/ath/ath12k/core.c
>> +++ b/drivers/net/wireless/ath/ath12k/core.c
>> @@ -1218,6 +1218,7 @@ struct ath12k_base *ath12k_core_alloc(struct device *dev, size_t priv_size,
>>  	ab->dev = dev;
>>  	ab->hif.bus = bus;
>>  	ab->qmi.num_radios = U8_MAX;
>> +	ab->slo_capable = true;
>>  
>>  	return ab;
>>  
>> diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
>> index f0a319ea57c1..a984171e4a08 100644
>> --- a/drivers/net/wireless/ath/ath12k/core.h
>> +++ b/drivers/net/wireless/ath/ath12k/core.h
>> @@ -842,6 +842,11 @@ struct ath12k_base {
>>  
>>  	const struct hal_rx_ops *hal_rx_ops;
>>  
>> +	/* slo_capable denotes if the single/multi link operation
>> +	 * is supported within the same chip (SoC).
>> +	 */
>> +	bool slo_capable;
>> +
>>  	/* must be last */
>>  	u8 drv_priv[] __aligned(sizeof(void *));
>>  };
>> diff --git a/drivers/net/wireless/ath/ath12k/mhi.c b/drivers/net/wireless/ath/ath12k/mhi.c
>> index 50b9e44504f7..adb8c3ec1950 100644
>> --- a/drivers/net/wireless/ath/ath12k/mhi.c
>> +++ b/drivers/net/wireless/ath/ath12k/mhi.c
>> @@ -385,6 +385,7 @@ 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->slo_capable = false;
>>  			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 0f0eaadc8418..92845ffff44a 100644
>> --- a/drivers/net/wireless/ath/ath12k/qmi.c
>> +++ b/drivers/net/wireless/ath/ath12k/qmi.c
>> @@ -2124,6 +2124,9 @@ static void ath12k_qmi_phy_cap_send(struct ath12k_base *ab)
>>  	struct qmi_txn txn;
>>  	int ret;
>>  
>> +	if (!ab->slo_capable)
>> +		goto out;
>> +
>>  	ret = qmi_txn_init(&ab->qmi.handle, &txn,
>>  			   qmi_wlanfw_phy_cap_resp_msg_v01_ei, &resp);
>>  	if (ret < 0)
>