Skip to content

Commit

Permalink
iwlwifi: pcie: fix xtal latency for 9560 devices
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20201008181047.34392f98fdb1.I3d3db14f6d1a8ecc547ca6afce8488816bd26081@changeid
  • Loading branch information
Luca Coelho authored and Kalle Valo committed Oct 8, 2020
1 parent a48d400 commit 2443619
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
17 changes: 13 additions & 4 deletions drivers/net/wireless/intel/iwlwifi/cfg/9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 = {
Expand All @@ -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
};

Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/intel/iwlwifi/iwl-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlwifi/pcie/drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)},
Expand Down

0 comments on commit 2443619

Please sign in to comment.