diff mbox series

[01/13] iwlwifi: pcie: fix xtal latency for 9560 devices

Message ID iwlwifi.20201008181047.34392f98fdb1.I3d3db14f6d1a8ecc547ca6afce8488816bd26081@changeid
State New
Headers show
Series [01/13] iwlwifi: pcie: fix xtal latency for 9560 devices | expand

Commit Message

Luca Coelho Oct. 8, 2020, 3:12 p.m. UTC
From: Luca Coelho <luciano.coelho@intel.com>

We were using a very high latency for all 9560 devices so they all
would have time to stabilize.  But this causes the system to be
slighly slower, so we can use the best values for each device.

This requires a new trans cfg struct for devices with longer latency
and some adjustments to the other structs.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/cfg/9000.c   | 17 +++++++++++++----
 drivers/net/wireless/intel/iwlwifi/iwl-config.h |  1 +
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c   |  2 +-
 3 files changed, 15 insertions(+), 5 deletions(-)

Comments

Kalle Valo Oct. 8, 2020, 5:15 p.m. UTC | #1
Luca Coelho <luca@coelho.fi> wrote:

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

> 

> We were using a very high latency for all 9560 devices so they all

> would have time to stabilize.  But this causes the system to be

> slighly slower, so we can use the best values for each device.

> 

> This requires a new trans cfg struct for devices with longer latency

> and some adjustments to the other structs.

> 

> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


13 patches applied to wireless-drivers-next.git, thanks.

24436191a3b4 iwlwifi: pcie: fix xtal latency for 9560 devices
8fac81b50059 iwlwifi: pcie: fix the xtal latency value for a few qu devices
58ddd9b6d194 iwlwifi: mvm: don't send a CSA command the firmware doesn't know
60cbad2b867f iwlwifi: mvm: remove memset of kek_kck command
efa40c7ef689 iwlwifi: mvm: fix suspicious rcu usage warnings
853f4954baf4 iwlwifi: stats: add new api fields for statistics cmd/ntfy
45acebf8d6a6 iwlwifi: fix sar geo table initialization
0fafaa97ef35 iwlwifi: rs: align to new TLC config command API
b3e4c0f34c17 iwlwifi: move PNVM implementation to common code
a182dfab2842 iwlwifi: add trans op to set PNVM
6654cd4eb90f iwlwifi: pcie: implement set_pnvm op
6972592850c0 iwlwifi: read and parse PNVM file
09b3ab8782e7 iwlwifi: bump FW API to 59 for AX devices

-- 
https://patchwork.kernel.org/patch/11823191/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c
index f84b8e5d3f0b..be4acf4a0e32 100644
--- a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c
+++ b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c
@@ -6,7 +6,7 @@ 
  * GPL LICENSE SUMMARY
  *
  * Copyright(c) 2015-2017 Intel Deutschland GmbH
- * Copyright (C) 2018 - 2019 Intel Corporation
+ * Copyright(c) 2018 - 2020 Intel Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -20,7 +20,7 @@ 
  * BSD LICENSE
  *
  * Copyright(c) 2015-2017 Intel Deutschland GmbH
- * Copyright (C) 2018 - 2019 Intel Corporation
+ * Copyright(c) 2018 - 2020 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -180,7 +180,16 @@  const struct iwl_cfg_trans_params iwl9560_trans_cfg = {
 	.mq_rx_supported = true,
 	.rf_id = true,
 	.integrated = true,
-	.xtal_latency = 5000,
+	.xtal_latency = 650,
+};
+
+const struct iwl_cfg_trans_params iwl9560_long_latency_trans_cfg = {
+	.device_family = IWL_DEVICE_FAMILY_9000,
+	.base_params = &iwl9000_base_params,
+	.mq_rx_supported = true,
+	.rf_id = true,
+	.integrated = true,
+	.xtal_latency = 2820,
 };
 
 const struct iwl_cfg_trans_params iwl9560_shared_clk_trans_cfg = {
@@ -189,7 +198,7 @@  const struct iwl_cfg_trans_params iwl9560_shared_clk_trans_cfg = {
 	.mq_rx_supported = true,
 	.rf_id = true,
 	.integrated = true,
-	.xtal_latency = 5000,
+	.xtal_latency = 670,
 	.extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK
 };
 
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
index d03f51bf7dfd..ca4967b81d01 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
@@ -519,6 +519,7 @@  struct iwl_dev_info {
  */
 extern const struct iwl_cfg_trans_params iwl9000_trans_cfg;
 extern const struct iwl_cfg_trans_params iwl9560_trans_cfg;
+extern const struct iwl_cfg_trans_params iwl9560_long_latency_trans_cfg;
 extern const struct iwl_cfg_trans_params iwl9560_shared_clk_trans_cfg;
 extern const struct iwl_cfg_trans_params iwl_qnj_trans_cfg;
 extern const struct iwl_cfg_trans_params iwl_qu_trans_cfg;
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 83811fad8431..129021f26791 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -514,7 +514,7 @@  static const struct pci_device_id iwl_hw_card_ids[] = {
 	{IWL_PCI_DEVICE(0x2526, PCI_ANY_ID, iwl9000_trans_cfg)},
 	{IWL_PCI_DEVICE(0x271B, PCI_ANY_ID, iwl9000_trans_cfg)},
 	{IWL_PCI_DEVICE(0x271C, PCI_ANY_ID, iwl9000_trans_cfg)},
-	{IWL_PCI_DEVICE(0x30DC, PCI_ANY_ID, iwl9560_trans_cfg)},
+	{IWL_PCI_DEVICE(0x30DC, PCI_ANY_ID, iwl9560_long_latency_trans_cfg)},
 	{IWL_PCI_DEVICE(0x31DC, PCI_ANY_ID, iwl9560_shared_clk_trans_cfg)},
 	{IWL_PCI_DEVICE(0x9DF0, PCI_ANY_ID, iwl9560_trans_cfg)},
 	{IWL_PCI_DEVICE(0xA370, PCI_ANY_ID, iwl9560_trans_cfg)},