From patchwork Thu Jan 19 17:56:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aiden Leong X-Patchwork-Id: 645044 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 E9599C38142 for ; Thu, 19 Jan 2023 17:57:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230288AbjASR5S (ORCPT ); Thu, 19 Jan 2023 12:57:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229831AbjASR5S (ORCPT ); Thu, 19 Jan 2023 12:57:18 -0500 Received: from out28-88.mail.aliyun.com (out28-88.mail.aliyun.com [115.124.28.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 058BE7D672 for ; Thu, 19 Jan 2023 09:57:15 -0800 (PST) X-Alimail-AntiSpam: AC=CONTINUE; BC=0.4812456|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.040544-0.0108522-0.948604; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047192; MF=aiden.leong@aibsd.com; NM=1; PH=DS; RN=8; RT=8; SR=0; TI=SMTPD_---.QxSYpMI_1674151031; Received: from localhost.localdomain(mailfrom:aiden.leong@aibsd.com fp:SMTPD_---.QxSYpMI_1674151031) by smtp.aliyun-inc.com; Fri, 20 Jan 2023 01:57:12 +0800 From: Aiden Leong To: linux-wireless@vger.kernel.org Cc: gregory.greenman@intel.com, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, Aiden Leong Subject: [PATCH v3] wifi: iwlwifi: pcie: fix the order of scanning iwl_dev_info_table Date: Fri, 20 Jan 2023 01:56:57 +0800 Message-Id: <20230119175657.9205-1-aiden.leong@aibsd.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fix a bug introduced by: commit 32ed101aa140 ("iwlwifi: convert all Qu with Jf devices to the new config table"), so now we pick the FIRST matching config. Signed-off-by: Aiden Leong --- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 99768d6a6032..05764eef15a7 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -1456,7 +1456,7 @@ iwl_pci_find_dev_info(u16 device, u16 subsystem_device, if (!num_devices) return NULL; - for (i = num_devices - 1; i >= 0; i--) { + for (i = 0; i < num_devices; i++) { const struct iwl_dev_info *dev_info = &iwl_dev_info_table[i]; if (dev_info->device != (u16)IWL_CFG_ANY &&