From patchwork Tue Mar 22 15:39:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Coelho X-Patchwork-Id: 12788715 X-Patchwork-Delegate: miriam.rachel.korenblit@intel.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 701D6C433F5 for ; Tue, 22 Mar 2022 15:39:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235948AbiCVPlY (ORCPT ); Tue, 22 Mar 2022 11:41:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232168AbiCVPlX (ORCPT ); Tue, 22 Mar 2022 11:41:23 -0400 Received: from farmhouse.coelho.fi (paleale.coelho.fi [176.9.41.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95AB466CA3 for ; Tue, 22 Mar 2022 08:39:55 -0700 (PDT) Received: from 91-156-4-241.elisa-laajakaista.fi ([91.156.4.241] helo=kveik.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1nWgbo-000d7v-AZ; Tue, 22 Mar 2022 17:39:45 +0200 From: Luca Coelho To: kvalo@kernel.org Cc: johannes@sipsolutions.net, socketcan@hartkopp.net, kuba@kernel.org, luca@coelho.fi, linux-wireless@vger.kernel.org Date: Tue, 22 Mar 2022 17:39:43 +0200 Message-Id: X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [PATCH] iwlwifi: mvm: Don't fail if PPAG isn't supported Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Miri Korenblit 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 Signed-off-by: Miri Korenblit Signed-off-by: Luca Coelho Acked-by: Kalle Valo --- 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,