]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlwifi: add csr configuration for 6300 devices
authorGolan Ben Ami <golan.ben.ami@intel.com>
Mon, 28 May 2018 09:15:44 +0000 (12:15 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 29 May 2018 12:23:06 +0000 (15:23 +0300)
Recently we have switched the csr addresses and values configuration
from a single configuration to all devices to a per-device configuration.
Doing that, the configuration for 6300 devices wasn't set.
This missing definition introduced a kernel panic once trying to access
the csr's.

Add the missing 6300 csr configuration.

While at it, add a checker that the csr values were indeed
configured, and bail out more gracefully if not.

Fixes: a8cbb46f831d ("iwlwifi: allow different csr flags for different device families")
Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/cfg/6000.c
drivers/net/wireless/intel/iwlwifi/pcie/drv.c

index 51cec0bb75fc760c82bb427026ef535bcba77126..dbcec7ce7863074f8cd2ca76df9dde4a67a7cc7b 100644 (file)
@@ -373,6 +373,7 @@ const struct iwl_cfg iwl6000_3agn_cfg = {
        .eeprom_params = &iwl6000_eeprom_params,
        .ht_params = &iwl6000_ht_params,
        .led_mode = IWL_LED_BLINK,
+       .csr = &iwl_csr_v1,
 };
 
 MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
index 959de2f8bb28b61a130d70b70e4139fca4c5bac5..38234bda901783c8fe533cb21f862f800910f53a 100644 (file)
@@ -836,6 +836,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        struct iwl_trans *iwl_trans;
        int ret;
 
+       if (WARN_ONCE(!cfg->csr, "CSR addresses aren't configured\n"))
+               return -EINVAL;
+
        iwl_trans = iwl_trans_pcie_alloc(pdev, ent, cfg);
        if (IS_ERR(iwl_trans))
                return PTR_ERR(iwl_trans);