aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-drv.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-fh.h1
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c15
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/drv.c4
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/trans.c17
5 files changed, 30 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c
index 38de1513e4de..850b85a47806 100644
--- a/drivers/net/wireless/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/iwlwifi/iwl-drv.c
@@ -1323,10 +1323,10 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
1323 1323
1324 try_again: 1324 try_again:
1325 /* try next, if any */ 1325 /* try next, if any */
1326 kfree(pieces);
1327 release_firmware(ucode_raw); 1326 release_firmware(ucode_raw);
1328 if (iwl_request_firmware(drv, false)) 1327 if (iwl_request_firmware(drv, false))
1329 goto out_unbind; 1328 goto out_unbind;
1329 kfree(pieces);
1330 return; 1330 return;
1331 1331
1332 out_free_fw: 1332 out_free_fw:
diff --git a/drivers/net/wireless/iwlwifi/iwl-fh.h b/drivers/net/wireless/iwlwifi/iwl-fh.h
index 9564ae173d06..1f7f15eb86da 100644
--- a/drivers/net/wireless/iwlwifi/iwl-fh.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fh.h
@@ -310,6 +310,7 @@ static inline unsigned int FH_MEM_CBBC_QUEUE(unsigned int chnl)
310#define FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000) 310#define FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000)
311 311
312#define FH_MEM_TFDIB_REG1_ADDR_BITSHIFT 28 312#define FH_MEM_TFDIB_REG1_ADDR_BITSHIFT 28
313#define FH_MEM_TB_MAX_LENGTH (0x00020000)
313 314
314/* TFDB Area - TFDs buffer table */ 315/* TFDB Area - TFDs buffer table */
315#define FH_MEM_TFDIB_DRAM_ADDR_LSB_MSK (0xFFFFFFFF) 316#define FH_MEM_TFDIB_DRAM_ADDR_LSB_MSK (0xFFFFFFFF)
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 31a5b3f4266c..e880f9d4717b 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -1004,8 +1004,13 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
1004{ 1004{
1005 lockdep_assert_held(&mvm->mutex); 1005 lockdep_assert_held(&mvm->mutex);
1006 1006
1007 /* disallow low power states when the FW is down */ 1007 /*
1008 iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); 1008 * Disallow low power states when the FW is down by taking
1009 * the UCODE_DOWN ref. in case of ongoing hw restart the
1010 * ref is already taken, so don't take it again.
1011 */
1012 if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status))
1013 iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
1009 1014
1010 /* async_handlers_wk is now blocked */ 1015 /* async_handlers_wk is now blocked */
1011 1016
@@ -1023,6 +1028,12 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
1023 /* the fw is stopped, the aux sta is dead: clean up driver state */ 1028 /* the fw is stopped, the aux sta is dead: clean up driver state */
1024 iwl_mvm_del_aux_sta(mvm); 1029 iwl_mvm_del_aux_sta(mvm);
1025 1030
1031 /*
1032 * Clear IN_HW_RESTART flag when stopping the hw (as restart_complete()
1033 * won't be called in this case).
1034 */
1035 clear_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status);
1036
1026 mvm->ucode_loaded = false; 1037 mvm->ucode_loaded = false;
1027} 1038}
1028 1039
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c
index 3ee8e3848876..2f0c4b170344 100644
--- a/drivers/net/wireless/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/iwlwifi/pcie/drv.c
@@ -367,7 +367,11 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
367 367
368/* 3165 Series */ 368/* 3165 Series */
369 {IWL_PCI_DEVICE(0x3165, 0x4010, iwl3165_2ac_cfg)}, 369 {IWL_PCI_DEVICE(0x3165, 0x4010, iwl3165_2ac_cfg)},
370 {IWL_PCI_DEVICE(0x3165, 0x4012, iwl3165_2ac_cfg)},
371 {IWL_PCI_DEVICE(0x3165, 0x4110, iwl3165_2ac_cfg)},
370 {IWL_PCI_DEVICE(0x3165, 0x4210, iwl3165_2ac_cfg)}, 372 {IWL_PCI_DEVICE(0x3165, 0x4210, iwl3165_2ac_cfg)},
373 {IWL_PCI_DEVICE(0x3165, 0x4410, iwl3165_2ac_cfg)},
374 {IWL_PCI_DEVICE(0x3165, 0x4510, iwl3165_2ac_cfg)},
371 375
372/* 7265 Series */ 376/* 7265 Series */
373 {IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)}, 377 {IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)},
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index 5d79a1f44b8e..523fe0c88dcb 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -614,7 +614,7 @@ static int iwl_pcie_load_section(struct iwl_trans *trans, u8 section_num,
614{ 614{
615 u8 *v_addr; 615 u8 *v_addr;
616 dma_addr_t p_addr; 616 dma_addr_t p_addr;
617 u32 offset, chunk_sz = section->len; 617 u32 offset, chunk_sz = min_t(u32, FH_MEM_TB_MAX_LENGTH, section->len);
618 int ret = 0; 618 int ret = 0;
619 619
620 IWL_DEBUG_FW(trans, "[%d] uCode section being loaded...\n", 620 IWL_DEBUG_FW(trans, "[%d] uCode section being loaded...\n",
@@ -1012,16 +1012,21 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
1012 /* Stop the device, and put it in low power state */ 1012 /* Stop the device, and put it in low power state */
1013 iwl_pcie_apm_stop(trans); 1013 iwl_pcie_apm_stop(trans);
1014 1014
1015 /* Upon stop, the APM issues an interrupt if HW RF kill is set. 1015 /* stop and reset the on-board processor */
1016 * Clean again the interrupt here 1016 iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);
1017 udelay(20);
1018
1019 /*
1020 * Upon stop, the APM issues an interrupt if HW RF kill is set.
1021 * This is a bug in certain verions of the hardware.
1022 * Certain devices also keep sending HW RF kill interrupt all
1023 * the time, unless the interrupt is ACKed even if the interrupt
1024 * should be masked. Re-ACK all the interrupts here.
1017 */ 1025 */
1018 spin_lock(&trans_pcie->irq_lock); 1026 spin_lock(&trans_pcie->irq_lock);
1019 iwl_disable_interrupts(trans); 1027 iwl_disable_interrupts(trans);
1020 spin_unlock(&trans_pcie->irq_lock); 1028 spin_unlock(&trans_pcie->irq_lock);
1021 1029
1022 /* stop and reset the on-board processor */
1023 iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);
1024 udelay(20);
1025 1030
1026 /* clear all status bits */ 1031 /* clear all status bits */
1027 clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status); 1032 clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status);