X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Fusb%2Fmain.c;h=890970c24ab237a7cd596eb8eb1903ecc04cc7e1;hb=8b944e7f0c1bd11fab1f1ce1862367f5e077bad0;hp=649dc4bd9f797ce8d92671aac5b763ff816ebb14;hpb=35cac8dcfa9d01fff0c929f0e2b9cc38fc919589;p=carl9170fw.git diff --git a/carlfw/usb/main.c b/carlfw/usb/main.c index 649dc4b..890970c 100644 --- a/carlfw/usb/main.c +++ b/carlfw/usb/main.c @@ -23,12 +23,13 @@ #include "carl9170.h" +#include "shared/phy.h" #include "hostif.h" #include "printf.h" #include "timer.h" #include "rom.h" #include "wl.h" -#include "shared/phy.h" +#include "wol.h" #ifdef CONFIG_CARL9170FW_DEBUG_USB void usb_putc(const char c) @@ -245,7 +246,7 @@ static void turn_power_off(void) AR9170_PWR_RESET_WLAN_MASK); set(AR9170_PWR_REG_RESET, 0x0); - set(AR9170_PWR_REG_CLOCK_SEL, AHB_40MHZ_OSC); + clock_set(AHB_20_22MHZ, false); set(AR9170_PWR_REG_PLL_ADDAC, 0x5163); /* 0x502b; */ set(AR9170_PHY_REG_ADC_SERIAL_CTL, AR9170_PHY_ADC_SCTL_SEL_EXTERNAL_RADIO); @@ -386,13 +387,13 @@ static void usb_handler(uint8_t usb_interrupt_level1) #ifdef CONFIG_CARL9170FW_WOL if (!(fw.usb.device_feature & USB_DEVICE_REMOTE_WAKEUP) || - !fw.wlan.wol.cmd.flags) { + !fw.wol.cmd.flags) { disable_watchdog(); /* GO_TO_SUSPEND stops the CPU clock too. */ orb(AR9170_USB_REG_MAIN_CTRL, AR9170_USB_MAIN_CTRL_GO_TO_SUSPEND); } else { - wlan_prepare_wol(); + wol_prepare(); } #else /* CONFIG_CARL9170FW_WOL */ disable_watchdog();