29 #define _RTL871X_PWRCTRL_C_
35 #define RTL8712_SDIO_LOCAL_BASE 0X10100000
36 #define SDIO_HCPWM (RTL8712_SDIO_LOCAL_BASE + 0x0081)
43 if (pwrpriv->
rpwm == val8) {
50 rpwm = val8 | pwrpriv->
tog;
106 _cancel_timer_ex(&padapter->
pwrctrlpriv. rpwm_check_timer);
107 _enter_pwrlock(&pwrpriv->
lock);
108 pwrpriv->
cpwm = (preportpwrstate->
state) & 0xf;
124 if (pwrctrl->
alives & tag)
146 _enter_pwrlock(&pwrpriv->
lock);
153 static void rpwm_workitem_callback(
struct work_struct *work)
160 if (pwrpriv->
cpwm != pwrpriv->
rpwm) {
161 _enter_pwrlock(&pwrpriv->
lock);
169 static void rpwm_check_handler (
void *FunctionContext)
172 _rpwm_check_handler(adapter);
180 sema_init(&pwrctrlpriv->
lock, 1);
184 pwrctrlpriv->
tog = 0x80;
188 SetPSModeWorkItemCallback, padapter);
190 rpwm_workitem_callback, padapter);
192 padapter->
pnetdev, rpwm_check_handler, (
u8 *)padapter);
214 _enter_pwrlock(&pwrctrl->
lock);
236 _enter_pwrlock(&pwrctrl->
lock);
237 unregister_task_alive(pwrctrl,
CMD_ALIVE);
240 if ((pwrctrl->
alives == 0) &&