]> git.baikalelectronics.ru Git - kernel.git/commitdiff
iwlwifi: assign directly to iwl_trans->cfg in QuZ detection
authorLuca Coelho <luciano.coelho@intel.com>
Thu, 29 Aug 2019 08:13:46 +0000 (11:13 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 3 Sep 2019 13:50:59 +0000 (16:50 +0300)
We were erroneously assigning the new configuration to a local
variable cfg, but that was not being assigned to anything, so the
change was getting lost.  Assign directly to iwl_trans->cfg instead.

Fixes: 5a8c31aa6357 ("iwlwifi: pcie: fix recognition of QuZ devices")
Cc: stable@vger.kernel.org # 5.2
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/intel/iwlwifi/pcie/drv.c

index d9ed53b7c768d631cb67c519f4c898a0e9152e70..3b12e7ad35e1dd06b36c6a5ff9c8b20fba5bfbc8 100644 (file)
@@ -1070,18 +1070,18 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        /* same thing for QuZ... */
        if (iwl_trans->hw_rev == CSR_HW_REV_TYPE_QUZ) {
-               if (cfg == &iwl_ax101_cfg_qu_hr)
-                       cfg = &iwl_ax101_cfg_quz_hr;
-               else if (cfg == &iwl_ax201_cfg_qu_hr)
-                       cfg = &iwl_ax201_cfg_quz_hr;
-               else if (cfg == &iwl9461_2ac_cfg_qu_b0_jf_b0)
-                       cfg = &iwl9461_2ac_cfg_quz_a0_jf_b0_soc;
-               else if (cfg == &iwl9462_2ac_cfg_qu_b0_jf_b0)
-                       cfg = &iwl9462_2ac_cfg_quz_a0_jf_b0_soc;
-               else if (cfg == &iwl9560_2ac_cfg_qu_b0_jf_b0)
-                       cfg = &iwl9560_2ac_cfg_quz_a0_jf_b0_soc;
-               else if (cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0)
-                       cfg = &iwl9560_2ac_160_cfg_quz_a0_jf_b0_soc;
+               if (iwl_trans->cfg == &iwl_ax101_cfg_qu_hr)
+                       iwl_trans->cfg = &iwl_ax101_cfg_quz_hr;
+               else if (iwl_trans->cfg == &iwl_ax201_cfg_qu_hr)
+                       iwl_trans->cfg = &iwl_ax201_cfg_quz_hr;
+               else if (iwl_trans->cfg == &iwl9461_2ac_cfg_qu_b0_jf_b0)
+                       iwl_trans->cfg = &iwl9461_2ac_cfg_quz_a0_jf_b0_soc;
+               else if (iwl_trans->cfg == &iwl9462_2ac_cfg_qu_b0_jf_b0)
+                       iwl_trans->cfg = &iwl9462_2ac_cfg_quz_a0_jf_b0_soc;
+               else if (iwl_trans->cfg == &iwl9560_2ac_cfg_qu_b0_jf_b0)
+                       iwl_trans->cfg = &iwl9560_2ac_cfg_quz_a0_jf_b0_soc;
+               else if (iwl_trans->cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0)
+                       iwl_trans->cfg = &iwl9560_2ac_160_cfg_quz_a0_jf_b0_soc;
        }
 
 #endif