wifi: mt76: mt7915: disable the second PCIe link for MT7915

The second PCIe link is only used to improve performance on older generation
PCIe devices (e.g. MT7621) where the bus speed of one link is not enough to
saturate both wifi bands under really good conditions.
Unfortunately it seems that resetting the hardware after a firmware error
causes the second band to stop working if the second link is in use.
Disable the link until the issue is properly fixed.

For testing, the link can still be enabled via module parameter.

Fixes: 9093cfff72e3 ("mt76: mt7915: add support for using a secondary PCIe link for gen1")
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2024-10-08 21:15:32 +02:00
parent 02c07fe539
commit a902bfa6db
+11
View File
@@ -16,6 +16,10 @@ static LIST_HEAD(hif_list);
static DEFINE_SPINLOCK(hif_lock);
static u32 hif_idx;
static int hif2_enable = -1;
module_param(hif2_enable, int, 0644);
MODULE_PARM_DESC(hif2_enable, "Enable second PCIe link support");
static const struct pci_device_id mt7915_pci_device_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_MEDIATEK, 0x7915) },
{ PCI_DEVICE(PCI_VENDOR_ID_MEDIATEK, 0x7906) },
@@ -84,6 +88,13 @@ static int mt7915_pci_hif2_probe(struct pci_dev *pdev)
{
struct mt7915_hif *hif;
if (!hif2_enable)
return -ENODEV;
/* Skip the second PCIe link on MT7915 due to SER failure */
if (hif2_enable < 0 && pdev->device == 0x7916)
return -ENODEV;
hif = devm_kzalloc(&pdev->dev, sizeof(*hif), GFP_KERNEL);
if (!hif)
return -ENOMEM;