All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2
@ 2021-01-31 18:22 Luca Coelho
  2021-01-31 18:22 ` [PATCH 01/12] iwlwifi: mvm: add IML/ROM information for other HW families Luca Coelho
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

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

Hi,

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

The changes are:

* Per Platform Antenna Gain (PPAG) fixes and improvements;
* Bump FW API support again;
* Improvements in the debug framework;

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

Please review.

Cheers,
Luca.


Luca Coelho (7):
  iwlwifi: mvm: set enabled in the PPAG command properly
  iwlwifi: mvm: implement approved list for the PPAG feature
  iwlwifi: mvm: add HP to the PPAG approved list
  iwlwifi: mvm: add Samsung to the PPAG approved list
  iwlwifi: mvm: add Microsoft to the PPAG approved list
  iwlwifi: mvm: add Asus to the PPAG approved list
  iwlwifi: bump FW API to 61 for AX devices

Mordechay Goodstein (5):
  iwlwifi: mvm: add IML/ROM information for other HW families
  iwlwifi: mvm: add triggers for MLME events
  iwlwifi: fwrt: add suspend/resume time point
  iwlwifi: mvm: add tx fail time point
  iwlwifi: mvm: add debugfs entry to trigger a dump as any time-point

 .../net/wireless/intel/iwlwifi/cfg/22000.c    |  2 +-
 drivers/net/wireless/intel/iwlwifi/fw/init.c  |  2 ++
 drivers/net/wireless/intel/iwlwifi/iwl-prph.h |  1 +
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c   |  3 --
 .../net/wireless/intel/iwlwifi/mvm/debugfs.c  | 19 ++++++++++
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c   | 35 +++++++++++++++++++
 .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 33 +++++++++++++++++
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c   | 26 ++++++++++++--
 .../net/wireless/intel/iwlwifi/mvm/utils.c    | 24 ++++++++++---
 9 files changed, 133 insertions(+), 12 deletions(-)

-- 
2.29.2


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

* [PATCH 01/12] iwlwifi: mvm: add IML/ROM information for other HW families
  2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
@ 2021-01-31 18:22 ` Luca Coelho
  2021-02-05  9:59   ` Luca Coelho
  2021-01-31 18:22 ` [PATCH 02/12] iwlwifi: mvm: add triggers for MLME events Luca Coelho
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

From: Mordechay Goodstein <mordechay.goodstein@intel.com>

This makes it easier to debug IML/ROM errors for other HW families
as well.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-prph.h |  1 +
 .../net/wireless/intel/iwlwifi/mvm/utils.c    | 24 +++++++++++++++----
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
index 0b03fdedc1f7..9dd2d79f4d5a 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
@@ -359,6 +359,7 @@ enum {
 /* device family 22000 WPROT register */
 #define PREG_PRPH_WPROT_22000		0xA04D00
 
+#define SB_MODIFY_CFG_FLAG		0xA03088
 #define SB_CPU_1_STATUS			0xA01E30
 #define SB_CPU_2_STATUS			0xA01E34
 #define UMAG_SB_CPU_1_STATUS		0xA038C0
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index 01a0fe86fd0d..b6b481ff1518 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -499,18 +499,33 @@ static void iwl_mvm_dump_lmac_error_log(struct iwl_mvm *mvm, u8 lmac_num)
 static void iwl_mvm_dump_iml_error_log(struct iwl_mvm *mvm)
 {
 	struct iwl_trans *trans = mvm->trans;
-	u32 error;
+	u32 error, data1;
+
+	if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000) {
+		error = UMAG_SB_CPU_2_STATUS;
+		data1 = UMAG_SB_CPU_1_STATUS;
+	} else if (mvm->trans->trans_cfg->device_family >=
+		   IWL_DEVICE_FAMILY_8000) {
+		error = SB_CPU_2_STATUS;
+		data1 = SB_CPU_1_STATUS;
+	} else {
+		return;
+	}
 
 	error = iwl_read_umac_prph(trans, UMAG_SB_CPU_2_STATUS);
 
 	IWL_ERR(trans, "IML/ROM dump:\n");
 
 	if (error & 0xFFFF0000)
-		IWL_ERR(trans, "IML/ROM SYSASSERT:\n");
+		IWL_ERR(trans, "0x%04X | IML/ROM SYSASSERT\n", error >> 16);
 
 	IWL_ERR(mvm, "0x%08X | IML/ROM error/state\n", error);
 	IWL_ERR(mvm, "0x%08X | IML/ROM data1\n",
-		iwl_read_umac_prph(trans, UMAG_SB_CPU_1_STATUS));
+		iwl_read_umac_prph(trans, data1));
+
+	if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000)
+		IWL_ERR(mvm, "0x%08X | IML/ROM WFPM_AUTH_KEY_0\n",
+			iwl_read_umac_prph(trans, SB_MODIFY_CFG_FLAG));
 }
 
 void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm)
@@ -528,8 +543,7 @@ void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm)
 
 	iwl_mvm_dump_umac_error_log(mvm);
 
-	if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
-		iwl_mvm_dump_iml_error_log(mvm);
+	iwl_mvm_dump_iml_error_log(mvm);
 
 	iwl_fw_error_print_fseq_regs(&mvm->fwrt);
 }
-- 
2.29.2


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

* [PATCH 02/12] iwlwifi: mvm: add triggers for MLME events
  2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
  2021-01-31 18:22 ` [PATCH 01/12] iwlwifi: mvm: add IML/ROM information for other HW families Luca Coelho
@ 2021-01-31 18:22 ` Luca Coelho
  2021-01-31 18:22 ` [PATCH 03/12] iwlwifi: fwrt: add suspend/resume time point Luca Coelho
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

From: Mordechay Goodstein <mordechay.goodstein@intel.com>

For debug we add auth/assoc failed event and disconnect event.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index a529404d416c..ec43601d410a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -4988,6 +4988,34 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw,
 	mutex_unlock(&mvm->mutex);
 }
 
+static void iwl_mvm_event_mlme_callback_ini(struct iwl_mvm *mvm,
+					    struct ieee80211_vif *vif,
+					    const  struct ieee80211_mlme_event *mlme)
+{
+	if (mlme->data == ASSOC_EVENT && (mlme->status == MLME_DENIED ||
+					  mlme->status == MLME_TIMEOUT)) {
+		iwl_dbg_tlv_time_point(&mvm->fwrt,
+				       IWL_FW_INI_TIME_POINT_ASSOC_FAILED,
+				       NULL);
+		return;
+	}
+
+	if (mlme->data == AUTH_EVENT && (mlme->status == MLME_DENIED ||
+					 mlme->status == MLME_TIMEOUT)) {
+		iwl_dbg_tlv_time_point(&mvm->fwrt,
+				       IWL_FW_INI_TIME_POINT_EAPOL_FAILED,
+				       NULL);
+		return;
+	}
+
+	if (mlme->data == DEAUTH_RX_EVENT || mlme->data == DEAUTH_TX_EVENT) {
+		iwl_dbg_tlv_time_point(&mvm->fwrt,
+				       IWL_FW_INI_TIME_POINT_DEASSOC,
+				       NULL);
+		return;
+	}
+}
+
 static void iwl_mvm_event_mlme_callback(struct iwl_mvm *mvm,
 					struct ieee80211_vif *vif,
 					const struct ieee80211_event *event)
@@ -5002,6 +5030,11 @@ static void iwl_mvm_event_mlme_callback(struct iwl_mvm *mvm,
 	struct iwl_fw_dbg_trigger_tlv *trig;
 	struct iwl_fw_dbg_trigger_mlme *trig_mlme;
 
+	if (iwl_trans_dbg_ini_valid(mvm->trans)) {
+		iwl_mvm_event_mlme_callback_ini(mvm, vif, &event->u.mlme);
+		return;
+	}
+
 	trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, ieee80211_vif_to_wdev(vif),
 				     FW_DBG_TRIGGER_MLME);
 	if (!trig)
-- 
2.29.2


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

* [PATCH 03/12] iwlwifi: fwrt: add suspend/resume time point
  2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
  2021-01-31 18:22 ` [PATCH 01/12] iwlwifi: mvm: add IML/ROM information for other HW families Luca Coelho
  2021-01-31 18:22 ` [PATCH 02/12] iwlwifi: mvm: add triggers for MLME events Luca Coelho
@ 2021-01-31 18:22 ` Luca Coelho
  2021-01-31 18:22 ` [PATCH 04/12] iwlwifi: mvm: add tx fail " Luca Coelho
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

From: Mordechay Goodstein <mordechay.goodstein@intel.com>

We should only collect debug data after exiting suspend state, that's
why we delete the current place in d3.c file, and add it to fwrt flows
that occur while we can still access the fw and collect debug data.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/init.c | 2 ++
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c  | 3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/init.c b/drivers/net/wireless/intel/iwlwifi/fw/init.c
index e317b051b8ed..986913f2fbd5 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/init.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/init.c
@@ -36,11 +36,13 @@ IWL_EXPORT_SYMBOL(iwl_fw_runtime_init);
 void iwl_fw_runtime_suspend(struct iwl_fw_runtime *fwrt)
 {
 	iwl_fw_suspend_timestamp(fwrt);
+	iwl_dbg_tlv_time_point(fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_START, NULL);
 }
 IWL_EXPORT_SYMBOL(iwl_fw_runtime_suspend);
 
 void iwl_fw_runtime_resume(struct iwl_fw_runtime *fwrt)
 {
+	iwl_dbg_tlv_time_point(fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_END, NULL);
 	iwl_fw_resume_timestamp(fwrt);
 }
 IWL_EXPORT_SYMBOL(iwl_fw_runtime_resume);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index f98eb7b71068..816a82db8252 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -2048,9 +2048,6 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)
 		goto err;
 	}
 
-	iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_END,
-			       NULL);
-
 	ret = iwl_trans_d3_resume(mvm->trans, &d3_status, test, !unified_image);
 	if (ret)
 		goto err;
-- 
2.29.2


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

* [PATCH 04/12] iwlwifi: mvm: add tx fail time point
  2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
                   ` (2 preceding siblings ...)
  2021-01-31 18:22 ` [PATCH 03/12] iwlwifi: fwrt: add suspend/resume time point Luca Coelho
@ 2021-01-31 18:22 ` Luca Coelho
  2021-01-31 18:22 ` [PATCH 05/12] iwlwifi: mvm: add debugfs entry to trigger a dump as any time-point Luca Coelho
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

From: Mordechay Goodstein <mordechay.goodstein@intel.com>

This helps collect on any tx failure fw data to better understand what
went wrong.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 26 ++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index b102fe116f04..03afced82afa 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -1324,12 +1324,24 @@ static void iwl_mvm_hwrate_to_tx_status(u32 rate_n_flags,
 }
 
 static void iwl_mvm_tx_status_check_trigger(struct iwl_mvm *mvm,
-					    u32 status)
+					    u32 status, __le16 frame_control)
 {
 	struct iwl_fw_dbg_trigger_tlv *trig;
 	struct iwl_fw_dbg_trigger_tx_status *status_trig;
 	int i;
 
+	if ((status & TX_STATUS_MSK) != TX_STATUS_SUCCESS) {
+		enum iwl_fw_ini_time_point tp =
+			IWL_FW_INI_TIME_POINT_TX_FAILED;
+
+		if (ieee80211_is_action(frame_control))
+			tp = IWL_FW_INI_TIME_POINT_TX_WFD_ACTION_FRAME_FAILED;
+
+		iwl_dbg_tlv_time_point(&mvm->fwrt,
+				       tp, NULL);
+		return;
+	}
+
 	trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, NULL,
 				     FW_DBG_TRIGGER_TX_STATUS);
 	if (!trig)
@@ -1447,7 +1459,7 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
 		if (skb_freed > 1)
 			info->flags |= IEEE80211_TX_STAT_ACK;
 
-		iwl_mvm_tx_status_check_trigger(mvm, status);
+		iwl_mvm_tx_status_check_trigger(mvm, status, hdr->frame_control);
 
 		info->status.rates[0].count = tx_resp->failure_frame + 1;
 		iwl_mvm_hwrate_to_tx_status(le32_to_cpu(tx_resp->initial_rate),
@@ -1631,10 +1643,13 @@ static void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm,
 	struct agg_tx_status *frame_status =
 		iwl_mvm_get_agg_status(mvm, tx_resp);
 	int i;
+	bool tirgger_timepoint = false;
 
 	for (i = 0; i < tx_resp->frame_count; i++) {
 		u16 fstatus = le16_to_cpu(frame_status[i].status);
-
+		/* In case one frame wasn't transmitted trigger time point */
+		tirgger_timepoint |= ((fstatus & AGG_TX_STATE_STATUS_MSK) !=
+				      AGG_TX_STATE_TRANSMITTED);
 		IWL_DEBUG_TX_REPLY(mvm,
 				   "status %s (0x%04x), try-count (%d) seq (0x%x)\n",
 				   iwl_get_agg_tx_status(fstatus),
@@ -1643,6 +1658,11 @@ static void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm,
 					AGG_TX_STATE_TRY_CNT_POS,
 				   le16_to_cpu(frame_status[i].sequence));
 	}
+
+	if (tirgger_timepoint)
+		iwl_dbg_tlv_time_point(&mvm->fwrt,
+				       IWL_FW_INI_TIME_POINT_TX_FAILED, NULL);
+
 }
 #else
 static void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm,
-- 
2.29.2


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

* [PATCH 05/12] iwlwifi: mvm: add debugfs entry to trigger a dump as any time-point
  2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
                   ` (3 preceding siblings ...)
  2021-01-31 18:22 ` [PATCH 04/12] iwlwifi: mvm: add tx fail " Luca Coelho
@ 2021-01-31 18:22 ` Luca Coelho
  2021-01-31 18:22 ` [PATCH 06/12] iwlwifi: mvm: set enabled in the PPAG command properly Luca Coelho
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

From: Mordechay Goodstein <mordechay.goodstein@intel.com>

This is used for different tests collecting different types of
debug data from fw (e.g latency issues, hw issues etc).

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 .../net/wireless/intel/iwlwifi/mvm/debugfs.c  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index 3834d7197e11..efc908231d74 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -1349,6 +1349,24 @@ static ssize_t iwl_dbgfs_fw_dbg_collect_write(struct iwl_mvm *mvm,
 	return count;
 }
 
+static ssize_t iwl_dbgfs_dbg_time_point_write(struct iwl_mvm *mvm,
+					      char *buf, size_t count,
+					      loff_t *ppos)
+{
+	u32 timepoint;
+
+	if (kstrtou32(buf, 0, &timepoint))
+		return -EINVAL;
+
+	if (timepoint == IWL_FW_INI_TIME_POINT_INVALID ||
+	    timepoint >= IWL_FW_INI_TIME_POINT_NUM)
+		return -EINVAL;
+
+	iwl_dbg_tlv_time_point(&mvm->fwrt, timepoint, NULL);
+
+	return count;
+}
+
 #define ADD_TEXT(...) pos += scnprintf(buf + pos, bufsz - pos, __VA_ARGS__)
 #ifdef CONFIG_IWLWIFI_BCAST_FILTERING
 static ssize_t iwl_dbgfs_bcast_filters_read(struct file *file,
@@ -1786,6 +1804,7 @@ MVM_DEBUGFS_WRITE_FILE_OPS(bt_force_ant, 10);
 MVM_DEBUGFS_READ_WRITE_FILE_OPS(scan_ant_rxchain, 8);
 MVM_DEBUGFS_READ_WRITE_FILE_OPS(fw_dbg_conf, 8);
 MVM_DEBUGFS_WRITE_FILE_OPS(fw_dbg_collect, 64);
+MVM_DEBUGFS_WRITE_FILE_OPS(dbg_time_point, 64);
 MVM_DEBUGFS_WRITE_FILE_OPS(indirection_tbl,
 			   (IWL_RSS_INDIRECTION_TABLE_SIZE * 2));
 MVM_DEBUGFS_WRITE_FILE_OPS(inject_packet, 512);
-- 
2.29.2


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

* [PATCH 06/12] iwlwifi: mvm: set enabled in the PPAG command properly
  2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
                   ` (4 preceding siblings ...)
  2021-01-31 18:22 ` [PATCH 05/12] iwlwifi: mvm: add debugfs entry to trigger a dump as any time-point Luca Coelho
@ 2021-01-31 18:22 ` Luca Coelho
  2021-01-31 18:22 ` [PATCH 07/12] iwlwifi: mvm: implement approved list for the PPAG feature Luca Coelho
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

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

When version 2 of the PER_PLATFORM_ANT_GAIN_CMD was implemented, we
started copying the values from the command that we have stored into a
local instance.  But we accidentally forgot to copy the enabled flag,
so in practice PPAG is never really enabled.  Fix this by copying the
flag from our stored data a we should.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Fixes: f2134f66f40e ("iwlwifi: acpi: support ppag table command v2")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index be1cc8653147..9f8751ceb45b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -999,6 +999,8 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
 		return 0;
 	}
 
+	ppag_table.v1.enabled = mvm->fwrt.ppag_table.v1.enabled;
+
 	cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, PHY_OPS_GROUP,
 					PER_PLATFORM_ANT_GAIN_CMD,
 					IWL_FW_CMD_VER_UNKNOWN);
-- 
2.29.2


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

* [PATCH 07/12] iwlwifi: mvm: implement approved list for the PPAG feature
  2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
                   ` (5 preceding siblings ...)
  2021-01-31 18:22 ` [PATCH 06/12] iwlwifi: mvm: set enabled in the PPAG command properly Luca Coelho
@ 2021-01-31 18:22 ` Luca Coelho
  2021-01-31 18:22 ` [PATCH 08/12] iwlwifi: mvm: add HP to the PPAG approved list Luca Coelho
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

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

We should only allow PPAG to be enabled by OEMs that are in the
approved list.  In order to do this, we need to compare the system
vendor string retrieved from SMBIOS to a list maintained in the
driver.  If the vendor string is not in the list, we don't allow PPAG
to be used.

For now the list is empty, but entries will be added to it
individually, in subsequent patches.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 9f8751ceb45b..e29f2d310fb6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -6,6 +6,7 @@
  */
 #include <net/mac80211.h>
 #include <linux/netdevice.h>
+#include <linux/dmi.h>
 
 #include "iwl-trans.h"
 #include "iwl-op-mode.h"
@@ -1043,6 +1044,9 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
 	return ret;
 }
 
+static const struct dmi_system_id dmi_ppag_approved_list[] = {
+};
+
 static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)
 {
 	int ret;
@@ -1054,6 +1058,15 @@ static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)
 				ret);
 		return 0;
 	}
+
+	if (!dmi_check_system(dmi_ppag_approved_list)) {
+		IWL_DEBUG_RADIO(mvm,
+				"System vendor '%s' is not in the approved list, disabling PPAG.\n",
+				dmi_get_system_info(DMI_SYS_VENDOR));
+		mvm->fwrt.ppag_table.v1.enabled = cpu_to_le32(0);
+		return 0;
+	}
+
 	return iwl_mvm_ppag_send_cmd(mvm);
 }
 
-- 
2.29.2


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

* [PATCH 08/12] iwlwifi: mvm: add HP to the PPAG approved list
  2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
                   ` (6 preceding siblings ...)
  2021-01-31 18:22 ` [PATCH 07/12] iwlwifi: mvm: implement approved list for the PPAG feature Luca Coelho
@ 2021-01-31 18:22 ` Luca Coelho
  2021-01-31 18:22 ` [PATCH 09/12] iwlwifi: mvm: add Samsung " Luca Coelho
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

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

HP is now part of the OEMs in the approved list for the PPAG feature.
Add it.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index e29f2d310fb6..8564f6e40c41 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1045,6 +1045,11 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
 }
 
 static const struct dmi_system_id dmi_ppag_approved_list[] = {
+	{ .ident = "HP",
+	  .matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "HP"),
+		},
+	},
 };
 
 static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)
-- 
2.29.2


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

* [PATCH 09/12] iwlwifi: mvm: add Samsung to the PPAG approved list
  2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
                   ` (7 preceding siblings ...)
  2021-01-31 18:22 ` [PATCH 08/12] iwlwifi: mvm: add HP to the PPAG approved list Luca Coelho
@ 2021-01-31 18:22 ` Luca Coelho
  2021-01-31 18:22 ` [PATCH 10/12] iwlwifi: mvm: add Microsoft " Luca Coelho
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

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

Samsung is now approved to use the PPAG feature.  Add it to the
approved list.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 8564f6e40c41..54e994357c70 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1050,6 +1050,11 @@ static const struct dmi_system_id dmi_ppag_approved_list[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "HP"),
 		},
 	},
+	{ .ident = "SAMSUNG",
+	  .matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD"),
+		},
+	},
 };
 
 static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)
-- 
2.29.2


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

* [PATCH 10/12] iwlwifi: mvm: add Microsoft to the PPAG approved list
  2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
                   ` (8 preceding siblings ...)
  2021-01-31 18:22 ` [PATCH 09/12] iwlwifi: mvm: add Samsung " Luca Coelho
@ 2021-01-31 18:22 ` Luca Coelho
  2021-01-31 18:22 ` [PATCH 11/12] iwlwifi: mvm: add Asus " Luca Coelho
  2021-01-31 18:22 ` [PATCH 12/12] iwlwifi: bump FW API to 61 for AX devices Luca Coelho
  11 siblings, 0 replies; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

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

Microsoft is now approved to use the PPAG feature.  Add it to the
approved list.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 54e994357c70..b5101c31071b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1055,6 +1055,11 @@ static const struct dmi_system_id dmi_ppag_approved_list[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD"),
 		},
 	},
+	{ .ident = "MSFT",
+	  .matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+		},
+	},
 };
 
 static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)
-- 
2.29.2


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

* [PATCH 11/12] iwlwifi: mvm: add Asus to the PPAG approved list
  2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
                   ` (9 preceding siblings ...)
  2021-01-31 18:22 ` [PATCH 10/12] iwlwifi: mvm: add Microsoft " Luca Coelho
@ 2021-01-31 18:22 ` Luca Coelho
  2021-01-31 18:22 ` [PATCH 12/12] iwlwifi: bump FW API to 61 for AX devices Luca Coelho
  11 siblings, 0 replies; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

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

Asus is now approved to use the PPAG feature.  Add it to the approved
list.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index b5101c31071b..1e9ed09bf1dd 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1060,6 +1060,11 @@ static const struct dmi_system_id dmi_ppag_approved_list[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
 		},
 	},
+	{ .ident = "ASUS",
+	  .matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTek COMPUTER INC."),
+		},
+	},
 };
 
 static int iwl_mvm_ppag_init(struct iwl_mvm *mvm)
-- 
2.29.2


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

* [PATCH 12/12] iwlwifi: bump FW API to 61 for AX devices
  2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
                   ` (10 preceding siblings ...)
  2021-01-31 18:22 ` [PATCH 11/12] iwlwifi: mvm: add Asus " Luca Coelho
@ 2021-01-31 18:22 ` Luca Coelho
  11 siblings, 0 replies; 14+ messages in thread
From: Luca Coelho @ 2021-01-31 18:22 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

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

Start supporting API version 61 for AX devices.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
index 65a2dacc083e..fa2c9f7c3d4a 100644
--- a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
+++ b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
@@ -9,7 +9,7 @@
 #include "iwl-prph.h"
 
 /* Highest firmware API version supported */
-#define IWL_22000_UCODE_API_MAX	60
+#define IWL_22000_UCODE_API_MAX	61
 
 /* Lowest firmware API version supported */
 #define IWL_22000_UCODE_API_MIN	39
-- 
2.29.2


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

* Re: [PATCH 01/12] iwlwifi: mvm: add IML/ROM information for other HW families
  2021-01-31 18:22 ` [PATCH 01/12] iwlwifi: mvm: add IML/ROM information for other HW families Luca Coelho
@ 2021-02-05  9:59   ` Luca Coelho
  0 siblings, 0 replies; 14+ messages in thread
From: Luca Coelho @ 2021-02-05  9:59 UTC (permalink / raw)
  To: Luca Coelho; +Cc: kvalo, linux-wireless

Luca Coelho <luca@coelho.fi> wrote:

> From: Mordechay Goodstein <mordechay.goodstein@intel.com>
> 
> This makes it easier to debug IML/ROM errors for other HW families
> as well.
> 
> Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

12 patches applied to iwlwifi-next.git, thanks.

5226cecbc6c8 iwlwifi: mvm: add IML/ROM information for other HW families
119c2a13a3e8 iwlwifi: mvm: add triggers for MLME events
1db5c3472b2a iwlwifi: fwrt: add suspend/resume time point
0d65ce900d11 iwlwifi: mvm: add tx fail time point
9dbb62a29042 iwlwifi: mvm: add debugfs entry to trigger a dump as any time-point
efaa85cf2294 iwlwifi: mvm: set enabled in the PPAG command properly
a2ac0f48a07c iwlwifi: mvm: implement approved list for the PPAG feature
ca176eddeba2 iwlwifi: mvm: add HP to the PPAG approved list
dd158ed674ed iwlwifi: mvm: add Samsung to the PPAG approved list
4a76553c88b4 iwlwifi: mvm: add Microsoft to the PPAG approved list
a7abc1eae7e4 iwlwifi: mvm: add Asus to the PPAG approved list
df8ba77ef4cc iwlwifi: bump FW API to 61 for AX devices


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

end of thread, other threads:[~2021-02-05 10:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-31 18:22 [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2 Luca Coelho
2021-01-31 18:22 ` [PATCH 01/12] iwlwifi: mvm: add IML/ROM information for other HW families Luca Coelho
2021-02-05  9:59   ` Luca Coelho
2021-01-31 18:22 ` [PATCH 02/12] iwlwifi: mvm: add triggers for MLME events Luca Coelho
2021-01-31 18:22 ` [PATCH 03/12] iwlwifi: fwrt: add suspend/resume time point Luca Coelho
2021-01-31 18:22 ` [PATCH 04/12] iwlwifi: mvm: add tx fail " Luca Coelho
2021-01-31 18:22 ` [PATCH 05/12] iwlwifi: mvm: add debugfs entry to trigger a dump as any time-point Luca Coelho
2021-01-31 18:22 ` [PATCH 06/12] iwlwifi: mvm: set enabled in the PPAG command properly Luca Coelho
2021-01-31 18:22 ` [PATCH 07/12] iwlwifi: mvm: implement approved list for the PPAG feature Luca Coelho
2021-01-31 18:22 ` [PATCH 08/12] iwlwifi: mvm: add HP to the PPAG approved list Luca Coelho
2021-01-31 18:22 ` [PATCH 09/12] iwlwifi: mvm: add Samsung " Luca Coelho
2021-01-31 18:22 ` [PATCH 10/12] iwlwifi: mvm: add Microsoft " Luca Coelho
2021-01-31 18:22 ` [PATCH 11/12] iwlwifi: mvm: add Asus " Luca Coelho
2021-01-31 18:22 ` [PATCH 12/12] iwlwifi: bump FW API to 61 for AX devices Luca Coelho

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.