[J] [PATCH 2/2] wifi: iwlwifi: fw: skip PPAG for JF

Kai-Heng Feng kai.heng.feng at canonical.com
Wed Oct 11 06:09:29 UTC 2023


From: Johannes Berg <johannes.berg at intel.com>

BugLink: https://bugs.launchpad.net/bugs/2037513

For JF RFs we don't support PPAG, but many firmware
images lie about it. Always skip support for JF to
avoid firmware errors when sending the command.

Reported-and-tested-by: Íñigo Huguet <ihuguet at redhat.com>
Link: https://lore.kernel.org/linux-wireless/CACT4oufQsqHGp6bah2c4+jPn2wG1oZqY=UKa_TmPx=F6Lxng8Q@mail.gmail.com
Signed-off-by: Johannes Berg <johannes.berg at intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman at intel.com>
Signed-off-by: Kalle Valo <kvalo at kernel.org>
Link: https://lore.kernel.org/r/20221213225723.2a43415d8990.I9ac210740a45b41f1b2e15274e1daf4284f2808a@changeid
(backported from commit 1c4c0b28b517d778d37900deedfe91088839f07a)
[khfeng: Move the changeset to before the code gets refactored]
Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 175e492aa6e9..a7d4c67009c2 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -972,6 +972,11 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
 	int i, j, ret, num_sub_bands, cmd_size;
 	s8 *gain;
 
+	/* many firmware images for JF lie about this */
+	if (CSR_HW_RFID_TYPE(mvm->trans->hw_rf_id) ==
+	    CSR_HW_RFID_TYPE(CSR_HW_RF_ID_TYPE_JF))
+		return 0;
+
 	if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_SET_PPAG)) {
 		IWL_DEBUG_RADIO(mvm,
 				"PPAG capability not supported by FW, command not sent.\n");
-- 
2.34.1




More information about the kernel-team mailing list