Merge tag 'pci-v6.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
[platform/kernel/linux-starfive.git] / drivers / net / wireless / ath / ath10k / pci.c
index 7535524..23f3662 100644 (file)
@@ -1963,8 +1963,9 @@ static int ath10k_pci_hif_start(struct ath10k *ar)
        ath10k_pci_irq_enable(ar);
        ath10k_pci_rx_post(ar);
 
-       pcie_capability_write_word(ar_pci->pdev, PCI_EXP_LNKCTL,
-                                  ar_pci->link_ctl);
+       pcie_capability_clear_and_set_word(ar_pci->pdev, PCI_EXP_LNKCTL,
+                                          PCI_EXP_LNKCTL_ASPMC,
+                                          ar_pci->link_ctl & PCI_EXP_LNKCTL_ASPMC);
 
        return 0;
 }
@@ -2821,8 +2822,8 @@ static int ath10k_pci_hif_power_up(struct ath10k *ar,
 
        pcie_capability_read_word(ar_pci->pdev, PCI_EXP_LNKCTL,
                                  &ar_pci->link_ctl);
-       pcie_capability_write_word(ar_pci->pdev, PCI_EXP_LNKCTL,
-                                  ar_pci->link_ctl & ~PCI_EXP_LNKCTL_ASPMC);
+       pcie_capability_clear_word(ar_pci->pdev, PCI_EXP_LNKCTL,
+                                  PCI_EXP_LNKCTL_ASPMC);
 
        /*
         * Bring the target up cleanly.