mac80211: fix a crash on accessing stale skb->dev references
[oweals/openwrt.git] / package / mac80211 / patches / 574-ath9k_fix_aspm_resume.patch
1 --- a/drivers/net/wireless/ath/ath9k/pci.c
2 +++ b/drivers/net/wireless/ath/ath9k/pci.c
3 @@ -331,6 +331,9 @@ static int ath_pci_suspend(struct device
4  static int ath_pci_resume(struct device *device)
5  {
6         struct pci_dev *pdev = to_pci_dev(device);
7 +       struct ieee80211_hw *hw = pci_get_drvdata(pdev);
8 +       struct ath_softc *sc = hw->priv;
9 +       struct ath_common *common = ath9k_hw_common(sc->sc_ah);
10         u32 val;
11  
12         /*
13 @@ -342,6 +345,8 @@ static int ath_pci_resume(struct device 
14         if ((val & 0x0000ff00) != 0)
15                 pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
16  
17 +       ath_pci_aspm_init(common);
18 +
19         return 0;
20  }
21