All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] iwlwifi: updates intended for v5.13 2021-04-11-2
@ 2021-04-11 10:25 Luca Coelho
  2021-04-11 10:25 ` [PATCH 1/8] iwlwifi: mvm: don't disconnect immediately if we don't hear beacons after CSA Luca Coelho
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Luca Coelho @ 2021-04-11 10:25 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

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

Hi,

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

The changes are:

* Bump the FW API version support for AX devices;
* One more CSA fix;
* Some other small fixes, clean-ups 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.


Emmanuel Grumbach (2):
  iwlwifi: mvm: don't disconnect immediately if we don't hear beacons
    after CSA
  iwlwifi: mvm: don't WARN if we can't remove a time event

Johannes Berg (2):
  iwlwifi: trans/pcie: defer transport initialisation
  iwlwifi: fw: print out trigger delay when collecting data

Krishnanand Prabhu (1):
  iwlwifi: mvm: add support for timing measurement

Luca Coelho (1):
  iwlwifi: bump FW API to 63 for AX devices

Matti Gottlieb (1):
  iwlwifi: pcie: Change ma product string name

Mukesh Sisodiya (1):
  iwlwifi: dbg:  disable ini debug in 9000 family and below

 .../net/wireless/intel/iwlwifi/cfg/22000.c    |  4 +-
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c   |  4 +-
 .../net/wireless/intel/iwlwifi/iwl-config.h   |  2 +-
 .../net/wireless/intel/iwlwifi/iwl-dbg-tlv.c  |  5 +-
 .../net/wireless/intel/iwlwifi/iwl-trans.c    | 91 +++++++++++--------
 .../net/wireless/intel/iwlwifi/iwl-trans.h    |  1 +
 .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 39 +++++++-
 .../wireless/intel/iwlwifi/mvm/time-event.c   | 17 +++-
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 10 +-
 9 files changed, 118 insertions(+), 55 deletions(-)

-- 
2.31.0


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

* [PATCH 1/8] iwlwifi: mvm: don't disconnect immediately if we don't hear beacons after CSA
  2021-04-11 10:25 [PATCH 0/8] iwlwifi: updates intended for v5.13 2021-04-11-2 Luca Coelho
@ 2021-04-11 10:25 ` Luca Coelho
  2021-04-12 10:27   ` Luca Coelho
  2021-04-11 10:25 ` [PATCH 2/8] iwlwifi: mvm: don't WARN if we can't remove a time event Luca Coelho
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 11+ messages in thread
From: Luca Coelho @ 2021-04-11 10:25 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

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

When we switch channel, we may miss a few beacons on the
new channel. Don't disconnect if the time event for the
switch ends before we hear the beacons.

Note that this is relevant only for old devices that still
use the TIME_EVENT firmware API for channel switch.

The check that we hear a beacon before the time event
ends was meant to be used for the association time event
and not for the channel switch time event.

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

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
index 1418a6438635..76c36f5cf9a3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2012-2014, 2018-2020 Intel Corporation
+ * Copyright (C) 2012-2014, 2018-2021 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2017 Intel Deutschland GmbH
  */
@@ -294,6 +294,17 @@ static void iwl_mvm_te_handle_notif(struct iwl_mvm *mvm,
 			iwl_mvm_roc_finished(mvm);
 			break;
 		case NL80211_IFTYPE_STATION:
+			/*
+			 * If we are switching channel, don't disconnect
+			 * if the time event is already done. Beacons can
+			 * be delayed a bit after the switch.
+			 */
+			if (te_data->id == TE_CHANNEL_SWITCH_PERIOD) {
+				IWL_DEBUG_TE(mvm,
+					     "No beacon heard and the CS time event is over, don't disconnect\n");
+				break;
+			}
+
 			/*
 			 * By now, we should have finished association
 			 * and know the dtim period.
-- 
2.31.0


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

* [PATCH 2/8] iwlwifi: mvm: don't WARN if we can't remove a time event
  2021-04-11 10:25 [PATCH 0/8] iwlwifi: updates intended for v5.13 2021-04-11-2 Luca Coelho
  2021-04-11 10:25 ` [PATCH 1/8] iwlwifi: mvm: don't disconnect immediately if we don't hear beacons after CSA Luca Coelho
@ 2021-04-11 10:25 ` Luca Coelho
  2021-04-11 10:25 ` [PATCH 3/8] iwlwifi: bump FW API to 63 for AX devices Luca Coelho
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Luca Coelho @ 2021-04-11 10:25 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

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

It is not very useful to WARN if we can't send a host command
The firmware is likely in a bad situation and the fact that
we didn't send the host command has an impact on the firmware
only, not on the driver. The driver could clean up all its
state.

Don't WARN in this case, but just leave a smaller note.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
index 76c36f5cf9a3..83342a6a6d5b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
@@ -734,8 +734,8 @@ void iwl_mvm_remove_time_event(struct iwl_mvm *mvm,
 	IWL_DEBUG_TE(mvm, "Removing TE 0x%x\n", le32_to_cpu(time_cmd.id));
 	ret = iwl_mvm_send_cmd_pdu(mvm, TIME_EVENT_CMD, 0,
 				   sizeof(time_cmd), &time_cmd);
-	if (WARN_ON(ret))
-		return;
+	if (ret)
+		IWL_ERR(mvm, "Couldn't remove the time event\n");
 }
 
 /*
-- 
2.31.0


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

* [PATCH 3/8] iwlwifi: bump FW API to 63 for AX devices
  2021-04-11 10:25 [PATCH 0/8] iwlwifi: updates intended for v5.13 2021-04-11-2 Luca Coelho
  2021-04-11 10:25 ` [PATCH 1/8] iwlwifi: mvm: don't disconnect immediately if we don't hear beacons after CSA Luca Coelho
  2021-04-11 10:25 ` [PATCH 2/8] iwlwifi: mvm: don't WARN if we can't remove a time event Luca Coelho
@ 2021-04-11 10:25 ` Luca Coelho
  2021-04-11 10:25 ` [PATCH 4/8] iwlwifi: trans/pcie: defer transport initialisation Luca Coelho
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Luca Coelho @ 2021-04-11 10:25 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

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

Start supporting API version 63 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 d775cd9c1394..44735a6d1d39 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	62
+#define IWL_22000_UCODE_API_MAX	63
 
 /* Lowest firmware API version supported */
 #define IWL_22000_UCODE_API_MIN	39
-- 
2.31.0


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

* [PATCH 4/8] iwlwifi: trans/pcie: defer transport initialisation
  2021-04-11 10:25 [PATCH 0/8] iwlwifi: updates intended for v5.13 2021-04-11-2 Luca Coelho
                   ` (2 preceding siblings ...)
  2021-04-11 10:25 ` [PATCH 3/8] iwlwifi: bump FW API to 63 for AX devices Luca Coelho
@ 2021-04-11 10:25 ` Luca Coelho
  2021-04-11 10:25 ` [PATCH 5/8] iwlwifi: fw: print out trigger delay when collecting data Luca Coelho
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Luca Coelho @ 2021-04-11 10:25 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

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

In a few PCIe devices we may have to swap out the configuration
after we allocate/initialise some parts of the device because
we only know the correct one after reading some registers. This
causes some things such as the byte-count table allocations to
be incorrect, since the configuration is swapped for one with a
bigger queue size.

Fix this by initialising most of the transport much later, only
after the configuration has finally been determined.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 .../net/wireless/intel/iwlwifi/iwl-trans.c    | 91 +++++++++++--------
 .../net/wireless/intel/iwlwifi/iwl-trans.h    |  1 +
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c |  4 +
 3 files changed, 57 insertions(+), 39 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.c b/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
index 60e0db4a5e20..9236f9106826 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.c
@@ -2,7 +2,7 @@
 /*
  * Copyright (C) 2015 Intel Mobile Communications GmbH
  * Copyright (C) 2016-2017 Intel Deutschland GmbH
- * Copyright (C) 2019-2020 Intel Corporation
+ * Copyright (C) 2019-2021 Intel Corporation
  */
 #include <linux/kernel.h>
 #include <linux/bsearch.h>
@@ -21,7 +21,6 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
 				  const struct iwl_cfg_trans_params *cfg_trans)
 {
 	struct iwl_trans *trans;
-	int txcmd_size, txcmd_align;
 #ifdef CONFIG_LOCKDEP
 	static struct lock_class_key __key;
 #endif
@@ -31,10 +30,40 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
 		return NULL;
 
 	trans->trans_cfg = cfg_trans;
-	if (!cfg_trans->gen2) {
+
+#ifdef CONFIG_LOCKDEP
+	lockdep_init_map(&trans->sync_cmd_lockdep_map, "sync_cmd_lockdep_map",
+			 &__key, 0);
+#endif
+
+	trans->dev = dev;
+	trans->ops = ops;
+	trans->num_rx_queues = 1;
+
+	WARN_ON(!ops->wait_txq_empty && !ops->wait_tx_queues_empty);
+
+	if (trans->trans_cfg->use_tfh) {
+		trans->txqs.tfd.addr_size = 64;
+		trans->txqs.tfd.max_tbs = IWL_TFH_NUM_TBS;
+		trans->txqs.tfd.size = sizeof(struct iwl_tfh_tfd);
+	} else {
+		trans->txqs.tfd.addr_size = 36;
+		trans->txqs.tfd.max_tbs = IWL_NUM_OF_TBS;
+		trans->txqs.tfd.size = sizeof(struct iwl_tfd);
+	}
+	trans->max_skb_frags = IWL_TRANS_MAX_FRAGS(trans);
+
+	return trans;
+}
+
+int iwl_trans_init(struct iwl_trans *trans)
+{
+	int txcmd_size, txcmd_align;
+
+	if (!trans->trans_cfg->gen2) {
 		txcmd_size = sizeof(struct iwl_tx_cmd);
 		txcmd_align = sizeof(void *);
-	} else if (cfg_trans->device_family < IWL_DEVICE_FAMILY_AX210) {
+	} else if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210) {
 		txcmd_size = sizeof(struct iwl_tx_cmd_gen2);
 		txcmd_align = 64;
 	} else {
@@ -46,17 +75,8 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
 	txcmd_size += 36; /* biggest possible 802.11 header */
 
 	/* Ensure device TX cmd cannot reach/cross a page boundary in gen2 */
-	if (WARN_ON(cfg_trans->gen2 && txcmd_size >= txcmd_align))
-		return ERR_PTR(-EINVAL);
-
-#ifdef CONFIG_LOCKDEP
-	lockdep_init_map(&trans->sync_cmd_lockdep_map, "sync_cmd_lockdep_map",
-			 &__key, 0);
-#endif
-
-	trans->dev = dev;
-	trans->ops = ops;
-	trans->num_rx_queues = 1;
+	if (WARN_ON(trans->trans_cfg->gen2 && txcmd_size >= txcmd_align))
+		return -EINVAL;
 
 	if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
 		trans->txqs.bc_tbl_size = sizeof(struct iwl_gen3_bc_tbl);
@@ -68,23 +88,16 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
 	 * allocate here.
 	 */
 	if (trans->trans_cfg->gen2) {
-		trans->txqs.bc_pool = dmam_pool_create("iwlwifi:bc", dev,
+		trans->txqs.bc_pool = dmam_pool_create("iwlwifi:bc", trans->dev,
 						       trans->txqs.bc_tbl_size,
 						       256, 0);
 		if (!trans->txqs.bc_pool)
-			return NULL;
+			return -ENOMEM;
 	}
 
-	if (trans->trans_cfg->use_tfh) {
-		trans->txqs.tfd.addr_size = 64;
-		trans->txqs.tfd.max_tbs = IWL_TFH_NUM_TBS;
-		trans->txqs.tfd.size = sizeof(struct iwl_tfh_tfd);
-	} else {
-		trans->txqs.tfd.addr_size = 36;
-		trans->txqs.tfd.max_tbs = IWL_NUM_OF_TBS;
-		trans->txqs.tfd.size = sizeof(struct iwl_tfd);
-	}
-	trans->max_skb_frags = IWL_TRANS_MAX_FRAGS(trans);
+	/* Some things must not change even if the config does */
+	WARN_ON(trans->txqs.tfd.addr_size !=
+		(trans->trans_cfg->use_tfh ? 64 : 36));
 
 	snprintf(trans->dev_cmd_pool_name, sizeof(trans->dev_cmd_pool_name),
 		 "iwl_cmd_pool:%s", dev_name(trans->dev));
@@ -93,35 +106,35 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
 				  txcmd_size, txcmd_align,
 				  SLAB_HWCACHE_ALIGN, NULL);
 	if (!trans->dev_cmd_pool)
-		return NULL;
-
-	WARN_ON(!ops->wait_txq_empty && !ops->wait_tx_queues_empty);
+		return -ENOMEM;
 
 	trans->txqs.tso_hdr_page = alloc_percpu(struct iwl_tso_hdr_page);
 	if (!trans->txqs.tso_hdr_page) {
 		kmem_cache_destroy(trans->dev_cmd_pool);
-		return NULL;
+		return -ENOMEM;
 	}
 
 	/* Initialize the wait queue for commands */
 	init_waitqueue_head(&trans->wait_command_queue);
 
-	return trans;
+	return 0;
 }
 
 void iwl_trans_free(struct iwl_trans *trans)
 {
 	int i;
 
-	for_each_possible_cpu(i) {
-		struct iwl_tso_hdr_page *p =
-			per_cpu_ptr(trans->txqs.tso_hdr_page, i);
+	if (trans->txqs.tso_hdr_page) {
+		for_each_possible_cpu(i) {
+			struct iwl_tso_hdr_page *p =
+				per_cpu_ptr(trans->txqs.tso_hdr_page, i);
 
-		if (p->page)
-			__free_page(p->page);
-	}
+			if (p && p->page)
+				__free_page(p->page);
+		}
 
-	free_percpu(trans->txqs.tso_hdr_page);
+		free_percpu(trans->txqs.tso_hdr_page);
+	}
 
 	kmem_cache_destroy(trans->dev_cmd_pool);
 }
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
index 6abb7385dae1..bf569f856ad8 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
@@ -1439,6 +1439,7 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
 			  struct device *dev,
 			  const struct iwl_trans_ops *ops,
 			  const struct iwl_cfg_trans_params *cfg_trans);
+int iwl_trans_init(struct iwl_trans *trans);
 void iwl_trans_free(struct iwl_trans *trans);
 
 /*****************************************************
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index a1aa2ac19256..327eeb18b079 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -1269,6 +1269,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		trans_pcie->num_rx_bufs = RX_QUEUE_SIZE;
 	}
 
+	ret = iwl_trans_init(iwl_trans);
+	if (ret)
+		goto out_free_trans;
+
 	pci_set_drvdata(pdev, iwl_trans);
 	iwl_trans->drv = iwl_drv_start(iwl_trans);
 
-- 
2.31.0


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

* [PATCH 5/8] iwlwifi: fw: print out trigger delay when collecting data
  2021-04-11 10:25 [PATCH 0/8] iwlwifi: updates intended for v5.13 2021-04-11-2 Luca Coelho
                   ` (3 preceding siblings ...)
  2021-04-11 10:25 ` [PATCH 4/8] iwlwifi: trans/pcie: defer transport initialisation Luca Coelho
@ 2021-04-11 10:25 ` Luca Coelho
  2021-04-11 10:25 ` [PATCH 6/8] iwlwifi: pcie: Change ma product string name Luca Coelho
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Luca Coelho @ 2021-04-11 10:25 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

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

It can be confusing to see "Collecting data: ..." followed by
that not actually happening immediately so print out the delay
in that message.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index 504729663c35..cc4e18ca9566 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -2559,7 +2559,9 @@ int iwl_fw_dbg_ini_collect(struct iwl_fw_runtime *fwrt,
 
 	fwrt->dump.wks[idx].dump_data = *dump_data;
 
-	IWL_WARN(fwrt, "WRT: Collecting data: ini trigger %d fired.\n", tp_id);
+	IWL_WARN(fwrt,
+		 "WRT: Collecting data: ini trigger %d fired (delay=%dms).\n",
+		 tp_id, (u32)(delay / USEC_PER_MSEC));
 
 	schedule_delayed_work(&fwrt->dump.wks[idx].wk, usecs_to_jiffies(delay));
 
-- 
2.31.0


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

* [PATCH 6/8] iwlwifi: pcie: Change ma product string name
  2021-04-11 10:25 [PATCH 0/8] iwlwifi: updates intended for v5.13 2021-04-11-2 Luca Coelho
                   ` (4 preceding siblings ...)
  2021-04-11 10:25 ` [PATCH 5/8] iwlwifi: fw: print out trigger delay when collecting data Luca Coelho
@ 2021-04-11 10:25 ` Luca Coelho
  2021-04-11 10:25 ` [PATCH 7/8] iwlwifi: dbg: disable ini debug in 9000 family and below Luca Coelho
  2021-04-11 10:25 ` [PATCH 8/8] iwlwifi: mvm: add support for timing measurement Luca Coelho
  7 siblings, 0 replies; 11+ messages in thread
From: Luca Coelho @ 2021-04-11 10:25 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

From: Matti Gottlieb <matti.gottlieb@intel.com>

Change ma product string name to the correct name,
and to reflect the CRF and not the CNV.

Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/cfg/22000.c  | 2 +-
 drivers/net/wireless/intel/iwlwifi/iwl-config.h | 2 +-
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c   | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
index 44735a6d1d39..c2315dea9a23 100644
--- a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
+++ b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c
@@ -388,8 +388,8 @@ const char iwl_ax200_name[] = "Intel(R) Wi-Fi 6 AX200 160MHz";
 const char iwl_ax201_name[] = "Intel(R) Wi-Fi 6 AX201 160MHz";
 const char iwl_ax203_name[] = "Intel(R) Wi-Fi 6 AX203";
 const char iwl_ax211_name[] = "Intel(R) Wi-Fi 6E AX211 160MHz";
+const char iwl_ax221_name[] = "Intel(R) Wi-Fi 6E AX221 160MHz";
 const char iwl_ax411_name[] = "Intel(R) Wi-Fi 6E AX411 160MHz";
-const char iwl_ma_name[] = "Intel(R) Wi-Fi 6";
 
 const char iwl_ax200_killer_1650w_name[] =
 	"Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)";
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
index 01a4cdf45d0d..e5ddb43358e5 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
@@ -504,8 +504,8 @@ extern const char iwl_ax201_killer_1650s_name[];
 extern const char iwl_ax201_killer_1650i_name[];
 extern const char iwl_ax210_killer_1675w_name[];
 extern const char iwl_ax210_killer_1675x_name[];
-extern const char iwl_ma_name[];
 extern const char iwl_ax211_name[];
+extern const char iwl_ax221_name[];
 extern const char iwl_ax411_name[];
 #if IS_ENABLED(CONFIG_IWLDVM)
 extern const struct iwl_cfg iwl5300_agn_cfg;
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 327eeb18b079..108ee3a4b314 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -1027,12 +1027,12 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {
 		      IWL_CFG_MAC_TYPE_MA, IWL_CFG_ANY,
 		      IWL_CFG_RF_TYPE_MR, IWL_CFG_ANY,
 		      IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
-		      iwl_cfg_ma_a0_mr_a0, iwl_ma_name),
+		      iwl_cfg_ma_a0_mr_a0, iwl_ax221_name),
 	_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
 		      IWL_CFG_MAC_TYPE_SNJ, IWL_CFG_ANY,
 		      IWL_CFG_RF_TYPE_MR, IWL_CFG_ANY,
 		      IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
-		      iwl_cfg_snj_a0_mr_a0, iwl_ma_name),
+		      iwl_cfg_snj_a0_mr_a0, iwl_ax221_name),
 
 /* So with Hr */
 	_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
@@ -1076,7 +1076,7 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {
 		      IWL_CFG_MAC_TYPE_BZ, IWL_CFG_ANY,
 		      IWL_CFG_RF_TYPE_MR, IWL_CFG_ANY,
 		      IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
-		      iwl_cfg_bz_a0_mr_a0, iwl_ma_name),
+		      iwl_cfg_bz_a0_mr_a0, iwl_ax211_name),
 
 /* So with GF */
 	_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
-- 
2.31.0


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

* [PATCH 7/8] iwlwifi: dbg:  disable ini debug in 9000 family and below
  2021-04-11 10:25 [PATCH 0/8] iwlwifi: updates intended for v5.13 2021-04-11-2 Luca Coelho
                   ` (5 preceding siblings ...)
  2021-04-11 10:25 ` [PATCH 6/8] iwlwifi: pcie: Change ma product string name Luca Coelho
@ 2021-04-11 10:25 ` Luca Coelho
  2021-04-11 10:25 ` [PATCH 8/8] iwlwifi: mvm: add support for timing measurement Luca Coelho
  7 siblings, 0 replies; 11+ messages in thread
From: Luca Coelho @ 2021-04-11 10:25 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

From: Mukesh Sisodiya <mukesh.sisodiya@intel.com>

Yoyo based debug is not applicable to old devices.  As init debug is
enabled by default in the driver, it needs to be disabled to work the
old debug mechanism in old devices.

Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Fixes: b0d8d2c27007 ("iwlwifi: yoyo: enable yoyo by default")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
index 579bc81cc0ae..4cd8c39cc3e9 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2018-2020 Intel Corporation
+ * Copyright (C) 2018-2021 Intel Corporation
  */
 #include <linux/firmware.h>
 #include "iwl-drv.h"
@@ -426,7 +426,8 @@ void iwl_dbg_tlv_load_bin(struct device *dev, struct iwl_trans *trans)
 	const struct firmware *fw;
 	int res;
 
-	if (!iwlwifi_mod_params.enable_ini)
+	if (!iwlwifi_mod_params.enable_ini ||
+	    trans->trans_cfg->device_family <= IWL_DEVICE_FAMILY_9000)
 		return;
 
 	res = firmware_request_nowarn(&fw, "iwl-debug-yoyo.bin", dev);
-- 
2.31.0


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

* [PATCH 8/8] iwlwifi: mvm: add support for timing measurement
  2021-04-11 10:25 [PATCH 0/8] iwlwifi: updates intended for v5.13 2021-04-11-2 Luca Coelho
                   ` (6 preceding siblings ...)
  2021-04-11 10:25 ` [PATCH 7/8] iwlwifi: dbg: disable ini debug in 9000 family and below Luca Coelho
@ 2021-04-11 10:25 ` Luca Coelho
  2021-04-11 10:30   ` Luca Coelho
  7 siblings, 1 reply; 11+ messages in thread
From: Luca Coelho @ 2021-04-11 10:25 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless

From: Krishnanand Prabhu <krishnanand.prabhu@intel.com>

Add support for timing measurement in extended capabilities, used for
time synchronization.

Signed-off-by: Krishnanand Prabhu <krishnanand.prabhu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 39 +++++++++++++++++--
 1 file changed, 35 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 607d5d564928..4e00f8d20788 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -297,13 +297,31 @@ static const u8 he_if_types_ext_capa_sta[] = {
 	 [9] = WLAN_EXT_CAPA10_TWT_REQUESTER_SUPPORT,
 };
 
-static const struct wiphy_iftype_ext_capab he_iftypes_ext_capa[] = {
+static const u8 tm_if_types_ext_capa_sta[] = {
+	 [0] = WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING,
+	 [2] = WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT |
+	       WLAN_EXT_CAPA3_TIMING_MEASUREMENT_SUPPORT,
+	 [7] = WLAN_EXT_CAPA8_OPMODE_NOTIF,
+	 [9] = WLAN_EXT_CAPA10_TWT_REQUESTER_SUPPORT,
+};
+
+/*
+ * Additional interface types for which extended capabilities are
+ * specified separately
+ */
+static const struct wiphy_iftype_ext_capab add_iftypes_ext_capa[] = {
 	{
 		.iftype = NL80211_IFTYPE_STATION,
 		.extended_capabilities = he_if_types_ext_capa_sta,
 		.extended_capabilities_mask = he_if_types_ext_capa_sta,
 		.extended_capabilities_len = sizeof(he_if_types_ext_capa_sta),
 	},
+	{
+		.iftype = NL80211_IFTYPE_STATION,
+		.extended_capabilities = tm_if_types_ext_capa_sta,
+		.extended_capabilities_mask = tm_if_types_ext_capa_sta,
+		.extended_capabilities_len = sizeof(tm_if_types_ext_capa_sta),
+	},
 };
 
 static int
@@ -646,16 +664,29 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
 			NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE);
 	}
 
+	hw->wiphy->iftype_ext_capab = NULL;
+	hw->wiphy->num_iftype_ext_capab = 0;
+
 	if (mvm->nvm_data->sku_cap_11ax_enable &&
 	    !iwlwifi_mod_params.disable_11ax) {
-		hw->wiphy->iftype_ext_capab = he_iftypes_ext_capa;
-		hw->wiphy->num_iftype_ext_capab =
-			ARRAY_SIZE(he_iftypes_ext_capa);
+		hw->wiphy->iftype_ext_capab = add_iftypes_ext_capa;
+		hw->wiphy->num_iftype_ext_capab = ARRAY_SIZE(add_iftypes_ext_capa) - 1;
 
 		ieee80211_hw_set(hw, SUPPORTS_MULTI_BSSID);
 		ieee80211_hw_set(hw, SUPPORTS_ONLY_HE_MULTI_BSSID);
 	}
 
+	if (iwl_fw_lookup_cmd_ver(mvm->fw, DATA_PATH_GROUP,
+				  WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD,
+				  IWL_FW_CMD_VER_UNKNOWN) == 1) {
+		IWL_DEBUG_INFO(mvm->trans, "Timing measurement supported\n");
+
+		hw->wiphy->iftype_ext_capab = add_iftypes_ext_capa + 1;
+		if (!hw->wiphy->iftype_ext_capab)
+			hw->wiphy->num_iftype_ext_capab =
+				hw->wiphy->num_iftype_ext_capab + 1;
+	}
+
 	mvm->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD;
 
 #ifdef CONFIG_PM_SLEEP
-- 
2.31.0


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

* Re: [PATCH 8/8] iwlwifi: mvm: add support for timing measurement
  2021-04-11 10:25 ` [PATCH 8/8] iwlwifi: mvm: add support for timing measurement Luca Coelho
@ 2021-04-11 10:30   ` Luca Coelho
  0 siblings, 0 replies; 11+ messages in thread
From: Luca Coelho @ 2021-04-11 10:30 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

On Sun, 2021-04-11 at 13:25 +0300, Luca Coelho wrote:
> From: Krishnanand Prabhu <krishnanand.prabhu@intel.com>
> 
> Add support for timing measurement in extended capabilities, used for
> time synchronization.
> 
> Signed-off-by: Krishnanand Prabhu <krishnanand.prabhu@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---

I'm going to drop this one for now, because there is a dependency on a
change in ieee80211.h that is not in yet.

--
Luca.


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

* Re: [PATCH 1/8] iwlwifi: mvm: don't disconnect immediately if we don't hear beacons after CSA
  2021-04-11 10:25 ` [PATCH 1/8] iwlwifi: mvm: don't disconnect immediately if we don't hear beacons after CSA Luca Coelho
@ 2021-04-12 10:27   ` Luca Coelho
  0 siblings, 0 replies; 11+ messages in thread
From: Luca Coelho @ 2021-04-12 10:27 UTC (permalink / raw)
  To: Luca Coelho; +Cc: kvalo, linux-wireless

Luca Coelho <luca@coelho.fi> wrote:

> From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> 
> When we switch channel, we may miss a few beacons on the
> new channel. Don't disconnect if the time event for the
> switch ends before we hear the beacons.
> 
> Note that this is relevant only for old devices that still
> use the TIME_EVENT firmware API for channel switch.
> 
> The check that we hear a beacon before the time event
> ends was meant to be used for the association time event
> and not for the channel switch time event.
> 
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

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

55479e240a84 iwlwifi: mvm: don't disconnect immediately if we don't hear beacons after CSA
668b20543dba iwlwifi: mvm: don't WARN if we can't remove a time event
5bae940ed691 iwlwifi: bump FW API to 63 for AX devices
0e6f59832e4a iwlwifi: trans/pcie: defer transport initialisation
e7a33279d670 iwlwifi: fw: print out trigger delay when collecting data
3ba2a6e76c03 iwlwifi: pcie: Change ma product string name
1a9674efd536 iwlwifi: dbg: disable ini debug in 9000 family and below


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

end of thread, other threads:[~2021-04-12 10:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-11 10:25 [PATCH 0/8] iwlwifi: updates intended for v5.13 2021-04-11-2 Luca Coelho
2021-04-11 10:25 ` [PATCH 1/8] iwlwifi: mvm: don't disconnect immediately if we don't hear beacons after CSA Luca Coelho
2021-04-12 10:27   ` Luca Coelho
2021-04-11 10:25 ` [PATCH 2/8] iwlwifi: mvm: don't WARN if we can't remove a time event Luca Coelho
2021-04-11 10:25 ` [PATCH 3/8] iwlwifi: bump FW API to 63 for AX devices Luca Coelho
2021-04-11 10:25 ` [PATCH 4/8] iwlwifi: trans/pcie: defer transport initialisation Luca Coelho
2021-04-11 10:25 ` [PATCH 5/8] iwlwifi: fw: print out trigger delay when collecting data Luca Coelho
2021-04-11 10:25 ` [PATCH 6/8] iwlwifi: pcie: Change ma product string name Luca Coelho
2021-04-11 10:25 ` [PATCH 7/8] iwlwifi: dbg: disable ini debug in 9000 family and below Luca Coelho
2021-04-11 10:25 ` [PATCH 8/8] iwlwifi: mvm: add support for timing measurement Luca Coelho
2021-04-11 10:30   ` 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.