All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: mvm: Don't fail if PPAG isn't supported
@ 2022-03-22 15:39 Luca Coelho
  2022-03-22 15:43 ` Luca Coelho
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Coelho @ 2022-03-22 15:39 UTC (permalink / raw)
  To: kvalo; +Cc: johannes, socketcan, kuba, luca, linux-wireless

From: Miri Korenblit <miriam.rachel.korenblit@intel.com>

When we're copying the PPAG table into the cmd structure we're failing
if the table doesn't exist in ACPI or is invalid, or if the FW doesn't
support PPAG setting etc.

This is wrong because those are valid scenarios.  Fix this by not
failing in those cases.

Fixes: e8e10a37c51c ("iwlwifi: acpi: move ppag code from mvm to fw/acpi")
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 4632d3ad1a2b..e842816134f1 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1015,8 +1015,9 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
 	int ret, cmd_size;
 
 	ret = iwl_read_ppag_table(&mvm->fwrt, &cmd, &cmd_size);
+	/* Not supporting PPAG table is a valid scenario */
 	if(ret < 0)
-		return ret;
+		return 0;
 
 	IWL_DEBUG_RADIO(mvm, "Sending PER_PLATFORM_ANT_GAIN_CMD\n");
 	ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(PHY_OPS_GROUP,
-- 
2.35.1


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

end of thread, other threads:[~2022-03-22 23:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22 15:39 [PATCH] iwlwifi: mvm: Don't fail if PPAG isn't supported Luca Coelho
2022-03-22 15:43 ` Luca Coelho
2022-03-22 19:36   ` Kalle Valo
2022-03-22 23:20     ` Jakub Kicinski

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.