diff options
author | 2023-06-20 13:03:56 +0300 | |
---|---|---|
committer | 2023-06-21 14:02:15 +0200 | |
commit | 3a9690d030d8572736e07b912deea5547dd94db3 (patch) | |
tree | 835f5649437e4cd7889f1e65a5cd74da96a4acdd /drivers/net/wireless/intel/iwlwifi/pcie | |
parent | wifi: iwlwifi: mvm: add EHT A-MPDU size exponent support (diff) | |
download | linux-3a9690d030d8572736e07b912deea5547dd94db3.tar.gz linux-3a9690d030d8572736e07b912deea5547dd94db3.tar.bz2 linux-3a9690d030d8572736e07b912deea5547dd94db3.zip |
wifi: iwlwifi: limit EHT capabilities based on PCIe link speed
If a discrete NIC is connected to a PCIe link hat isn't at least
Gen3 (8.0 GT/s), then we cannot sustain 320 MHz traffic, so remove
that from EHT capabilities in that case.
While at it, also move setting 320 MHz beamformee to the right
place in the code so it's not set while not supporting 320 MHz.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230620125813.b77a1574a0a7.Id4120c161fb7df6dedc70d5f3e3829e9117b8cb1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/pcie')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index fcc0f3319bcd..18550c03f870 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -1760,6 +1760,15 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) trans_pcie->num_rx_bufs = RX_QUEUE_SIZE; } + if (!iwl_trans->trans_cfg->integrated) { + u16 link_status; + + pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &link_status); + + iwl_trans->pcie_link_speed = + u16_get_bits(link_status, PCI_EXP_LNKSTA_CLS); + } + ret = iwl_trans_init(iwl_trans); if (ret) goto out_free_trans; |