Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1402547rwb; Thu, 19 Jan 2023 10:06:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXvEVgW5s274tYPvKaP8gHOix66pm/gnMIbDdtGSzhX1kKZaTStO9tqVLW0X3xxqM43qTrL+ X-Received: by 2002:a17:906:7156:b0:86d:f880:5195 with SMTP id z22-20020a170906715600b0086df8805195mr12064867ejj.56.1674151612319; Thu, 19 Jan 2023 10:06:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674151612; cv=none; d=google.com; s=arc-20160816; b=d7GYa+CRiJ+Xq8up3skJwwqboGw2XGmlQcNolBjLQ7Q9akWkTPwcCDP6WtGkjN12kB y8PvAbuODVJk5dSCt0CVNbOvz11480jLzX3e7/9H8Gdw/ZxGB1McORCQPUV8QerICi5X WhvgAzrMZ8AjeQgVARacQOhOUSvsbvGIlkD4hLxUIQ+ZwvsXE63pKZ9bdUuNBGHLtgqg QeF1i7dTOKfNDHA+Yv7ijjAW4k5ImzZcPntfmbP1firW9KcClEAehEEvar3lpFsOKLV7 y9+yQsOy6UMn5KWlG2/QGAgpeOSfY6Nn1Zb+QA8LN98PBa+uYZbJaPR69Wq8/AGqimDc Fk6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Zcy0Q2K9z9TwEVOqC45qt2BIENPjFYTmHffDggqT874=; b=m39HAwd1TU4b+1A2o+bUgr7f48LiWMP25omC8fB9tbuCrXI9MfMbpBiZOBpUpzQHBz kZc8F2tsOg6wXt7mJMrS1daspUbrzLi6Ozi47PZ9nki0PDjrMMzcQms6XveP4Qh4/oDX J9d+txTc9VlOglNBY2bnNWgCgE+E4Low1CdmonU78htQ8NmLMAhcdMUl7lcOgIv8xRPg R/8id6LufRXk1gNyCo3kBzgU3dwxBmOT/ObXhEDDWhLLSmlze/Y7+fULQC0mmRJu7KMZ fqkeI/P7A7kei/kTIlZn9sSHgIxYdo+AEfE6BY6oLP23cVYzJThsh9c/VVjM+nuaZEND CKEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw16-20020a170906479000b00876a2339b76si7245363ejc.400.2023.01.19.10.06.33; Thu, 19 Jan 2023 10:06:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230288AbjASR5S (ORCPT + 63 others); 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 && -- 2.39.0