diff options
author | Kalle Valo <kvalo@codeaurora.org> | 2017-12-02 08:01:45 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-12-02 08:01:45 -0500 |
commit | e4875470a79090eb941052ba6ec0dd34b98cf261 (patch) | |
tree | 022e34e947832f9da429bf83a3f913e0b0301037 | |
parent | f859b4af1c52493ec21173ccc73d0b60029b5b88 (diff) | |
parent | 0232d2cd7aa8e1b810fe84fb4059a0bd1eabe2ba (diff) |
Merge tag 'iwlwifi-for-kalle-2017-11-28' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
Second batch of fixes intended for 4.15.
* One fix in rate-scaling;
* One fix for the TX queue hang detection for AP/GO modes;
* Fix the TX queue hang timeout used in monitor interfaces;
* Fix packet injection;
* Remove a wrong error message when dumping PCI registers;
* Fix race condition with RF-kill;
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/api/txq.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 53 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 10 |
11 files changed, 80 insertions, 19 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h b/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h index 87b4434224a1..dfa111bb411e 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h | |||
@@ -68,6 +68,9 @@ | |||
68 | * @IWL_MVM_DQA_CMD_QUEUE: a queue reserved for sending HCMDs to the FW | 68 | * @IWL_MVM_DQA_CMD_QUEUE: a queue reserved for sending HCMDs to the FW |
69 | * @IWL_MVM_DQA_AUX_QUEUE: a queue reserved for aux frames | 69 | * @IWL_MVM_DQA_AUX_QUEUE: a queue reserved for aux frames |
70 | * @IWL_MVM_DQA_P2P_DEVICE_QUEUE: a queue reserved for P2P device frames | 70 | * @IWL_MVM_DQA_P2P_DEVICE_QUEUE: a queue reserved for P2P device frames |
71 | * @IWL_MVM_DQA_INJECT_MONITOR_QUEUE: a queue reserved for injection using | ||
72 | * monitor mode. Note this queue is the same as the queue for P2P device | ||
73 | * but we can't have active monitor mode along with P2P device anyway. | ||
71 | * @IWL_MVM_DQA_GCAST_QUEUE: a queue reserved for P2P GO/SoftAP GCAST frames | 74 | * @IWL_MVM_DQA_GCAST_QUEUE: a queue reserved for P2P GO/SoftAP GCAST frames |
72 | * @IWL_MVM_DQA_BSS_CLIENT_QUEUE: a queue reserved for BSS activity, to ensure | 75 | * @IWL_MVM_DQA_BSS_CLIENT_QUEUE: a queue reserved for BSS activity, to ensure |
73 | * that we are never left without the possibility to connect to an AP. | 76 | * that we are never left without the possibility to connect to an AP. |
@@ -87,6 +90,7 @@ enum iwl_mvm_dqa_txq { | |||
87 | IWL_MVM_DQA_CMD_QUEUE = 0, | 90 | IWL_MVM_DQA_CMD_QUEUE = 0, |
88 | IWL_MVM_DQA_AUX_QUEUE = 1, | 91 | IWL_MVM_DQA_AUX_QUEUE = 1, |
89 | IWL_MVM_DQA_P2P_DEVICE_QUEUE = 2, | 92 | IWL_MVM_DQA_P2P_DEVICE_QUEUE = 2, |
93 | IWL_MVM_DQA_INJECT_MONITOR_QUEUE = 2, | ||
90 | IWL_MVM_DQA_GCAST_QUEUE = 3, | 94 | IWL_MVM_DQA_GCAST_QUEUE = 3, |
91 | IWL_MVM_DQA_BSS_CLIENT_QUEUE = 4, | 95 | IWL_MVM_DQA_BSS_CLIENT_QUEUE = 4, |
92 | IWL_MVM_DQA_MIN_MGMT_QUEUE = 5, | 96 | IWL_MVM_DQA_MIN_MGMT_QUEUE = 5, |
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h index 9c889a32fe24..223fb77a3aa9 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h | |||
@@ -209,8 +209,6 @@ static inline void iwl_fw_dbg_stop_recording(struct iwl_fw_runtime *fwrt) | |||
209 | 209 | ||
210 | static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt) | 210 | static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt) |
211 | { | 211 | { |
212 | iwl_fw_dbg_stop_recording(fwrt); | ||
213 | |||
214 | fwrt->dump.conf = FW_DBG_INVALID; | 212 | fwrt->dump.conf = FW_DBG_INVALID; |
215 | } | 213 | } |
216 | 214 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c index a2bf530eeae4..2f22e14e00fe 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | |||
@@ -787,7 +787,7 @@ static int iwl_mvm_mac_ctxt_cmd_listener(struct iwl_mvm *mvm, | |||
787 | u32 action) | 787 | u32 action) |
788 | { | 788 | { |
789 | struct iwl_mac_ctx_cmd cmd = {}; | 789 | struct iwl_mac_ctx_cmd cmd = {}; |
790 | u32 tfd_queue_msk = 0; | 790 | u32 tfd_queue_msk = BIT(mvm->snif_queue); |
791 | int ret; | 791 | int ret; |
792 | 792 | ||
793 | WARN_ON(vif->type != NL80211_IFTYPE_MONITOR); | 793 | WARN_ON(vif->type != NL80211_IFTYPE_MONITOR); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 4575595ab022..6a9a25beab3f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |||
@@ -972,6 +972,7 @@ struct iwl_mvm { | |||
972 | 972 | ||
973 | /* Tx queues */ | 973 | /* Tx queues */ |
974 | u16 aux_queue; | 974 | u16 aux_queue; |
975 | u16 snif_queue; | ||
975 | u16 probe_queue; | 976 | u16 probe_queue; |
976 | u16 p2p_dev_queue; | 977 | u16 p2p_dev_queue; |
977 | 978 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 7078b7e458be..45470b6b351a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
@@ -624,6 +624,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
624 | mvm->fw_restart = iwlwifi_mod_params.fw_restart ? -1 : 0; | 624 | mvm->fw_restart = iwlwifi_mod_params.fw_restart ? -1 : 0; |
625 | 625 | ||
626 | mvm->aux_queue = IWL_MVM_DQA_AUX_QUEUE; | 626 | mvm->aux_queue = IWL_MVM_DQA_AUX_QUEUE; |
627 | mvm->snif_queue = IWL_MVM_DQA_INJECT_MONITOR_QUEUE; | ||
627 | mvm->probe_queue = IWL_MVM_DQA_AP_PROBE_RESP_QUEUE; | 628 | mvm->probe_queue = IWL_MVM_DQA_AP_PROBE_RESP_QUEUE; |
628 | mvm->p2p_dev_queue = IWL_MVM_DQA_P2P_DEVICE_QUEUE; | 629 | mvm->p2p_dev_queue = IWL_MVM_DQA_P2P_DEVICE_QUEUE; |
629 | 630 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 76dc58381e1c..20fe23fbf040 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |||
@@ -213,6 +213,7 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, | |||
213 | struct ieee80211_rx_status *rx_status) | 213 | struct ieee80211_rx_status *rx_status) |
214 | { | 214 | { |
215 | int energy_a, energy_b, max_energy; | 215 | int energy_a, energy_b, max_energy; |
216 | u32 rate_flags = le32_to_cpu(desc->rate_n_flags); | ||
216 | 217 | ||
217 | energy_a = desc->energy_a; | 218 | energy_a = desc->energy_a; |
218 | energy_a = energy_a ? -energy_a : S8_MIN; | 219 | energy_a = energy_a ? -energy_a : S8_MIN; |
@@ -224,7 +225,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, | |||
224 | energy_a, energy_b, max_energy); | 225 | energy_a, energy_b, max_energy); |
225 | 226 | ||
226 | rx_status->signal = max_energy; | 227 | rx_status->signal = max_energy; |
227 | rx_status->chains = 0; /* TODO: phy info */ | 228 | rx_status->chains = |
229 | (rate_flags & RATE_MCS_ANT_AB_MSK) >> RATE_MCS_ANT_POS; | ||
228 | rx_status->chain_signal[0] = energy_a; | 230 | rx_status->chain_signal[0] = energy_a; |
229 | rx_status->chain_signal[1] = energy_b; | 231 | rx_status->chain_signal[1] = energy_b; |
230 | rx_status->chain_signal[2] = S8_MIN; | 232 | rx_status->chain_signal[2] = S8_MIN; |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index c19f98489d4e..1add5615fc3a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c | |||
@@ -1709,29 +1709,29 @@ void iwl_mvm_dealloc_int_sta(struct iwl_mvm *mvm, struct iwl_mvm_int_sta *sta) | |||
1709 | sta->sta_id = IWL_MVM_INVALID_STA; | 1709 | sta->sta_id = IWL_MVM_INVALID_STA; |
1710 | } | 1710 | } |
1711 | 1711 | ||
1712 | static void iwl_mvm_enable_aux_queue(struct iwl_mvm *mvm) | 1712 | static void iwl_mvm_enable_aux_snif_queue(struct iwl_mvm *mvm, u16 *queue, |
1713 | u8 sta_id, u8 fifo) | ||
1713 | { | 1714 | { |
1714 | unsigned int wdg_timeout = iwlmvm_mod_params.tfd_q_hang_detect ? | 1715 | unsigned int wdg_timeout = iwlmvm_mod_params.tfd_q_hang_detect ? |
1715 | mvm->cfg->base_params->wd_timeout : | 1716 | mvm->cfg->base_params->wd_timeout : |
1716 | IWL_WATCHDOG_DISABLED; | 1717 | IWL_WATCHDOG_DISABLED; |
1717 | 1718 | ||
1718 | if (iwl_mvm_has_new_tx_api(mvm)) { | 1719 | if (iwl_mvm_has_new_tx_api(mvm)) { |
1719 | int queue = iwl_mvm_tvqm_enable_txq(mvm, mvm->aux_queue, | 1720 | int tvqm_queue = |
1720 | mvm->aux_sta.sta_id, | 1721 | iwl_mvm_tvqm_enable_txq(mvm, *queue, sta_id, |
1721 | IWL_MAX_TID_COUNT, | 1722 | IWL_MAX_TID_COUNT, |
1722 | wdg_timeout); | 1723 | wdg_timeout); |
1723 | mvm->aux_queue = queue; | 1724 | *queue = tvqm_queue; |
1724 | } else { | 1725 | } else { |
1725 | struct iwl_trans_txq_scd_cfg cfg = { | 1726 | struct iwl_trans_txq_scd_cfg cfg = { |
1726 | .fifo = IWL_MVM_TX_FIFO_MCAST, | 1727 | .fifo = fifo, |
1727 | .sta_id = mvm->aux_sta.sta_id, | 1728 | .sta_id = sta_id, |
1728 | .tid = IWL_MAX_TID_COUNT, | 1729 | .tid = IWL_MAX_TID_COUNT, |
1729 | .aggregate = false, | 1730 | .aggregate = false, |
1730 | .frame_limit = IWL_FRAME_LIMIT, | 1731 | .frame_limit = IWL_FRAME_LIMIT, |
1731 | }; | 1732 | }; |
1732 | 1733 | ||
1733 | iwl_mvm_enable_txq(mvm, mvm->aux_queue, mvm->aux_queue, 0, &cfg, | 1734 | iwl_mvm_enable_txq(mvm, *queue, *queue, 0, &cfg, wdg_timeout); |
1734 | wdg_timeout); | ||
1735 | } | 1735 | } |
1736 | } | 1736 | } |
1737 | 1737 | ||
@@ -1750,7 +1750,9 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm) | |||
1750 | 1750 | ||
1751 | /* Map Aux queue to fifo - needs to happen before adding Aux station */ | 1751 | /* Map Aux queue to fifo - needs to happen before adding Aux station */ |
1752 | if (!iwl_mvm_has_new_tx_api(mvm)) | 1752 | if (!iwl_mvm_has_new_tx_api(mvm)) |
1753 | iwl_mvm_enable_aux_queue(mvm); | 1753 | iwl_mvm_enable_aux_snif_queue(mvm, &mvm->aux_queue, |
1754 | mvm->aux_sta.sta_id, | ||
1755 | IWL_MVM_TX_FIFO_MCAST); | ||
1754 | 1756 | ||
1755 | ret = iwl_mvm_add_int_sta_common(mvm, &mvm->aux_sta, NULL, | 1757 | ret = iwl_mvm_add_int_sta_common(mvm, &mvm->aux_sta, NULL, |
1756 | MAC_INDEX_AUX, 0); | 1758 | MAC_INDEX_AUX, 0); |
@@ -1764,7 +1766,9 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm) | |||
1764 | * to firmware so enable queue here - after the station was added | 1766 | * to firmware so enable queue here - after the station was added |
1765 | */ | 1767 | */ |
1766 | if (iwl_mvm_has_new_tx_api(mvm)) | 1768 | if (iwl_mvm_has_new_tx_api(mvm)) |
1767 | iwl_mvm_enable_aux_queue(mvm); | 1769 | iwl_mvm_enable_aux_snif_queue(mvm, &mvm->aux_queue, |
1770 | mvm->aux_sta.sta_id, | ||
1771 | IWL_MVM_TX_FIFO_MCAST); | ||
1768 | 1772 | ||
1769 | return 0; | 1773 | return 0; |
1770 | } | 1774 | } |
@@ -1772,10 +1776,31 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm) | |||
1772 | int iwl_mvm_add_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | 1776 | int iwl_mvm_add_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) |
1773 | { | 1777 | { |
1774 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | 1778 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
1779 | int ret; | ||
1775 | 1780 | ||
1776 | lockdep_assert_held(&mvm->mutex); | 1781 | lockdep_assert_held(&mvm->mutex); |
1777 | return iwl_mvm_add_int_sta_common(mvm, &mvm->snif_sta, vif->addr, | 1782 | |
1783 | /* Map snif queue to fifo - must happen before adding snif station */ | ||
1784 | if (!iwl_mvm_has_new_tx_api(mvm)) | ||
1785 | iwl_mvm_enable_aux_snif_queue(mvm, &mvm->snif_queue, | ||
1786 | mvm->snif_sta.sta_id, | ||
1787 | IWL_MVM_TX_FIFO_BE); | ||
1788 | |||
1789 | ret = iwl_mvm_add_int_sta_common(mvm, &mvm->snif_sta, vif->addr, | ||
1778 | mvmvif->id, 0); | 1790 | mvmvif->id, 0); |
1791 | if (ret) | ||
1792 | return ret; | ||
1793 | |||
1794 | /* | ||
1795 | * For 22000 firmware and on we cannot add queue to a station unknown | ||
1796 | * to firmware so enable queue here - after the station was added | ||
1797 | */ | ||
1798 | if (iwl_mvm_has_new_tx_api(mvm)) | ||
1799 | iwl_mvm_enable_aux_snif_queue(mvm, &mvm->snif_queue, | ||
1800 | mvm->snif_sta.sta_id, | ||
1801 | IWL_MVM_TX_FIFO_BE); | ||
1802 | |||
1803 | return 0; | ||
1779 | } | 1804 | } |
1780 | 1805 | ||
1781 | int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | 1806 | int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) |
@@ -1784,6 +1809,8 @@ int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
1784 | 1809 | ||
1785 | lockdep_assert_held(&mvm->mutex); | 1810 | lockdep_assert_held(&mvm->mutex); |
1786 | 1811 | ||
1812 | iwl_mvm_disable_txq(mvm, mvm->snif_queue, mvm->snif_queue, | ||
1813 | IWL_MAX_TID_COUNT, 0); | ||
1787 | ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id); | 1814 | ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id); |
1788 | if (ret) | 1815 | if (ret) |
1789 | IWL_WARN(mvm, "Failed sending remove station\n"); | 1816 | IWL_WARN(mvm, "Failed sending remove station\n"); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index 593b7f97b29c..333bcb75b8af 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c | |||
@@ -657,7 +657,8 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb) | |||
657 | if (ap_sta_id != IWL_MVM_INVALID_STA) | 657 | if (ap_sta_id != IWL_MVM_INVALID_STA) |
658 | sta_id = ap_sta_id; | 658 | sta_id = ap_sta_id; |
659 | } else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) { | 659 | } else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) { |
660 | queue = mvm->aux_queue; | 660 | queue = mvm->snif_queue; |
661 | sta_id = mvm->snif_sta.sta_id; | ||
661 | } | 662 | } |
662 | } | 663 | } |
663 | 664 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index d46115e2d69e..03ffd84786ca 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |||
@@ -1134,9 +1134,18 @@ unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm, | |||
1134 | unsigned int default_timeout = | 1134 | unsigned int default_timeout = |
1135 | cmd_q ? IWL_DEF_WD_TIMEOUT : mvm->cfg->base_params->wd_timeout; | 1135 | cmd_q ? IWL_DEF_WD_TIMEOUT : mvm->cfg->base_params->wd_timeout; |
1136 | 1136 | ||
1137 | if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS)) | 1137 | if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS)) { |
1138 | /* | ||
1139 | * We can't know when the station is asleep or awake, so we | ||
1140 | * must disable the queue hang detection. | ||
1141 | */ | ||
1142 | if (fw_has_capa(&mvm->fw->ucode_capa, | ||
1143 | IWL_UCODE_TLV_CAPA_STA_PM_NOTIF) && | ||
1144 | vif && vif->type == NL80211_IFTYPE_AP) | ||
1145 | return IWL_WATCHDOG_DISABLED; | ||
1138 | return iwlmvm_mod_params.tfd_q_hang_detect ? | 1146 | return iwlmvm_mod_params.tfd_q_hang_detect ? |
1139 | default_timeout : IWL_WATCHDOG_DISABLED; | 1147 | default_timeout : IWL_WATCHDOG_DISABLED; |
1148 | } | ||
1140 | 1149 | ||
1141 | trigger = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS); | 1150 | trigger = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS); |
1142 | txq_timer = (void *)trigger->data; | 1151 | txq_timer = (void *)trigger->data; |
@@ -1163,6 +1172,8 @@ unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm, | |||
1163 | return le32_to_cpu(txq_timer->p2p_go); | 1172 | return le32_to_cpu(txq_timer->p2p_go); |
1164 | case NL80211_IFTYPE_P2P_DEVICE: | 1173 | case NL80211_IFTYPE_P2P_DEVICE: |
1165 | return le32_to_cpu(txq_timer->p2p_device); | 1174 | return le32_to_cpu(txq_timer->p2p_device); |
1175 | case NL80211_IFTYPE_MONITOR: | ||
1176 | return default_timeout; | ||
1166 | default: | 1177 | default: |
1167 | WARN_ON(1); | 1178 | WARN_ON(1); |
1168 | return mvm->cfg->base_params->wd_timeout; | 1179 | return mvm->cfg->base_params->wd_timeout; |
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c index c59f4581e972..ac05fd1e74c4 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | |||
@@ -49,6 +49,7 @@ | |||
49 | * | 49 | * |
50 | *****************************************************************************/ | 50 | *****************************************************************************/ |
51 | #include "iwl-trans.h" | 51 | #include "iwl-trans.h" |
52 | #include "iwl-prph.h" | ||
52 | #include "iwl-context-info.h" | 53 | #include "iwl-context-info.h" |
53 | #include "internal.h" | 54 | #include "internal.h" |
54 | 55 | ||
@@ -156,6 +157,11 @@ void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans, bool low_power) | |||
156 | 157 | ||
157 | trans_pcie->is_down = true; | 158 | trans_pcie->is_down = true; |
158 | 159 | ||
160 | /* Stop dbgc before stopping device */ | ||
161 | iwl_write_prph(trans, DBGC_IN_SAMPLE, 0); | ||
162 | udelay(100); | ||
163 | iwl_write_prph(trans, DBGC_OUT_CTRL, 0); | ||
164 | |||
159 | /* tell the device to stop sending interrupts */ | 165 | /* tell the device to stop sending interrupts */ |
160 | iwl_disable_interrupts(trans); | 166 | iwl_disable_interrupts(trans); |
161 | 167 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index b7a51603465b..4541c86881d6 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c | |||
@@ -166,6 +166,7 @@ static void iwl_trans_pcie_dump_regs(struct iwl_trans *trans) | |||
166 | print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, | 166 | print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, |
167 | 4, buf, i, 0); | 167 | 4, buf, i, 0); |
168 | } | 168 | } |
169 | goto out; | ||
169 | 170 | ||
170 | err_read: | 171 | err_read: |
171 | print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, 4, buf, i, 0); | 172 | print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, 4, buf, i, 0); |
@@ -1226,6 +1227,15 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans, bool low_power) | |||
1226 | 1227 | ||
1227 | trans_pcie->is_down = true; | 1228 | trans_pcie->is_down = true; |
1228 | 1229 | ||
1230 | /* Stop dbgc before stopping device */ | ||
1231 | if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) { | ||
1232 | iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x100); | ||
1233 | } else { | ||
1234 | iwl_write_prph(trans, DBGC_IN_SAMPLE, 0); | ||
1235 | udelay(100); | ||
1236 | iwl_write_prph(trans, DBGC_OUT_CTRL, 0); | ||
1237 | } | ||
1238 | |||
1229 | /* tell the device to stop sending interrupts */ | 1239 | /* tell the device to stop sending interrupts */ |
1230 | iwl_disable_interrupts(trans); | 1240 | iwl_disable_interrupts(trans); |
1231 | 1241 | ||