carl9170 firmware: reorder SUSPEND/RESUME/WOL paths
authorChristian Lamparter <chunkeey@googlemail.com>
Sun, 16 Jan 2011 14:17:48 +0000 (15:17 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Sun, 16 Jan 2011 14:17:48 +0000 (15:17 +0100)
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
carlfw/usb/main.c

index c2ad6c3d71fcc79fc4b1bc082430f796931745cd..bd8428a0e39a2940f24daec3a9f8815e22bac445 100644 (file)
@@ -395,10 +395,11 @@ static void usb_handler(uint8_t usb_interrupt_level1)
                }
 
                if (usb_interrupt_level2 & AR9170_USB_INTR_SRC7_USB_RESUME) {
+                       usb_resume_ack();
+
                        fw.suspend_mode = CARL9170_HOST_AWAKE;
-                       andl(AR9170_USB_REG_WAKE_UP, AR9170_USB_WAKE_UP_WAKE);
+                       set(AR9170_USB_REG_WAKE_UP, 0);
 
-                       usb_resume_ack();
                        reboot();
                }
        }
@@ -421,7 +422,7 @@ void usb_timer(void)
 {
 #ifdef CONFIG_CARL9170FW_WOL
        if (fw.suspend_mode == CARL9170_AWAKE_HOST) {
-               orl(AR9170_USB_REG_WAKE_UP, AR9170_USB_WAKE_UP_WAKE);
+               set(AR9170_USB_REG_WAKE_UP, AR9170_USB_WAKE_UP_WAKE);
        }
 #endif /* CONFIG_CARL9170FW_WOL */
 }