diff options
author | Jakub Kicinski <kubakici@wp.pl> | 2013-05-06 18:28:50 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-05-22 15:05:32 -0400 |
commit | 9483f40d8d01918b399b4e24d0c1111db0afffeb (patch) | |
tree | 091a89798591e6989d3f8419e78683156e4a62ee | |
parent | e9e433032c83b28b3c41470bf91ecf597a78a3fc (diff) |
rt2x00pci: Use PCI MSIs whenever possible
All PCIe devices must support MSIs, make use of them.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index dc49e525ae5e..76d95deb274b 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -105,11 +105,13 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops) | |||
105 | goto exit_release_regions; | 105 | goto exit_release_regions; |
106 | } | 106 | } |
107 | 107 | ||
108 | pci_enable_msi(pci_dev); | ||
109 | |||
108 | hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw); | 110 | hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw); |
109 | if (!hw) { | 111 | if (!hw) { |
110 | rt2x00_probe_err("Failed to allocate hardware\n"); | 112 | rt2x00_probe_err("Failed to allocate hardware\n"); |
111 | retval = -ENOMEM; | 113 | retval = -ENOMEM; |
112 | goto exit_release_regions; | 114 | goto exit_disable_msi; |
113 | } | 115 | } |
114 | 116 | ||
115 | pci_set_drvdata(pci_dev, hw); | 117 | pci_set_drvdata(pci_dev, hw); |
@@ -150,6 +152,9 @@ exit_free_reg: | |||
150 | exit_free_device: | 152 | exit_free_device: |
151 | ieee80211_free_hw(hw); | 153 | ieee80211_free_hw(hw); |
152 | 154 | ||
155 | exit_disable_msi: | ||
156 | pci_disable_msi(pci_dev); | ||
157 | |||
153 | exit_release_regions: | 158 | exit_release_regions: |
154 | pci_release_regions(pci_dev); | 159 | pci_release_regions(pci_dev); |
155 | 160 | ||
@@ -174,6 +179,8 @@ void rt2x00pci_remove(struct pci_dev *pci_dev) | |||
174 | rt2x00pci_free_reg(rt2x00dev); | 179 | rt2x00pci_free_reg(rt2x00dev); |
175 | ieee80211_free_hw(hw); | 180 | ieee80211_free_hw(hw); |
176 | 181 | ||
182 | pci_disable_msi(pci_dev); | ||
183 | |||
177 | /* | 184 | /* |
178 | * Free the PCI device data. | 185 | * Free the PCI device data. |
179 | */ | 186 | */ |