Lines Matching refs:ppsc
13 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl_ps_enable_nic() local
30 RT_CLEAR_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC); in rtl_ps_enable_nic()
70 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl_ps_set_rf_state() local
80 if (ppsc->rfchange_inprogress) { in rtl_ps_set_rf_state()
88 while (ppsc->rfchange_inprogress) { in rtl_ps_set_rf_state()
98 ppsc->rfchange_inprogress = true; in rtl_ps_set_rf_state()
106 ppsc->rfoff_reason &= (~changesource); in rtl_ps_set_rf_state()
109 (ppsc->hwradiooff)) { in rtl_ps_set_rf_state()
110 ppsc->hwradiooff = false; in rtl_ps_set_rf_state()
113 if (!ppsc->rfoff_reason) { in rtl_ps_set_rf_state()
114 ppsc->rfoff_reason = 0; in rtl_ps_set_rf_state()
122 if ((changesource == RF_CHANGE_BY_HW) && !ppsc->hwradiooff) { in rtl_ps_set_rf_state()
123 ppsc->hwradiooff = true; in rtl_ps_set_rf_state()
126 ppsc->rfoff_reason |= changesource; in rtl_ps_set_rf_state()
131 ppsc->rfoff_reason |= changesource; in rtl_ps_set_rf_state()
144 ppsc->rfchange_inprogress = false; in rtl_ps_set_rf_state()
154 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in _rtl_ps_inactive_ps() local
156 ppsc->swrf_processing = true; in _rtl_ps_inactive_ps()
158 if (ppsc->inactive_pwrstate == ERFON && in _rtl_ps_inactive_ps()
160 if ((ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM) && in _rtl_ps_inactive_ps()
161 RT_IN_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM)) { in _rtl_ps_inactive_ps()
163 RT_CLEAR_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM); in _rtl_ps_inactive_ps()
167 rtl_ps_set_rf_state(hw, ppsc->inactive_pwrstate, in _rtl_ps_inactive_ps()
170 if (ppsc->inactive_pwrstate == ERFOFF && in _rtl_ps_inactive_ps()
172 if (ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM && in _rtl_ps_inactive_ps()
173 !RT_IN_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM)) { in _rtl_ps_inactive_ps()
175 RT_SET_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM); in _rtl_ps_inactive_ps()
179 ppsc->swrf_processing = false; in _rtl_ps_inactive_ps()
190 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl_ips_nic_off_wq_callback() local
214 if (ppsc->inactiveps) { in rtl_ips_nic_off_wq_callback()
215 rtstate = ppsc->rfpwr_state; in rtl_ips_nic_off_wq_callback()
228 !ppsc->swrf_processing && in rtl_ips_nic_off_wq_callback()
234 ppsc->inactive_pwrstate = ERFOFF; in rtl_ips_nic_off_wq_callback()
235 ppsc->in_powersavemode = true; in rtl_ips_nic_off_wq_callback()
240 ppsc->inactive_pwrstate); in rtl_ips_nic_off_wq_callback()
266 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl_ips_nic_on() local
272 if (ppsc->inactiveps) { in rtl_ips_nic_on()
273 rtstate = ppsc->rfpwr_state; in rtl_ips_nic_on()
276 !ppsc->swrf_processing && in rtl_ips_nic_on()
277 ppsc->rfoff_reason <= RF_CHANGE_BY_IPS) { in rtl_ips_nic_on()
279 ppsc->inactive_pwrstate = ERFON; in rtl_ips_nic_on()
280 ppsc->in_powersavemode = false; in rtl_ips_nic_on()
285 ppsc->inactive_pwrstate); in rtl_ips_nic_on()
303 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl_get_fwlps_doze() local
307 ppsc->last_delaylps_stamp_jiffies); in rtl_get_fwlps_doze()
329 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl_lps_set_psmode() local
338 if (ppsc->dot11_psmode == rt_psmode && rt_psmode == EACTIVE) in rtl_lps_set_psmode()
342 ppsc->dot11_psmode = rt_psmode; in rtl_lps_set_psmode()
354 if ((ppsc->fwctrl_lps) && ppsc->report_linked) { in rtl_lps_set_psmode()
355 if (ppsc->dot11_psmode == EACTIVE) { in rtl_lps_set_psmode()
360 ppsc->pwr_mode = FW_PS_ACTIVE_MODE; in rtl_lps_set_psmode()
361 ppsc->smart_ps = 0; in rtl_lps_set_psmode()
364 if (ppsc->p2p_ps_info.opp_ps) in rtl_lps_set_psmode()
373 ppsc->fwctrl_psmode); in rtl_lps_set_psmode()
377 ppsc->pwr_mode = ppsc->fwctrl_psmode; in rtl_lps_set_psmode()
378 ppsc->smart_ps = 2; in rtl_lps_set_psmode()
385 ppsc->dot11_psmode = EACTIVE; in rtl_lps_set_psmode()
395 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl_lps_enter_core() local
398 if (!ppsc->fwctrl_lps) in rtl_lps_enter_core()
434 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl_lps_leave_core() local
439 if (ppsc->fwctrl_lps) { in rtl_lps_leave_core()
440 if (ppsc->dot11_psmode != EACTIVE) { in rtl_lps_leave_core()
445 if (ppsc->reg_rfps_level & RT_RF_LPS_LEVEL_ASPM && in rtl_lps_leave_core()
446 RT_IN_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM) && in rtl_lps_leave_core()
449 RT_CLEAR_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM); in rtl_lps_leave_core()
546 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl_swlps_rf_awake() local
554 if (ppsc->reg_rfps_level & RT_RF_LPS_LEVEL_ASPM && in rtl_swlps_rf_awake()
555 RT_IN_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM)) { in rtl_swlps_rf_awake()
557 RT_CLEAR_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM); in rtl_swlps_rf_awake()
578 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); in rtl_swlps_rf_sleep() local
606 if (ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM && in rtl_swlps_rf_sleep()
607 !RT_IN_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM)) { in rtl_swlps_rf_sleep()
609 RT_SET_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM); in rtl_swlps_rf_sleep()