diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2020-03-09 09:16:10 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2020-03-17 21:10:45 +0200 |
commit | 95939551e28c9bf9267d63d0ae12a019de75483f (patch) | |
tree | daab032c03994562bc7192e686b36083f2dea4fa /drivers/net/wireless/intel/iwlwifi/pcie | |
parent | d6f2134a383168bfb28ac458f7e4311e58482439 (diff) | |
download | linux-95939551e28c9bf9267d63d0ae12a019de75483f.tar.bz2 |
iwlwifi: add GNSS differentiation to the device tables
Devices that also include a GNSS module have different names, so add a
new device option to differentiate them, according to the values we
have in the modules section of the subsystem device ID.
Additionally, convert the two applicable devices to use this value
instead of hardcoded subsystem IDs.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200309091348.1f958e558d05.I45492bb57cbbeb4cc0ec84313bade4def7377a27@changeid
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/pcie')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index ef023d61ef3a..f474d1426970 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -942,20 +942,17 @@ static const struct pci_device_id iwl_hw_card_ids[] = { MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids); #define _IWL_DEV_INFO(_device, _subdevice, _mac_type, _rf_type, _no_160, \ - _cfg, _name) \ + _cores, _cfg, _name) \ { .device = (_device), .subdevice = (_subdevice), .cfg = &(_cfg), \ .name = _name, .mac_type = _mac_type, .rf_type = _rf_type, \ - .no_160 = _no_160, } + .no_160 = _no_160, .cores = _cores } #define IWL_DEV_INFO(_device, _subdevice, _cfg, _name) \ _IWL_DEV_INFO(_device, _subdevice, IWL_CFG_ANY, IWL_CFG_ANY, \ - IWL_CFG_ANY, _cfg, _name) + IWL_CFG_ANY, IWL_CFG_ANY, _cfg, _name) static const struct iwl_dev_info iwl_dev_info_table[] = { #if IS_ENABLED(CONFIG_IWLMVM) - IWL_DEV_INFO(0x2526, 0x1410, iwl9260_2ac_cfg, iwl9270_name), - IWL_DEV_INFO(0x2526, 0x1610, iwl9260_2ac_cfg, iwl9270_name), - IWL_DEV_INFO(0x2526, 0x1550, iwl9260_2ac_cfg, iwl9260_killer_1550_name), IWL_DEV_INFO(0x2526, 0x0030, iwl9560_2ac_cfg, iwl9560_160_name), @@ -991,9 +988,20 @@ static const struct iwl_dev_info iwl_dev_info_table[] = { _IWL_DEV_INFO(0x2526, IWL_CFG_ANY, IWL_CFG_MAC_TYPE_TH, IWL_CFG_RF_TYPE_TH, IWL_CFG_160, + IWL_CFG_CORES_BT_GNSS, + iwl9260_2ac_cfg, iwl9270_160_name), + _IWL_DEV_INFO(0x2526, IWL_CFG_ANY, + IWL_CFG_MAC_TYPE_TH, IWL_CFG_RF_TYPE_TH, IWL_CFG_NO_160, + IWL_CFG_CORES_BT_GNSS, + iwl9260_2ac_cfg, iwl9270_name), + + _IWL_DEV_INFO(0x2526, IWL_CFG_ANY, + IWL_CFG_MAC_TYPE_TH, IWL_CFG_RF_TYPE_TH, IWL_CFG_160, + IWL_CFG_CORES_BT, iwl9260_2ac_cfg, iwl9260_160_name), _IWL_DEV_INFO(0x2526, IWL_CFG_ANY, IWL_CFG_MAC_TYPE_TH, IWL_CFG_RF_TYPE_TH, IWL_CFG_NO_160, + IWL_CFG_CORES_BT, iwl9260_2ac_cfg, iwl9260_name), #endif /* CONFIG_IWLMVM */ }; @@ -1046,7 +1054,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id)) && (dev_info->no_160 == (u8)IWL_CFG_ANY || dev_info->no_160 == - IWL_SUBDEVICE_NO_160(pdev->subsystem_device))) { + IWL_SUBDEVICE_NO_160(pdev->subsystem_device)) && + (dev_info->cores == (u8)IWL_CFG_ANY || + dev_info->cores == + IWL_SUBDEVICE_CORES(pdev->subsystem_device))) { iwl_trans->cfg = dev_info->cfg; iwl_trans->name = dev_info->name; goto found; |