diff options
author | Kalle Valo <kvalo@codeaurora.org> | 2016-04-21 08:40:13 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-04-21 08:40:13 -0400 |
commit | e2841ea91611622370f66b4dfaa62599e8850d48 (patch) | |
tree | d448a05e604ebed6919a536fe1eda8b73d8e3080 | |
parent | de478a61389cacafe94dc8b035081b681b878f9d (diff) | |
parent | f742aaf36edf0390c54d0614bc4d20fd4cd3762a (diff) |
Merge tag 'iwlwifi-for-kalle-2016-04-12_2' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
* add new device IDs for 8265
* fix a NULL pointer dereference when paging firmware asserts
* remove a WARNING on gscan capabilities
* fix MODULE_FIRMWARE for 8260
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 26 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 10 |
5 files changed, 27 insertions, 19 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c index 97be104d1203..b5c57eebf995 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c | |||
@@ -93,7 +93,7 @@ | |||
93 | #define IWL8260_SMEM_OFFSET 0x400000 | 93 | #define IWL8260_SMEM_OFFSET 0x400000 |
94 | #define IWL8260_SMEM_LEN 0x68000 | 94 | #define IWL8260_SMEM_LEN 0x68000 |
95 | 95 | ||
96 | #define IWL8000_FW_PRE "iwlwifi-8000" | 96 | #define IWL8000_FW_PRE "iwlwifi-8000C-" |
97 | #define IWL8000_MODULE_FIRMWARE(api) \ | 97 | #define IWL8000_MODULE_FIRMWARE(api) \ |
98 | IWL8000_FW_PRE "-" __stringify(api) ".ucode" | 98 | IWL8000_FW_PRE "-" __stringify(api) ".ucode" |
99 | 99 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index f899666acb41..9e45bf9c6071 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c | |||
@@ -238,19 +238,6 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first) | |||
238 | snprintf(drv->firmware_name, sizeof(drv->firmware_name), "%s%s.ucode", | 238 | snprintf(drv->firmware_name, sizeof(drv->firmware_name), "%s%s.ucode", |
239 | name_pre, tag); | 239 | name_pre, tag); |
240 | 240 | ||
241 | /* | ||
242 | * Starting 8000B - FW name format has changed. This overwrites the | ||
243 | * previous name and uses the new format. | ||
244 | */ | ||
245 | if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) { | ||
246 | char rev_step = 'A' + CSR_HW_REV_STEP(drv->trans->hw_rev); | ||
247 | |||
248 | if (rev_step != 'A') | ||
249 | snprintf(drv->firmware_name, | ||
250 | sizeof(drv->firmware_name), "%s%c-%s.ucode", | ||
251 | name_pre, rev_step, tag); | ||
252 | } | ||
253 | |||
254 | IWL_DEBUG_INFO(drv, "attempting to load firmware %s'%s'\n", | 241 | IWL_DEBUG_INFO(drv, "attempting to load firmware %s'%s'\n", |
255 | (drv->fw_index == UCODE_EXPERIMENTAL_INDEX) | 242 | (drv->fw_index == UCODE_EXPERIMENTAL_INDEX) |
256 | ? "EXPERIMENTAL " : "", | 243 | ? "EXPERIMENTAL " : "", |
@@ -1060,11 +1047,18 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, | |||
1060 | return -EINVAL; | 1047 | return -EINVAL; |
1061 | } | 1048 | } |
1062 | 1049 | ||
1063 | if (WARN(fw_has_capa(capa, IWL_UCODE_TLV_CAPA_GSCAN_SUPPORT) && | 1050 | /* |
1064 | !gscan_capa, | 1051 | * If ucode advertises that it supports GSCAN but GSCAN |
1065 | "GSCAN is supported but capabilities TLV is unavailable\n")) | 1052 | * capabilities TLV is not present, or if it has an old format, |
1053 | * warn and continue without GSCAN. | ||
1054 | */ | ||
1055 | if (fw_has_capa(capa, IWL_UCODE_TLV_CAPA_GSCAN_SUPPORT) && | ||
1056 | !gscan_capa) { | ||
1057 | IWL_DEBUG_INFO(drv, | ||
1058 | "GSCAN is supported but capabilities TLV is unavailable\n"); | ||
1066 | __clear_bit((__force long)IWL_UCODE_TLV_CAPA_GSCAN_SUPPORT, | 1059 | __clear_bit((__force long)IWL_UCODE_TLV_CAPA_GSCAN_SUPPORT, |
1067 | capa->_capa); | 1060 | capa->_capa); |
1061 | } | ||
1068 | 1062 | ||
1069 | return 0; | 1063 | return 0; |
1070 | 1064 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c index 4856eac120f6..6938cd37be57 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | |||
@@ -526,7 +526,8 @@ void iwl_mvm_fw_error_dump(struct iwl_mvm *mvm) | |||
526 | file_len += sizeof(*dump_data) + sizeof(*dump_mem) + sram2_len; | 526 | file_len += sizeof(*dump_data) + sizeof(*dump_mem) + sram2_len; |
527 | 527 | ||
528 | /* Make room for fw's virtual image pages, if it exists */ | 528 | /* Make room for fw's virtual image pages, if it exists */ |
529 | if (mvm->fw->img[mvm->cur_ucode].paging_mem_size) | 529 | if (mvm->fw->img[mvm->cur_ucode].paging_mem_size && |
530 | mvm->fw_paging_db[0].fw_paging_block) | ||
530 | file_len += mvm->num_of_paging_blk * | 531 | file_len += mvm->num_of_paging_blk * |
531 | (sizeof(*dump_data) + | 532 | (sizeof(*dump_data) + |
532 | sizeof(struct iwl_fw_error_dump_paging) + | 533 | sizeof(struct iwl_fw_error_dump_paging) + |
@@ -643,7 +644,8 @@ void iwl_mvm_fw_error_dump(struct iwl_mvm *mvm) | |||
643 | } | 644 | } |
644 | 645 | ||
645 | /* Dump fw's virtual image */ | 646 | /* Dump fw's virtual image */ |
646 | if (mvm->fw->img[mvm->cur_ucode].paging_mem_size) { | 647 | if (mvm->fw->img[mvm->cur_ucode].paging_mem_size && |
648 | mvm->fw_paging_db[0].fw_paging_block) { | ||
647 | for (i = 1; i < mvm->num_of_paging_blk + 1; i++) { | 649 | for (i = 1; i < mvm->num_of_paging_blk + 1; i++) { |
648 | struct iwl_fw_error_dump_paging *paging; | 650 | struct iwl_fw_error_dump_paging *paging; |
649 | struct page *pages = | 651 | struct page *pages = |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 594cd0dc7df9..09d895fafaf2 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c | |||
@@ -144,9 +144,11 @@ void iwl_free_fw_paging(struct iwl_mvm *mvm) | |||
144 | 144 | ||
145 | __free_pages(mvm->fw_paging_db[i].fw_paging_block, | 145 | __free_pages(mvm->fw_paging_db[i].fw_paging_block, |
146 | get_order(mvm->fw_paging_db[i].fw_paging_size)); | 146 | get_order(mvm->fw_paging_db[i].fw_paging_size)); |
147 | mvm->fw_paging_db[i].fw_paging_block = NULL; | ||
147 | } | 148 | } |
148 | kfree(mvm->trans->paging_download_buf); | 149 | kfree(mvm->trans->paging_download_buf); |
149 | mvm->trans->paging_download_buf = NULL; | 150 | mvm->trans->paging_download_buf = NULL; |
151 | mvm->trans->paging_db = NULL; | ||
150 | 152 | ||
151 | memset(mvm->fw_paging_db, 0, sizeof(mvm->fw_paging_db)); | 153 | memset(mvm->fw_paging_db, 0, sizeof(mvm->fw_paging_db)); |
152 | } | 154 | } |
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 05b968506836..79d7cd7d461e 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c | |||
@@ -479,8 +479,18 @@ static const struct pci_device_id iwl_hw_card_ids[] = { | |||
479 | {IWL_PCI_DEVICE(0x24F3, 0x0930, iwl8260_2ac_cfg)}, | 479 | {IWL_PCI_DEVICE(0x24F3, 0x0930, iwl8260_2ac_cfg)}, |
480 | {IWL_PCI_DEVICE(0x24F3, 0x0000, iwl8265_2ac_cfg)}, | 480 | {IWL_PCI_DEVICE(0x24F3, 0x0000, iwl8265_2ac_cfg)}, |
481 | {IWL_PCI_DEVICE(0x24FD, 0x0010, iwl8265_2ac_cfg)}, | 481 | {IWL_PCI_DEVICE(0x24FD, 0x0010, iwl8265_2ac_cfg)}, |
482 | {IWL_PCI_DEVICE(0x24FD, 0x0110, iwl8265_2ac_cfg)}, | ||
483 | {IWL_PCI_DEVICE(0x24FD, 0x1110, iwl8265_2ac_cfg)}, | ||
484 | {IWL_PCI_DEVICE(0x24FD, 0x1010, iwl8265_2ac_cfg)}, | ||
485 | {IWL_PCI_DEVICE(0x24FD, 0x0050, iwl8265_2ac_cfg)}, | ||
486 | {IWL_PCI_DEVICE(0x24FD, 0x0150, iwl8265_2ac_cfg)}, | ||
487 | {IWL_PCI_DEVICE(0x24FD, 0x9010, iwl8265_2ac_cfg)}, | ||
488 | {IWL_PCI_DEVICE(0x24FD, 0x8110, iwl8265_2ac_cfg)}, | ||
489 | {IWL_PCI_DEVICE(0x24FD, 0x8050, iwl8265_2ac_cfg)}, | ||
482 | {IWL_PCI_DEVICE(0x24FD, 0x8010, iwl8265_2ac_cfg)}, | 490 | {IWL_PCI_DEVICE(0x24FD, 0x8010, iwl8265_2ac_cfg)}, |
483 | {IWL_PCI_DEVICE(0x24FD, 0x0810, iwl8265_2ac_cfg)}, | 491 | {IWL_PCI_DEVICE(0x24FD, 0x0810, iwl8265_2ac_cfg)}, |
492 | {IWL_PCI_DEVICE(0x24FD, 0x9110, iwl8265_2ac_cfg)}, | ||
493 | {IWL_PCI_DEVICE(0x24FD, 0x8130, iwl8265_2ac_cfg)}, | ||
484 | 494 | ||
485 | /* 9000 Series */ | 495 | /* 9000 Series */ |
486 | {IWL_PCI_DEVICE(0x9DF0, 0x2A10, iwl5165_2ac_cfg)}, | 496 | {IWL_PCI_DEVICE(0x9DF0, 0x2A10, iwl5165_2ac_cfg)}, |