mac80211: fix compile error on rt2x00 when buildin for SoC
[openwrt.git] / package / kernel / mac80211 / patches / 618-rt2x00-msi-fix.patch
1 Index: compat-wireless-2013-06-13/drivers/net/wireless/rt2x00/rt2x00pci.c
2 ===================================================================
3 --- compat-wireless-2013-06-13.orig/drivers/net/wireless/rt2x00/rt2x00pci.c     2013-06-20 21:19:16.205070973 +0200
4 +++ compat-wireless-2013-06-13/drivers/net/wireless/rt2x00/rt2x00pci.c  2013-06-20 21:18:36.705069262 +0200
5 @@ -108,7 +108,9 @@
6                 goto exit_release_regions;
7         }
8  
9 +#ifdef CONFIG_PCI_MSI
10         pci_enable_msi(pci_dev);
11 +#endif
12  
13         hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);
14         if (!hw) {
15 @@ -162,7 +164,9 @@
16         ieee80211_free_hw(hw);
17  
18  exit_disable_msi:
19 +#ifdef CONFIG_PCI_SET_MWI
20         pci_disable_msi(pci_dev);
21 +#endif
22  
23  exit_release_regions:
24         pci_release_regions(pci_dev);
25 @@ -188,7 +192,9 @@
26         rt2x00pci_free_reg(rt2x00dev);
27         ieee80211_free_hw(hw);
28  
29 +#ifdef CONFIG_PCI_MSI
30         pci_disable_msi(pci_dev);
31 +#endif
32  
33         /*
34          * Free the PCI device data.