Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290738
b: refs/heads/master
c: e8b461c
h: refs/heads/master
v: v3
  • Loading branch information
Jakub Kicinski authored and John W. Linville committed Feb 27, 2012
1 parent d627640 commit 0cbd441
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 09a3311c1a061bda809ff78c512855f3b71dcd6b
refs/heads/master: e8b461c37717d6b5c071c4924845884a86c20752
25 changes: 17 additions & 8 deletions trunk/drivers/net/wireless/rt2x00/rt2800pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,27 @@ static int rt2800pci_init_registers(struct rt2x00_dev *rt2x00dev)

static int rt2800pci_enable_radio(struct rt2x00_dev *rt2x00dev)
{
int retval;

if (unlikely(rt2800_wait_wpdma_ready(rt2x00dev) ||
rt2800pci_init_queues(rt2x00dev)))
return -EIO;

return rt2800_enable_radio(rt2x00dev);
retval = rt2800_enable_radio(rt2x00dev);
if (retval)
return retval;

/* After resume MCU_BOOT_SIGNAL will trash these. */
rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_STATUS, ~0);
rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);

rt2800_mcu_request(rt2x00dev, MCU_SLEEP, TOKEN_RADIO_OFF, 0xff, 0x02);
rt2800pci_mcu_status(rt2x00dev, TOKEN_RADIO_OFF);

rt2800_mcu_request(rt2x00dev, MCU_WAKEUP, TOKEN_WAKEUP, 0, 0);
rt2800pci_mcu_status(rt2x00dev, TOKEN_WAKEUP);

return retval;
}

static void rt2800pci_disable_radio(struct rt2x00_dev *rt2x00dev)
Expand Down Expand Up @@ -544,13 +560,6 @@ static int rt2800pci_set_device_state(struct rt2x00_dev *rt2x00dev,

switch (state) {
case STATE_RADIO_ON:
/*
* Before the radio can be enabled, the device first has
* to be woken up. After that it needs a bit of time
* to be fully awake and then the radio can be enabled.
*/
rt2800pci_set_state(rt2x00dev, STATE_AWAKE);
msleep(1);
retval = rt2800pci_enable_radio(rt2x00dev);
break;
case STATE_RADIO_OFF:
Expand Down

0 comments on commit 0cbd441

Please sign in to comment.