summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
diff options
context:
space:
mode:
authorGolan Ben Ami <golan.ben.ami@intel.com>2018-05-28 12:15:44 +0300
committerLuca Coelho <luciano.coelho@intel.com>2018-05-29 15:23:06 +0300
commit0513c083d1f460c30eae67867c0add557f7ca1b9 (patch)
tree1985858d884fb91264f1f04af4dc4dd95aca6b81 /drivers/net/wireless/intel/iwlwifi/pcie/drv.c
parent06895b1627fe36f0bea49d4c9fd0e27f0f7498b1 (diff)
iwlwifi: add csr configuration for 6300 devices
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>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/pcie/drv.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/drv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 959de2f8bb28..38234bda9017 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -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);