wifi: ath12k: add keep backward compatibility of PHY mode to avoid firmware crash
authorWen Gong <quic_wgong@quicinc.com>
Sat, 30 Sep 2023 04:54:52 +0000 (07:54 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Mon, 2 Oct 2023 16:53:36 +0000 (19:53 +0300)
commit972754bfeec489fc03eec3df512be11dff457a65
treecda7722b58b59b300fe11241aaeb846222ebfa71
parent7d9832e3b5385b3a02867e563ea1b1c0a7407100
wifi: ath12k: add keep backward compatibility of PHY mode to avoid firmware crash

In a special WCN7855 firmware release the EHT (IEEE 802.11be) support has
been disabled for size reduction. Currently ath12k always enables EHT PHY
mode during vdev start but with the special firmware that will cause a
firmware crash during vdev start in firmware initialisation. This is
because the firmware will use the EHT mode to allocate resources but as
the EHT mode is not available in the firmware, there's an internal
conflict and the firmware will crash.

To fix the crash check the WMI_TLV_SERVICE_11BE flag to see if the firmware
supports EHT. If EHT is not supported downgrade the PHY mode to HE
(IEEE 802.11ax).

This does not impact QCN9274, because WMI_SERVICE_11BE is always enabled
for QCN9274, then eht_cap->has_eht will always set for it, and the logic
of this patch will not take effect and the PHY mode will not down grade
for it.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230913105757.17744-1-quic_wgong@quicinc.com
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath12k/wmi.h