diff options
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 4cfd8f77fa71..88dd242ac1e3 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -61,6 +61,7 @@ static bool rt2800pci_hwcrypt_disabled(struct rt2x00_dev *rt2x00dev) | |||
61 | return modparam_nohwcrypt; | 61 | return modparam_nohwcrypt; |
62 | } | 62 | } |
63 | 63 | ||
64 | #ifdef CONFIG_PCI | ||
64 | static void rt2800pci_mcu_status(struct rt2x00_dev *rt2x00dev, const u8 token) | 65 | static void rt2800pci_mcu_status(struct rt2x00_dev *rt2x00dev, const u8 token) |
65 | { | 66 | { |
66 | unsigned int i; | 67 | unsigned int i; |
@@ -91,7 +92,6 @@ static void rt2800pci_mcu_status(struct rt2x00_dev *rt2x00dev, const u8 token) | |||
91 | rt2x00mmio_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0); | 92 | rt2x00mmio_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0); |
92 | } | 93 | } |
93 | 94 | ||
94 | #ifdef CONFIG_PCI | ||
95 | static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom) | 95 | static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom) |
96 | { | 96 | { |
97 | struct rt2x00_dev *rt2x00dev = eeprom->data; | 97 | struct rt2x00_dev *rt2x00dev = eeprom->data; |
@@ -210,17 +210,23 @@ static int rt2800pci_write_firmware(struct rt2x00_dev *rt2x00dev, | |||
210 | /* | 210 | /* |
211 | * Device state switch handlers. | 211 | * Device state switch handlers. |
212 | */ | 212 | */ |
213 | static int rt2800pci_enable_radio(struct rt2x00_dev *rt2x00dev) | 213 | static int rt2800mmio_enable_radio(struct rt2x00_dev *rt2x00dev) |
214 | { | 214 | { |
215 | int retval; | ||
216 | |||
217 | /* Wait for DMA, ignore error until we initialize queues. */ | 215 | /* Wait for DMA, ignore error until we initialize queues. */ |
218 | rt2800_wait_wpdma_ready(rt2x00dev); | 216 | rt2800_wait_wpdma_ready(rt2x00dev); |
219 | 217 | ||
220 | if (unlikely(rt2800mmio_init_queues(rt2x00dev))) | 218 | if (unlikely(rt2800mmio_init_queues(rt2x00dev))) |
221 | return -EIO; | 219 | return -EIO; |
222 | 220 | ||
223 | retval = rt2800_enable_radio(rt2x00dev); | 221 | return rt2800_enable_radio(rt2x00dev); |
222 | } | ||
223 | |||
224 | #ifdef CONFIG_PCI | ||
225 | static int rt2800pci_enable_radio(struct rt2x00_dev *rt2x00dev) | ||
226 | { | ||
227 | int retval; | ||
228 | |||
229 | retval = rt2800mmio_enable_radio(rt2x00dev); | ||
224 | if (retval) | 230 | if (retval) |
225 | return retval; | 231 | return retval; |
226 | 232 | ||
@@ -237,7 +243,6 @@ static int rt2800pci_enable_radio(struct rt2x00_dev *rt2x00dev) | |||
237 | return retval; | 243 | return retval; |
238 | } | 244 | } |
239 | 245 | ||
240 | #ifdef CONFIG_PCI | ||
241 | static int rt2800pci_set_state(struct rt2x00_dev *rt2x00dev, | 246 | static int rt2800pci_set_state(struct rt2x00_dev *rt2x00dev, |
242 | enum dev_state state) | 247 | enum dev_state state) |
243 | { | 248 | { |
@@ -484,7 +489,7 @@ static int rt2800soc_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
484 | 489 | ||
485 | switch (state) { | 490 | switch (state) { |
486 | case STATE_RADIO_ON: | 491 | case STATE_RADIO_ON: |
487 | retval = rt2800pci_enable_radio(rt2x00dev); | 492 | retval = rt2800mmio_enable_radio(rt2x00dev); |
488 | break; | 493 | break; |
489 | 494 | ||
490 | case STATE_RADIO_OFF: | 495 | case STATE_RADIO_OFF: |