linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28
@ 2019-06-28  9:19 Luca Coelho
  2019-06-28  9:19 ` [PATCH 01/20] iwlwifi: lib: Use struct_size() helper Luca Coelho
                   ` (19 more replies)
  0 siblings, 20 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Luca Coelho

From: Luca Coelho <luciano.coelho@intel.com>

Hi,

Here's the second set of patches intended for v5.3.  It's the usual
development, new features, cleanups and bugfixes.

The changes are:

* Special SAR implementation for South Korea;
* Fixes in the module init error paths;
* Debugging infra work continues;
* A few clean-ups;
* Other small fixes and improvements;

As usual, I'm pushing this to a pending branch, for kbuild bot, and
will send a pull-request later.

Please review.

Cheers,
Luca.


Andrei Otcheretianski (1):
  iwlwifi: mvm: Drop large non sta frames

Dan Carpenter (1):
  iwlwifi: remove some unnecessary NULL checks

Emmanuel Grumbach (2):
  iwlwifi: support FSEQ TLV even when FMAC is not compiled
  iwlwifi: mvm: make the usage of TWT configurable

Gustavo A. R. Silva (2):
  iwlwifi: lib: Use struct_size() helper
  iwlwifi: d3: Use struct_size() helper

Haim Dreyfuss (2):
  iwlwifi: Add support for SAR South Korea limitation
  iwlwifi: mvm: Add log information about SAR status

Johannes Berg (1):
  iwlwifi: fix module init error paths

Luca Coelho (2):
  iwlwifi: pcie: increase the size of PCI dumps
  iwlwifi: mvm: remove MAC_FILTER_IN_11AX for AP mode

Naftali Goldstein (1):
  iwlwifi: mvm: correctly fill the ac array in the iwl_mac_ctx_cmd

Shahar S Matityahu (7):
  iwlwifi: dbg: fix debug monitor stop and restart delays
  iwlwifi: dbg_ini: enforce apply point early on buffer allocation tlv
  iwlwifi: dbg_ini: remove redundant checking of ini mode
  iwlwifi: dbg: move trans debug fields to a separate struct
  iwlwifi: dbg_ini: fix debug monitor stop and restart in ini mode
  iwlwifi: dbg: don't stop dbg recording before entering D3 from 9000
    devices
  iwlwifi: dbg: debug recording stop and restart command remove

Shaul Triebitz (1):
  iwlwifi: mvm: convert to FW AC when configuring MU EDCA

 drivers/net/wireless/intel/iwlwifi/dvm/lib.c  |   3 +-
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c  |  28 +--
 drivers/net/wireless/intel/iwlwifi/fw/acpi.h  |   5 +-
 .../net/wireless/intel/iwlwifi/fw/api/power.h |  12 ++
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c   | 100 ++++++-----
 drivers/net/wireless/intel/iwlwifi/fw/dbg.h   |  93 +++++-----
 drivers/net/wireless/intel/iwlwifi/fw/file.h  |   3 +
 .../net/wireless/intel/iwlwifi/iwl-dbg-tlv.c  |  32 ++--
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c  |  34 +++-
 .../net/wireless/intel/iwlwifi/iwl-trans.h    |  75 ++++----
 .../wireless/intel/iwlwifi/mvm/constants.h    |   1 +
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c   |  14 +-
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c   |  62 +++++--
 .../net/wireless/intel/iwlwifi/mvm/mac-ctxt.c |  16 +-
 .../net/wireless/intel/iwlwifi/mvm/mac80211.c |  11 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h  |   2 +
 drivers/net/wireless/intel/iwlwifi/mvm/nvm.c  |   9 +
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c  |  10 +-
 .../net/wireless/intel/iwlwifi/mvm/rs-fw.c    |  23 ++-
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c   |   3 +
 .../net/wireless/intel/iwlwifi/mvm/utils.c    |  20 ++-
 .../intel/iwlwifi/pcie/ctxt-info-gen3.c       |   8 +-
 .../wireless/intel/iwlwifi/pcie/internal.h    |   2 +-
 drivers/net/wireless/intel/iwlwifi/pcie/rx.c  |   2 +-
 .../wireless/intel/iwlwifi/pcie/trans-gen2.c  |   2 +-
 .../net/wireless/intel/iwlwifi/pcie/trans.c   | 166 +++++++++---------
 26 files changed, 433 insertions(+), 303 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH 01/20] iwlwifi: lib: Use struct_size() helper
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
@ 2019-06-28  9:19 ` Luca Coelho
  2019-06-28  9:19 ` [PATCH 02/20] iwlwifi: d3: " Luca Coelho
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Gustavo A. R. Silva, Luca Coelho

From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.

So, change the following form:

sizeof(*pattern_cmd) +
               wowlan->n_patterns * sizeof(struct iwlagn_wowlan_pattern)

 to :

struct_size(pattern_cmd, patterns, wowlan->n_patterns)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/dvm/lib.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/lib.c b/drivers/net/wireless/intel/iwlwifi/dvm/lib.c
index b2f172d4f78a..cae9cd438697 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/lib.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/lib.c
@@ -1022,8 +1022,7 @@ int iwlagn_send_patterns(struct iwl_priv *priv,
 	if (!wowlan->n_patterns)
 		return 0;
 
-	cmd.len[0] = sizeof(*pattern_cmd) +
-		wowlan->n_patterns * sizeof(struct iwlagn_wowlan_pattern);
+	cmd.len[0] = struct_size(pattern_cmd, patterns, wowlan->n_patterns);
 
 	pattern_cmd = kmalloc(cmd.len[0], GFP_KERNEL);
 	if (!pattern_cmd)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 02/20] iwlwifi: d3: Use struct_size() helper
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
  2019-06-28  9:19 ` [PATCH 01/20] iwlwifi: lib: Use struct_size() helper Luca Coelho
@ 2019-06-28  9:19 ` Luca Coelho
  2019-06-28  9:19 ` [PATCH 03/20] iwlwifi: remove some unnecessary NULL checks Luca Coelho
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Gustavo A. R. Silva, Luca Coelho

From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.

So, change the following form:

sizeof(*pattern_cmd) +
               wowlan->n_patterns * sizeof(struct iwlagn_wowlan_pattern)

 to :

struct_size(pattern_cmd, patterns, wowlan->n_patterns)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index 60f5d337f16d..363fd6127bb6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -398,8 +398,7 @@ static int iwl_mvm_send_patterns_v1(struct iwl_mvm *mvm,
 	if (!wowlan->n_patterns)
 		return 0;
 
-	cmd.len[0] = sizeof(*pattern_cmd) +
-		wowlan->n_patterns * sizeof(struct iwl_wowlan_pattern_v1);
+	cmd.len[0] = struct_size(pattern_cmd, patterns, wowlan->n_patterns);
 
 	pattern_cmd = kmalloc(cmd.len[0], GFP_KERNEL);
 	if (!pattern_cmd)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 03/20] iwlwifi: remove some unnecessary NULL checks
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
  2019-06-28  9:19 ` [PATCH 01/20] iwlwifi: lib: Use struct_size() helper Luca Coelho
  2019-06-28  9:19 ` [PATCH 02/20] iwlwifi: d3: " Luca Coelho
@ 2019-06-28  9:19 ` Luca Coelho
  2019-06-28  9:19 ` [PATCH 04/20] iwlwifi: mvm: correctly fill the ac array in the iwl_mac_ctx_cmd Luca Coelho
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Dan Carpenter, Luca Coelho

From: Dan Carpenter <dan.carpenter@oracle.com>

These pointers are an offset into the "sta" struct.  They're assigned
like this:

	const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;

They're not the first member of the struct (->supp_rates[] is first) so
they can't be NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 .../net/wireless/intel/iwlwifi/mvm/rs-fw.c    | 23 +++++++++----------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
index 1cfd550c1ecb..b409e69cb1a4 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
@@ -101,7 +101,7 @@ static u8 rs_fw_sgi_cw_support(struct ieee80211_sta *sta)
 	struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
 	u8 supp = 0;
 
-	if (he_cap && he_cap->has_he)
+	if (he_cap->has_he)
 		return 0;
 
 	if (ht_cap->cap & IEEE80211_HT_CAP_SGI_20)
@@ -123,12 +123,12 @@ static u16 rs_fw_get_config_flags(struct iwl_mvm *mvm,
 	struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
 	struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
 	struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
-	bool vht_ena = vht_cap && vht_cap->vht_supported;
+	bool vht_ena = vht_cap->vht_supported;
 	u16 flags = 0;
 
 	if (mvm->cfg->ht_params->stbc &&
 	    (num_of_ant(iwl_mvm_get_valid_tx_ant(mvm)) > 1)) {
-		if (he_cap && he_cap->has_he) {
+		if (he_cap->has_he) {
 			if (he_cap->he_cap_elem.phy_cap_info[2] &
 			    IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ)
 				flags |= IWL_TLC_MNG_CFG_FLAGS_STBC_MSK;
@@ -136,15 +136,14 @@ static u16 rs_fw_get_config_flags(struct iwl_mvm *mvm,
 			if (he_cap->he_cap_elem.phy_cap_info[7] &
 			    IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ)
 				flags |= IWL_TLC_MNG_CFG_FLAGS_HE_STBC_160MHZ_MSK;
-		} else if ((ht_cap &&
-			    (ht_cap->cap & IEEE80211_HT_CAP_RX_STBC)) ||
+		} else if ((ht_cap->cap & IEEE80211_HT_CAP_RX_STBC) ||
 			   (vht_ena &&
 			    (vht_cap->cap & IEEE80211_VHT_CAP_RXSTBC_MASK)))
 			flags |= IWL_TLC_MNG_CFG_FLAGS_STBC_MSK;
 	}
 
 	if (mvm->cfg->ht_params->ldpc &&
-	    ((ht_cap && (ht_cap->cap & IEEE80211_HT_CAP_LDPC_CODING)) ||
+	    ((ht_cap->cap & IEEE80211_HT_CAP_LDPC_CODING) ||
 	     (vht_ena && (vht_cap->cap & IEEE80211_VHT_CAP_RXLDPC))))
 		flags |= IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK;
 
@@ -154,7 +153,7 @@ static u16 rs_fw_get_config_flags(struct iwl_mvm *mvm,
 	     IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD))
 		flags &= ~IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK;
 
-	if (he_cap && he_cap->has_he &&
+	if (he_cap->has_he &&
 	    (he_cap->he_cap_elem.phy_cap_info[3] &
 	     IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK))
 		flags |= IWL_TLC_MNG_CFG_FLAGS_HE_DCM_NSS_1_MSK;
@@ -293,13 +292,13 @@ static void rs_fw_set_supp_rates(struct ieee80211_sta *sta,
 	cmd->mode = IWL_TLC_MNG_MODE_NON_HT;
 
 	/* HT/VHT rates */
-	if (he_cap && he_cap->has_he) {
+	if (he_cap->has_he) {
 		cmd->mode = IWL_TLC_MNG_MODE_HE;
 		rs_fw_he_set_enabled_rates(sta, sband, cmd);
-	} else if (vht_cap && vht_cap->vht_supported) {
+	} else if (vht_cap->vht_supported) {
 		cmd->mode = IWL_TLC_MNG_MODE_VHT;
 		rs_fw_vht_set_enabled_rates(sta, vht_cap, cmd);
-	} else if (ht_cap && ht_cap->ht_supported) {
+	} else if (ht_cap->ht_supported) {
 		cmd->mode = IWL_TLC_MNG_MODE_HT;
 		cmd->ht_rates[0][0] = cpu_to_le16(ht_cap->mcs.rx_mask[0]);
 		cmd->ht_rates[1][0] = cpu_to_le16(ht_cap->mcs.rx_mask[1]);
@@ -381,7 +380,7 @@ static u16 rs_fw_get_max_amsdu_len(struct ieee80211_sta *sta)
 	const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
 	const struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
 
-	if (vht_cap && vht_cap->vht_supported) {
+	if (vht_cap->vht_supported) {
 		switch (vht_cap->cap & IEEE80211_VHT_CAP_MAX_MPDU_MASK) {
 		case IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454:
 			return IEEE80211_MAX_MPDU_LEN_VHT_11454;
@@ -391,7 +390,7 @@ static u16 rs_fw_get_max_amsdu_len(struct ieee80211_sta *sta)
 			return IEEE80211_MAX_MPDU_LEN_VHT_3895;
 	}
 
-	} else if (ht_cap && ht_cap->ht_supported) {
+	} else if (ht_cap->ht_supported) {
 		if (ht_cap->cap & IEEE80211_HT_CAP_MAX_AMSDU)
 			/*
 			 * agg is offloaded so we need to assume that agg
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 04/20] iwlwifi: mvm: correctly fill the ac array in the iwl_mac_ctx_cmd
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (2 preceding siblings ...)
  2019-06-28  9:19 ` [PATCH 03/20] iwlwifi: remove some unnecessary NULL checks Luca Coelho
@ 2019-06-28  9:19 ` Luca Coelho
  2019-06-28  9:19 ` [PATCH 05/20] iwlwifi: mvm: convert to FW AC when configuring MU EDCA Luca Coelho
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Naftali Goldstein, Luca Coelho

From: Naftali Goldstein <naftali.goldstein@intel.com>

The indexes into the ac array in the iwl_mac_ctx_cmd are from the iwl_ac
enum and not the txfs.  The current code therefore puts the edca params
in the wrong indexes of the array, causing wrong priority for
data-streams of different ACs.
Fix this.

Note that this bug only occurs in NICs that use the new tx api, since in
the old tx api the txf number is equal to the corresponding ac in the
iwl_ac enum.

Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 11 ++++++-----
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h      |  1 +
 drivers/net/wireless/intel/iwlwifi/mvm/utils.c    | 12 ++++++++++++
 3 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
index 53c217af13c8..699a887612b9 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
@@ -558,15 +558,16 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
 
 	for (i = 0; i < IEEE80211_NUM_ACS; i++) {
 		u8 txf = iwl_mvm_mac_ac_to_tx_fifo(mvm, i);
+		u8 ucode_ac = iwl_mvm_mac80211_ac_to_ucode_ac(i);
 
-		cmd->ac[txf].cw_min =
+		cmd->ac[ucode_ac].cw_min =
 			cpu_to_le16(mvmvif->queue_params[i].cw_min);
-		cmd->ac[txf].cw_max =
+		cmd->ac[ucode_ac].cw_max =
 			cpu_to_le16(mvmvif->queue_params[i].cw_max);
-		cmd->ac[txf].edca_txop =
+		cmd->ac[ucode_ac].edca_txop =
 			cpu_to_le16(mvmvif->queue_params[i].txop * 32);
-		cmd->ac[txf].aifsn = mvmvif->queue_params[i].aifs;
-		cmd->ac[txf].fifos_mask = BIT(txf);
+		cmd->ac[ucode_ac].aifsn = mvmvif->queue_params[i].aifs;
+		cmd->ac[ucode_ac].fifos_mask = BIT(txf);
 	}
 
 	if (vif->bss_conf.qos)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index e3614f59d274..01a9762e109b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -1539,6 +1539,7 @@ void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags,
 			       enum nl80211_band band,
 			       struct ieee80211_tx_rate *r);
 u8 iwl_mvm_mac80211_idx_to_hwrate(int rate_idx);
+u8 iwl_mvm_mac80211_ac_to_ucode_ac(enum ieee80211_ac_numbers ac);
 void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm);
 u8 first_antenna(u8 mask);
 u8 iwl_mvm_next_antenna(struct iwl_mvm *mvm, u8 valid, u8 last_idx);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index b9914efc55c4..d2f06a95d75f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -238,6 +238,18 @@ u8 iwl_mvm_mac80211_idx_to_hwrate(int rate_idx)
 	return fw_rate_idx_to_plcp[rate_idx];
 }
 
+u8 iwl_mvm_mac80211_ac_to_ucode_ac(enum ieee80211_ac_numbers ac)
+{
+	static const u8 mac80211_ac_to_ucode_ac[] = {
+		AC_VO,
+		AC_VI,
+		AC_BE,
+		AC_BK
+	};
+
+	return mac80211_ac_to_ucode_ac[ac];
+}
+
 void iwl_mvm_rx_fw_error(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
 {
 	struct iwl_rx_packet *pkt = rxb_addr(rxb);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 05/20] iwlwifi: mvm: convert to FW AC when configuring MU EDCA
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (3 preceding siblings ...)
  2019-06-28  9:19 ` [PATCH 04/20] iwlwifi: mvm: correctly fill the ac array in the iwl_mac_ctx_cmd Luca Coelho
@ 2019-06-28  9:19 ` Luca Coelho
  2019-06-28  9:19 ` [PATCH 06/20] iwlwifi: fix module init error paths Luca Coelho
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Shaul Triebitz, Luca Coelho

From: Shaul Triebitz <shaul.triebitz@intel.com>

The AC numbers used by mac80211 differ from those used
by the firmware.  When setting MU EDCA params for each
AC, use the correct FW AC numbers.

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 5f7ed51c96ab..27d4d92e237c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -2365,22 +2365,23 @@ static void iwl_mvm_cfg_he_sta(struct iwl_mvm *mvm,
 
 	/* Mark MU EDCA as enabled, unless none detected on some AC */
 	flags |= STA_CTXT_HE_MU_EDCA_CW;
-	for (i = 0; i < AC_NUM; i++) {
+	for (i = 0; i < IEEE80211_NUM_ACS; i++) {
 		struct ieee80211_he_mu_edca_param_ac_rec *mu_edca =
 			&mvmvif->queue_params[i].mu_edca_param_rec;
+		u8 ac = iwl_mvm_mac80211_ac_to_ucode_ac(i);
 
 		if (!mvmvif->queue_params[i].mu_edca) {
 			flags &= ~STA_CTXT_HE_MU_EDCA_CW;
 			break;
 		}
 
-		sta_ctxt_cmd.trig_based_txf[i].cwmin =
+		sta_ctxt_cmd.trig_based_txf[ac].cwmin =
 			cpu_to_le16(mu_edca->ecw_min_max & 0xf);
-		sta_ctxt_cmd.trig_based_txf[i].cwmax =
+		sta_ctxt_cmd.trig_based_txf[ac].cwmax =
 			cpu_to_le16((mu_edca->ecw_min_max & 0xf0) >> 4);
-		sta_ctxt_cmd.trig_based_txf[i].aifsn =
+		sta_ctxt_cmd.trig_based_txf[ac].aifsn =
 			cpu_to_le16(mu_edca->aifsn);
-		sta_ctxt_cmd.trig_based_txf[i].mu_time =
+		sta_ctxt_cmd.trig_based_txf[ac].mu_time =
 			cpu_to_le16(mu_edca->mu_edca_timer);
 	}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 06/20] iwlwifi: fix module init error paths
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (4 preceding siblings ...)
  2019-06-28  9:19 ` [PATCH 05/20] iwlwifi: mvm: convert to FW AC when configuring MU EDCA Luca Coelho
@ 2019-06-28  9:19 ` Luca Coelho
  2019-06-28  9:19 ` [PATCH 07/20] iwlwifi: Add support for SAR South Korea limitation Luca Coelho
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Johannes Berg, Luca Coelho

From: Johannes Berg <johannes.berg@intel.com>

When the module fails to initialize for some reason, it
doesn't clean up properly. Fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index e14811ca75b3..2c7a3709a19f 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -1746,7 +1746,7 @@ IWL_EXPORT_SYMBOL(iwl_opmode_deregister);
 
 static int __init iwl_drv_init(void)
 {
-	int i;
+	int i, err;
 
 	mutex_init(&iwlwifi_opmode_table_mtx);
 
@@ -1761,7 +1761,17 @@ static int __init iwl_drv_init(void)
 	iwl_dbgfs_root = debugfs_create_dir(DRV_NAME, NULL);
 #endif
 
-	return iwl_pci_register_driver();
+	err = iwl_pci_register_driver();
+	if (err)
+		goto cleanup_debugfs;
+
+	return 0;
+
+cleanup_debugfs:
+#ifdef CONFIG_IWLWIFI_DEBUGFS
+	debugfs_remove_recursive(iwl_dbgfs_root);
+#endif
+	return err;
 }
 module_init(iwl_drv_init);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 07/20] iwlwifi: Add support for SAR South Korea limitation
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (5 preceding siblings ...)
  2019-06-28  9:19 ` [PATCH 06/20] iwlwifi: fix module init error paths Luca Coelho
@ 2019-06-28  9:19 ` Luca Coelho
  2019-06-28  9:19 ` [PATCH 08/20] iwlwifi: mvm: Add log information about SAR status Luca Coelho
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Haim Dreyfuss, Luca Coelho

From: Haim Dreyfuss <haim.dreyfuss@intel.com>

South Korea is adding a more strict SAR limit called "Limb SAR".
Currently, WGDS SAR offset group 3 is not used (not mapped to any country).
In order to be able to comply with South Korea new restriction:
- OEM will use WGDS SAR offset group 3 to South Korea limitation.
- OEM will change WGDS revision to 1 (currently latest revision is 0)
	to notify that Korea Limb SAR applied.
- Driver will read the WGDS table and pass the values to FW (as usual)
- Driver will pass to FW an indication that Korea Limb SAR is applied
	in case table revision is 1.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/acpi.c  | 28 ++++++----
 drivers/net/wireless/intel/iwlwifi/fw/acpi.h  |  5 +-
 .../net/wireless/intel/iwlwifi/fw/api/power.h | 12 ++++
 drivers/net/wireless/intel/iwlwifi/fw/file.h  |  3 +
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c   | 55 ++++++++++++++-----
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h  |  1 +
 6 files changed, 76 insertions(+), 28 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
index 405038ce98d6..7573af2d88ce 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c
@@ -97,7 +97,7 @@ IWL_EXPORT_SYMBOL(iwl_acpi_get_object);
 
 union acpi_object *iwl_acpi_get_wifi_pkg(struct device *dev,
 					 union acpi_object *data,
-					 int data_size)
+					 int data_size, int *tbl_rev)
 {
 	int i;
 	union acpi_object *wifi_pkg;
@@ -113,16 +113,19 @@ union acpi_object *iwl_acpi_get_wifi_pkg(struct device *dev,
 	/*
 	 * We need at least two packages, one for the revision and one
 	 * for the data itself.  Also check that the revision is valid
-	 * (i.e. it is an integer set to 0).
+	 * (i.e. it is an integer smaller than 2, as we currently support only
+	 * 2 revisions).
 	 */
 	if (data->type != ACPI_TYPE_PACKAGE ||
 	    data->package.count < 2 ||
 	    data->package.elements[0].type != ACPI_TYPE_INTEGER ||
-	    data->package.elements[0].integer.value != 0) {
+	    data->package.elements[0].integer.value > 1) {
 		IWL_DEBUG_DEV_RADIO(dev, "Unsupported packages structure\n");
 		return ERR_PTR(-EINVAL);
 	}
 
+	*tbl_rev = data->package.elements[0].integer.value;
+
 	/* loop through all the packages to find the one for WiFi */
 	for (i = 1; i < data->package.count; i++) {
 		union acpi_object *domain;
@@ -151,14 +154,15 @@ int iwl_acpi_get_mcc(struct device *dev, char *mcc)
 {
 	union acpi_object *wifi_pkg, *data;
 	u32 mcc_val;
-	int ret;
+	int ret, tbl_rev;
 
 	data = iwl_acpi_get_object(dev, ACPI_WRDD_METHOD);
 	if (IS_ERR(data))
 		return PTR_ERR(data);
 
-	wifi_pkg = iwl_acpi_get_wifi_pkg(dev, data, ACPI_WRDD_WIFI_DATA_SIZE);
-	if (IS_ERR(wifi_pkg)) {
+	wifi_pkg = iwl_acpi_get_wifi_pkg(dev, data, ACPI_WRDD_WIFI_DATA_SIZE,
+					 &tbl_rev);
+	if (IS_ERR(wifi_pkg) || tbl_rev != 0) {
 		ret = PTR_ERR(wifi_pkg);
 		goto out_free;
 	}
@@ -185,6 +189,7 @@ u64 iwl_acpi_get_pwr_limit(struct device *dev)
 {
 	union acpi_object *data, *wifi_pkg;
 	u64 dflt_pwr_limit;
+	int tbl_rev;
 
 	data = iwl_acpi_get_object(dev, ACPI_SPLC_METHOD);
 	if (IS_ERR(data)) {
@@ -193,8 +198,8 @@ u64 iwl_acpi_get_pwr_limit(struct device *dev)
 	}
 
 	wifi_pkg = iwl_acpi_get_wifi_pkg(dev, data,
-					 ACPI_SPLC_WIFI_DATA_SIZE);
-	if (IS_ERR(wifi_pkg) ||
+					 ACPI_SPLC_WIFI_DATA_SIZE, &tbl_rev);
+	if (IS_ERR(wifi_pkg) || tbl_rev != 0 ||
 	    wifi_pkg->package.elements[1].integer.value != ACPI_TYPE_INTEGER) {
 		dflt_pwr_limit = 0;
 		goto out_free;
@@ -211,14 +216,15 @@ IWL_EXPORT_SYMBOL(iwl_acpi_get_pwr_limit);
 int iwl_acpi_get_eckv(struct device *dev, u32 *extl_clk)
 {
 	union acpi_object *wifi_pkg, *data;
-	int ret;
+	int ret, tbl_rev;
 
 	data = iwl_acpi_get_object(dev, ACPI_ECKV_METHOD);
 	if (IS_ERR(data))
 		return PTR_ERR(data);
 
-	wifi_pkg = iwl_acpi_get_wifi_pkg(dev, data, ACPI_ECKV_WIFI_DATA_SIZE);
-	if (IS_ERR(wifi_pkg)) {
+	wifi_pkg = iwl_acpi_get_wifi_pkg(dev, data, ACPI_ECKV_WIFI_DATA_SIZE,
+					 &tbl_rev);
+	if (IS_ERR(wifi_pkg) || tbl_rev != 0) {
 		ret = PTR_ERR(wifi_pkg);
 		goto out_free;
 	}
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h
index f5704e16643f..991a23450999 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h
@@ -97,7 +97,7 @@
 void *iwl_acpi_get_object(struct device *dev, acpi_string method);
 union acpi_object *iwl_acpi_get_wifi_pkg(struct device *dev,
 					 union acpi_object *data,
-					 int data_size);
+					 int data_size, int *tbl_rev);
 
 /**
  * iwl_acpi_get_mcc - read MCC from ACPI, if available
@@ -131,7 +131,8 @@ static inline void *iwl_acpi_get_object(struct device *dev, acpi_string method)
 
 static inline union acpi_object *iwl_acpi_get_wifi_pkg(struct device *dev,
 						       union acpi_object *data,
-						       int data_size)
+						       int data_size,
+						       int *tbl_rev)
 {
 	return ERR_PTR(-ENOENT);
 }
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/power.h b/drivers/net/wireless/intel/iwlwifi/fw/api/power.h
index 01f003c6cff9..f195db398bed 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/power.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/power.h
@@ -419,14 +419,26 @@ struct iwl_per_chain_offset_group {
 	struct iwl_per_chain_offset hb;
 } __packed; /* PER_CHAIN_LIMIT_OFFSET_GROUP_S_VER_1 */
 
+/**
+ * struct iwl_geo_tx_power_profile_cmd_v1 - struct for GEO_TX_POWER_LIMIT cmd.
+ * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
+ * @table: offset profile per band.
+ */
+struct iwl_geo_tx_power_profiles_cmd_v1 {
+	__le32 ops;
+	struct iwl_per_chain_offset_group table[IWL_NUM_GEO_PROFILES];
+} __packed; /* GEO_TX_POWER_LIMIT_VER_1 */
+
 /**
  * struct iwl_geo_tx_power_profile_cmd - struct for GEO_TX_POWER_LIMIT cmd.
  * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
  * @table: offset profile per band.
+ * @table_revision: BIOS table revision.
  */
 struct iwl_geo_tx_power_profiles_cmd {
 	__le32 ops;
 	struct iwl_per_chain_offset_group table[IWL_NUM_GEO_PROFILES];
+	__le32 table_revision;
 } __packed; /* GEO_TX_POWER_LIMIT */
 
 /**
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/file.h b/drivers/net/wireless/intel/iwlwifi/fw/file.h
index 7b65a94ba7dd..0c38e7392b61 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/file.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h
@@ -287,6 +287,8 @@ typedef unsigned int __bitwise iwl_ucode_tlv_api_t;
  *	SCAN_OFFLOAD_PROFILES_QUERY_RSP_S.
  * @IWL_UCODE_TLV_API_MBSSID_HE: This ucode supports v2 of
  *	STA_CONTEXT_DOT11AX_API_S
+ * @IWL_UCODE_TLV_CAPA_SAR_TABLE_VER: This ucode supports different sar
+ *	version tables.
  *
  * @NUM_IWL_UCODE_TLV_API: number of bits used
  */
@@ -319,6 +321,7 @@ enum iwl_ucode_tlv_api {
 	IWL_UCODE_TLV_API_MBSSID_HE		= (__force iwl_ucode_tlv_api_t)52,
 	IWL_UCODE_TLV_API_WOWLAN_TCP_SYN_WAKE	= (__force iwl_ucode_tlv_api_t)53,
 	IWL_UCODE_TLV_API_FTM_RTT_ACCURACY      = (__force iwl_ucode_tlv_api_t)54,
+	IWL_UCODE_TLV_API_SAR_TABLE_VER         = (__force iwl_ucode_tlv_api_t)55,
 	IWL_UCODE_TLV_API_ADWELL_HB_DEF_N_AP	= (__force iwl_ucode_tlv_api_t)57,
 
 	NUM_IWL_UCODE_TLV_API
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 78dc37bf4fa7..b27be2e3eca2 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -672,15 +672,15 @@ static int iwl_mvm_sar_get_wrds_table(struct iwl_mvm *mvm)
 {
 	union acpi_object *wifi_pkg, *table, *data;
 	bool enabled;
-	int ret;
+	int ret, tbl_rev;
 
 	data = iwl_acpi_get_object(mvm->dev, ACPI_WRDS_METHOD);
 	if (IS_ERR(data))
 		return PTR_ERR(data);
 
 	wifi_pkg = iwl_acpi_get_wifi_pkg(mvm->dev, data,
-					 ACPI_WRDS_WIFI_DATA_SIZE);
-	if (IS_ERR(wifi_pkg)) {
+					 ACPI_WRDS_WIFI_DATA_SIZE, &tbl_rev);
+	if (IS_ERR(wifi_pkg) || tbl_rev != 0) {
 		ret = PTR_ERR(wifi_pkg);
 		goto out_free;
 	}
@@ -709,15 +709,15 @@ static int iwl_mvm_sar_get_ewrd_table(struct iwl_mvm *mvm)
 {
 	union acpi_object *wifi_pkg, *data;
 	bool enabled;
-	int i, n_profiles, ret;
+	int i, n_profiles, ret, tbl_rev;
 
 	data = iwl_acpi_get_object(mvm->dev, ACPI_EWRD_METHOD);
 	if (IS_ERR(data))
 		return PTR_ERR(data);
 
 	wifi_pkg = iwl_acpi_get_wifi_pkg(mvm->dev, data,
-					 ACPI_EWRD_WIFI_DATA_SIZE);
-	if (IS_ERR(wifi_pkg)) {
+					 ACPI_EWRD_WIFI_DATA_SIZE, &tbl_rev);
+	if (IS_ERR(wifi_pkg) || tbl_rev != 0) {
 		ret = PTR_ERR(wifi_pkg);
 		goto out_free;
 	}
@@ -768,7 +768,7 @@ static int iwl_mvm_sar_get_ewrd_table(struct iwl_mvm *mvm)
 static int iwl_mvm_sar_get_wgds_table(struct iwl_mvm *mvm)
 {
 	union acpi_object *wifi_pkg, *data;
-	int i, j, ret;
+	int i, j, ret, tbl_rev;
 	int idx = 1;
 
 	data = iwl_acpi_get_object(mvm->dev, ACPI_WGDS_METHOD);
@@ -776,12 +776,13 @@ static int iwl_mvm_sar_get_wgds_table(struct iwl_mvm *mvm)
 		return PTR_ERR(data);
 
 	wifi_pkg = iwl_acpi_get_wifi_pkg(mvm->dev, data,
-					 ACPI_WGDS_WIFI_DATA_SIZE);
-	if (IS_ERR(wifi_pkg)) {
+					 ACPI_WGDS_WIFI_DATA_SIZE, &tbl_rev);
+	if (IS_ERR(wifi_pkg) || tbl_rev > 1) {
 		ret = PTR_ERR(wifi_pkg);
 		goto out_free;
 	}
 
+	mvm->geo_rev = tbl_rev;
 	for (i = 0; i < ACPI_NUM_GEO_PROFILES; i++) {
 		for (j = 0; j < ACPI_GEO_TABLE_SIZE; j++) {
 			union acpi_object *entry;
@@ -868,15 +869,29 @@ int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)
 {
 	struct iwl_geo_tx_power_profiles_resp *resp;
 	int ret;
+	u16 len;
+	void *data;
+	struct iwl_geo_tx_power_profiles_cmd geo_cmd;
+	struct iwl_geo_tx_power_profiles_cmd_v1 geo_cmd_v1;
+	struct iwl_host_cmd cmd;
+
+	if (fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_SAR_TABLE_VER)) {
+		geo_cmd.ops =
+			cpu_to_le32(IWL_PER_CHAIN_OFFSET_GET_CURRENT_TABLE);
+		len = sizeof(geo_cmd);
+		data = &geo_cmd;
+	} else {
+		geo_cmd_v1.ops =
+			cpu_to_le32(IWL_PER_CHAIN_OFFSET_GET_CURRENT_TABLE);
+		len = sizeof(geo_cmd_v1);
+		data = &geo_cmd_v1;
+	}
 
-	struct iwl_geo_tx_power_profiles_cmd geo_cmd = {
-		.ops = cpu_to_le32(IWL_PER_CHAIN_OFFSET_GET_CURRENT_TABLE),
-	};
-	struct iwl_host_cmd cmd = {
+	cmd = (struct iwl_host_cmd){
 		.id =  WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT),
-		.len = { sizeof(geo_cmd), },
+		.len = { len, },
 		.flags = CMD_WANT_SKB,
-		.data = { &geo_cmd },
+		.data = { data },
 	};
 
 	ret = iwl_mvm_send_cmd(mvm, &cmd);
@@ -946,6 +961,16 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
 					i, j, value[1], value[2], value[0]);
 		}
 	}
+
+	cmd.table_revision = cpu_to_le32(mvm->geo_rev);
+
+	if (!fw_has_api(&mvm->fw->ucode_capa,
+		       IWL_UCODE_TLV_API_SAR_TABLE_VER)) {
+		return iwl_mvm_send_cmd_pdu(mvm, cmd_wide_id, 0,
+				sizeof(struct iwl_geo_tx_power_profiles_cmd_v1),
+				&cmd);
+	}
+
 	return iwl_mvm_send_cmd_pdu(mvm, cmd_wide_id, 0, sizeof(cmd), &cmd);
 }
 
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 01a9762e109b..662e24da94a6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -1182,6 +1182,7 @@ struct iwl_mvm {
 #ifdef CONFIG_ACPI
 	struct iwl_mvm_sar_profile sar_profiles[ACPI_SAR_PROFILE_NUM];
 	struct iwl_mvm_geo_profile geo_profiles[ACPI_NUM_GEO_PROFILES];
+	u32 geo_rev;
 #endif
 };
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 08/20] iwlwifi: mvm: Add log information about SAR status
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (6 preceding siblings ...)
  2019-06-28  9:19 ` [PATCH 07/20] iwlwifi: Add support for SAR South Korea limitation Luca Coelho
@ 2019-06-28  9:19 ` Luca Coelho
  2019-09-30 12:06   ` Matteo Croce
  2019-06-28  9:19 ` [PATCH 09/20] iwlwifi: mvm: Drop large non sta frames Luca Coelho
                   ` (11 subsequent siblings)
  19 siblings, 1 reply; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Haim Dreyfuss, Luca Coelho

From: Haim Dreyfuss <haim.dreyfuss@intel.com>

Inform users when SAR status is changing.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c  | 3 +++
 drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 9 +++++++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index b27be2e3eca2..41a98cf01d0e 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -850,6 +850,9 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b)
 			return -ENOENT;
 		}
 
+		IWL_DEBUG_INFO(mvm,
+			       "SAR EWRD: chain %d profile index %d\n",
+			       i, profs[i]);
 		IWL_DEBUG_RADIO(mvm, "  Chain[%d]:\n", i);
 		for (j = 0; j < ACPI_SAR_NUM_SUB_BANDS; j++) {
 			idx = (i * ACPI_SAR_NUM_SUB_BANDS) + j;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c
index 7bdbd010ae6b..719f793b3487 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c
@@ -620,6 +620,7 @@ void iwl_mvm_rx_chub_update_mcc(struct iwl_mvm *mvm,
 	enum iwl_mcc_source src;
 	char mcc[3];
 	struct ieee80211_regdomain *regd;
+	u32 wgds_tbl_idx;
 
 	lockdep_assert_held(&mvm->mutex);
 
@@ -643,6 +644,14 @@ void iwl_mvm_rx_chub_update_mcc(struct iwl_mvm *mvm,
 	if (IS_ERR_OR_NULL(regd))
 		return;
 
+	wgds_tbl_idx = iwl_mvm_get_sar_geo_profile(mvm);
+	if (wgds_tbl_idx < 0)
+		IWL_DEBUG_INFO(mvm, "SAR WGDS is disabled (%d)\n",
+			       wgds_tbl_idx);
+	else
+		IWL_DEBUG_INFO(mvm, "SAR WGDS: geo profile %d is configured\n",
+			       wgds_tbl_idx);
+
 	regulatory_set_wiphy_regd(mvm->hw->wiphy, regd);
 	kfree(regd);
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 09/20] iwlwifi: mvm: Drop large non sta frames
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (7 preceding siblings ...)
  2019-06-28  9:19 ` [PATCH 08/20] iwlwifi: mvm: Add log information about SAR status Luca Coelho
@ 2019-06-28  9:19 ` Luca Coelho
  2019-06-28  9:19 ` [PATCH 10/20] iwlwifi: pcie: increase the size of PCI dumps Luca Coelho
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Andrei Otcheretianski, Luca Coelho

From: Andrei Otcheretianski <andrei.otcheretianski@intel.com>

In some buggy scenarios we could possible attempt to transmit frames larger
than maximum MSDU size. Since our devices don't know how to handle this,
it may result in asserts, hangs etc.
This can happen, for example, when we receive a large multicast frame
and try to transmit it back to the air in AP mode.
Since in a legal scenario this should never happen, drop such frames and
warn about it.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 16f7458e2e81..a3e5d88f1c07 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -726,6 +726,9 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
 
 	memcpy(&info, skb->cb, sizeof(info));
 
+	if (WARN_ON_ONCE(skb->len > IEEE80211_MAX_DATA_LEN + hdrlen))
+		return -1;
+
 	if (WARN_ON_ONCE(info.flags & IEEE80211_TX_CTL_AMPDU))
 		return -1;
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 10/20] iwlwifi: pcie: increase the size of PCI dumps
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (8 preceding siblings ...)
  2019-06-28  9:19 ` [PATCH 09/20] iwlwifi: mvm: Drop large non sta frames Luca Coelho
@ 2019-06-28  9:19 ` Luca Coelho
  2019-06-28  9:19 ` [PATCH 11/20] iwlwifi: dbg: fix debug monitor stop and restart delays Luca Coelho
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Luca Coelho

From: Luca Coelho <luciano.coelho@intel.com>

Currently we dump only the first 64 bytes of the PCI config space,
which leaves out some important things, such as the base address
registers.

Increase it to 352 for the PCI device and to 524 for the rootport to
make sure we include everything we need.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 .../net/wireless/intel/iwlwifi/pcie/trans.c   | 22 ++++++++++++-------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index ca486a7af602..6f5f7e9a894f 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -90,8 +90,10 @@
 
 void iwl_trans_pcie_dump_regs(struct iwl_trans *trans)
 {
-#define PCI_DUMP_SIZE	64
-#define PREFIX_LEN	32
+#define PCI_DUMP_SIZE		352
+#define PCI_MEM_DUMP_SIZE	64
+#define PCI_PARENT_DUMP_SIZE	524
+#define PREFIX_LEN		32
 	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
 	struct pci_dev *pdev = trans_pcie->pci_dev;
 	u32 i, pos, alloc_size, *ptr, *buf;
@@ -102,11 +104,15 @@ void iwl_trans_pcie_dump_regs(struct iwl_trans *trans)
 
 	/* Should be a multiple of 4 */
 	BUILD_BUG_ON(PCI_DUMP_SIZE > 4096 || PCI_DUMP_SIZE & 0x3);
+	BUILD_BUG_ON(PCI_MEM_DUMP_SIZE > 4096 || PCI_MEM_DUMP_SIZE & 0x3);
+	BUILD_BUG_ON(PCI_PARENT_DUMP_SIZE > 4096 || PCI_PARENT_DUMP_SIZE & 0x3);
+
 	/* Alloc a max size buffer */
-	if (PCI_ERR_ROOT_ERR_SRC +  4 > PCI_DUMP_SIZE)
-		alloc_size = PCI_ERR_ROOT_ERR_SRC +  4 + PREFIX_LEN;
-	else
-		alloc_size = PCI_DUMP_SIZE + PREFIX_LEN;
+	alloc_size = PCI_ERR_ROOT_ERR_SRC +  4 + PREFIX_LEN;
+	alloc_size = max_t(u32, alloc_size, PCI_DUMP_SIZE + PREFIX_LEN);
+	alloc_size = max_t(u32, alloc_size, PCI_MEM_DUMP_SIZE + PREFIX_LEN);
+	alloc_size = max_t(u32, alloc_size, PCI_PARENT_DUMP_SIZE + PREFIX_LEN);
+
 	buf = kmalloc(alloc_size, GFP_ATOMIC);
 	if (!buf)
 		return;
@@ -123,7 +129,7 @@ void iwl_trans_pcie_dump_regs(struct iwl_trans *trans)
 	print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, 4, buf, i, 0);
 
 	IWL_ERR(trans, "iwlwifi device memory mapped registers:\n");
-	for (i = 0, ptr = buf; i < PCI_DUMP_SIZE; i += 4, ptr++)
+	for (i = 0, ptr = buf; i < PCI_MEM_DUMP_SIZE; i += 4, ptr++)
 		*ptr = iwl_read32(trans, i);
 	print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, 4, buf, i, 0);
 
@@ -146,7 +152,7 @@ void iwl_trans_pcie_dump_regs(struct iwl_trans *trans)
 
 	IWL_ERR(trans, "iwlwifi parent port (%s) config registers:\n",
 		pci_name(pdev));
-	for (i = 0, ptr = buf; i < PCI_DUMP_SIZE; i += 4, ptr++)
+	for (i = 0, ptr = buf; i < PCI_PARENT_DUMP_SIZE; i += 4, ptr++)
 		if (pci_read_config_dword(pdev, i, ptr))
 			goto err_read;
 	print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, 4, buf, i, 0);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 11/20] iwlwifi: dbg: fix debug monitor stop and restart delays
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (9 preceding siblings ...)
  2019-06-28  9:19 ` [PATCH 10/20] iwlwifi: pcie: increase the size of PCI dumps Luca Coelho
@ 2019-06-28  9:19 ` Luca Coelho
  2019-06-28  9:20 ` [PATCH 12/20] iwlwifi: dbg_ini: enforce apply point early on buffer allocation tlv Luca Coelho
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:19 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Shahar S Matityahu, Luca Coelho

From: Shahar S Matityahu <shahar.s.matityahu@intel.com>

The driver should delay only in recording stop flow between writing to
DBGC_IN_SAMPLE register and DBGC_OUT_CTRL register. Any other delay is
not needed.

Change the following:
1. Remove any unnecessary delays in the flow
2. Increase the delay in the stop recording flow since 100 micro is
   not enough
3. Use usleep_range instead of delay since the driver is allowed to
   sleep in this flow.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Fixes: 5cfe79c8d92a ("iwlwifi: fw: stop and start debugging using host command")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 2 --
 drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 6 ++++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index 0c366009389e..21df3e3a28e7 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -2386,8 +2386,6 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
 	/* start recording again if the firmware is not crashed */
 	if (!test_bit(STATUS_FW_ERROR, &fwrt->trans->status) &&
 	    fwrt->fw->dbg.dest_tlv) {
-		/* wait before we collect the data till the DBGC stop */
-		udelay(500);
 		iwl_fw_dbg_restart_recording(fwrt, &params);
 	}
 
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
index d009c0aa95d7..cff96d2a7e4c 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
@@ -295,7 +295,10 @@ _iwl_fw_dbg_stop_recording(struct iwl_trans *trans,
 	}
 
 	iwl_write_umac_prph(trans, DBGC_IN_SAMPLE, 0);
-	udelay(100);
+	/* wait for the DBGC to finish writing the internal buffer to DRAM to
+	 * avoid halting the HW while writing
+	 */
+	usleep_range(700, 1000);
 	iwl_write_umac_prph(trans, DBGC_OUT_CTRL, 0);
 #ifdef CONFIG_IWLWIFI_DEBUGFS
 	trans->dbg_rec_on = false;
@@ -325,7 +328,6 @@ _iwl_fw_dbg_restart_recording(struct iwl_trans *trans,
 		iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x1);
 	} else {
 		iwl_write_umac_prph(trans, DBGC_IN_SAMPLE, params->in_sample);
-		udelay(100);
 		iwl_write_umac_prph(trans, DBGC_OUT_CTRL, params->out_ctrl);
 	}
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 12/20] iwlwifi: dbg_ini: enforce apply point early on buffer allocation tlv
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (10 preceding siblings ...)
  2019-06-28  9:19 ` [PATCH 11/20] iwlwifi: dbg: fix debug monitor stop and restart delays Luca Coelho
@ 2019-06-28  9:20 ` Luca Coelho
  2019-06-28  9:20 ` [PATCH 13/20] iwlwifi: dbg_ini: remove redundant checking of ini mode Luca Coelho
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:20 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Shahar S Matityahu, Luca Coelho

From: Shahar S Matityahu <shahar.s.matityahu@intel.com>

Apply buffer allocation TLV only if it is set to apply point
IWL_FW_INI_APPLY_EARLY.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 28 +++++++++++----------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index 21df3e3a28e7..d61def45af57 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -2518,16 +2518,11 @@ static void iwl_fw_dbg_buffer_apply(struct iwl_fw_runtime *fwrt,
 	u32 buf_location = le32_to_cpu(alloc->tlv.buffer_location);
 
 	if (buf_location == IWL_FW_INI_LOCATION_SRAM_PATH) {
-		if (!WARN(pnt != IWL_FW_INI_APPLY_EARLY,
-			  "WRT: Invalid apply point %d for SMEM buffer allocation, aborting\n",
-			  pnt)) {
-			IWL_DEBUG_FW(trans,
-				     "WRT: applying SMEM buffer destination\n");
-
-			/* set sram monitor by enabling bit 7 */
-			iwl_set_bit(fwrt->trans, CSR_HW_IF_CONFIG_REG,
-				    CSR_HW_IF_CONFIG_REG_BIT_MONITOR_SRAM);
-		}
+		IWL_DEBUG_FW(trans, "WRT: applying SMEM buffer destination\n");
+		/* set sram monitor by enabling bit 7 */
+		iwl_set_bit(fwrt->trans, CSR_HW_IF_CONFIG_REG,
+			    CSR_HW_IF_CONFIG_REG_BIT_MONITOR_SRAM);
+
 		return;
 	}
 
@@ -2774,6 +2769,8 @@ static void _iwl_fw_dbg_apply_point(struct iwl_fw_runtime *fwrt,
 		struct iwl_ucode_tlv *tlv = iter;
 		void *ini_tlv = (void *)tlv->data;
 		u32 type = le32_to_cpu(tlv->type);
+		const char invalid_ap_str[] =
+			"WRT: ext=%d. Invalid apply point %d for %s\n";
 
 		switch (type) {
 		case IWL_UCODE_TLV_TYPE_DEBUG_INFO:
@@ -2782,15 +2779,20 @@ static void _iwl_fw_dbg_apply_point(struct iwl_fw_runtime *fwrt,
 		case IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION: {
 			struct iwl_fw_ini_allocation_data *buf_alloc = ini_tlv;
 
+			if (pnt != IWL_FW_INI_APPLY_EARLY) {
+				IWL_ERR(fwrt, invalid_ap_str, ext, pnt,
+					"buffer allocation");
+				goto next;
+			}
+
 			iwl_fw_dbg_buffer_apply(fwrt, ini_tlv, pnt);
 			iter += sizeof(buf_alloc->is_alloc);
 			break;
 		}
 		case IWL_UCODE_TLV_TYPE_HCMD:
 			if (pnt < IWL_FW_INI_APPLY_AFTER_ALIVE) {
-				IWL_ERR(fwrt,
-					"WRT: ext=%d. Invalid apply point %d for host command\n",
-					ext, pnt);
+				IWL_ERR(fwrt, invalid_ap_str, ext, pnt,
+					"host command");
 				goto next;
 			}
 			iwl_fw_dbg_send_hcmd(fwrt, tlv, ext);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 13/20] iwlwifi: dbg_ini: remove redundant checking of ini mode
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (11 preceding siblings ...)
  2019-06-28  9:20 ` [PATCH 12/20] iwlwifi: dbg_ini: enforce apply point early on buffer allocation tlv Luca Coelho
@ 2019-06-28  9:20 ` Luca Coelho
  2019-06-28  9:20 ` [PATCH 14/20] iwlwifi: dbg: move trans debug fields to a separate struct Luca Coelho
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:20 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Shahar S Matityahu, Luca Coelho

From: Shahar S Matityahu <shahar.s.matityahu@intel.com>

There are several flows where the driver checks if it runs in ini mode.
Some of these flows are no longer used in ini mode or there is another
condition that check the ini mode in the same flow. Either way, those
conditions are redundant. Remove the redundant conditions.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c     |  5 +----
 drivers/net/wireless/intel/iwlwifi/fw/dbg.h     |  2 +-
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 11 +++--------
 3 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index d61def45af57..a00323d72be1 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -2023,7 +2023,7 @@ static void iwl_fw_error_dump(struct iwl_fw_runtime *fwrt)
 	if (!dump_file)
 		goto out;
 
-	if (!fwrt->trans->ini_valid && fwrt->dump.monitor_only)
+	if (fwrt->dump.monitor_only)
 		dump_mask &= IWL_FW_ERROR_DUMP_FW_MONITOR;
 
 	fw_error_dump.trans_ptr = iwl_trans_dump_data(fwrt->trans, dump_mask);
@@ -2275,9 +2275,6 @@ int iwl_fw_dbg_collect_trig(struct iwl_fw_runtime *fwrt,
 	int ret, len = 0;
 	char buf[64];
 
-	if (fwrt->trans->ini_valid)
-		return 0;
-
 	if (fmt) {
 		va_list ap;
 
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
index cff96d2a7e4c..54fc59639962 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
@@ -362,7 +362,7 @@ void iwl_fw_error_dump_wk(struct work_struct *work);
 
 static inline bool iwl_fw_dbg_type_on(struct iwl_fw_runtime *fwrt, u32 type)
 {
-	return (fwrt->fw->dbg.dump_mask & BIT(type) || fwrt->trans->ini_valid);
+	return (fwrt->fw->dbg.dump_mask & BIT(type));
 }
 
 static inline bool iwl_fw_dbg_is_d3_debug_enabled(struct iwl_fw_runtime *fwrt)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index 6f5f7e9a894f..f6201a03ca35 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -3021,10 +3021,6 @@ iwl_trans_pcie_dump_pointers(struct iwl_trans *trans,
 		base_high = DBGC_CUR_DBGBUF_BASE_ADDR_MSB;
 		write_ptr = DBGC_CUR_DBGBUF_STATUS;
 		wrap_cnt = DBGC_DBGBUF_WRAP_AROUND;
-	} else if (trans->ini_valid) {
-		base = iwl_umac_prph(trans, MON_BUFF_BASE_ADDR_VER2);
-		write_ptr = iwl_umac_prph(trans, MON_BUFF_WRPTR_VER2);
-		wrap_cnt = iwl_umac_prph(trans, MON_BUFF_CYCLE_CNT_VER2);
 	} else if (trans->dbg_dest_tlv) {
 		write_ptr = le32_to_cpu(trans->dbg_dest_tlv->write_ptr_reg);
 		wrap_cnt = le32_to_cpu(trans->dbg_dest_tlv->wrap_count);
@@ -3055,11 +3051,10 @@ iwl_trans_pcie_dump_monitor(struct iwl_trans *trans,
 {
 	u32 len = 0;
 
-	if ((trans->num_blocks &&
+	if (trans->dbg_dest_tlv ||
+	    (trans->num_blocks &&
 	     (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000 ||
-	      trans->cfg->device_family >= IWL_DEVICE_FAMILY_AX210 ||
-	      trans->ini_valid)) ||
-	    (trans->dbg_dest_tlv && !trans->ini_valid)) {
+	      trans->cfg->device_family >= IWL_DEVICE_FAMILY_AX210))) {
 		struct iwl_fw_error_dump_fw_mon *fw_mon_data;
 
 		(*data)->type = cpu_to_le32(IWL_FW_ERROR_DUMP_FW_MONITOR);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 14/20] iwlwifi: dbg: move trans debug fields to a separate struct
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (12 preceding siblings ...)
  2019-06-28  9:20 ` [PATCH 13/20] iwlwifi: dbg_ini: remove redundant checking of ini mode Luca Coelho
@ 2019-06-28  9:20 ` Luca Coelho
  2019-06-28  9:20 ` [PATCH 15/20] iwlwifi: support FSEQ TLV even when FMAC is not compiled Luca Coelho
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:20 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Shahar S Matityahu, Luca Coelho

From: Shahar S Matityahu <shahar.s.matityahu@intel.com>

Unite iwl_trans debug related fields under iwl_trans_debug struct to
increase readability and keep iwl_trans clean.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c   |  44 +++---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.h   |  24 ++--
 .../net/wireless/intel/iwlwifi/iwl-dbg-tlv.c  |  32 ++---
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c  |   8 +-
 .../net/wireless/intel/iwlwifi/iwl-trans.h    |  73 ++++++----
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c   |   2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c   |   4 +-
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c  |  10 +-
 .../net/wireless/intel/iwlwifi/mvm/utils.c    |   8 +-
 .../intel/iwlwifi/pcie/ctxt-info-gen3.c       |   8 +-
 .../wireless/intel/iwlwifi/pcie/internal.h    |   2 +-
 drivers/net/wireless/intel/iwlwifi/pcie/rx.c  |   2 +-
 .../net/wireless/intel/iwlwifi/pcie/trans.c   | 135 +++++++++---------
 13 files changed, 184 insertions(+), 168 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index a00323d72be1..8dc56f14a5cb 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -1155,10 +1155,10 @@ iwl_dump_ini_mon_dram_iter(struct iwl_fw_runtime *fwrt,
 		return -EBUSY;
 
 	range->dram_base_addr = cpu_to_le64(start_addr);
-	range->range_data_size = cpu_to_le32(fwrt->trans->fw_mon[idx].size);
+	range->range_data_size = cpu_to_le32(fwrt->trans->dbg.fw_mon[idx].size);
 
-	memcpy(range->data, fwrt->trans->fw_mon[idx].block,
-	       fwrt->trans->fw_mon[idx].size);
+	memcpy(range->data, fwrt->trans->dbg.fw_mon[idx].block,
+	       fwrt->trans->dbg.fw_mon[idx].size);
 
 	return sizeof(*range) + le32_to_cpu(range->range_data_size);
 }
@@ -1581,8 +1581,8 @@ static u32 iwl_dump_ini_mon_dram_get_size(struct iwl_fw_runtime *fwrt,
 	u32 size = sizeof(struct iwl_fw_ini_monitor_dump) +
 		sizeof(struct iwl_fw_ini_error_dump_range);
 
-	if (fwrt->trans->num_blocks)
-		size += fwrt->trans->fw_mon[0].size;
+	if (fwrt->trans->dbg.num_blocks)
+		size += fwrt->trans->dbg.fw_mon[0].size;
 
 	return size;
 }
@@ -1735,7 +1735,8 @@ static void iwl_dump_ini_info(struct iwl_fw_runtime *fwrt,
 
 	dump->version = cpu_to_le32(IWL_INI_DUMP_VER);
 	dump->trigger_id = trigger->trigger_id;
-	dump->is_external_cfg = cpu_to_le32(fwrt->trans->external_ini_loaded);
+	dump->is_external_cfg =
+		cpu_to_le32(fwrt->trans->dbg.external_ini_loaded);
 
 	dump->ver_type = cpu_to_le32(fwrt->dump.fw_ver.type);
 	dump->ver_subtype = cpu_to_le32(fwrt->dump.fw_ver.subtype);
@@ -1842,7 +1843,7 @@ static int iwl_fw_ini_get_trigger_len(struct iwl_fw_runtime *fwrt,
 				ret_size += hdr_len + size;
 			break;
 		case IWL_FW_INI_REGION_DRAM_BUFFER:
-			if (!fwrt->trans->num_blocks)
+			if (!fwrt->trans->dbg.num_blocks)
 				break;
 			size = iwl_dump_ini_mon_dram_get_size(fwrt, reg);
 			if (size)
@@ -2097,7 +2098,7 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,
 	u32 trig_type = le32_to_cpu(desc->trig_desc.type);
 	int ret;
 
-	if (fwrt->trans->ini_valid) {
+	if (fwrt->trans->dbg.ini_valid) {
 		ret = iwl_fw_dbg_ini_collect(fwrt, trig_type);
 		if (!ret)
 			iwl_fw_free_dump_desc(fwrt);
@@ -2374,7 +2375,7 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
 	iwl_fw_dbg_stop_recording(fwrt, &params);
 
 	IWL_DEBUG_FW_INFO(fwrt, "WRT: data collection start\n");
-	if (fwrt->trans->ini_valid)
+	if (fwrt->trans->dbg.ini_valid)
 		iwl_fw_error_ini_dump(fwrt, wk_idx);
 	else
 		iwl_fw_error_dump(fwrt);
@@ -2474,7 +2475,8 @@ iwl_fw_dbg_buffer_allocation(struct iwl_fw_runtime *fwrt, u32 size)
 	void *virtual_addr = NULL;
 	dma_addr_t phys_addr;
 
-	if (WARN_ON_ONCE(trans->num_blocks == ARRAY_SIZE(trans->fw_mon)))
+	if (WARN_ON_ONCE(trans->dbg.num_blocks ==
+			 ARRAY_SIZE(trans->dbg.fw_mon)))
 		return;
 
 	virtual_addr =
@@ -2488,12 +2490,12 @@ iwl_fw_dbg_buffer_allocation(struct iwl_fw_runtime *fwrt, u32 size)
 
 	IWL_DEBUG_FW(trans,
 		     "Allocated DRAM buffer[%d], size=0x%x\n",
-		     trans->num_blocks, size);
+		     trans->dbg.num_blocks, size);
 
-	trans->fw_mon[trans->num_blocks].block = virtual_addr;
-	trans->fw_mon[trans->num_blocks].physical = phys_addr;
-	trans->fw_mon[trans->num_blocks].size = size;
-	trans->num_blocks++;
+	trans->dbg.fw_mon[trans->dbg.num_blocks].block = virtual_addr;
+	trans->dbg.fw_mon[trans->dbg.num_blocks].physical = phys_addr;
+	trans->dbg.fw_mon[trans->dbg.num_blocks].size = size;
+	trans->dbg.num_blocks++;
 }
 
 static void iwl_fw_dbg_buffer_apply(struct iwl_fw_runtime *fwrt,
@@ -2511,7 +2513,7 @@ static void iwl_fw_dbg_buffer_apply(struct iwl_fw_runtime *fwrt,
 		.data[0] = &ldbg_cmd,
 		.len[0] = sizeof(ldbg_cmd),
 	};
-	int block_idx = trans->num_blocks;
+	int block_idx = trans->dbg.num_blocks;
 	u32 buf_location = le32_to_cpu(alloc->tlv.buffer_location);
 
 	if (buf_location == IWL_FW_INI_LOCATION_SRAM_PATH) {
@@ -2529,13 +2531,13 @@ static void iwl_fw_dbg_buffer_apply(struct iwl_fw_runtime *fwrt,
 	if (!alloc->is_alloc) {
 		iwl_fw_dbg_buffer_allocation(fwrt,
 					     le32_to_cpu(alloc->tlv.size));
-		if (block_idx == trans->num_blocks)
+		if (block_idx == trans->dbg.num_blocks)
 			return;
 		alloc->is_alloc = 1;
 	}
 
 	/* First block is assigned via registers / context info */
-	if (trans->num_blocks == 1)
+	if (trans->dbg.num_blocks == 1)
 		return;
 
 	IWL_DEBUG_FW(trans,
@@ -2543,7 +2545,7 @@ static void iwl_fw_dbg_buffer_apply(struct iwl_fw_runtime *fwrt,
 
 	cmd->num_frags = cpu_to_le32(1);
 	cmd->fragments[0].address =
-		cpu_to_le64(trans->fw_mon[block_idx].physical);
+		cpu_to_le64(trans->dbg.fw_mon[block_idx].physical);
 	cmd->fragments[0].size = alloc->tlv.size;
 	cmd->allocation_id = alloc->tlv.allocation_id;
 	cmd->buffer_location = alloc->tlv.buffer_location;
@@ -2835,7 +2837,7 @@ static void iwl_fw_dbg_ini_reset_cfg(struct iwl_fw_runtime *fwrt)
 void iwl_fw_dbg_apply_point(struct iwl_fw_runtime *fwrt,
 			    enum iwl_fw_ini_apply_point apply_point)
 {
-	void *data = &fwrt->trans->apply_points[apply_point];
+	void *data = &fwrt->trans->dbg.apply_points[apply_point];
 
 	IWL_DEBUG_FW(fwrt, "WRT: enabling apply point %d\n", apply_point);
 
@@ -2844,7 +2846,7 @@ void iwl_fw_dbg_apply_point(struct iwl_fw_runtime *fwrt,
 
 	_iwl_fw_dbg_apply_point(fwrt, data, apply_point, false);
 
-	data = &fwrt->trans->apply_points_ext[apply_point];
+	data = &fwrt->trans->dbg.apply_points_ext[apply_point];
 	_iwl_fw_dbg_apply_point(fwrt, data, apply_point, true);
 }
 IWL_EXPORT_SYMBOL(iwl_fw_dbg_apply_point);
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
index 54fc59639962..06cdf272e38d 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
@@ -202,7 +202,7 @@ _iwl_fw_dbg_trigger_on(struct iwl_fw_runtime *fwrt,
 {
 	struct iwl_fw_dbg_trigger_tlv *trig;
 
-	if (fwrt->trans->ini_valid)
+	if (fwrt->trans->dbg.ini_valid)
 		return NULL;
 
 	if (!iwl_fw_dbg_trigger_enabled(fwrt->fw, id))
@@ -229,7 +229,7 @@ iwl_fw_ini_trigger_on(struct iwl_fw_runtime *fwrt,
 	struct iwl_fw_ini_trigger *trig;
 	u32 usec;
 
-	if (!fwrt->trans->ini_valid || id == IWL_FW_TRIGGER_ID_INVALID ||
+	if (!fwrt->trans->dbg.ini_valid || id == IWL_FW_TRIGGER_ID_INVALID ||
 	    id >= IWL_FW_TRIGGER_ID_NUM || !fwrt->dump.active_trigs[id].active)
 		return false;
 
@@ -301,7 +301,7 @@ _iwl_fw_dbg_stop_recording(struct iwl_trans *trans,
 	usleep_range(700, 1000);
 	iwl_write_umac_prph(trans, DBGC_OUT_CTRL, 0);
 #ifdef CONFIG_IWLWIFI_DEBUGFS
-	trans->dbg_rec_on = false;
+	trans->dbg.rec_on = false;
 #endif
 }
 
@@ -336,7 +336,7 @@ _iwl_fw_dbg_restart_recording(struct iwl_trans *trans,
 static inline void iwl_fw_set_dbg_rec_on(struct iwl_fw_runtime *fwrt)
 {
 	if (fwrt->fw->dbg.dest_tlv && fwrt->cur_fw_img == IWL_UCODE_REGULAR)
-		fwrt->trans->dbg_rec_on = true;
+		fwrt->trans->dbg.rec_on = true;
 }
 #endif
 
@@ -452,28 +452,28 @@ void iwl_fwrt_stop_device(struct iwl_fw_runtime *fwrt);
 static inline void iwl_fw_lmac1_set_alive_err_table(struct iwl_trans *trans,
 						    u32 lmac_error_event_table)
 {
-	if (!(trans->error_event_table_tlv_status &
+	if (!(trans->dbg.error_event_table_tlv_status &
 	      IWL_ERROR_EVENT_TABLE_LMAC1) ||
-	    WARN_ON(trans->lmac_error_event_table[0] !=
+	    WARN_ON(trans->dbg.lmac_error_event_table[0] !=
 		    lmac_error_event_table))
-		trans->lmac_error_event_table[0] = lmac_error_event_table;
+		trans->dbg.lmac_error_event_table[0] = lmac_error_event_table;
 }
 
 static inline void iwl_fw_umac_set_alive_err_table(struct iwl_trans *trans,
 						   u32 umac_error_event_table)
 {
-	if (!(trans->error_event_table_tlv_status &
+	if (!(trans->dbg.error_event_table_tlv_status &
 	      IWL_ERROR_EVENT_TABLE_UMAC) ||
-	    WARN_ON(trans->umac_error_event_table !=
+	    WARN_ON(trans->dbg.umac_error_event_table !=
 		    umac_error_event_table))
-		trans->umac_error_event_table = umac_error_event_table;
+		trans->dbg.umac_error_event_table = umac_error_event_table;
 }
 
 static inline void iwl_fw_error_collect(struct iwl_fw_runtime *fwrt)
 {
-	if (fwrt->trans->ini_valid && fwrt->trans->hw_error) {
+	if (fwrt->trans->dbg.ini_valid && fwrt->trans->dbg.hw_error) {
 		_iwl_fw_dbg_ini_collect(fwrt, IWL_FW_TRIGGER_ID_FW_HW_ERROR);
-		fwrt->trans->hw_error = false;
+		fwrt->trans->dbg.hw_error = false;
 	} else {
 		iwl_fw_dbg_collect_desc(fwrt, &iwl_dump_desc_assert, false, 0);
 	}
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
index fcc1c5c1d013..fcaec410b3be 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
@@ -81,9 +81,9 @@ void iwl_fw_dbg_copy_tlv(struct iwl_trans *trans, struct iwl_ucode_tlv *tlv,
 		return;
 
 	if (ext)
-		data = &trans->apply_points_ext[apply_point];
+		data = &trans->dbg.apply_points_ext[apply_point];
 	else
-		data = &trans->apply_points[apply_point];
+		data = &trans->dbg.apply_points[apply_point];
 
 	/* add room for is_alloc field in &iwl_fw_ini_allocation_data struct */
 	if (le32_to_cpu(tlv->type) == IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION) {
@@ -172,14 +172,14 @@ void iwl_alloc_dbg_tlv(struct iwl_trans *trans, size_t len, const u8 *data,
 		}
 
 		if (ext) {
-			trans->apply_points_ext[i].data = mem;
-			trans->apply_points_ext[i].size = size[i];
+			trans->dbg.apply_points_ext[i].data = mem;
+			trans->dbg.apply_points_ext[i].size = size[i];
 		} else {
-			trans->apply_points[i].data = mem;
-			trans->apply_points[i].size = size[i];
+			trans->dbg.apply_points[i].data = mem;
+			trans->dbg.apply_points[i].size = size[i];
 		}
 
-		trans->ini_valid = true;
+		trans->dbg.ini_valid = true;
 	}
 }
 
@@ -187,14 +187,14 @@ void iwl_fw_dbg_free(struct iwl_trans *trans)
 {
 	int i;
 
-	for (i = 0; i < ARRAY_SIZE(trans->apply_points); i++) {
-		kfree(trans->apply_points[i].data);
-		trans->apply_points[i].size = 0;
-		trans->apply_points[i].offset = 0;
+	for (i = 0; i < ARRAY_SIZE(trans->dbg.apply_points); i++) {
+		kfree(trans->dbg.apply_points[i].data);
+		trans->dbg.apply_points[i].size = 0;
+		trans->dbg.apply_points[i].offset = 0;
 
-		kfree(trans->apply_points_ext[i].data);
-		trans->apply_points_ext[i].size = 0;
-		trans->apply_points_ext[i].offset = 0;
+		kfree(trans->dbg.apply_points_ext[i].data);
+		trans->dbg.apply_points_ext[i].size = 0;
+		trans->dbg.apply_points_ext[i].offset = 0;
 	}
 }
 
@@ -243,7 +243,7 @@ void iwl_load_fw_dbg_tlv(struct device *dev, struct iwl_trans *trans)
 	const struct firmware *fw;
 	int res;
 
-	if (trans->external_ini_loaded || !iwlwifi_mod_params.enable_ini)
+	if (trans->dbg.external_ini_loaded || !iwlwifi_mod_params.enable_ini)
 		return;
 
 	res = request_firmware(&fw, "iwl-dbg-tlv.ini", dev);
@@ -253,6 +253,6 @@ void iwl_load_fw_dbg_tlv(struct device *dev, struct iwl_trans *trans)
 	iwl_alloc_dbg_tlv(trans, fw->size, fw->data, true);
 	iwl_parse_fw_dbg_tlv(trans, fw->data, fw->size);
 
-	trans->external_ini_loaded = true;
+	trans->dbg.external_ini_loaded = true;
 	release_firmware(fw);
 }
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index 2c7a3709a19f..63da2c781d12 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -1114,10 +1114,10 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
 			if (drv->trans->cfg->device_family <
 			    IWL_DEVICE_FAMILY_22000)
 				break;
-			drv->trans->umac_error_event_table =
+			drv->trans->dbg.umac_error_event_table =
 				le32_to_cpu(dbg_ptrs->error_info_addr) &
 				~FW_ADDR_CACHE_CONTROL;
-			drv->trans->error_event_table_tlv_status |=
+			drv->trans->dbg.error_event_table_tlv_status |=
 				IWL_ERROR_EVENT_TABLE_UMAC;
 			break;
 			}
@@ -1130,10 +1130,10 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
 			if (drv->trans->cfg->device_family <
 			    IWL_DEVICE_FAMILY_22000)
 				break;
-			drv->trans->lmac_error_event_table[0] =
+			drv->trans->dbg.lmac_error_event_table[0] =
 				le32_to_cpu(dbg_ptrs->error_event_table_ptr) &
 				~FW_ADDR_CACHE_CONTROL;
-			drv->trans->error_event_table_tlv_status |=
+			drv->trans->dbg.error_event_table_tlv_status |=
 				IWL_ERROR_EVENT_TABLE_LMAC1;
 			break;
 			}
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
index 1e4c9ef548cc..90707c576ce4 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
@@ -721,6 +721,48 @@ struct iwl_self_init_dram {
 	int paging_cnt;
 };
 
+/**
+ * struct iwl_trans_debug - transport debug related data
+ *
+ * @n_dest_reg: num of reg_ops in %dbg_dest_tlv
+ * @rec_on: true iff there is a fw debug recording currently active
+ * @dest_tlv: points to the destination TLV for debug
+ * @conf_tlv: array of pointers to configuration TLVs for debug
+ * @trigger_tlv: array of pointers to triggers TLVs for debug
+ * @lmac_error_event_table: addrs of lmacs error tables
+ * @umac_error_event_table: addr of umac error table
+ * @error_event_table_tlv_status: bitmap that indicates what error table
+ *	pointers was recevied via TLV. uses enum &iwl_error_event_table_status
+ * @external_ini_loaded: indicates if an external ini cfg was given
+ * @ini_valid: indicates if debug ini mode is on
+ * @num_blocks: number of blocks in fw_mon
+ * @fw_mon: address of the buffers for firmware monitor
+ * @hw_error: equals true if hw error interrupt was received from the FW
+ */
+struct iwl_trans_debug {
+	u8 n_dest_reg;
+	bool rec_on;
+
+	const struct iwl_fw_dbg_dest_tlv_v1 *dest_tlv;
+	const struct iwl_fw_dbg_conf_tlv *conf_tlv[FW_DBG_CONF_MAX];
+	struct iwl_fw_dbg_trigger_tlv * const *trigger_tlv;
+
+	u32 lmac_error_event_table[2];
+	u32 umac_error_event_table;
+	unsigned int error_event_table_tlv_status;
+
+	bool external_ini_loaded;
+	bool ini_valid;
+
+	struct iwl_apply_point_data apply_points[IWL_FW_INI_APPLY_NUM];
+	struct iwl_apply_point_data apply_points_ext[IWL_FW_INI_APPLY_NUM];
+
+	int num_blocks;
+	struct iwl_dram_data fw_mon[IWL_FW_INI_APPLY_NUM];
+
+	bool hw_error;
+};
+
 /**
  * struct iwl_trans - transport common data
  *
@@ -750,24 +792,12 @@ struct iwl_self_init_dram {
  * @rx_mpdu_cmd_hdr_size: used for tracing, amount of data before the
  *	start of the 802.11 header in the @rx_mpdu_cmd
  * @dflt_pwr_limit: default power limit fetched from the platform (ACPI)
- * @dbg_dest_tlv: points to the destination TLV for debug
- * @dbg_conf_tlv: array of pointers to configuration TLVs for debug
- * @dbg_trigger_tlv: array of pointers to triggers TLVs for debug
- * @dbg_n_dest_reg: num of reg_ops in %dbg_dest_tlv
- * @num_blocks: number of blocks in fw_mon
- * @fw_mon: address of the buffers for firmware monitor
  * @system_pm_mode: the system-wide power management mode in use.
  *	This mode is set dynamically, depending on the WoWLAN values
  *	configured from the userspace at runtime.
  * @runtime_pm_mode: the runtime power management mode in use.  This
  *	mode is set during the initialization phase and is not
  *	supposed to change during runtime.
- * @dbg_rec_on: true iff there is a fw debug recording currently active
- * @lmac_error_event_table: addrs of lmacs error tables
- * @umac_error_event_table: addr of umac error table
- * @error_event_table_tlv_status: bitmap that indicates what error table
- *	pointers was recevied via TLV. use enum &iwl_error_event_table_status
- * @hw_error: equals true if hw error interrupt was received from the FW
  */
 struct iwl_trans {
 	const struct iwl_trans_ops *ops;
@@ -808,29 +838,12 @@ struct iwl_trans {
 	struct lockdep_map sync_cmd_lockdep_map;
 #endif
 
-	struct iwl_apply_point_data apply_points[IWL_FW_INI_APPLY_NUM];
-	struct iwl_apply_point_data apply_points_ext[IWL_FW_INI_APPLY_NUM];
-
-	bool external_ini_loaded;
-	bool ini_valid;
-
-	const struct iwl_fw_dbg_dest_tlv_v1 *dbg_dest_tlv;
-	const struct iwl_fw_dbg_conf_tlv *dbg_conf_tlv[FW_DBG_CONF_MAX];
-	struct iwl_fw_dbg_trigger_tlv * const *dbg_trigger_tlv;
-	u8 dbg_n_dest_reg;
-	int num_blocks;
-	struct iwl_dram_data fw_mon[IWL_FW_INI_APPLY_NUM];
+	struct iwl_trans_debug dbg;
 	struct iwl_self_init_dram init_dram;
 
 	enum iwl_plat_pm_mode system_pm_mode;
 	enum iwl_plat_pm_mode runtime_pm_mode;
 	bool suspending;
-	bool dbg_rec_on;
-
-	u32 lmac_error_event_table[2];
-	u32 umac_error_event_table;
-	unsigned int error_event_table_tlv_status;
-	bool hw_error;
 
 	/* pointer to trans specific struct */
 	/*Ensure that this pointer will always be aligned to sizeof pointer */
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index 363fd6127bb6..3a5710d32acf 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -2005,7 +2005,7 @@ static void iwl_mvm_d3_disconnect_iter(void *data, u8 *mac,
 static int iwl_mvm_check_rt_status(struct iwl_mvm *mvm,
 				   struct ieee80211_vif *vif)
 {
-	u32 base = mvm->trans->lmac_error_event_table[0];
+	u32 base = mvm->trans->dbg.lmac_error_event_table[0];
 	struct error_table_start {
 		/* cf. struct iwl_error_event_table */
 		u32 valid;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 41a98cf01d0e..5fc6793d9462 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -238,7 +238,7 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
 	iwl_fw_lmac1_set_alive_err_table(mvm->trans, lmac_error_event_table);
 
 	if (lmac2)
-		mvm->trans->lmac_error_event_table[1] =
+		mvm->trans->dbg.lmac_error_event_table[1] =
 			le32_to_cpu(lmac2->dbg_ptrs.error_event_table_ptr);
 
 	umac_error_event_table = le32_to_cpu(umac->dbg_ptrs.error_info_addr);
@@ -1163,7 +1163,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
 	if (ret)
 		IWL_ERR(mvm, "Failed to initialize Smart Fifo\n");
 
-	if (!mvm->trans->ini_valid) {
+	if (!mvm->trans->dbg.ini_valid) {
 		mvm->fwrt.dump.conf = FW_DBG_INVALID;
 		/* if we have a destination, assume EARLY START */
 		if (mvm->fw->dbg.dest_tlv)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 6514e045c901..487fc552a3ce 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -799,11 +799,11 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
 	iwl_trans_configure(mvm->trans, &trans_cfg);
 
 	trans->rx_mpdu_cmd = REPLY_RX_MPDU_CMD;
-	trans->dbg_dest_tlv = mvm->fw->dbg.dest_tlv;
-	trans->dbg_n_dest_reg = mvm->fw->dbg.n_dest_reg;
-	memcpy(trans->dbg_conf_tlv, mvm->fw->dbg.conf_tlv,
-	       sizeof(trans->dbg_conf_tlv));
-	trans->dbg_trigger_tlv = mvm->fw->dbg.trigger_tlv;
+	trans->dbg.dest_tlv = mvm->fw->dbg.dest_tlv;
+	trans->dbg.n_dest_reg = mvm->fw->dbg.n_dest_reg;
+	memcpy(trans->dbg.conf_tlv, mvm->fw->dbg.conf_tlv,
+	       sizeof(trans->dbg.conf_tlv));
+	trans->dbg.trigger_tlv = mvm->fw->dbg.trigger_tlv;
 
 	trans->iml = mvm->fw->iml;
 	trans->iml_len = mvm->fw->iml_len;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index d2f06a95d75f..aacf1761158e 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -469,10 +469,10 @@ static void iwl_mvm_dump_umac_error_log(struct iwl_mvm *mvm)
 {
 	struct iwl_trans *trans = mvm->trans;
 	struct iwl_umac_error_event_table table;
-	u32 base = mvm->trans->umac_error_event_table;
+	u32 base = mvm->trans->dbg.umac_error_event_table;
 
 	if (!mvm->support_umac_log &&
-	    !(mvm->trans->error_event_table_tlv_status &
+	    !(mvm->trans->dbg.error_event_table_tlv_status &
 	      IWL_ERROR_EVENT_TABLE_UMAC))
 		return;
 
@@ -508,7 +508,7 @@ static void iwl_mvm_dump_lmac_error_log(struct iwl_mvm *mvm, u8 lmac_num)
 {
 	struct iwl_trans *trans = mvm->trans;
 	struct iwl_error_event_table table;
-	u32 val, base = mvm->trans->lmac_error_event_table[lmac_num];
+	u32 val, base = mvm->trans->dbg.lmac_error_event_table[lmac_num];
 
 	if (mvm->fwrt.cur_fw_img == IWL_UCODE_INIT) {
 		if (!base)
@@ -604,7 +604,7 @@ void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm)
 
 	iwl_mvm_dump_lmac_error_log(mvm, 0);
 
-	if (mvm->trans->lmac_error_event_table[1])
+	if (mvm->trans->dbg.lmac_error_event_table[1])
 		iwl_mvm_dump_lmac_error_log(mvm, 1);
 
 	iwl_mvm_dump_umac_error_log(mvm);
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c
index f496d1bcb643..344c5af73975 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c
@@ -96,13 +96,13 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,
 		cpu_to_le64(trans_pcie->rxq->bd_dma);
 
 	/* Configure debug, for integration */
-	if (!trans->ini_valid)
+	if (!trans->dbg.ini_valid)
 		iwl_pcie_alloc_fw_monitor(trans, 0);
-	if (trans->num_blocks) {
+	if (trans->dbg.num_blocks) {
 		prph_sc_ctrl->hwm_cfg.hwm_base_addr =
-			cpu_to_le64(trans->fw_mon[0].physical);
+			cpu_to_le64(trans->dbg.fw_mon[0].physical);
 		prph_sc_ctrl->hwm_cfg.hwm_size =
-			cpu_to_le32(trans->fw_mon[0].size);
+			cpu_to_le32(trans->dbg.fw_mon[0].size);
 	}
 
 	/* allocate ucode sections in dram and set addresses */
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
index b513037dc066..e66e12b9d9aa 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h
@@ -1018,7 +1018,7 @@ static inline void __iwl_trans_pcie_set_bit(struct iwl_trans *trans,
 
 static inline bool iwl_pcie_dbg_on(struct iwl_trans *trans)
 {
-	return (trans->dbg_dest_tlv || trans->ini_valid);
+	return (trans->dbg.dest_tlv || trans->dbg.ini_valid);
 }
 
 void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state);
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
index 31b3591f71d1..7e370a92de0e 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
@@ -2212,7 +2212,7 @@ irqreturn_t iwl_pcie_irq_msix_handler(int irq, void *dev_id)
 			"Hardware error detected. Restarting.\n");
 
 		isr_stats->hw++;
-		trans->hw_error = true;
+		trans->dbg.hw_error = true;
 		iwl_pcie_irq_handle_error(trans);
 	}
 
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index f6201a03ca35..13ebd948ccc0 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -194,14 +194,14 @@ static void iwl_pcie_free_fw_monitor(struct iwl_trans *trans)
 {
 	int i;
 
-	for (i = 0; i < trans->num_blocks; i++) {
-		dma_free_coherent(trans->dev, trans->fw_mon[i].size,
-				  trans->fw_mon[i].block,
-				  trans->fw_mon[i].physical);
-		trans->fw_mon[i].block = NULL;
-		trans->fw_mon[i].physical = 0;
-		trans->fw_mon[i].size = 0;
-		trans->num_blocks--;
+	for (i = 0; i < trans->dbg.num_blocks; i++) {
+		dma_free_coherent(trans->dev, trans->dbg.fw_mon[i].size,
+				  trans->dbg.fw_mon[i].block,
+				  trans->dbg.fw_mon[i].physical);
+		trans->dbg.fw_mon[i].block = NULL;
+		trans->dbg.fw_mon[i].physical = 0;
+		trans->dbg.fw_mon[i].size = 0;
+		trans->dbg.num_blocks--;
 	}
 }
 
@@ -236,10 +236,10 @@ static void iwl_pcie_alloc_fw_monitor_block(struct iwl_trans *trans,
 			(unsigned long)BIT(power - 10),
 			(unsigned long)BIT(max_power - 10));
 
-	trans->fw_mon[trans->num_blocks].block = cpu_addr;
-	trans->fw_mon[trans->num_blocks].physical = phys;
-	trans->fw_mon[trans->num_blocks].size = size;
-	trans->num_blocks++;
+	trans->dbg.fw_mon[trans->dbg.num_blocks].block = cpu_addr;
+	trans->dbg.fw_mon[trans->dbg.num_blocks].physical = phys;
+	trans->dbg.fw_mon[trans->dbg.num_blocks].size = size;
+	trans->dbg.num_blocks++;
 }
 
 void iwl_pcie_alloc_fw_monitor(struct iwl_trans *trans, u8 max_power)
@@ -260,7 +260,7 @@ void iwl_pcie_alloc_fw_monitor(struct iwl_trans *trans, u8 max_power)
 	 * This function allocats the default fw monitor.
 	 * The optional additional ones will be allocated in runtime
 	 */
-	if (trans->num_blocks)
+	if (trans->dbg.num_blocks)
 		return;
 
 	iwl_pcie_alloc_fw_monitor_block(trans, max_power, 11);
@@ -895,21 +895,21 @@ static int iwl_pcie_load_cpu_sections(struct iwl_trans *trans,
 
 void iwl_pcie_apply_destination(struct iwl_trans *trans)
 {
-	const struct iwl_fw_dbg_dest_tlv_v1 *dest = trans->dbg_dest_tlv;
+	const struct iwl_fw_dbg_dest_tlv_v1 *dest = trans->dbg.dest_tlv;
 	int i;
 
-	if (trans->ini_valid) {
-		if (!trans->num_blocks)
+	if (trans->dbg.ini_valid) {
+		if (!trans->dbg.num_blocks)
 			return;
 
 		IWL_DEBUG_FW(trans,
 			     "WRT: applying DRAM buffer[0] destination\n");
 		iwl_write_umac_prph(trans, MON_BUFF_BASE_ADDR_VER2,
-				    trans->fw_mon[0].physical >>
+				    trans->dbg.fw_mon[0].physical >>
 				    MON_BUFF_SHIFT_VER2);
 		iwl_write_umac_prph(trans, MON_BUFF_END_ADDR_VER2,
-				    (trans->fw_mon[0].physical +
-				     trans->fw_mon[0].size - 256) >>
+				    (trans->dbg.fw_mon[0].physical +
+				     trans->dbg.fw_mon[0].size - 256) >>
 				    MON_BUFF_SHIFT_VER2);
 		return;
 	}
@@ -922,7 +922,7 @@ void iwl_pcie_apply_destination(struct iwl_trans *trans)
 	else
 		IWL_WARN(trans, "PCI should have external buffer debug\n");
 
-	for (i = 0; i < trans->dbg_n_dest_reg; i++) {
+	for (i = 0; i < trans->dbg.n_dest_reg; i++) {
 		u32 addr = le32_to_cpu(dest->reg_ops[i].addr);
 		u32 val = le32_to_cpu(dest->reg_ops[i].val);
 
@@ -961,18 +961,19 @@ void iwl_pcie_apply_destination(struct iwl_trans *trans)
 	}
 
 monitor:
-	if (dest->monitor_mode == EXTERNAL_MODE && trans->fw_mon[0].size) {
+	if (dest->monitor_mode == EXTERNAL_MODE && trans->dbg.fw_mon[0].size) {
 		iwl_write_prph(trans, le32_to_cpu(dest->base_reg),
-			       trans->fw_mon[0].physical >> dest->base_shift);
+			       trans->dbg.fw_mon[0].physical >>
+			       dest->base_shift);
 		if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_8000)
 			iwl_write_prph(trans, le32_to_cpu(dest->end_reg),
-				       (trans->fw_mon[0].physical +
-					trans->fw_mon[0].size - 256) >>
+				       (trans->dbg.fw_mon[0].physical +
+					trans->dbg.fw_mon[0].size - 256) >>
 						dest->end_shift);
 		else
 			iwl_write_prph(trans, le32_to_cpu(dest->end_reg),
-				       (trans->fw_mon[0].physical +
-					trans->fw_mon[0].size) >>
+				       (trans->dbg.fw_mon[0].physical +
+					trans->dbg.fw_mon[0].size) >>
 						dest->end_shift);
 	}
 }
@@ -1009,12 +1010,12 @@ static int iwl_pcie_load_given_ucode(struct iwl_trans *trans,
 	    trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
 		iwl_pcie_alloc_fw_monitor(trans, 0);
 
-		if (trans->fw_mon[0].size) {
+		if (trans->dbg.fw_mon[0].size) {
 			iwl_write_prph(trans, MON_BUFF_BASE_ADDR,
-				       trans->fw_mon[0].physical >> 4);
+				       trans->dbg.fw_mon[0].physical >> 4);
 			iwl_write_prph(trans, MON_BUFF_END_ADDR,
-				       (trans->fw_mon[0].physical +
-					trans->fw_mon[0].size) >> 4);
+				       (trans->dbg.fw_mon[0].physical +
+					trans->dbg.fw_mon[0].size) >> 4);
 		}
 	} else if (iwl_pcie_dbg_on(trans)) {
 		iwl_pcie_apply_destination(trans);
@@ -2715,8 +2716,8 @@ static int iwl_dbgfs_monitor_data_open(struct inode *inode,
 	struct iwl_trans *trans = inode->i_private;
 	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
 
-	if (!trans->dbg_dest_tlv ||
-	    trans->dbg_dest_tlv->monitor_mode != EXTERNAL_MODE) {
+	if (!trans->dbg.dest_tlv ||
+	    trans->dbg.dest_tlv->monitor_mode != EXTERNAL_MODE) {
 		IWL_ERR(trans, "Debug destination is not set to DRAM\n");
 		return -ENOENT;
 	}
@@ -2763,22 +2764,22 @@ static ssize_t iwl_dbgfs_monitor_data_read(struct file *file,
 {
 	struct iwl_trans *trans = file->private_data;
 	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
-	void *cpu_addr = (void *)trans->fw_mon[0].block, *curr_buf;
+	void *cpu_addr = (void *)trans->dbg.fw_mon[0].block, *curr_buf;
 	struct cont_rec *data = &trans_pcie->fw_mon_data;
 	u32 write_ptr_addr, wrap_cnt_addr, write_ptr, wrap_cnt;
 	ssize_t size, bytes_copied = 0;
 	bool b_full;
 
-	if (trans->dbg_dest_tlv) {
+	if (trans->dbg.dest_tlv) {
 		write_ptr_addr =
-			le32_to_cpu(trans->dbg_dest_tlv->write_ptr_reg);
-		wrap_cnt_addr = le32_to_cpu(trans->dbg_dest_tlv->wrap_count);
+			le32_to_cpu(trans->dbg.dest_tlv->write_ptr_reg);
+		wrap_cnt_addr = le32_to_cpu(trans->dbg.dest_tlv->wrap_count);
 	} else {
 		write_ptr_addr = MON_BUFF_WRPTR;
 		wrap_cnt_addr = MON_BUFF_CYCLE_CNT;
 	}
 
-	if (unlikely(!trans->dbg_rec_on))
+	if (unlikely(!trans->dbg.rec_on))
 		return 0;
 
 	mutex_lock(&data->mutex);
@@ -2802,7 +2803,7 @@ static ssize_t iwl_dbgfs_monitor_data_read(struct file *file,
 
 	} else if (data->prev_wrap_cnt == wrap_cnt - 1 &&
 		   write_ptr < data->prev_wr_ptr) {
-		size = trans->fw_mon[0].size - data->prev_wr_ptr;
+		size = trans->dbg.fw_mon[0].size - data->prev_wr_ptr;
 		curr_buf = cpu_addr + data->prev_wr_ptr;
 		b_full = iwl_write_to_user_buf(user_buf, count,
 					       curr_buf, &size,
@@ -3021,10 +3022,10 @@ iwl_trans_pcie_dump_pointers(struct iwl_trans *trans,
 		base_high = DBGC_CUR_DBGBUF_BASE_ADDR_MSB;
 		write_ptr = DBGC_CUR_DBGBUF_STATUS;
 		wrap_cnt = DBGC_DBGBUF_WRAP_AROUND;
-	} else if (trans->dbg_dest_tlv) {
-		write_ptr = le32_to_cpu(trans->dbg_dest_tlv->write_ptr_reg);
-		wrap_cnt = le32_to_cpu(trans->dbg_dest_tlv->wrap_count);
-		base = le32_to_cpu(trans->dbg_dest_tlv->base_reg);
+	} else if (trans->dbg.dest_tlv) {
+		write_ptr = le32_to_cpu(trans->dbg.dest_tlv->write_ptr_reg);
+		wrap_cnt = le32_to_cpu(trans->dbg.dest_tlv->wrap_count);
+		base = le32_to_cpu(trans->dbg.dest_tlv->base_reg);
 	} else {
 		base = MON_BUFF_BASE_ADDR;
 		write_ptr = MON_BUFF_WRPTR;
@@ -3051,8 +3052,8 @@ iwl_trans_pcie_dump_monitor(struct iwl_trans *trans,
 {
 	u32 len = 0;
 
-	if (trans->dbg_dest_tlv ||
-	    (trans->num_blocks &&
+	if (trans->dbg.dest_tlv ||
+	    (trans->dbg.num_blocks &&
 	     (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000 ||
 	      trans->cfg->device_family >= IWL_DEVICE_FAMILY_AX210))) {
 		struct iwl_fw_error_dump_fw_mon *fw_mon_data;
@@ -3063,32 +3064,32 @@ iwl_trans_pcie_dump_monitor(struct iwl_trans *trans,
 		iwl_trans_pcie_dump_pointers(trans, fw_mon_data);
 
 		len += sizeof(**data) + sizeof(*fw_mon_data);
-		if (trans->num_blocks) {
+		if (trans->dbg.num_blocks) {
 			memcpy(fw_mon_data->data,
-			       trans->fw_mon[0].block,
-			       trans->fw_mon[0].size);
+			       trans->dbg.fw_mon[0].block,
+			       trans->dbg.fw_mon[0].size);
 
-			monitor_len = trans->fw_mon[0].size;
-		} else if (trans->dbg_dest_tlv->monitor_mode == SMEM_MODE) {
+			monitor_len = trans->dbg.fw_mon[0].size;
+		} else if (trans->dbg.dest_tlv->monitor_mode == SMEM_MODE) {
 			u32 base = le32_to_cpu(fw_mon_data->fw_mon_base_ptr);
 			/*
 			 * Update pointers to reflect actual values after
 			 * shifting
 			 */
-			if (trans->dbg_dest_tlv->version) {
+			if (trans->dbg.dest_tlv->version) {
 				base = (iwl_read_prph(trans, base) &
 					IWL_LDBG_M2S_BUF_BA_MSK) <<
-				       trans->dbg_dest_tlv->base_shift;
+				       trans->dbg.dest_tlv->base_shift;
 				base *= IWL_M2S_UNIT_SIZE;
 				base += trans->cfg->smem_offset;
 			} else {
 				base = iwl_read_prph(trans, base) <<
-				       trans->dbg_dest_tlv->base_shift;
+				       trans->dbg.dest_tlv->base_shift;
 			}
 
 			iwl_trans_read_mem(trans, base, fw_mon_data->data,
 					   monitor_len / sizeof(u32));
-		} else if (trans->dbg_dest_tlv->monitor_mode == MARBH_MODE) {
+		} else if (trans->dbg.dest_tlv->monitor_mode == MARBH_MODE) {
 			monitor_len =
 				iwl_trans_pci_dump_marbh_monitor(trans,
 								 fw_mon_data,
@@ -3107,40 +3108,40 @@ iwl_trans_pcie_dump_monitor(struct iwl_trans *trans,
 
 static int iwl_trans_get_fw_monitor_len(struct iwl_trans *trans, u32 *len)
 {
-	if (trans->num_blocks) {
+	if (trans->dbg.num_blocks) {
 		*len += sizeof(struct iwl_fw_error_dump_data) +
 			sizeof(struct iwl_fw_error_dump_fw_mon) +
-			trans->fw_mon[0].size;
-		return trans->fw_mon[0].size;
-	} else if (trans->dbg_dest_tlv) {
+			trans->dbg.fw_mon[0].size;
+		return trans->dbg.fw_mon[0].size;
+	} else if (trans->dbg.dest_tlv) {
 		u32 base, end, cfg_reg, monitor_len;
 
-		if (trans->dbg_dest_tlv->version == 1) {
-			cfg_reg = le32_to_cpu(trans->dbg_dest_tlv->base_reg);
+		if (trans->dbg.dest_tlv->version == 1) {
+			cfg_reg = le32_to_cpu(trans->dbg.dest_tlv->base_reg);
 			cfg_reg = iwl_read_prph(trans, cfg_reg);
 			base = (cfg_reg & IWL_LDBG_M2S_BUF_BA_MSK) <<
-				trans->dbg_dest_tlv->base_shift;
+				trans->dbg.dest_tlv->base_shift;
 			base *= IWL_M2S_UNIT_SIZE;
 			base += trans->cfg->smem_offset;
 
 			monitor_len =
 				(cfg_reg & IWL_LDBG_M2S_BUF_SIZE_MSK) >>
-				trans->dbg_dest_tlv->end_shift;
+				trans->dbg.dest_tlv->end_shift;
 			monitor_len *= IWL_M2S_UNIT_SIZE;
 		} else {
-			base = le32_to_cpu(trans->dbg_dest_tlv->base_reg);
-			end = le32_to_cpu(trans->dbg_dest_tlv->end_reg);
+			base = le32_to_cpu(trans->dbg.dest_tlv->base_reg);
+			end = le32_to_cpu(trans->dbg.dest_tlv->end_reg);
 
 			base = iwl_read_prph(trans, base) <<
-			       trans->dbg_dest_tlv->base_shift;
+			       trans->dbg.dest_tlv->base_shift;
 			end = iwl_read_prph(trans, end) <<
-			      trans->dbg_dest_tlv->end_shift;
+			      trans->dbg.dest_tlv->end_shift;
 
 			/* Make "end" point to the actual end */
 			if (trans->cfg->device_family >=
 			    IWL_DEVICE_FAMILY_8000 ||
-			    trans->dbg_dest_tlv->monitor_mode == MARBH_MODE)
-				end += (1 << trans->dbg_dest_tlv->end_shift);
+			    trans->dbg.dest_tlv->monitor_mode == MARBH_MODE)
+				end += (1 << trans->dbg.dest_tlv->end_shift);
 			monitor_len = end - base;
 		}
 		*len += sizeof(struct iwl_fw_error_dump_data) +
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 15/20] iwlwifi: support FSEQ TLV even when FMAC is not compiled
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (13 preceding siblings ...)
  2019-06-28  9:20 ` [PATCH 14/20] iwlwifi: dbg: move trans debug fields to a separate struct Luca Coelho
@ 2019-06-28  9:20 ` Luca Coelho
  2019-06-28  9:20 ` [PATCH 16/20] iwlwifi: mvm: make the usage of TWT configurable Luca Coelho
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:20 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Emmanuel Grumbach, Luca Coelho

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

FSEQ TLV should be parsed and read even when FMAC is not compiled.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index 63da2c781d12..b35fee492786 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -1105,6 +1105,18 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
 				le32_to_cpu(recov_info->buf_size);
 			}
 			break;
+		case IWL_UCODE_TLV_FW_FSEQ_VERSION: {
+			struct {
+				u8 version[32];
+				u8 sha1[20];
+			} *fseq_ver = (void *)tlv_data;
+
+			if (tlv_len != sizeof(*fseq_ver))
+				goto invalid_tlv_len;
+			IWL_INFO(drv, "TLV_FW_FSEQ_VERSION: %s\n",
+				 fseq_ver->version);
+			}
+			break;
 		case IWL_UCODE_TLV_UMAC_DEBUG_ADDRS: {
 			struct iwl_umac_debug_addrs *dbg_ptrs =
 				(void *)tlv_data;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 16/20] iwlwifi: mvm: make the usage of TWT configurable
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (14 preceding siblings ...)
  2019-06-28  9:20 ` [PATCH 15/20] iwlwifi: support FSEQ TLV even when FMAC is not compiled Luca Coelho
@ 2019-06-28  9:20 ` Luca Coelho
  2019-06-28  9:20 ` [PATCH 17/20] iwlwifi: dbg_ini: fix debug monitor stop and restart in ini mode Luca Coelho
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:20 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Emmanuel Grumbach, Luca Coelho

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

TWT is still very new and we expect issues. Make its usage
configurable and disable it by default.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/constants.h | 1 +
 drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/constants.h b/drivers/net/wireless/intel/iwlwifi/mvm/constants.h
index dff14f1ec55f..915b172da57a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/constants.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/constants.h
@@ -152,5 +152,6 @@
 #define IWL_MVM_FTM_INITIATOR_ALGO		IWL_TOF_ALGO_TYPE_MAX_LIKE
 #define IWL_MVM_FTM_INITIATOR_DYNACK		true
 #define IWL_MVM_D3_DEBUG			false
+#define IWL_MVM_USE_TWT				false
 
 #endif /* __MVM_CONSTANTS_H */
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
index 699a887612b9..cea1948ac7a4 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
@@ -679,7 +679,7 @@ static int iwl_mvm_mac_ctxt_cmd_sta(struct iwl_mvm *mvm,
 
 	if (vif->bss_conf.he_support && !iwlwifi_mod_params.disable_11ax) {
 		cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_11AX);
-		if (vif->bss_conf.twt_requester)
+		if (vif->bss_conf.twt_requester && IWL_MVM_USE_TWT)
 			ctxt_sta->data_policy |= cpu_to_le32(TWT_SUPPORTED);
 	}
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 17/20] iwlwifi: dbg_ini: fix debug monitor stop and restart in ini mode
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (15 preceding siblings ...)
  2019-06-28  9:20 ` [PATCH 16/20] iwlwifi: mvm: make the usage of TWT configurable Luca Coelho
@ 2019-06-28  9:20 ` Luca Coelho
  2019-06-28  9:20 ` [PATCH 18/20] iwlwifi: dbg: don't stop dbg recording before entering D3 from 9000 devices Luca Coelho
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:20 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Shahar S Matityahu, Luca Coelho

From: Shahar S Matityahu <shahar.s.matityahu@intel.com>

In ini debug mode the recording does not restart unless legacy monitor
configuration is also given.

Add dbg_ini_dest field to trans to indicate the debug monitor
destination to solve this.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c   | 19 +++++++++++++-----
 drivers/net/wireless/intel/iwlwifi/fw/dbg.h   | 20 ++++++++++++++++++-
 .../net/wireless/intel/iwlwifi/iwl-trans.h    |  2 ++
 3 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index 8dc56f14a5cb..38c30fd905ed 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -2381,11 +2381,7 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
 		iwl_fw_error_dump(fwrt);
 	IWL_DEBUG_FW_INFO(fwrt, "WRT: data collection done\n");
 
-	/* start recording again if the firmware is not crashed */
-	if (!test_bit(STATUS_FW_ERROR, &fwrt->trans->status) &&
-	    fwrt->fw->dbg.dest_tlv) {
-		iwl_fw_dbg_restart_recording(fwrt, &params);
-	}
+	iwl_fw_dbg_restart_recording(fwrt, &params);
 
 out:
 	clear_bit(wk_idx, &fwrt->dump.active_wks);
@@ -2516,6 +2512,17 @@ static void iwl_fw_dbg_buffer_apply(struct iwl_fw_runtime *fwrt,
 	int block_idx = trans->dbg.num_blocks;
 	u32 buf_location = le32_to_cpu(alloc->tlv.buffer_location);
 
+	if (fwrt->trans->dbg.ini_dest == IWL_FW_INI_LOCATION_INVALID)
+		fwrt->trans->dbg.ini_dest = buf_location;
+
+	if (buf_location != fwrt->trans->dbg.ini_dest) {
+		WARN(fwrt,
+		     "WRT: attempt to override buffer location on apply point %d\n",
+		     pnt);
+
+		return;
+	}
+
 	if (buf_location == IWL_FW_INI_LOCATION_SRAM_PATH) {
 		IWL_DEBUG_FW(trans, "WRT: applying SMEM buffer destination\n");
 		/* set sram monitor by enabling bit 7 */
@@ -2832,6 +2839,8 @@ static void iwl_fw_dbg_ini_reset_cfg(struct iwl_fw_runtime *fwrt)
 	       sizeof(fwrt->dump.internal_dbg_cfg_name));
 	memset(fwrt->dump.external_dbg_cfg_name, 0,
 	       sizeof(fwrt->dump.external_dbg_cfg_name));
+
+	fwrt->trans->dbg.ini_dest = IWL_FW_INI_LOCATION_INVALID;
 }
 
 void iwl_fw_dbg_apply_point(struct iwl_fw_runtime *fwrt,
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
index 06cdf272e38d..c2d91f645b0f 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
@@ -309,6 +309,14 @@ static inline void
 iwl_fw_dbg_stop_recording(struct iwl_fw_runtime *fwrt,
 			  struct iwl_fw_dbg_params *params)
 {
+	/* if the FW crashed or not debug monitor cfg was given, there is
+	 * no point in stopping
+	 */
+	if (test_bit(STATUS_FW_ERROR, &fwrt->trans->status) ||
+	    (!fwrt->trans->dbg.dest_tlv &&
+	     fwrt->trans->dbg.ini_dest == IWL_FW_INI_LOCATION_INVALID))
+		return;
+
 	if (fwrt->trans->cfg->device_family < IWL_DEVICE_FAMILY_22560)
 		_iwl_fw_dbg_stop_recording(fwrt->trans, params);
 	else
@@ -335,7 +343,9 @@ _iwl_fw_dbg_restart_recording(struct iwl_trans *trans,
 #ifdef CONFIG_IWLWIFI_DEBUGFS
 static inline void iwl_fw_set_dbg_rec_on(struct iwl_fw_runtime *fwrt)
 {
-	if (fwrt->fw->dbg.dest_tlv && fwrt->cur_fw_img == IWL_UCODE_REGULAR)
+	if (fwrt->cur_fw_img == IWL_UCODE_REGULAR &&
+	    (fwrt->fw->dbg.dest_tlv ||
+	     fwrt->trans->dbg.ini_dest != IWL_FW_INI_LOCATION_INVALID))
 		fwrt->trans->dbg.rec_on = true;
 }
 #endif
@@ -344,6 +354,14 @@ static inline void
 iwl_fw_dbg_restart_recording(struct iwl_fw_runtime *fwrt,
 			     struct iwl_fw_dbg_params *params)
 {
+	/* if the FW crashed or not debug monitor cfg was given, there is
+	 * no point in restarting
+	 */
+	if (test_bit(STATUS_FW_ERROR, &fwrt->trans->status) ||
+	    (!fwrt->trans->dbg.dest_tlv &&
+	     fwrt->trans->dbg.ini_dest == IWL_FW_INI_LOCATION_INVALID))
+		return;
+
 	if (fwrt->trans->cfg->device_family < IWL_DEVICE_FAMILY_22560)
 		_iwl_fw_dbg_restart_recording(fwrt->trans, params);
 	else
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
index 90707c576ce4..0f8aeb111b0e 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
@@ -738,6 +738,7 @@ struct iwl_self_init_dram {
  * @num_blocks: number of blocks in fw_mon
  * @fw_mon: address of the buffers for firmware monitor
  * @hw_error: equals true if hw error interrupt was received from the FW
+ * @ini_dest: debug monitor destination uses &enum iwl_fw_ini_buffer_location
  */
 struct iwl_trans_debug {
 	u8 n_dest_reg;
@@ -761,6 +762,7 @@ struct iwl_trans_debug {
 	struct iwl_dram_data fw_mon[IWL_FW_INI_APPLY_NUM];
 
 	bool hw_error;
+	enum iwl_fw_ini_buffer_location ini_dest;
 };
 
 /**
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 18/20] iwlwifi: dbg: don't stop dbg recording before entering D3 from 9000 devices
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (16 preceding siblings ...)
  2019-06-28  9:20 ` [PATCH 17/20] iwlwifi: dbg_ini: fix debug monitor stop and restart in ini mode Luca Coelho
@ 2019-06-28  9:20 ` Luca Coelho
  2019-06-28  9:20 ` [PATCH 19/20] iwlwifi: dbg: debug recording stop and restart command remove Luca Coelho
  2019-06-28  9:20 ` [PATCH 20/20] iwlwifi: mvm: remove MAC_FILTER_IN_11AX for AP mode Luca Coelho
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:20 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Shahar S Matityahu, Luca Coelho

From: Shahar S Matityahu <shahar.s.matityahu@intel.com>

From 9000 device family the FW automatically stops the debug
recording and the driver should not stop it as well.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index 3a5710d32acf..47f1529b6491 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -1078,11 +1078,12 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
 #endif
 
 	/*
-	 * TODO: this is needed because the firmware is not stopping
-	 * the recording automatically before entering D3.  This can
-	 * be removed once the FW starts doing that.
+	 * Prior to 9000 device family the driver needs to stop the dbg
+	 * recording before entering D3. In later devices the FW stops the
+	 * recording automatically.
 	 */
-	_iwl_fw_dbg_stop_recording(mvm->fwrt.trans, NULL);
+	if (mvm->trans->cfg->device_family < IWL_DEVICE_FAMILY_9000)
+		_iwl_fw_dbg_stop_recording(mvm->trans, NULL);
 
 	/* must be last -- this switches firmware state */
 	ret = iwl_mvm_send_cmd(mvm, &d3_cfg_cmd);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 19/20] iwlwifi: dbg: debug recording stop and restart command remove
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (17 preceding siblings ...)
  2019-06-28  9:20 ` [PATCH 18/20] iwlwifi: dbg: don't stop dbg recording before entering D3 from 9000 devices Luca Coelho
@ 2019-06-28  9:20 ` Luca Coelho
  2019-06-28  9:20 ` [PATCH 20/20] iwlwifi: mvm: remove MAC_FILTER_IN_11AX for AP mode Luca Coelho
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:20 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Shahar S Matityahu, Luca Coelho

From: Shahar S Matityahu <shahar.s.matityahu@intel.com>

The 0xF6 command used to start and stop the recording from 22560 devices
was removed. This is causing an assert when the driver tries to alter
the recording state.
Remove the use of the command.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c   |  2 +-
 drivers/net/wireless/intel/iwlwifi/fw/dbg.h   | 47 +++++++------------
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c   |  2 +-
 .../wireless/intel/iwlwifi/pcie/trans-gen2.c  |  2 +-
 .../net/wireless/intel/iwlwifi/pcie/trans.c   |  2 +-
 5 files changed, 22 insertions(+), 33 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index 38c30fd905ed..15beaea37e61 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -2372,7 +2372,7 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
 		goto out;
 	}
 
-	iwl_fw_dbg_stop_recording(fwrt, &params);
+	iwl_fw_dbg_stop_recording(fwrt->trans, &params);
 
 	IWL_DEBUG_FW_INFO(fwrt, "WRT: data collection start\n");
 	if (fwrt->trans->dbg.ini_valid)
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
index c2d91f645b0f..47470cf80e6d 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
@@ -263,23 +263,6 @@ _iwl_fw_dbg_trigger_simple_stop(struct iwl_fw_runtime *fwrt,
 					iwl_fw_dbg_get_trigger((fwrt)->fw,\
 							       (trig)))
 
-static inline int
-iwl_fw_dbg_start_stop_hcmd(struct iwl_fw_runtime *fwrt, bool start)
-{
-	struct iwl_ldbg_config_cmd cmd = {
-		.type = start ? cpu_to_le32(START_DEBUG_RECORDING) :
-				cpu_to_le32(STOP_DEBUG_RECORDING),
-	};
-	struct iwl_host_cmd hcmd = {
-		.id = LDBG_CONFIG_CMD,
-		.flags = CMD_ASYNC,
-		.data[0] = &cmd,
-		.len[0] = sizeof(cmd),
-	};
-
-	return iwl_trans_send_cmd(fwrt->trans, &hcmd);
-}
-
 static inline void
 _iwl_fw_dbg_stop_recording(struct iwl_trans *trans,
 			   struct iwl_fw_dbg_params *params)
@@ -306,21 +289,24 @@ _iwl_fw_dbg_stop_recording(struct iwl_trans *trans,
 }
 
 static inline void
-iwl_fw_dbg_stop_recording(struct iwl_fw_runtime *fwrt,
+iwl_fw_dbg_stop_recording(struct iwl_trans *trans,
 			  struct iwl_fw_dbg_params *params)
 {
 	/* if the FW crashed or not debug monitor cfg was given, there is
 	 * no point in stopping
 	 */
-	if (test_bit(STATUS_FW_ERROR, &fwrt->trans->status) ||
-	    (!fwrt->trans->dbg.dest_tlv &&
-	     fwrt->trans->dbg.ini_dest == IWL_FW_INI_LOCATION_INVALID))
+	if (test_bit(STATUS_FW_ERROR, &trans->status) ||
+	    (!trans->dbg.dest_tlv &&
+	     trans->dbg.ini_dest == IWL_FW_INI_LOCATION_INVALID))
 		return;
 
-	if (fwrt->trans->cfg->device_family < IWL_DEVICE_FAMILY_22560)
-		_iwl_fw_dbg_stop_recording(fwrt->trans, params);
-	else
-		iwl_fw_dbg_start_stop_hcmd(fwrt, false);
+	if (trans->cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
+		IWL_ERR(trans,
+			"WRT: unsupported device family %d for debug stop recording\n",
+			trans->cfg->device_family);
+		return;
+	}
+	_iwl_fw_dbg_stop_recording(trans, params);
 }
 
 static inline void
@@ -362,10 +348,13 @@ iwl_fw_dbg_restart_recording(struct iwl_fw_runtime *fwrt,
 	     fwrt->trans->dbg.ini_dest == IWL_FW_INI_LOCATION_INVALID))
 		return;
 
-	if (fwrt->trans->cfg->device_family < IWL_DEVICE_FAMILY_22560)
-		_iwl_fw_dbg_restart_recording(fwrt->trans, params);
-	else
-		iwl_fw_dbg_start_stop_hcmd(fwrt, true);
+	if (fwrt->trans->cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
+		IWL_ERR(fwrt,
+			"WRT: unsupported device family %d for debug restart recording\n",
+			fwrt->trans->cfg->device_family);
+		return;
+	}
+	_iwl_fw_dbg_restart_recording(fwrt->trans, params);
 #ifdef CONFIG_IWLWIFI_DEBUGFS
 	iwl_fw_set_dbg_rec_on(fwrt);
 #endif
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index 47f1529b6491..9677955624e1 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -1083,7 +1083,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
 	 * recording automatically.
 	 */
 	if (mvm->trans->cfg->device_family < IWL_DEVICE_FAMILY_9000)
-		_iwl_fw_dbg_stop_recording(mvm->trans, NULL);
+		iwl_fw_dbg_stop_recording(mvm->trans, NULL);
 
 	/* must be last -- this switches firmware state */
 	ret = iwl_mvm_send_cmd(mvm, &d3_cfg_cmd);
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
index 8507a7bdcfdd..a1533f025f5e 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
@@ -148,7 +148,7 @@ void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans, bool low_power)
 	trans_pcie->is_down = true;
 
 	/* Stop dbgc before stopping device */
-	_iwl_fw_dbg_stop_recording(trans, NULL);
+	iwl_fw_dbg_stop_recording(trans, NULL);
 
 	/* tell the device to stop sending interrupts */
 	iwl_disable_interrupts(trans);
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index 13ebd948ccc0..ba2f4c7c52d7 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -1243,7 +1243,7 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans, bool low_power)
 	trans_pcie->is_down = true;
 
 	/* Stop dbgc before stopping device */
-	_iwl_fw_dbg_stop_recording(trans, NULL);
+	iwl_fw_dbg_stop_recording(trans, NULL);
 
 	/* tell the device to stop sending interrupts */
 	iwl_disable_interrupts(trans);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 20/20] iwlwifi: mvm: remove MAC_FILTER_IN_11AX for AP mode
  2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
                   ` (18 preceding siblings ...)
  2019-06-28  9:20 ` [PATCH 19/20] iwlwifi: dbg: debug recording stop and restart command remove Luca Coelho
@ 2019-06-28  9:20 ` Luca Coelho
  19 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-06-28  9:20 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Luca Coelho

From: Luca Coelho <luciano.coelho@intel.com>

The FW API was clarified saying that this flag should only be set in
BSS client mode.  Remove it from the MAC_CTXT command we send in AP
and GO modes.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Fixes: 3b5ee8dd8bb1 ("iwlwifi: mvm: set MAC_FILTER_IN_11AX in AP mode")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
index cea1948ac7a4..cb22d447fcb8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
@@ -1082,9 +1082,6 @@ static void iwl_mvm_mac_ctxt_cmd_fill_ap(struct iwl_mvm *mvm,
 		IWL_DEBUG_HC(mvm, "No need to receive beacons\n");
 	}
 
-	if (vif->bss_conf.he_support && !iwlwifi_mod_params.disable_11ax)
-		cmd->filter_flags |= cpu_to_le32(MAC_FILTER_IN_11AX);
-
 	ctxt_ap->bi = cpu_to_le32(vif->bss_conf.beacon_int);
 	ctxt_ap->dtim_interval = cpu_to_le32(vif->bss_conf.beacon_int *
 					     vif->bss_conf.dtim_period);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH 08/20] iwlwifi: mvm: Add log information about SAR status
  2019-06-28  9:19 ` [PATCH 08/20] iwlwifi: mvm: Add log information about SAR status Luca Coelho
@ 2019-09-30 12:06   ` Matteo Croce
  2019-09-30 12:12     ` Luca Coelho
  0 siblings, 1 reply; 23+ messages in thread
From: Matteo Croce @ 2019-09-30 12:06 UTC (permalink / raw)
  To: Luca Coelho, Haim Dreyfuss, Luca Coelho; +Cc: Kalle Valo, linux-wireless

On Fri, Jun 28, 2019 at 11:20 AM Luca Coelho <luca@coelho.fi> wrote:
>
> From: Haim Dreyfuss <haim.dreyfuss@intel.com>
>
> Inform users when SAR status is changing.
>
> Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---
>  drivers/net/wireless/intel/iwlwifi/mvm/fw.c  | 3 +++
>  drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 9 +++++++++
>  2 files changed, 12 insertions(+)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> index b27be2e3eca2..41a98cf01d0e 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> @@ -850,6 +850,9 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b)
>                         return -ENOENT;
>                 }
>
> +               IWL_DEBUG_INFO(mvm,
> +                              "SAR EWRD: chain %d profile index %d\n",
> +                              i, profs[i]);
>                 IWL_DEBUG_RADIO(mvm, "  Chain[%d]:\n", i);
>                 for (j = 0; j < ACPI_SAR_NUM_SUB_BANDS; j++) {
>                         idx = (i * ACPI_SAR_NUM_SUB_BANDS) + j;
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c
> index 7bdbd010ae6b..719f793b3487 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c
> @@ -620,6 +620,7 @@ void iwl_mvm_rx_chub_update_mcc(struct iwl_mvm *mvm,
>         enum iwl_mcc_source src;
>         char mcc[3];
>         struct ieee80211_regdomain *regd;
> +       u32 wgds_tbl_idx;
>
>         lockdep_assert_held(&mvm->mutex);
>
> @@ -643,6 +644,14 @@ void iwl_mvm_rx_chub_update_mcc(struct iwl_mvm *mvm,
>         if (IS_ERR_OR_NULL(regd))
>                 return;
>
> +       wgds_tbl_idx = iwl_mvm_get_sar_geo_profile(mvm);
> +       if (wgds_tbl_idx < 0)
> +               IWL_DEBUG_INFO(mvm, "SAR WGDS is disabled (%d)\n",
> +                              wgds_tbl_idx);
> +       else
> +               IWL_DEBUG_INFO(mvm, "SAR WGDS: geo profile %d is configured\n",
> +                              wgds_tbl_idx);
> +
>         regulatory_set_wiphy_regd(mvm->hw->wiphy, regd);
>         kfree(regd);
>  }
> --
> 2.20.1
>

Hi all,

this patch seems to cause a long microcode dump:

[   16.792357] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   16.939172] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   17.019127] iwlwifi 0000:04:00.0: FW already configured (0) - re-configuring
[   17.053395] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   17.200436] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   17.280572] iwlwifi 0000:04:00.0: FW already configured (0) - re-configuring
[   20.822983] iwlwifi 0000:04:00.0: Microcode SW error detected.
Restarting 0x82000000.
[   20.823153] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   20.823155] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 6
[   20.823157] iwlwifi 0000:04:00.0: Loaded firmware version: 36.77d01142.0
[   20.823158] iwlwifi 0000:04:00.0: 0x00000038 | BAD_COMMAND
[   20.823160] iwlwifi 0000:04:00.0: 0x000002F0 | trm_hw_status0
[   20.823161] iwlwifi 0000:04:00.0: 0x00000000 | trm_hw_status1
[   20.823162] iwlwifi 0000:04:00.0: 0x00024200 | branchlink2
[   20.823163] iwlwifi 0000:04:00.0: 0x00039872 | interruptlink1
[   20.823164] iwlwifi 0000:04:00.0: 0x00000000 | interruptlink2
[   20.823166] iwlwifi 0000:04:00.0: 0x00330405 | data1
[   20.823167] iwlwifi 0000:04:00.0: 0x00000034 | data2
[   20.823168] iwlwifi 0000:04:00.0: 0x00000034 | data3
[   20.823169] iwlwifi 0000:04:00.0: 0x00099ECD | beacon time
[   20.823170] iwlwifi 0000:04:00.0: 0x003662E5 | tsf low
[   20.823171] iwlwifi 0000:04:00.0: 0x00000000 | tsf hi
[   20.823173] iwlwifi 0000:04:00.0: 0x00000000 | time gp1
[   20.823174] iwlwifi 0000:04:00.0: 0x003662E6 | time gp2
[   20.823175] iwlwifi 0000:04:00.0: 0x00000001 | uCode revision type
[   20.823176] iwlwifi 0000:04:00.0: 0x00000024 | uCode version major
[   20.823177] iwlwifi 0000:04:00.0: 0x77D01142 | uCode version minor
[   20.823178] iwlwifi 0000:04:00.0: 0x00000201 | hw version
[   20.823180] iwlwifi 0000:04:00.0: 0x00489008 | board version
[   20.823181] iwlwifi 0000:04:00.0: 0x00330405 | hcmd
[   20.823182] iwlwifi 0000:04:00.0: 0x00022080 | isr0
[   20.823183] iwlwifi 0000:04:00.0: 0x10800000 | isr1
[   20.823184] iwlwifi 0000:04:00.0: 0x28201802 | isr2
[   20.823185] iwlwifi 0000:04:00.0: 0x00400080 | isr3
[   20.823187] iwlwifi 0000:04:00.0: 0x00000000 | isr4
[   20.823188] iwlwifi 0000:04:00.0: 0x003201C8 | last cmd Id
[   20.823189] iwlwifi 0000:04:00.0: 0x00000000 | wait_event
[   20.823190] iwlwifi 0000:04:00.0: 0x00000080 | l2p_control
[   20.823191] iwlwifi 0000:04:00.0: 0x00000000 | l2p_duration
[   20.823192] iwlwifi 0000:04:00.0: 0x00000000 | l2p_mhvalid
[   20.823193] iwlwifi 0000:04:00.0: 0x00000000 | l2p_addr_match
[   20.823195] iwlwifi 0000:04:00.0: 0x0000008F | lmpm_pmg_sel
[   20.823196] iwlwifi 0000:04:00.0: 0x19071249 | timestamp
[   20.823197] iwlwifi 0000:04:00.0: 0x00005868 | flow_handler
[   20.823358] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   20.823359] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 7
[   20.823361] iwlwifi 0000:04:00.0: 0x00000070 | NMI_INTERRUPT_LMAC_FATAL
[   20.823362] iwlwifi 0000:04:00.0: 0x00000000 | umac branchlink1
[   20.823363] iwlwifi 0000:04:00.0: 0xC0086B38 | umac branchlink2
[   20.823364] iwlwifi 0000:04:00.0: 0xC0083D08 | umac interruptlink1
[   20.823365] iwlwifi 0000:04:00.0: 0xC0083D08 | umac interruptlink2
[   20.823367] iwlwifi 0000:04:00.0: 0x00000800 | umac data1
[   20.823368] iwlwifi 0000:04:00.0: 0xC0083D08 | umac data2
[   20.823369] iwlwifi 0000:04:00.0: 0xDEADBEEF | umac data3
[   20.823370] iwlwifi 0000:04:00.0: 0x00000024 | umac major
[   20.823371] iwlwifi 0000:04:00.0: 0x77D01142 | umac minor
[   20.823372] iwlwifi 0000:04:00.0: 0xC088628C | frame pointer
[   20.823374] iwlwifi 0000:04:00.0: 0xC088628C | stack pointer
[   20.823375] iwlwifi 0000:04:00.0: 0x00330405 | last host cmd
[   20.823376] iwlwifi 0000:04:00.0: 0x00000000 | isr status reg
[   20.823495] iwlwifi 0000:04:00.0: Fseq Registers:
[   20.823500] iwlwifi 0000:04:00.0: 0x81F5E342 | FSEQ_ERROR_CODE
[   20.823549] iwlwifi 0000:04:00.0: 0x120F8254 | FSEQ_TOP_INIT_VERSION
[   20.823598] iwlwifi 0000:04:00.0: 0x54034CA7 | FSEQ_CNVIO_INIT_VERSION
[   20.823647] iwlwifi 0000:04:00.0: 0x0000A056 | FSEQ_OTP_VERSION
[   20.823696] iwlwifi 0000:04:00.0: 0xCCA632D8 | FSEQ_TOP_CONTENT_VERSION
[   20.823745] iwlwifi 0000:04:00.0: 0xFCBC4F8A | FSEQ_ALIVE_TOKEN
[   20.823750] iwlwifi 0000:04:00.0: 0x377E9CF5 | FSEQ_CNVI_ID
[   20.823755] iwlwifi 0000:04:00.0: 0x7673FF81 | FSEQ_CNVR_ID
[   20.823804] iwlwifi 0000:04:00.0: 0x03000000 | CNVI_AUX_MISC_CHIP
[   20.823852] iwlwifi 0000:04:00.0: 0x0BADCAFE | CNVR_AUX_MISC_CHIP
[   20.823860] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
[   20.823910] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
[   20.823971] iwlwifi 0000:04:00.0: Collecting data: trigger 2 fired.
[   20.823973] ieee80211 phy0: Hardware restart was requested
[   20.823978] iwlwifi 0000:04:00.0: FW Error notification: type
0x00000000 cmd_id 0x05
[   20.823980] iwlwifi 0000:04:00.0: FW Error notification: seq 0x0033
service 0x00000005
[   20.823981] iwlwifi 0000:04:00.0: FW Error notification: timestamp
0x00000000003662E2
[   20.831748] iwlwifi 0000:04:00.0: iwlwifi transaction failed,
dumping registers
[   20.831750] iwlwifi 0000:04:00.0: iwlwifi device config registers:
[   20.832261] iwlwifi 0000:04:00.0: 00000000: 24f38086 00100406
0280003a 00000000 b3d00004 00000000 00000000 00000000
[   20.832264] iwlwifi 0000:04:00.0: 00000020: 00000000 00000000
00000000 01308086 00000000 000000c8 00000000 000001ff
[   20.832266] iwlwifi 0000:04:00.0: 00000040: 00020010 10008ec0
00190c10 0045e811 10110142 00000000 00000000 00000000
[   20.832268] iwlwifi 0000:04:00.0: 00000060: 00000000 00080812
00000405 00000000 00010001 00000000 00000000 00000000
[   20.832271] iwlwifi 0000:04:00.0: 00000080: 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000
[   20.832272] iwlwifi 0000:04:00.0: 000000a0: 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000
[   20.832275] iwlwifi 0000:04:00.0: 000000c0: 00000000 00000000
c823d001 0d000000 00814005 fee004d8 00000000 00000000
[   20.832277] iwlwifi 0000:04:00.0: 000000e0: 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000
[   20.832279] iwlwifi 0000:04:00.0: 00000100: 14010001 00000000
00000000 00462031 00000000 00002000 00000000 00000000
[   20.832280] iwlwifi 0000:04:00.0: 00000120: 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000
[   20.832282] iwlwifi 0000:04:00.0: 00000140: 14c10003 ffb66999
d4258bff 15410018 10031003 0001001e 00481e1f 40a0000f
[   20.832284] iwlwifi 0000:04:00.0: iwlwifi device memory mapped registers:
[   20.832434] iwlwifi 0000:04:00.0: 00000000: 00489008 0000ff40
00000000 00000000 00000000 00000000 00000019 00000000
[   20.832437] iwlwifi 0000:04:00.0: 00000020: 00000000 08040005
00000201 d55555d5 d55555d5 d55555d5 80008040 041f0042
[   20.832488] iwlwifi 0000:04:00.0: iwlwifi device AER capability structure:
[   20.832557] iwlwifi 0000:04:00.0: 00000000: 14010001 00000000
00000000 00462031 00000000 00002000 00000000 00000000
[   20.832559] iwlwifi 0000:04:00.0: 00000020: 00000000 00000000 00000000
[   20.832560] iwlwifi 0000:04:00.0: iwlwifi parent port
(0000:00:1c.2) config registers:
[   20.832650] iwlwifi 0000:00:1c.2: 00000000: a1128086 00100407
060400f1 00810000 00000000 00000000 00040400 200000f0
[   20.832652] iwlwifi 0000:00:1c.2: 00000020: b3d0b3d0 0001fff1
00000000 00000000 00000000 00000040 00000000 000203ff
[   20.832654] iwlwifi 0000:00:1c.2: 00000040: 01428010 00008001
0010000f 03724c13 70110042 0014b200 01400000 00000000
[   20.832655] iwlwifi 0000:00:1c.2: 00000060: 00000000 00000837
00000400 0000000e 00010003 00000000 00000000 00000000
[   20.832657] iwlwifi 0000:00:1c.2: 00000080: 00019005 fee00278
00000000 00000000 0000a00d 222e17aa 00000000 00000000
[   20.832659] iwlwifi 0000:00:1c.2: 000000a0: c8030001 00000000
00000000 00000000 00000000 00000000 00000000 00000000
[   20.832661] iwlwifi 0000:00:1c.2: 000000c0: 00000000 00000000
00000000 00000000 07001001 00001842 8b9e0008 00000000
[   20.832663] iwlwifi 0000:00:1c.2: 000000e0: 00630300 8c548c54
00100016 00000000 00000050 4c000000 08410fb3 03000000
[   20.832665] iwlwifi 0000:00:1c.2: 00000100: 14010001 00000000
00000000 00060011 00000000 00002000 00000000 00000000
[   20.832666] iwlwifi 0000:00:1c.2: 00000120: 00000000 00000000
00000000 00000007 00000000 00000000 00000000 00000000
[   20.832668] iwlwifi 0000:00:1c.2: 00000140: 2001000d 0000000f
0000000d 00000000 00000000 00000000 00000000 00000000
[   20.832670] iwlwifi 0000:00:1c.2: 00000160: 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000
[   20.832671] iwlwifi 0000:00:1c.2: 00000180: 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000
[   20.832673] iwlwifi 0000:00:1c.2: 000001a0: 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000
[   20.832675] iwlwifi 0000:00:1c.2: 000001c0: 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000
[   20.832676] iwlwifi 0000:00:1c.2: 000001e0: 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000
[   20.832677] iwlwifi 0000:00:1c.2: 00000200: 2201001e 00b0281f 40a0280f
[   20.832680] iwlwifi 0000:04:00.0: iwlwifi root port (0000:00:1c.2)
AER cap structure:
[   20.832689] iwlwifi 0000:00:1c.2: 00000000: 14010001 00000000
00000000 00060011 00000000 00002000 00000000 00000000
[   20.832691] iwlwifi 0000:00:1c.2: 00000020: 00000000 00000000
00000000 00000007 00000000 00000000
[   20.832693] iwlwifi 0000:04:00.0: FW error in SYNC CMD GEO_TX_POWER_LIMIT
[   20.832695] CPU: 2 PID: 163 Comm: kworker/2:2 Not tainted 5.3.1-matteo #81
[   20.832696] Hardware name: LENOVO 20EQS64N1B/20EQS64N1B, BIOS
N1EET84W (1.57 ) 05/09/2019
[   20.832706] Workqueue: events iwl_mvm_async_handlers_wk [iwlmvm]
[   20.832707] Call Trace:
[   20.832713]  dump_stack+0x46/0x60
[   20.832723]  iwl_trans_pcie_send_hcmd+0x505/0x520 [iwlwifi]
[   20.832726]  ? wait_woken+0x70/0x70
[   20.832734]  iwl_trans_send_cmd+0x57/0xb0 [iwlwifi]
[   20.832742]  iwl_mvm_send_cmd+0x23/0x80 [iwlmvm]
[   20.832749]  iwl_mvm_get_sar_geo_profile+0xae/0x130 [iwlmvm]
[   20.832756]  iwl_mvm_rx_chub_update_mcc+0x108/0x1a0 [iwlmvm]
[   20.832762]  iwl_mvm_async_handlers_wk+0xaa/0x140 [iwlmvm]
[   20.832765]  process_one_work+0x1cf/0x370
[   20.832767]  worker_thread+0x4a/0x3c0
[   20.832769]  kthread+0xfb/0x130
[   20.832771]  ? cancel_delayed_work+0x90/0x90
[   20.832772]  ? kthread_create_on_node+0x60/0x60
[   20.832773]  ret_from_fork+0x35/0x40
[   20.832777] iwlwifi 0000:04:00.0: Failed to get geographic profile info -5
[   20.832792] ------------[ cut here ]------------
[   20.832813] WARNING: CPU: 2 PID: 163 at
drivers/net/wireless/intel/iwlwifi/mvm/scan.c:1874
iwl_mvm_rx_umac_scan_complete_notif.cold+0xc/0x13 [iwlmvm]
[   20.832814] Modules linked in: xt_MASQUERADE xt_conntrack
ipt_REJECT nf_reject_ipv4 xt_tcpudp tun bridge stp llc iptable_mangle
iptable_nat nf_nat nf_conntrack libcrc32c nf_defrag_ipv4
ip6table_filter ip6_tables iptable_filter ip_tables x_tables rmi_smbus
rmi_core snd_hda_codec_hdmi nls_iso8859_1 vfat fat intel_rapl_msr
iwlmvm snd_hda_codec_realtek snd_hda_codec_generic iTCO_wdt uvcvideo
videobuf2_vmalloc mac80211 snd_hda_intel libarc4 coretemp
videobuf2_memops snd_hda_codec intel_rapl_common videobuf2_v4l2
iosf_mbi snd_hwdep videodev snd_hda_core x86_pkg_temp_thermal snd_seq
intel_powerclamp videobuf2_common snd_seq_device kvm_intel iwlwifi
snd_pcm kvm irqbypass intel_cstate snd_timer rtsx_pci_ms
intel_rapl_perf i2c_i801 memstick psmouse snd efivars soundcore
cfg80211 mei_me mei dm_crypt rtsx_pci_sdmmc mmc_core nouveau hwmon
led_class mxm_wmi drm_kms_helper syscopyarea sysfillrect sysimgblt
fb_sys_fops xhci_pci ttm rtsx_pci xhci_hcd e1000e mfd_core drm agpgart
usbcore usb_common wmi video
[   20.832843]  dm_mod ipv6 nf_defrag_ipv6 autofs4
[   20.832846] CPU: 2 PID: 163 Comm: kworker/2:2 Not tainted 5.3.1-matteo #81
[   20.832847] Hardware name: LENOVO 20EQS64N1B/20EQS64N1B, BIOS
N1EET84W (1.57 ) 05/09/2019
[   20.832854] Workqueue: events iwl_mvm_async_handlers_wk [iwlmvm]
[   20.832862] RIP:
0010:iwl_mvm_rx_umac_scan_complete_notif.cold+0xc/0x13 [iwlmvm]
[   20.832863] Code: 48 c7 c7 18 6e aa a0 e8 bc 6f 66 e0 0f 0b 49 8b
47 10 44 8b a0 9c 00 00 00 e9 8b de fe ff 48 c7 c7 18 6e aa a0 e8 9e
6f 66 e0 <0f> 0b e9 d2 e3 fe ff 48 c7 c7 18 6e aa a0 e8 8b 6f 66 e0 0f
0b 41
[   20.832864] RSP: 0000:ffffc900003bfdf0 EFLAGS: 00010246
[   20.832865] RAX: 0000000000000024 RBX: ffff88887e765040 RCX: 0000000000000006
[   20.832866] RDX: 0000000000000000 RSI: 0000000000000096 RDI: ffff888883a96370
[   20.832867] RBP: ffff88887cef1e58 R08: 0000000000000001 R09: 00000000000003e9
[   20.832868] R10: 0000000000016a68 R11: 0000000000000004 R12: ffff88887cef1e28
[   20.832868] R13: ffff88887cef1e28 R14: ffff88887c666fc0 R15: dead000000000100
[   20.832870] FS:  0000000000000000(0000) GS:ffff888883a80000(0000)
knlGS:0000000000000000
[   20.832870] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   20.832871] CR2: 00007fced42b4078 CR3: 000000087938a004 CR4: 00000000003606e0
[   20.832872] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   20.832873] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   20.832873] Call Trace:
[   20.832880]  iwl_mvm_async_handlers_wk+0xaa/0x140 [iwlmvm]
[   20.832883]  process_one_work+0x1cf/0x370
[   20.832885]  worker_thread+0x4a/0x3c0
[   20.832886]  kthread+0xfb/0x130
[   20.832887]  ? cancel_delayed_work+0x90/0x90
[   20.832889]  ? kthread_create_on_node+0x60/0x60
[   20.832890]  ret_from_fork+0x35/0x40
[   20.832891] ---[ end trace c1c6ffcd88e853ba ]---
[   22.960642] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   23.108376] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   23.188882] iwlwifi 0000:04:00.0: FW already configured (0) - re-configuring
[   26.542158] iwlwifi 0000:04:00.0: Microcode SW error detected.
Restarting 0x82000000.
[   26.542382] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   26.542384] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 6
[   26.542385] iwlwifi 0000:04:00.0: Loaded firmware version: 36.77d01142.0
[   26.542386] iwlwifi 0000:04:00.0: 0x00000038 | BAD_COMMAND
[   26.542387] iwlwifi 0000:04:00.0: 0x000002F0 | trm_hw_status0
[   26.542389] iwlwifi 0000:04:00.0: 0x00000000 | trm_hw_status1
[   26.542390] iwlwifi 0000:04:00.0: 0x00024200 | branchlink2
[   26.542391] iwlwifi 0000:04:00.0: 0x00039872 | interruptlink1
[   26.542392] iwlwifi 0000:04:00.0: 0x00000000 | interruptlink2
[   26.542393] iwlwifi 0000:04:00.0: 0x003B0405 | data1
[   26.542394] iwlwifi 0000:04:00.0: 0x0000003C | data2
[   26.542395] iwlwifi 0000:04:00.0: 0x0000003C | data3
[   26.542396] iwlwifi 0000:04:00.0: 0x000C80BE | beacon time
[   26.542397] iwlwifi 0000:04:00.0: 0x0033801A | tsf low
[   26.542398] iwlwifi 0000:04:00.0: 0x00000000 | tsf hi
[   26.542399] iwlwifi 0000:04:00.0: 0x00000000 | time gp1
[   26.542400] iwlwifi 0000:04:00.0: 0x0033801B | time gp2
[   26.542401] iwlwifi 0000:04:00.0: 0x00000001 | uCode revision type
[   26.542402] iwlwifi 0000:04:00.0: 0x00000024 | uCode version major
[   26.542403] iwlwifi 0000:04:00.0: 0x77D01142 | uCode version minor
[   26.542404] iwlwifi 0000:04:00.0: 0x00000201 | hw version
[   26.542405] iwlwifi 0000:04:00.0: 0x00489008 | board version
[   26.542406] iwlwifi 0000:04:00.0: 0x003B0405 | hcmd
[   26.542407] iwlwifi 0000:04:00.0: 0x00022080 | isr0
[   26.542408] iwlwifi 0000:04:00.0: 0x00000000 | isr1
[   26.542409] iwlwifi 0000:04:00.0: 0x28201802 | isr2
[   26.542410] iwlwifi 0000:04:00.0: 0x00400080 | isr3
[   26.542411] iwlwifi 0000:04:00.0: 0x00000000 | isr4
[   26.542412] iwlwifi 0000:04:00.0: 0x003A01C8 | last cmd Id
[   26.542413] iwlwifi 0000:04:00.0: 0x00000000 | wait_event
[   26.542414] iwlwifi 0000:04:00.0: 0x00000080 | l2p_control
[   26.542415] iwlwifi 0000:04:00.0: 0x00000000 | l2p_duration
[   26.542416] iwlwifi 0000:04:00.0: 0x00000000 | l2p_mhvalid
[   26.542417] iwlwifi 0000:04:00.0: 0x00000000 | l2p_addr_match
[   26.542418] iwlwifi 0000:04:00.0: 0x0000008F | lmpm_pmg_sel
[   26.542419] iwlwifi 0000:04:00.0: 0x19071249 | timestamp
[   26.542420] iwlwifi 0000:04:00.0: 0x00005060 | flow_handler
[   26.542581] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   26.542582] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 7
[   26.542584] iwlwifi 0000:04:00.0: 0x00000070 | NMI_INTERRUPT_LMAC_FATAL
[   26.542585] iwlwifi 0000:04:00.0: 0x00000000 | umac branchlink1
[   26.542586] iwlwifi 0000:04:00.0: 0xC0086B38 | umac branchlink2
[   26.542587] iwlwifi 0000:04:00.0: 0xC0083D08 | umac interruptlink1
[   26.542588] iwlwifi 0000:04:00.0: 0xC0083D08 | umac interruptlink2
[   26.542589] iwlwifi 0000:04:00.0: 0x00000800 | umac data1
[   26.542590] iwlwifi 0000:04:00.0: 0xC0083D08 | umac data2
[   26.542591] iwlwifi 0000:04:00.0: 0xDEADBEEF | umac data3
[   26.542592] iwlwifi 0000:04:00.0: 0x00000024 | umac major
[   26.542593] iwlwifi 0000:04:00.0: 0x77D01142 | umac minor
[   26.542594] iwlwifi 0000:04:00.0: 0xC088628C | frame pointer
[   26.542595] iwlwifi 0000:04:00.0: 0xC088628C | stack pointer
[   26.542596] iwlwifi 0000:04:00.0: 0x003B0405 | last host cmd
[   26.542597] iwlwifi 0000:04:00.0: 0x00000000 | isr status reg
[   26.542716] iwlwifi 0000:04:00.0: Fseq Registers:
[   26.542721] iwlwifi 0000:04:00.0: 0x81F5E342 | FSEQ_ERROR_CODE
[   26.542726] iwlwifi 0000:04:00.0: 0x120F8254 | FSEQ_TOP_INIT_VERSION
[   26.542730] iwlwifi 0000:04:00.0: 0x54034CA7 | FSEQ_CNVIO_INIT_VERSION
[   26.542735] iwlwifi 0000:04:00.0: 0x0000A056 | FSEQ_OTP_VERSION
[   26.542740] iwlwifi 0000:04:00.0: 0xCCA632D8 | FSEQ_TOP_CONTENT_VERSION
[   26.542745] iwlwifi 0000:04:00.0: 0xFCBC4F8A | FSEQ_ALIVE_TOKEN
[   26.542750] iwlwifi 0000:04:00.0: 0x377E9CF5 | FSEQ_CNVI_ID
[   26.542754] iwlwifi 0000:04:00.0: 0x7673FF81 | FSEQ_CNVR_ID
[   26.542759] iwlwifi 0000:04:00.0: 0x03000000 | CNVI_AUX_MISC_CHIP
[   26.542767] iwlwifi 0000:04:00.0: 0x0BADCAFE | CNVR_AUX_MISC_CHIP
[   26.542775] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
[   26.542782] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
[   26.542789] iwlwifi 0000:04:00.0: Collecting data: trigger 2 fired.
[   26.542792] ieee80211 phy0: Hardware restart was requested
[   26.542797] iwlwifi 0000:04:00.0: FW Error notification: type
0x00000000 cmd_id 0x05
[   26.542798] iwlwifi 0000:04:00.0: FW Error notification: seq 0x003B
service 0x00000005
[   26.542799] iwlwifi 0000:04:00.0: FW Error notification: timestamp
0x0000000000338017
[   26.542809] iwlwifi 0000:04:00.0: FW error in SYNC CMD GEO_TX_POWER_LIMIT
[   26.542812] CPU: 2 PID: 452 Comm: kworker/2:3 Tainted: G        W
      5.3.1-matteo #81
[   26.542813] Hardware name: LENOVO 20EQS64N1B/20EQS64N1B, BIOS
N1EET84W (1.57 ) 05/09/2019
[   26.542823] Workqueue: events iwl_mvm_async_handlers_wk [iwlmvm]
[   26.542825] Call Trace:
[   26.542831]  dump_stack+0x46/0x60
[   26.542841]  iwl_trans_pcie_send_hcmd+0x505/0x520 [iwlwifi]
[   26.542845]  ? wait_woken+0x70/0x70
[   26.542853]  iwl_trans_send_cmd+0x57/0xb0 [iwlwifi]
[   26.542862]  iwl_mvm_send_cmd+0x23/0x80 [iwlmvm]
[   26.542868]  iwl_mvm_get_sar_geo_profile+0xae/0x130 [iwlmvm]
[   26.542876]  iwl_mvm_rx_chub_update_mcc+0x108/0x1a0 [iwlmvm]
[   26.542882]  iwl_mvm_async_handlers_wk+0xaa/0x140 [iwlmvm]
[   26.542885]  process_one_work+0x1cf/0x370
[   26.542887]  worker_thread+0x4a/0x3c0
[   26.542889]  kthread+0xfb/0x130
[   26.542890]  ? cancel_delayed_work+0x90/0x90
[   26.542892]  ? kthread_create_on_node+0x60/0x60
[   26.542893]  ret_from_fork+0x35/0x40
[   26.542896] iwlwifi 0000:04:00.0: Failed to get geographic profile info -5
[   26.542901] ------------[ cut here ]------------
[   26.542925] WARNING: CPU: 2 PID: 452 at
drivers/net/wireless/intel/iwlwifi/mvm/scan.c:1874
iwl_mvm_rx_umac_scan_complete_notif.cold+0xc/0x13 [iwlmvm]
[   26.542925] Modules linked in: xt_MASQUERADE xt_conntrack
ipt_REJECT nf_reject_ipv4 xt_tcpudp tun bridge stp llc iptable_mangle
iptable_nat nf_nat nf_conntrack libcrc32c nf_defrag_ipv4
ip6table_filter ip6_tables iptable_filter ip_tables x_tables rmi_smbus
rmi_core snd_hda_codec_hdmi nls_iso8859_1 vfat fat intel_rapl_msr
iwlmvm snd_hda_codec_realtek snd_hda_codec_generic iTCO_wdt uvcvideo
videobuf2_vmalloc mac80211 snd_hda_intel libarc4 coretemp
videobuf2_memops snd_hda_codec intel_rapl_common videobuf2_v4l2
iosf_mbi snd_hwdep videodev snd_hda_core x86_pkg_temp_thermal snd_seq
intel_powerclamp videobuf2_common snd_seq_device kvm_intel iwlwifi
snd_pcm kvm irqbypass intel_cstate snd_timer rtsx_pci_ms
intel_rapl_perf i2c_i801 memstick psmouse snd efivars soundcore
cfg80211 mei_me mei dm_crypt rtsx_pci_sdmmc mmc_core nouveau hwmon
led_class mxm_wmi drm_kms_helper syscopyarea sysfillrect sysimgblt
fb_sys_fops xhci_pci ttm rtsx_pci xhci_hcd e1000e mfd_core drm agpgart
usbcore usb_common wmi video
[   26.542952]  dm_mod ipv6 nf_defrag_ipv6 autofs4
[   26.542956] CPU: 2 PID: 452 Comm: kworker/2:3 Tainted: G        W
      5.3.1-matteo #81
[   26.542956] Hardware name: LENOVO 20EQS64N1B/20EQS64N1B, BIOS
N1EET84W (1.57 ) 05/09/2019
[   26.542963] Workqueue: events iwl_mvm_async_handlers_wk [iwlmvm]
[   26.542972] RIP:
0010:iwl_mvm_rx_umac_scan_complete_notif.cold+0xc/0x13 [iwlmvm]
[   26.542974] Code: 48 c7 c7 18 6e aa a0 e8 bc 6f 66 e0 0f 0b 49 8b
47 10 44 8b a0 9c 00 00 00 e9 8b de fe ff 48 c7 c7 18 6e aa a0 e8 9e
6f 66 e0 <0f> 0b e9 d2 e3 fe ff 48 c7 c7 18 6e aa a0 e8 8b 6f 66 e0 0f
0b 41
[   26.542975] RSP: 0018:ffffc90000517df0 EFLAGS: 00010246
[   26.542976] RAX: 0000000000000024 RBX: ffff888840a3e000 RCX: 0000000000000006
[   26.542977] RDX: 0000000000000000 RSI: 0000000000000096 RDI: ffff888883a96370
[   26.542978] RBP: ffff88887cef1e58 R08: 0000000000000001 R09: 0000000000000465
[   26.542978] R10: 0000000000019a70 R11: 0000000000000004 R12: ffff88887cef1e28
[   26.542979] R13: ffff88887cef1e28 R14: ffff88887addc400 R15: dead000000000100
[   26.542980] FS:  0000000000000000(0000) GS:ffff888883a80000(0000)
knlGS:0000000000000000
[   26.542981] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   26.542982] CR2: 000055ea725e9498 CR3: 0000000001e0a004 CR4: 00000000003606e0
[   26.542983] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   26.542983] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   26.542984] Call Trace:
[   26.542991]  iwl_mvm_async_handlers_wk+0xaa/0x140 [iwlmvm]
[   26.542994]  process_one_work+0x1cf/0x370
[   26.542996]  worker_thread+0x225/0x3c0
[   26.542997]  kthread+0xfb/0x130
[   26.542999]  ? cancel_delayed_work+0x90/0x90
[   26.543000]  ? kthread_create_on_node+0x60/0x60
[   26.543001]  ret_from_fork+0x35/0x40
[   26.543003] ---[ end trace c1c6ffcd88e853bb ]---
[   27.912222] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   28.061048] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   28.157251] iwlwifi 0000:04:00.0: FW already configured (0) - re-configuring
[   28.212885] wlp4s0: authenticate with fc:d4:f2:11:2b:ba
[   28.216247] wlp4s0: send auth to fc:d4:f2:11:2b:ba (try 1/3)
[   28.253162] wlp4s0: authenticated
[   28.255847] wlp4s0: associate with fc:d4:f2:11:2b:ba (try 1/3)
[   28.359782] wlp4s0: associate with fc:d4:f2:11:2b:ba (try 2/3)
[   28.380570] wlp4s0: RX AssocResp from fc:d4:f2:11:2b:ba (capab=0x11
status=0 aid=2)
[   28.391573] wlp4s0: associated
[   29.607287] IPv6: ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready
[   38.051771] iwlwifi 0000:04:00.0: regular scan timed out
[   38.051840] iwlwifi 0000:04:00.0: Microcode SW error detected.
Restarting 0x2000000.
[   38.051969] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   38.051971] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 6
[   38.051973] iwlwifi 0000:04:00.0: Loaded firmware version: 36.77d01142.0
[   38.051974] iwlwifi 0000:04:00.0: 0x00000084 | NMI_INTERRUPT_UNKNOWN
[   38.051976] iwlwifi 0000:04:00.0: 0x00000220 | trm_hw_status0
[   38.051977] iwlwifi 0000:04:00.0: 0x00000000 | trm_hw_status1
[   38.051978] iwlwifi 0000:04:00.0: 0x00024200 | branchlink2
[   38.051979] iwlwifi 0000:04:00.0: 0x00039872 | interruptlink1
[   38.051980] iwlwifi 0000:04:00.0: 0x00039872 | interruptlink2
[   38.051981] iwlwifi 0000:04:00.0: 0x00000000 | data1
[   38.051983] iwlwifi 0000:04:00.0: 0x00000080 | data2
[   38.051984] iwlwifi 0000:04:00.0: 0x07830000 | data3
[   38.051985] iwlwifi 0000:04:00.0: 0x17C17E6D | beacon time
[   38.051986] iwlwifi 0000:04:00.0: 0x6DA50196 | tsf low
[   38.051987] iwlwifi 0000:04:00.0: 0x00000016 | tsf hi
[   38.051989] iwlwifi 0000:04:00.0: 0x00000000 | time gp1
[   38.051990] iwlwifi 0000:04:00.0: 0x00978B64 | time gp2
[   38.051991] iwlwifi 0000:04:00.0: 0x00000001 | uCode revision type
[   38.051992] iwlwifi 0000:04:00.0: 0x00000024 | uCode version major
[   38.051993] iwlwifi 0000:04:00.0: 0x77D01142 | uCode version minor
[   38.051994] iwlwifi 0000:04:00.0: 0x00000201 | hw version
[   38.051996] iwlwifi 0000:04:00.0: 0x00489008 | board version
[   38.051997] iwlwifi 0000:04:00.0: 0x0A0D001C | hcmd
[   38.051998] iwlwifi 0000:04:00.0: 0x24022000 | isr0
[   38.051999] iwlwifi 0000:04:00.0: 0x00800000 | isr1
[   38.052000] iwlwifi 0000:04:00.0: 0x08001802 | isr2
[   38.052001] iwlwifi 0000:04:00.0: 0x00417CC0 | isr3
[   38.052002] iwlwifi 0000:04:00.0: 0x00000000 | isr4
[   38.052004] iwlwifi 0000:04:00.0: 0x0A0D001C | last cmd Id
[   38.052005] iwlwifi 0000:04:00.0: 0x00000000 | wait_event
[   38.052006] iwlwifi 0000:04:00.0: 0x000000D4 | l2p_control
[   38.052007] iwlwifi 0000:04:00.0: 0x00018030 | l2p_duration
[   38.052008] iwlwifi 0000:04:00.0: 0x00000007 | l2p_mhvalid
[   38.052010] iwlwifi 0000:04:00.0: 0x00000081 | l2p_addr_match
[   38.052011] iwlwifi 0000:04:00.0: 0x0000000D | lmpm_pmg_sel
[   38.052012] iwlwifi 0000:04:00.0: 0x19071249 | timestamp
[   38.052013] iwlwifi 0000:04:00.0: 0x00340818 | flow_handler
[   38.052082] iwlwifi 0000:04:00.0: 0x00000000 | ADVANCED_SYSASSERT
[   38.052084] iwlwifi 0000:04:00.0: 0x00000000 | umac branchlink1
[   38.052085] iwlwifi 0000:04:00.0: 0x00000000 | umac branchlink2
[   38.052086] iwlwifi 0000:04:00.0: 0x00000000 | umac interruptlink1
[   38.052087] iwlwifi 0000:04:00.0: 0x00000000 | umac interruptlink2
[   38.052088] iwlwifi 0000:04:00.0: 0x00000000 | umac data1
[   38.052090] iwlwifi 0000:04:00.0: 0x00000000 | umac data2
[   38.052091] iwlwifi 0000:04:00.0: 0x00000000 | umac data3
[   38.052092] iwlwifi 0000:04:00.0: 0x00000000 | umac major
[   38.052093] iwlwifi 0000:04:00.0: 0x00000000 | umac minor
[   38.052094] iwlwifi 0000:04:00.0: 0x00000000 | frame pointer
[   38.052095] iwlwifi 0000:04:00.0: 0x00000000 | stack pointer
[   38.052096] iwlwifi 0000:04:00.0: 0x00000000 | last host cmd
[   38.052097] iwlwifi 0000:04:00.0: 0x00000000 | isr status reg
[   38.052117] iwlwifi 0000:04:00.0: Fseq Registers:
[   38.052129] iwlwifi 0000:04:00.0: 0x81F5E342 | FSEQ_ERROR_CODE
[   38.052143] iwlwifi 0000:04:00.0: 0x120F8254 | FSEQ_TOP_INIT_VERSION
[   38.052148] iwlwifi 0000:04:00.0: 0x54034CA7 | FSEQ_CNVIO_INIT_VERSION
[   38.052152] iwlwifi 0000:04:00.0: 0x0000A056 | FSEQ_OTP_VERSION
[   38.052157] iwlwifi 0000:04:00.0: 0xCCA632D8 | FSEQ_TOP_CONTENT_VERSION
[   38.052162] iwlwifi 0000:04:00.0: 0xFCBC4F8A | FSEQ_ALIVE_TOKEN
[   38.052166] iwlwifi 0000:04:00.0: 0x377E9CF5 | FSEQ_CNVI_ID
[   38.052171] iwlwifi 0000:04:00.0: 0x7673FF81 | FSEQ_CNVR_ID
[   38.052181] iwlwifi 0000:04:00.0: 0x03000000 | CNVI_AUX_MISC_CHIP
[   38.052191] iwlwifi 0000:04:00.0: 0x0BADCAFE | CNVR_AUX_MISC_CHIP
[   38.052201] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
[   38.052211] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
[   38.052222] iwlwifi 0000:04:00.0: Collecting data: trigger 2 fired.
[   38.052225] ieee80211 phy0: Hardware restart was requested
[   38.615192] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   38.768828] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   38.851065] iwlwifi 0000:04:00.0: FW already configured (0) - re-configuring
[   70.012833] wlp4s0: Connection to AP fc:d4:f2:11:2b:ba lost
[   70.124167] iwlwifi 0000:04:00.0: offset 0 not used in fw key table.
[   70.124174] wlp4s0: failed to remove key (5, ff:ff:ff:ff:ff:ff)
from hardware (-2)
[   73.377475] iwlwifi 0000:04:00.0: Microcode SW error detected.
Restarting 0x92000000.
[   73.377693] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   73.377698] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 6
[   73.377701] iwlwifi 0000:04:00.0: Loaded firmware version: 36.77d01142.0
[   73.377705] iwlwifi 0000:04:00.0: 0x00000038 | BAD_COMMAND
[   73.377708] iwlwifi 0000:04:00.0: 0x000002F0 | trm_hw_status0
[   73.377711] iwlwifi 0000:04:00.0: 0x00000000 | trm_hw_status1
[   73.377714] iwlwifi 0000:04:00.0: 0x00024200 | branchlink2
[   73.377717] iwlwifi 0000:04:00.0: 0x00039872 | interruptlink1
[   73.377719] iwlwifi 0000:04:00.0: 0x00000000 | interruptlink2
[   73.377722] iwlwifi 0000:04:00.0: 0x00F00405 | data1
[   73.377725] iwlwifi 0000:04:00.0: 0x000000F1 | data2
[   73.377727] iwlwifi 0000:04:00.0: 0x000000F1 | data3
[   73.377730] iwlwifi 0000:04:00.0: 0x544188FA | beacon time
[   73.377733] iwlwifi 0000:04:00.0: 0x6FC00709 | tsf low
[   73.377735] iwlwifi 0000:04:00.0: 0x00000016 | tsf hi
[   73.377738] iwlwifi 0000:04:00.0: 0x00000000 | time gp1
[   73.377741] iwlwifi 0000:04:00.0: 0x020F2BF2 | time gp2
[   73.377744] iwlwifi 0000:04:00.0: 0x00000001 | uCode revision type
[   73.377747] iwlwifi 0000:04:00.0: 0x00000024 | uCode version major
[   73.377749] iwlwifi 0000:04:00.0: 0x77D01142 | uCode version minor
[   73.377752] iwlwifi 0000:04:00.0: 0x00000201 | hw version
[   73.377754] iwlwifi 0000:04:00.0: 0x00489008 | board version
[   73.377757] iwlwifi 0000:04:00.0: 0x00F00405 | hcmd
[   73.377760] iwlwifi 0000:04:00.0: 0x00022080 | isr0
[   73.377762] iwlwifi 0000:04:00.0: 0x10800000 | isr1
[   73.377765] iwlwifi 0000:04:00.0: 0x28201802 | isr2
[   73.377767] iwlwifi 0000:04:00.0: 0x00400080 | isr3
[   73.377770] iwlwifi 0000:04:00.0: 0x00000000 | isr4
[   73.377773] iwlwifi 0000:04:00.0: 0x00EF01C8 | last cmd Id
[   73.377775] iwlwifi 0000:04:00.0: 0x00000000 | wait_event
[   73.377778] iwlwifi 0000:04:00.0: 0x00000BFF | l2p_control
[   73.377781] iwlwifi 0000:04:00.0: 0x00000000 | l2p_duration
[   73.377783] iwlwifi 0000:04:00.0: 0x00000000 | l2p_mhvalid
[   73.377786] iwlwifi 0000:04:00.0: 0x00000000 | l2p_addr_match
[   73.377789] iwlwifi 0000:04:00.0: 0x0000008F | lmpm_pmg_sel
[   73.377791] iwlwifi 0000:04:00.0: 0x19071249 | timestamp
[   73.377794] iwlwifi 0000:04:00.0: 0x0000F000 | flow_handler
[   73.377968] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   73.377971] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 7
[   73.377975] iwlwifi 0000:04:00.0: 0x00000070 | NMI_INTERRUPT_LMAC_FATAL
[   73.377978] iwlwifi 0000:04:00.0: 0x00000000 | umac branchlink1
[   73.377980] iwlwifi 0000:04:00.0: 0xC0086B38 | umac branchlink2
[   73.377983] iwlwifi 0000:04:00.0: 0xC0083D08 | umac interruptlink1
[   73.377986] iwlwifi 0000:04:00.0: 0xC0083D08 | umac interruptlink2
[   73.377988] iwlwifi 0000:04:00.0: 0x00000800 | umac data1
[   73.377991] iwlwifi 0000:04:00.0: 0xC0083D08 | umac data2
[   73.377994] iwlwifi 0000:04:00.0: 0xDEADBEEF | umac data3
[   73.377996] iwlwifi 0000:04:00.0: 0x00000024 | umac major
[   73.377999] iwlwifi 0000:04:00.0: 0x77D01142 | umac minor
[   73.378001] iwlwifi 0000:04:00.0: 0xC088628C | frame pointer
[   73.378004] iwlwifi 0000:04:00.0: 0xC088628C | stack pointer
[   73.378007] iwlwifi 0000:04:00.0: 0x00F00405 | last host cmd
[   73.378009] iwlwifi 0000:04:00.0: 0x00000000 | isr status reg
[   73.378141] iwlwifi 0000:04:00.0: Fseq Registers:
[   73.378197] iwlwifi 0000:04:00.0: 0x81F5E342 | FSEQ_ERROR_CODE
[   73.378252] iwlwifi 0000:04:00.0: 0x120F8254 | FSEQ_TOP_INIT_VERSION
[   73.378307] iwlwifi 0000:04:00.0: 0x54034CA7 | FSEQ_CNVIO_INIT_VERSION
[   73.378362] iwlwifi 0000:04:00.0: 0x0000A056 | FSEQ_OTP_VERSION
[   73.378417] iwlwifi 0000:04:00.0: 0xCCA632D8 | FSEQ_TOP_CONTENT_VERSION
[   73.378472] iwlwifi 0000:04:00.0: 0xFCBC4F8A | FSEQ_ALIVE_TOKEN
[   73.378527] iwlwifi 0000:04:00.0: 0x377E9CF5 | FSEQ_CNVI_ID
[   73.378582] iwlwifi 0000:04:00.0: 0x7673FF81 | FSEQ_CNVR_ID
[   73.378637] iwlwifi 0000:04:00.0: 0x03000000 | CNVI_AUX_MISC_CHIP
[   73.378695] iwlwifi 0000:04:00.0: 0x0BADCAFE | CNVR_AUX_MISC_CHIP
[   73.378754] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
[   73.378812] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
[   73.378877] iwlwifi 0000:04:00.0: Collecting data: trigger 2 fired.
[   73.378886] ieee80211 phy0: Hardware restart was requested
[   73.378904] iwlwifi 0000:04:00.0: FW Error notification: type
0x00000000 cmd_id 0x05
[   73.378910] iwlwifi 0000:04:00.0: FW Error notification: seq 0x00F0
service 0x00000005
[   73.378915] iwlwifi 0000:04:00.0: FW Error notification: timestamp
0x00000000020F2A00
[   73.378972] iwlwifi 0000:04:00.0: FW error in SYNC CMD GEO_TX_POWER_LIMIT
[   73.378978] CPU: 2 PID: 64 Comm: kworker/2:1 Tainted: G        W
     5.3.1-matteo #81
[   73.378981] Hardware name: LENOVO 20EQS64N1B/20EQS64N1B, BIOS
N1EET84W (1.57 ) 05/09/2019
[   73.379011] Workqueue: events iwl_mvm_async_handlers_wk [iwlmvm]
[   73.379015] Call Trace:
[   73.379029]  dump_stack+0x46/0x60
[   73.379052]  iwl_trans_pcie_send_hcmd+0x505/0x520 [iwlwifi]
[   73.379060]  ? wait_woken+0x70/0x70
[   73.379081]  iwl_trans_send_cmd+0x57/0xb0 [iwlwifi]
[   73.379102]  iwl_mvm_send_cmd+0x23/0x80 [iwlmvm]
[   73.379118]  iwl_mvm_get_sar_geo_profile+0xae/0x130 [iwlmvm]
[   73.379136]  iwl_mvm_rx_chub_update_mcc+0x108/0x1a0 [iwlmvm]
[   73.379152]  iwl_mvm_async_handlers_wk+0xaa/0x140 [iwlmvm]
[   73.379159]  process_one_work+0x1cf/0x370
[   73.379164]  worker_thread+0x4a/0x3c0
[   73.379168]  kthread+0xfb/0x130
[   73.379173]  ? cancel_delayed_work+0x90/0x90
[   73.379176]  ? kthread_create_on_node+0x60/0x60
[   73.379180]  ret_from_fork+0x35/0x40
[   73.379188] iwlwifi 0000:04:00.0: Failed to get geographic profile info -5
[   73.379200] ------------[ cut here ]------------
[   73.379251] WARNING: CPU: 2 PID: 64 at
drivers/net/wireless/intel/iwlwifi/mvm/scan.c:1874
iwl_mvm_rx_umac_scan_complete_notif.cold+0xc/0x13 [iwlmvm]
[   73.379253] Modules linked in: cmac ccm xt_MASQUERADE xt_conntrack
ipt_REJECT nf_reject_ipv4 xt_tcpudp tun bridge stp llc iptable_mangle
iptable_nat nf_nat nf_conntrack libcrc32c nf_defrag_ipv4
ip6table_filter ip6_tables iptable_filter ip_tables x_tables rmi_smbus
rmi_core snd_hda_codec_hdmi nls_iso8859_1 vfat fat intel_rapl_msr
iwlmvm snd_hda_codec_realtek snd_hda_codec_generic iTCO_wdt uvcvideo
videobuf2_vmalloc mac80211 snd_hda_intel libarc4 coretemp
videobuf2_memops snd_hda_codec intel_rapl_common videobuf2_v4l2
iosf_mbi snd_hwdep videodev snd_hda_core x86_pkg_temp_thermal snd_seq
intel_powerclamp videobuf2_common snd_seq_device kvm_intel iwlwifi
snd_pcm kvm irqbypass intel_cstate snd_timer rtsx_pci_ms
intel_rapl_perf i2c_i801 memstick psmouse snd efivars soundcore
cfg80211 mei_me mei dm_crypt rtsx_pci_sdmmc mmc_core nouveau hwmon
led_class mxm_wmi drm_kms_helper syscopyarea sysfillrect sysimgblt
fb_sys_fops xhci_pci ttm rtsx_pci xhci_hcd e1000e mfd_core drm agpgart
usbcore usb_common
[   73.379310]  wmi video dm_mod ipv6 nf_defrag_ipv6 autofs4
[   73.379319] CPU: 2 PID: 64 Comm: kworker/2:1 Tainted: G        W
     5.3.1-matteo #81
[   73.379320] Hardware name: LENOVO 20EQS64N1B/20EQS64N1B, BIOS
N1EET84W (1.57 ) 05/09/2019
[   73.379337] Workqueue: events iwl_mvm_async_handlers_wk [iwlmvm]
[   73.379360] RIP:
0010:iwl_mvm_rx_umac_scan_complete_notif.cold+0xc/0x13 [iwlmvm]
[   73.379364] Code: 48 c7 c7 18 6e aa a0 e8 bc 6f 66 e0 0f 0b 49 8b
47 10 44 8b a0 9c 00 00 00 e9 8b de fe ff 48 c7 c7 18 6e aa a0 e8 9e
6f 66 e0 <0f> 0b e9 d2 e3 fe ff 48 c7 c7 18 6e aa a0 e8 8b 6f 66 e0 0f
0b 41
[   73.379367] RSP: 0018:ffffc900002a7df0 EFLAGS: 00010246
[   73.379370] RAX: 0000000000000024 RBX: ffff888792c4c000 RCX: 0000000000000006
[   73.379372] RDX: 0000000000000000 RSI: 0000000000000096 RDI: ffff888883a96370
[   73.379374] RBP: ffff88887cef1e58 R08: 0000000000000001 R09: 0000000000000533
[   73.379376] R10: 000000000001ea9c R11: 0000000000000004 R12: ffff88887cef1e28
[   73.379378] R13: ffff88887cef1e28 R14: ffff8887e3696f40 R15: dead000000000100
[   73.379381] FS:  0000000000000000(0000) GS:ffff888883a80000(0000)
knlGS:0000000000000000
[   73.379383] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   73.379385] CR2: 00007fcf67732000 CR3: 0000000001e0a006 CR4: 00000000003606e0
[   73.379387] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   73.379389] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   73.379391] Call Trace:
[   73.379408]  iwl_mvm_async_handlers_wk+0xaa/0x140 [iwlmvm]
[   73.379415]  process_one_work+0x1cf/0x370
[   73.379419]  worker_thread+0x4a/0x3c0
[   73.379423]  kthread+0xfb/0x130
[   73.379428]  ? cancel_delayed_work+0x90/0x90
[   73.379431]  ? kthread_create_on_node+0x60/0x60
[   73.379434]  ret_from_fork+0x35/0x40
[   73.379438] ---[ end trace c1c6ffcd88e853bc ]---
[   73.966408] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   74.117837] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   74.204930] iwlwifi 0000:04:00.0: FW already configured (0) - re-configuring
[   74.278332] wlp4s0: authenticate with fc:d4:f2:11:2b:ba
[   74.281639] wlp4s0: send auth to fc:d4:f2:11:2b:ba (try 1/3)
[   74.360321] wlp4s0: authenticated
[   74.364104] wlp4s0: associate with fc:d4:f2:11:2b:ba (try 1/3)
[   74.468101] wlp4s0: associate with fc:d4:f2:11:2b:ba (try 2/3)
[   74.498235] wlp4s0: RX AssocResp from fc:d4:f2:11:2b:ba (capab=0x11
status=30 aid=2)
[   74.498244] wlp4s0: fc:d4:f2:11:2b:ba rejected association
temporarily; comeback duration 1000 TU (1024 ms)
[   74.592674] wlp4s0: RX AssocResp from fc:d4:f2:11:2b:ba (capab=0x11
status=30 aid=2)
[   74.592683] wlp4s0: fc:d4:f2:11:2b:ba rejected association
temporarily; comeback duration 888 TU (909 ms)
[   74.895826] iwlwifi 0000:04:00.0: No beacon heard and the time
event is over already...
[   74.895896] wlp4s0: Connection to AP fc:d4:f2:11:2b:ba lost
[   75.523964] wlp4s0: associate with fc:d4:f2:11:2b:ba (try 3/3)
[   75.632085] wlp4s0: association with fc:d4:f2:11:2b:ba timed out
[   79.331803] iwlwifi 0000:04:00.0: Microcode SW error detected.
Restarting 0x82000000.
[   79.333238] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   79.333239] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 6
[   79.333240] iwlwifi 0000:04:00.0: Loaded firmware version: 36.77d01142.0
[   79.333241] iwlwifi 0000:04:00.0: 0x00000038 | BAD_COMMAND
[   79.333242] iwlwifi 0000:04:00.0: 0x000002F0 | trm_hw_status0
[   79.333243] iwlwifi 0000:04:00.0: 0x00000000 | trm_hw_status1
[   79.333243] iwlwifi 0000:04:00.0: 0x00024200 | branchlink2
[   79.333244] iwlwifi 0000:04:00.0: 0x00039872 | interruptlink1
[   79.333245] iwlwifi 0000:04:00.0: 0x00000000 | interruptlink2
[   79.333245] iwlwifi 0000:04:00.0: 0x004D0405 | data1
[   79.333246] iwlwifi 0000:04:00.0: 0x0000004E | data2
[   79.333247] iwlwifi 0000:04:00.0: 0x0000004E | data3
[   79.333247] iwlwifi 0000:04:00.0: 0x00027131 | beacon time
[   79.333248] iwlwifi 0000:04:00.0: 0x701AE221 | tsf low
[   79.333248] iwlwifi 0000:04:00.0: 0x00000016 | tsf hi
[   79.333249] iwlwifi 0000:04:00.0: 0x00000000 | time gp1
[   79.333250] iwlwifi 0000:04:00.0: 0x004EA1EB | time gp2
[   79.333250] iwlwifi 0000:04:00.0: 0x00000001 | uCode revision type
[   79.333251] iwlwifi 0000:04:00.0: 0x00000024 | uCode version major
[   79.333252] iwlwifi 0000:04:00.0: 0x77D01142 | uCode version minor
[   79.333252] iwlwifi 0000:04:00.0: 0x00000201 | hw version
[   79.333253] iwlwifi 0000:04:00.0: 0x00489008 | board version
[   79.333254] iwlwifi 0000:04:00.0: 0x004D0405 | hcmd
[   79.333254] iwlwifi 0000:04:00.0: 0x00022080 | isr0
[   79.333255] iwlwifi 0000:04:00.0: 0x00000000 | isr1
[   79.333256] iwlwifi 0000:04:00.0: 0x28201802 | isr2
[   79.333256] iwlwifi 0000:04:00.0: 0x00400080 | isr3
[   79.333257] iwlwifi 0000:04:00.0: 0x00000000 | isr4
[   79.333258] iwlwifi 0000:04:00.0: 0x004C01C8 | last cmd Id
[   79.333258] iwlwifi 0000:04:00.0: 0x00000000 | wait_event
[   79.333259] iwlwifi 0000:04:00.0: 0x00000080 | l2p_control
[   79.333259] iwlwifi 0000:04:00.0: 0x00000000 | l2p_duration
[   79.333260] iwlwifi 0000:04:00.0: 0x00000000 | l2p_mhvalid
[   79.333261] iwlwifi 0000:04:00.0: 0x00000000 | l2p_addr_match
[   79.333261] iwlwifi 0000:04:00.0: 0x0000008F | lmpm_pmg_sel
[   79.333262] iwlwifi 0000:04:00.0: 0x19071249 | timestamp
[   79.333263] iwlwifi 0000:04:00.0: 0x000098A8 | flow_handler
[   79.333433] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   79.333434] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 7
[   79.333435] iwlwifi 0000:04:00.0: 0x00000070 | NMI_INTERRUPT_LMAC_FATAL
[   79.333435] iwlwifi 0000:04:00.0: 0x00000000 | umac branchlink1
[   79.333436] iwlwifi 0000:04:00.0: 0xC0086B38 | umac branchlink2
[   79.333437] iwlwifi 0000:04:00.0: 0xC0083D08 | umac interruptlink1
[   79.333437] iwlwifi 0000:04:00.0: 0xC0083D08 | umac interruptlink2
[   79.333438] iwlwifi 0000:04:00.0: 0x00000800 | umac data1
[   79.333439] iwlwifi 0000:04:00.0: 0xC0083D08 | umac data2
[   79.333439] iwlwifi 0000:04:00.0: 0xDEADBEEF | umac data3
[   79.333440] iwlwifi 0000:04:00.0: 0x00000024 | umac major
[   79.333440] iwlwifi 0000:04:00.0: 0x77D01142 | umac minor
[   79.333441] iwlwifi 0000:04:00.0: 0xC088628C | frame pointer
[   79.333442] iwlwifi 0000:04:00.0: 0xC088628C | stack pointer
[   79.333442] iwlwifi 0000:04:00.0: 0x004D0405 | last host cmd
[   79.333443] iwlwifi 0000:04:00.0: 0x00000000 | isr status reg
[   79.333566] iwlwifi 0000:04:00.0: Fseq Registers:
[   79.333571] iwlwifi 0000:04:00.0: 0x81F5E342 | FSEQ_ERROR_CODE
[   79.333575] iwlwifi 0000:04:00.0: 0x120F8254 | FSEQ_TOP_INIT_VERSION
[   79.333580] iwlwifi 0000:04:00.0: 0x54034CA7 | FSEQ_CNVIO_INIT_VERSION
[   79.333584] iwlwifi 0000:04:00.0: 0x0000A056 | FSEQ_OTP_VERSION
[   79.333588] iwlwifi 0000:04:00.0: 0xCCA632D8 | FSEQ_TOP_CONTENT_VERSION
[   79.333592] iwlwifi 0000:04:00.0: 0xFCBC4F8A | FSEQ_ALIVE_TOKEN
[   79.333597] iwlwifi 0000:04:00.0: 0x377E9CF5 | FSEQ_CNVI_ID
[   79.333601] iwlwifi 0000:04:00.0: 0x7673FF81 | FSEQ_CNVR_ID
[   79.333605] iwlwifi 0000:04:00.0: 0x03000000 | CNVI_AUX_MISC_CHIP
[   79.333613] iwlwifi 0000:04:00.0: 0x0BADCAFE | CNVR_AUX_MISC_CHIP
[   79.333620] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
[   79.333627] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
[   79.333633] iwlwifi 0000:04:00.0: Collecting data: trigger 2 fired.
[   79.333635] ieee80211 phy0: Hardware restart was requested
[   79.333638] iwlwifi 0000:04:00.0: FW Error notification: type
0x00000000 cmd_id 0x05
[   79.333639] iwlwifi 0000:04:00.0: FW Error notification: seq 0x004D
service 0x00000005
[   79.333640] iwlwifi 0000:04:00.0: FW Error notification: timestamp
0x00000000004EA1E7
[   79.333678] iwlwifi 0000:04:00.0: FW error in SYNC CMD GEO_TX_POWER_LIMIT
[   79.333680] CPU: 2 PID: 64 Comm: kworker/2:1 Tainted: G        W
     5.3.1-matteo #81
[   79.333681] Hardware name: LENOVO 20EQS64N1B/20EQS64N1B, BIOS
N1EET84W (1.57 ) 05/09/2019
[   79.333689] Workqueue: events iwl_mvm_async_handlers_wk [iwlmvm]
[   79.333690] Call Trace:
[   79.333695]  dump_stack+0x46/0x60
[   79.333715]  iwl_trans_pcie_send_hcmd+0x505/0x520 [iwlwifi]
[   79.333718]  ? wait_woken+0x70/0x70
[   79.333724]  iwl_trans_send_cmd+0x57/0xb0 [iwlwifi]
[   79.333729]  iwl_mvm_send_cmd+0x23/0x80 [iwlmvm]
[   79.333733]  iwl_mvm_get_sar_geo_profile+0xae/0x130 [iwlmvm]
[   79.333738]  iwl_mvm_rx_chub_update_mcc+0x108/0x1a0 [iwlmvm]
[   79.333742]  iwl_mvm_async_handlers_wk+0xaa/0x140 [iwlmvm]
[   79.333744]  process_one_work+0x1cf/0x370
[   79.333745]  worker_thread+0x4a/0x3c0
[   79.333746]  kthread+0xfb/0x130
[   79.333748]  ? cancel_delayed_work+0x90/0x90
[   79.333748]  ? kthread_create_on_node+0x60/0x60
[   79.333750]  ret_from_fork+0x35/0x40
[   79.333754] iwlwifi 0000:04:00.0: Failed to get geographic profile info -5
[   79.333758] ------------[ cut here ]------------
[   79.333773] WARNING: CPU: 2 PID: 64 at
drivers/net/wireless/intel/iwlwifi/mvm/scan.c:1874
iwl_mvm_rx_umac_scan_complete_notif.cold+0xc/0x13 [iwlmvm]
[   79.333774] Modules linked in: cmac ccm xt_MASQUERADE xt_conntrack
ipt_REJECT nf_reject_ipv4 xt_tcpudp tun bridge stp llc iptable_mangle
iptable_nat nf_nat nf_conntrack libcrc32c nf_defrag_ipv4
ip6table_filter ip6_tables iptable_filter ip_tables x_tables rmi_smbus
rmi_core snd_hda_codec_hdmi nls_iso8859_1 vfat fat intel_rapl_msr
iwlmvm snd_hda_codec_realtek snd_hda_codec_generic iTCO_wdt uvcvideo
videobuf2_vmalloc mac80211 snd_hda_intel libarc4 coretemp
videobuf2_memops snd_hda_codec intel_rapl_common videobuf2_v4l2
iosf_mbi snd_hwdep videodev snd_hda_core x86_pkg_temp_thermal snd_seq
intel_powerclamp videobuf2_common snd_seq_device kvm_intel iwlwifi
snd_pcm kvm irqbypass intel_cstate snd_timer rtsx_pci_ms
intel_rapl_perf i2c_i801 memstick psmouse snd efivars soundcore
cfg80211 mei_me mei dm_crypt rtsx_pci_sdmmc mmc_core nouveau hwmon
led_class mxm_wmi drm_kms_helper syscopyarea sysfillrect sysimgblt
fb_sys_fops xhci_pci ttm rtsx_pci xhci_hcd e1000e mfd_core drm agpgart
usbcore usb_common
[   79.333793]  wmi video dm_mod ipv6 nf_defrag_ipv6 autofs4
[   79.333796] CPU: 2 PID: 64 Comm: kworker/2:1 Tainted: G        W
     5.3.1-matteo #81
[   79.333796] Hardware name: LENOVO 20EQS64N1B/20EQS64N1B, BIOS
N1EET84W (1.57 ) 05/09/2019
[   79.333800] Workqueue: events iwl_mvm_async_handlers_wk [iwlmvm]
[   79.333806] RIP:
0010:iwl_mvm_rx_umac_scan_complete_notif.cold+0xc/0x13 [iwlmvm]
[   79.333807] Code: 48 c7 c7 18 6e aa a0 e8 bc 6f 66 e0 0f 0b 49 8b
47 10 44 8b a0 9c 00 00 00 e9 8b de fe ff 48 c7 c7 18 6e aa a0 e8 9e
6f 66 e0 <0f> 0b e9 d2 e3 fe ff 48 c7 c7 18 6e aa a0 e8 8b 6f 66 e0 0f
0b 41
[   79.333807] RSP: 0018:ffffc900002a7df0 EFLAGS: 00010246
[   79.333808] RAX: 0000000000000024 RBX: ffff8887a9e41000 RCX: 0000000000000006
[   79.333809] RDX: 0000000000000000 RSI: 0000000000000096 RDI: ffff888883a96370
[   79.333809] RBP: ffff88887cef1e58 R08: 0000000000000001 R09: 00000000000005bc
[   79.333810] R10: 0000000000021ec4 R11: 0000000000000004 R12: ffff88887cef1e28
[   79.333810] R13: ffff88887cef1e28 R14: ffff8887e3696940 R15: dead000000000100
[   79.333811] FS:  0000000000000000(0000) GS:ffff888883a80000(0000)
knlGS:0000000000000000
[   79.333812] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   79.333812] CR2: 00002e8e36a82000 CR3: 0000000001e0a004 CR4: 00000000003606e0
[   79.333813] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   79.333813] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   79.333814] Call Trace:
[   79.333818]  iwl_mvm_async_handlers_wk+0xaa/0x140 [iwlmvm]
[   79.333820]  process_one_work+0x1cf/0x370
[   79.333821]  worker_thread+0x4a/0x3c0
[   79.333822]  kthread+0xfb/0x130
[   79.333823]  ? cancel_delayed_work+0x90/0x90
[   79.333824]  ? kthread_create_on_node+0x60/0x60
[   79.333825]  ret_from_fork+0x35/0x40
[   79.333826] ---[ end trace c1c6ffcd88e853bd ]---
[   79.972512] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   80.123002] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   80.203866] iwlwifi 0000:04:00.0: FW already configured (0) - re-configuring
[   88.508299] iwlwifi 0000:04:00.0: Microcode SW error detected.
Restarting 0x82000000.
[   88.508594] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   88.508595] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 6
[   88.508596] iwlwifi 0000:04:00.0: Loaded firmware version: 36.77d01142.0
[   88.508597] iwlwifi 0000:04:00.0: 0x00000038 | BAD_COMMAND
[   88.508598] iwlwifi 0000:04:00.0: 0x000002F0 | trm_hw_status0
[   88.508599] iwlwifi 0000:04:00.0: 0x00000000 | trm_hw_status1
[   88.508600] iwlwifi 0000:04:00.0: 0x00024200 | branchlink2
[   88.508601] iwlwifi 0000:04:00.0: 0x00039872 | interruptlink1
[   88.508601] iwlwifi 0000:04:00.0: 0x00000000 | interruptlink2
[   88.508602] iwlwifi 0000:04:00.0: 0x003C0405 | data1
[   88.508603] iwlwifi 0000:04:00.0: 0x0000003D | data2
[   88.508604] iwlwifi 0000:04:00.0: 0x0000003D | data3
[   88.508605] iwlwifi 0000:04:00.0: 0x0003EB18 | beacon time
[   88.508605] iwlwifi 0000:04:00.0: 0x007F0E6C | tsf low
[   88.508606] iwlwifi 0000:04:00.0: 0x00000000 | tsf hi
[   88.508607] iwlwifi 0000:04:00.0: 0x00000000 | time gp1
[   88.508608] iwlwifi 0000:04:00.0: 0x007F0E6D | time gp2
[   88.508608] iwlwifi 0000:04:00.0: 0x00000001 | uCode revision type
[   88.508609] iwlwifi 0000:04:00.0: 0x00000024 | uCode version major
[   88.508610] iwlwifi 0000:04:00.0: 0x77D01142 | uCode version minor
[   88.508611] iwlwifi 0000:04:00.0: 0x00000201 | hw version
[   88.508612] iwlwifi 0000:04:00.0: 0x00489008 | board version
[   88.508613] iwlwifi 0000:04:00.0: 0x003C0405 | hcmd
[   88.508613] iwlwifi 0000:04:00.0: 0x00022080 | isr0
[   88.508614] iwlwifi 0000:04:00.0: 0x00000000 | isr1
[   88.508615] iwlwifi 0000:04:00.0: 0x28201802 | isr2
[   88.508616] iwlwifi 0000:04:00.0: 0x00400080 | isr3
[   88.508616] iwlwifi 0000:04:00.0: 0x00000000 | isr4
[   88.508617] iwlwifi 0000:04:00.0: 0x003B01C8 | last cmd Id
[   88.508618] iwlwifi 0000:04:00.0: 0x00000000 | wait_event
[   88.508619] iwlwifi 0000:04:00.0: 0x00000080 | l2p_control
[   88.508620] iwlwifi 0000:04:00.0: 0x00000000 | l2p_duration
[   88.508620] iwlwifi 0000:04:00.0: 0x00000000 | l2p_mhvalid
[   88.508621] iwlwifi 0000:04:00.0: 0x00000000 | l2p_addr_match
[   88.508622] iwlwifi 0000:04:00.0: 0x0000008F | lmpm_pmg_sel
[   88.508623] iwlwifi 0000:04:00.0: 0x19071249 | timestamp
[   88.508624] iwlwifi 0000:04:00.0: 0x00006070 | flow_handler
[   88.508803] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   88.508804] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 7
[   88.508805] iwlwifi 0000:04:00.0: 0x00000070 | NMI_INTERRUPT_LMAC_FATAL
[   88.508806] iwlwifi 0000:04:00.0: 0x00000000 | umac branchlink1
[   88.508806] iwlwifi 0000:04:00.0: 0xC0086B38 | umac branchlink2
[   88.508807] iwlwifi 0000:04:00.0: 0xC0083D08 | umac interruptlink1
[   88.508808] iwlwifi 0000:04:00.0: 0xC0083D08 | umac interruptlink2
[   88.508809] iwlwifi 0000:04:00.0: 0x00000800 | umac data1
[   88.508810] iwlwifi 0000:04:00.0: 0xC0083D08 | umac data2
[   88.508810] iwlwifi 0000:04:00.0: 0xDEADBEEF | umac data3
[   88.508811] iwlwifi 0000:04:00.0: 0x00000024 | umac major
[   88.508812] iwlwifi 0000:04:00.0: 0x77D01142 | umac minor
[   88.508813] iwlwifi 0000:04:00.0: 0xC088628C | frame pointer
[   88.508813] iwlwifi 0000:04:00.0: 0xC088628C | stack pointer
[   88.508814] iwlwifi 0000:04:00.0: 0x003C0405 | last host cmd
[   88.508815] iwlwifi 0000:04:00.0: 0x00000000 | isr status reg
[   88.508939] iwlwifi 0000:04:00.0: Fseq Registers:
[   88.508943] iwlwifi 0000:04:00.0: 0x81F5E342 | FSEQ_ERROR_CODE
[   88.508948] iwlwifi 0000:04:00.0: 0x120F8254 | FSEQ_TOP_INIT_VERSION
[   88.508952] iwlwifi 0000:04:00.0: 0x54034CA7 | FSEQ_CNVIO_INIT_VERSION
[   88.508957] iwlwifi 0000:04:00.0: 0x0000A056 | FSEQ_OTP_VERSION
[   88.508961] iwlwifi 0000:04:00.0: 0xCCA632D8 | FSEQ_TOP_CONTENT_VERSION
[   88.508966] iwlwifi 0000:04:00.0: 0xFCBC4F8A | FSEQ_ALIVE_TOKEN
[   88.508970] iwlwifi 0000:04:00.0: 0x377E9CF5 | FSEQ_CNVI_ID
[   88.508974] iwlwifi 0000:04:00.0: 0x7673FF81 | FSEQ_CNVR_ID
[   88.508979] iwlwifi 0000:04:00.0: 0x03000000 | CNVI_AUX_MISC_CHIP
[   88.508986] iwlwifi 0000:04:00.0: 0x0BADCAFE | CNVR_AUX_MISC_CHIP
[   88.508994] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
[   88.509002] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
[   88.509054] iwlwifi 0000:04:00.0: Collecting data: trigger 2 fired.
[   88.509057] ieee80211 phy0: Hardware restart was requested
[   88.509060] iwlwifi 0000:04:00.0: FW Error notification: type
0x00000000 cmd_id 0x05
[   88.509061] iwlwifi 0000:04:00.0: FW Error notification: seq 0x003C
service 0x00000005
[   88.509062] iwlwifi 0000:04:00.0: FW Error notification: timestamp
0x00000000007F0E69
[   88.509068] iwlwifi 0000:04:00.0: FW error in SYNC CMD GEO_TX_POWER_LIMIT
[   88.509070] CPU: 2 PID: 64 Comm: kworker/2:1 Tainted: G        W
     5.3.1-matteo #81
[   88.509070] Hardware name: LENOVO 20EQS64N1B/20EQS64N1B, BIOS
N1EET84W (1.57 ) 05/09/2019
[   88.509080] Workqueue: events iwl_mvm_async_handlers_wk [iwlmvm]
[   88.509081] Call Trace:
[   88.509086]  dump_stack+0x46/0x60
[   88.509094]  iwl_trans_pcie_send_hcmd+0x505/0x520 [iwlwifi]
[   88.509097]  ? wait_woken+0x70/0x70
[   88.509104]  iwl_trans_send_cmd+0x57/0xb0 [iwlwifi]
[   88.509111]  iwl_mvm_send_cmd+0x23/0x80 [iwlmvm]
[   88.509116]  iwl_mvm_get_sar_geo_profile+0xae/0x130 [iwlmvm]
[   88.509121]  iwl_mvm_rx_chub_update_mcc+0x108/0x1a0 [iwlmvm]
[   88.509126]  iwl_mvm_async_handlers_wk+0xaa/0x140 [iwlmvm]
[   88.509129]  process_one_work+0x1cf/0x370
[   88.509131]  worker_thread+0x4a/0x3c0
[   88.509132]  kthread+0xfb/0x130
[   88.509133]  ? cancel_delayed_work+0x90/0x90
[   88.509134]  ? kthread_create_on_node+0x60/0x60
[   88.509135]  ret_from_fork+0x35/0x40
[   88.509138] iwlwifi 0000:04:00.0: Failed to get geographic profile info -5
[   88.509142] ------------[ cut here ]------------
[   88.509163] WARNING: CPU: 2 PID: 64 at
drivers/net/wireless/intel/iwlwifi/mvm/scan.c:1874
iwl_mvm_rx_umac_scan_complete_notif.cold+0xc/0x13 [iwlmvm]
[   88.509163] Modules linked in: cmac ccm xt_MASQUERADE xt_conntrack
ipt_REJECT nf_reject_ipv4 xt_tcpudp tun bridge stp llc iptable_mangle
iptable_nat nf_nat nf_conntrack libcrc32c nf_defrag_ipv4
ip6table_filter ip6_tables iptable_filter ip_tables x_tables rmi_smbus
rmi_core snd_hda_codec_hdmi nls_iso8859_1 vfat fat intel_rapl_msr
iwlmvm snd_hda_codec_realtek snd_hda_codec_generic iTCO_wdt uvcvideo
videobuf2_vmalloc mac80211 snd_hda_intel libarc4 coretemp
videobuf2_memops snd_hda_codec intel_rapl_common videobuf2_v4l2
iosf_mbi snd_hwdep videodev snd_hda_core x86_pkg_temp_thermal snd_seq
intel_powerclamp videobuf2_common snd_seq_device kvm_intel iwlwifi
snd_pcm kvm irqbypass intel_cstate snd_timer rtsx_pci_ms
intel_rapl_perf i2c_i801 memstick psmouse snd efivars soundcore
cfg80211 mei_me mei dm_crypt rtsx_pci_sdmmc mmc_core nouveau hwmon
led_class mxm_wmi drm_kms_helper syscopyarea sysfillrect sysimgblt
fb_sys_fops xhci_pci ttm rtsx_pci xhci_hcd e1000e mfd_core drm agpgart
usbcore usb_common
[   88.509185]  wmi video dm_mod ipv6 nf_defrag_ipv6 autofs4
[   88.509188] CPU: 2 PID: 64 Comm: kworker/2:1 Tainted: G        W
     5.3.1-matteo #81
[   88.509188] Hardware name: LENOVO 20EQS64N1B/20EQS64N1B, BIOS
N1EET84W (1.57 ) 05/09/2019
[   88.509193] Workqueue: events iwl_mvm_async_handlers_wk [iwlmvm]
[   88.509201] RIP:
0010:iwl_mvm_rx_umac_scan_complete_notif.cold+0xc/0x13 [iwlmvm]
[   88.509202] Code: 48 c7 c7 18 6e aa a0 e8 bc 6f 66 e0 0f 0b 49 8b
47 10 44 8b a0 9c 00 00 00 e9 8b de fe ff 48 c7 c7 18 6e aa a0 e8 9e
6f 66 e0 <0f> 0b e9 d2 e3 fe ff 48 c7 c7 18 6e aa a0 e8 8b 6f 66 e0 0f
0b 41
[   88.509203] RSP: 0000:ffffc900002a7df0 EFLAGS: 00010246
[   88.509204] RAX: 0000000000000024 RBX: ffff8887a9e18000 RCX: 0000000000000006
[   88.509205] RDX: 0000000000000000 RSI: 0000000000000096 RDI: ffff888883a96370
[   88.509205] RBP: ffff88887cef1e58 R08: 0000000000000001 R09: 0000000000000638
[   88.509206] R10: 0000000000024ee4 R11: 0000000000000004 R12: ffff88887cef1e28
[   88.509206] R13: ffff88887cef1e28 R14: ffff8887e36961c0 R15: dead000000000100
[   88.509207] FS:  0000000000000000(0000) GS:ffff888883a80000(0000)
knlGS:0000000000000000
[   88.509208] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   88.509209] CR2: 00007fa2b99a7024 CR3: 00000007b82c4002 CR4: 00000000003606e0
[   88.509209] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   88.509210] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   88.509210] Call Trace:
[   88.509216]  iwl_mvm_async_handlers_wk+0xaa/0x140 [iwlmvm]
[   88.509217]  process_one_work+0x1cf/0x370
[   88.509219]  worker_thread+0x225/0x3c0
[   88.509220]  kthread+0xfb/0x130
[   88.509221]  ? cancel_delayed_work+0x90/0x90
[   88.509222]  ? kthread_create_on_node+0x60/0x60
[   88.509223]  ret_from_fork+0x35/0x40
[   88.509225] ---[ end trace c1c6ffcd88e853be ]---
[   89.191879] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   89.338862] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   89.419149] iwlwifi 0000:04:00.0: FW already configured (0) - re-configuring
[   91.303918] iwlwifi 0000:04:00.0: regular scan timed out
[   91.304300] iwlwifi 0000:04:00.0: Microcode SW error detected.
Restarting 0x2000000.
[   91.304527] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   91.304531] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 6
[   91.304534] iwlwifi 0000:04:00.0: Loaded firmware version: 36.77d01142.0
[   91.304538] iwlwifi 0000:04:00.0: 0x00000084 | NMI_INTERRUPT_UNKNOWN
[   91.304541] iwlwifi 0000:04:00.0: 0x000002B0 | trm_hw_status0
[   91.304543] iwlwifi 0000:04:00.0: 0x00000000 | trm_hw_status1
[   91.304546] iwlwifi 0000:04:00.0: 0x00024200 | branchlink2
[   91.304548] iwlwifi 0000:04:00.0: 0x00039872 | interruptlink1
[   91.304551] iwlwifi 0000:04:00.0: 0x00048868 | interruptlink2
[   91.304553] iwlwifi 0000:04:00.0: 0x00000000 | data1
[   91.304555] iwlwifi 0000:04:00.0: 0x00000080 | data2
[   91.304558] iwlwifi 0000:04:00.0: 0x07830000 | data3
[   91.304560] iwlwifi 0000:04:00.0: 0x0022E682 | beacon time
[   91.304562] iwlwifi 0000:04:00.0: 0x001D197C | tsf low
[   91.304565] iwlwifi 0000:04:00.0: 0x00000000 | tsf hi
[   91.304567] iwlwifi 0000:04:00.0: 0x00000000 | time gp1
[   91.304570] iwlwifi 0000:04:00.0: 0x001D197D | time gp2
[   91.304572] iwlwifi 0000:04:00.0: 0x00000001 | uCode revision type
[   91.304574] iwlwifi 0000:04:00.0: 0x00000024 | uCode version major
[   91.304577] iwlwifi 0000:04:00.0: 0x77D01142 | uCode version minor
[   91.304579] iwlwifi 0000:04:00.0: 0x00000201 | hw version
[   91.304582] iwlwifi 0000:04:00.0: 0x00489008 | board version
[   91.304584] iwlwifi 0000:04:00.0: 0x0000001C | hcmd
[   91.304587] iwlwifi 0000:04:00.0: 0x00022000 | isr0
[   91.304589] iwlwifi 0000:04:00.0: 0x00800000 | isr1
[   91.304591] iwlwifi 0000:04:00.0: 0x08001802 | isr2
[   91.304593] iwlwifi 0000:04:00.0: 0x0041FCC0 | isr3
[   91.304596] iwlwifi 0000:04:00.0: 0x00000000 | isr4
[   91.304598] iwlwifi 0000:04:00.0: 0x803AFB03 | last cmd Id
[   91.304600] iwlwifi 0000:04:00.0: 0x00000000 | wait_event
[   91.304603] iwlwifi 0000:04:00.0: 0x00000080 | l2p_control
[   91.304605] iwlwifi 0000:04:00.0: 0x00010020 | l2p_duration
[   91.304608] iwlwifi 0000:04:00.0: 0x0000003F | l2p_mhvalid
[   91.304610] iwlwifi 0000:04:00.0: 0x00000080 | l2p_addr_match
[   91.304613] iwlwifi 0000:04:00.0: 0x0000000D | lmpm_pmg_sel
[   91.304615] iwlwifi 0000:04:00.0: 0x19071249 | timestamp
[   91.304617] iwlwifi 0000:04:00.0: 0x00345860 | flow_handler
[   91.304791] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
[   91.304794] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 7
[   91.304797] iwlwifi 0000:04:00.0: 0x00000070 | NMI_INTERRUPT_LMAC_FATAL
[   91.304800] iwlwifi 0000:04:00.0: 0x00000000 | umac branchlink1
[   91.304802] iwlwifi 0000:04:00.0: 0xC0086B38 | umac branchlink2
[   91.304805] iwlwifi 0000:04:00.0: 0xC0083D08 | umac interruptlink1
[   91.304807] iwlwifi 0000:04:00.0: 0xC0083D08 | umac interruptlink2
[   91.304809] iwlwifi 0000:04:00.0: 0x00000800 | umac data1
[   91.304812] iwlwifi 0000:04:00.0: 0xC0083D08 | umac data2
[   91.304814] iwlwifi 0000:04:00.0: 0xDEADBEEF | umac data3
[   91.304816] iwlwifi 0000:04:00.0: 0x00000024 | umac major
[   91.304819] iwlwifi 0000:04:00.0: 0x77D01142 | umac minor
[   91.304821] iwlwifi 0000:04:00.0: 0xC088628C | frame pointer
[   91.304823] iwlwifi 0000:04:00.0: 0xC088628C | stack pointer
[   91.304826] iwlwifi 0000:04:00.0: 0x003A010D | last host cmd
[   91.304828] iwlwifi 0000:04:00.0: 0x00000000 | isr status reg
[   91.304960] iwlwifi 0000:04:00.0: Fseq Registers:
[   91.305015] iwlwifi 0000:04:00.0: 0x81F5E342 | FSEQ_ERROR_CODE
[   91.305070] iwlwifi 0000:04:00.0: 0x120F8254 | FSEQ_TOP_INIT_VERSION
[   91.305125] iwlwifi 0000:04:00.0: 0x54034CA7 | FSEQ_CNVIO_INIT_VERSION
[   91.305181] iwlwifi 0000:04:00.0: 0x0000A056 | FSEQ_OTP_VERSION
[   91.305236] iwlwifi 0000:04:00.0: 0xCCA632D8 | FSEQ_TOP_CONTENT_VERSION
[   91.305291] iwlwifi 0000:04:00.0: 0xFCBC4F8A | FSEQ_ALIVE_TOKEN
[   91.305346] iwlwifi 0000:04:00.0: 0x377E9CF5 | FSEQ_CNVI_ID
[   91.305401] iwlwifi 0000:04:00.0: 0x7673FF81 | FSEQ_CNVR_ID
[   91.305456] iwlwifi 0000:04:00.0: 0x03000000 | CNVI_AUX_MISC_CHIP
[   91.305514] iwlwifi 0000:04:00.0: 0x0BADCAFE | CNVR_AUX_MISC_CHIP
[   91.305573] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
[   91.305631] iwlwifi 0000:04:00.0: 0x0BADCAFE |
CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
[   91.305691] iwlwifi 0000:04:00.0: Collecting data: trigger 2 fired.
[   91.305698] ieee80211 phy0: Hardware restart was requested
[   91.967590] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   92.117459] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
[   92.202999] iwlwifi 0000:04:00.0: FW already configured (0) - re-configuring

Reverting the patch fixes it, this is my card:

$ lspci -d ::280
04:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)

-- 
Matteo Croce
per aspera ad upstream


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 08/20] iwlwifi: mvm: Add log information about SAR status
  2019-09-30 12:06   ` Matteo Croce
@ 2019-09-30 12:12     ` Luca Coelho
  0 siblings, 0 replies; 23+ messages in thread
From: Luca Coelho @ 2019-09-30 12:12 UTC (permalink / raw)
  To: Matteo Croce, Haim Dreyfuss; +Cc: Kalle Valo, linux-wireless

On Mon, 2019-09-30 at 14:06 +0200, Matteo Croce wrote:
> On Fri, Jun 28, 2019 at 11:20 AM Luca Coelho <luca@coelho.fi> wrote:
> > From: Haim Dreyfuss <haim.dreyfuss@intel.com>
> > 
> > Inform users when SAR status is changing.
> > 
> > Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
> > Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> > ---
> >  drivers/net/wireless/intel/iwlwifi/mvm/fw.c  | 3 +++
> >  drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 9 +++++++++
> >  2 files changed, 12 insertions(+)
> > 
> > diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> > index b27be2e3eca2..41a98cf01d0e 100644
> > --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> > +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> > @@ -850,6 +850,9 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b)
> >                         return -ENOENT;
> >                 }
> > 
> > +               IWL_DEBUG_INFO(mvm,
> > +                              "SAR EWRD: chain %d profile index %d\n",
> > +                              i, profs[i]);
> >                 IWL_DEBUG_RADIO(mvm, "  Chain[%d]:\n", i);
> >                 for (j = 0; j < ACPI_SAR_NUM_SUB_BANDS; j++) {
> >                         idx = (i * ACPI_SAR_NUM_SUB_BANDS) + j;
> > diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c
> > index 7bdbd010ae6b..719f793b3487 100644
> > --- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c
> > +++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c
> > @@ -620,6 +620,7 @@ void iwl_mvm_rx_chub_update_mcc(struct iwl_mvm *mvm,
> >         enum iwl_mcc_source src;
> >         char mcc[3];
> >         struct ieee80211_regdomain *regd;
> > +       u32 wgds_tbl_idx;
> > 
> >         lockdep_assert_held(&mvm->mutex);
> > 
> > @@ -643,6 +644,14 @@ void iwl_mvm_rx_chub_update_mcc(struct iwl_mvm *mvm,
> >         if (IS_ERR_OR_NULL(regd))
> >                 return;
> > 
> > +       wgds_tbl_idx = iwl_mvm_get_sar_geo_profile(mvm);
> > +       if (wgds_tbl_idx < 0)
> > +               IWL_DEBUG_INFO(mvm, "SAR WGDS is disabled (%d)\n",
> > +                              wgds_tbl_idx);
> > +       else
> > +               IWL_DEBUG_INFO(mvm, "SAR WGDS: geo profile %d is configured\n",
> > +                              wgds_tbl_idx);
> > +
> >         regulatory_set_wiphy_regd(mvm->hw->wiphy, regd);
> >         kfree(regd);
> >  }
> > --
> > 2.20.1
> > 
> 
> Hi all,
> 
> this patch seems to cause a long microcode dump:
> 
> [   16.792357] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
> [   16.939172] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
> [   17.019127] iwlwifi 0000:04:00.0: FW already configured (0) - re-configuring
> [   17.053395] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
> [   17.200436] iwlwifi 0000:04:00.0: Applying debug destination EXTERNAL_DRAM
> [   17.280572] iwlwifi 0000:04:00.0: FW already configured (0) - re-configuring
> [   20.822983] iwlwifi 0000:04:00.0: Microcode SW error detected.
> Restarting 0x82000000.
> [   20.823153] iwlwifi 0000:04:00.0: Start IWL Error Log Dump:
> [   20.823155] iwlwifi 0000:04:00.0: Status: 0x00000080, count: 6
> [   20.823157] iwlwifi 0000:04:00.0: Loaded firmware version: 36.77d01142.0
> [   20.823158] iwlwifi 0000:04:00.0: 0x00000038 | BAD_COMMAND

[...]


> Reverting the patch fixes it, this is my card:
> $ lspci -d ::280
> 04:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)

Thanks for reporting!

But this bug was already reported and fixed.  Please check this:

https://bugzilla.kernel.org/show_bug.cgi?id=204151#c15

(specifically comment 15)

HTH.

--
Cheers,
Luca.


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2019-09-30 12:12 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-28  9:19 [PATCH 00/20] iwlwifi: updates intended for v5.3 2019-06-28 Luca Coelho
2019-06-28  9:19 ` [PATCH 01/20] iwlwifi: lib: Use struct_size() helper Luca Coelho
2019-06-28  9:19 ` [PATCH 02/20] iwlwifi: d3: " Luca Coelho
2019-06-28  9:19 ` [PATCH 03/20] iwlwifi: remove some unnecessary NULL checks Luca Coelho
2019-06-28  9:19 ` [PATCH 04/20] iwlwifi: mvm: correctly fill the ac array in the iwl_mac_ctx_cmd Luca Coelho
2019-06-28  9:19 ` [PATCH 05/20] iwlwifi: mvm: convert to FW AC when configuring MU EDCA Luca Coelho
2019-06-28  9:19 ` [PATCH 06/20] iwlwifi: fix module init error paths Luca Coelho
2019-06-28  9:19 ` [PATCH 07/20] iwlwifi: Add support for SAR South Korea limitation Luca Coelho
2019-06-28  9:19 ` [PATCH 08/20] iwlwifi: mvm: Add log information about SAR status Luca Coelho
2019-09-30 12:06   ` Matteo Croce
2019-09-30 12:12     ` Luca Coelho
2019-06-28  9:19 ` [PATCH 09/20] iwlwifi: mvm: Drop large non sta frames Luca Coelho
2019-06-28  9:19 ` [PATCH 10/20] iwlwifi: pcie: increase the size of PCI dumps Luca Coelho
2019-06-28  9:19 ` [PATCH 11/20] iwlwifi: dbg: fix debug monitor stop and restart delays Luca Coelho
2019-06-28  9:20 ` [PATCH 12/20] iwlwifi: dbg_ini: enforce apply point early on buffer allocation tlv Luca Coelho
2019-06-28  9:20 ` [PATCH 13/20] iwlwifi: dbg_ini: remove redundant checking of ini mode Luca Coelho
2019-06-28  9:20 ` [PATCH 14/20] iwlwifi: dbg: move trans debug fields to a separate struct Luca Coelho
2019-06-28  9:20 ` [PATCH 15/20] iwlwifi: support FSEQ TLV even when FMAC is not compiled Luca Coelho
2019-06-28  9:20 ` [PATCH 16/20] iwlwifi: mvm: make the usage of TWT configurable Luca Coelho
2019-06-28  9:20 ` [PATCH 17/20] iwlwifi: dbg_ini: fix debug monitor stop and restart in ini mode Luca Coelho
2019-06-28  9:20 ` [PATCH 18/20] iwlwifi: dbg: don't stop dbg recording before entering D3 from 9000 devices Luca Coelho
2019-06-28  9:20 ` [PATCH 19/20] iwlwifi: dbg: debug recording stop and restart command remove Luca Coelho
2019-06-28  9:20 ` [PATCH 20/20] iwlwifi: mvm: remove MAC_FILTER_IN_11AX for AP mode Luca Coelho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).