Lines Matching refs:rtwdev
12 static int rtw_ips_pwr_up(struct rtw_dev *rtwdev) in rtw_ips_pwr_up() argument
16 ret = rtw_core_start(rtwdev); in rtw_ips_pwr_up()
18 rtw_err(rtwdev, "leave idle state failed\n"); in rtw_ips_pwr_up()
20 rtw_set_channel(rtwdev); in rtw_ips_pwr_up()
21 rtw_flag_clear(rtwdev, RTW_FLAG_INACTIVE_PS); in rtw_ips_pwr_up()
26 int rtw_enter_ips(struct rtw_dev *rtwdev) in rtw_enter_ips() argument
28 rtw_flag_set(rtwdev, RTW_FLAG_INACTIVE_PS); in rtw_enter_ips()
30 rtw_coex_ips_notify(rtwdev, COEX_IPS_ENTER); in rtw_enter_ips()
32 rtw_core_stop(rtwdev); in rtw_enter_ips()
40 struct rtw_dev *rtwdev = data; in rtw_restore_port_cfg_iter() local
44 rtw_vif_port_config(rtwdev, rtwvif, config); in rtw_restore_port_cfg_iter()
47 int rtw_leave_ips(struct rtw_dev *rtwdev) in rtw_leave_ips() argument
51 ret = rtw_ips_pwr_up(rtwdev); in rtw_leave_ips()
53 rtw_err(rtwdev, "failed to leave ips state\n"); in rtw_leave_ips()
57 rtw_iterate_vifs_atomic(rtwdev, rtw_restore_port_cfg_iter, rtwdev); in rtw_leave_ips()
59 rtw_coex_ips_notify(rtwdev, COEX_IPS_LEAVE); in rtw_leave_ips()
64 static void rtw_leave_lps_core(struct rtw_dev *rtwdev) in rtw_leave_lps_core() argument
66 struct rtw_lps_conf *conf = &rtwdev->lps_conf; in rtw_leave_lps_core()
73 rtw_fw_set_pwr_mode(rtwdev); in rtw_leave_lps_core()
74 rtw_flag_clear(rtwdev, RTW_FLAG_LEISURE_PS); in rtw_leave_lps_core()
76 rtw_coex_lps_notify(rtwdev, COEX_LPS_DISABLE); in rtw_leave_lps_core()
79 static void rtw_enter_lps_core(struct rtw_dev *rtwdev) in rtw_enter_lps_core() argument
81 struct rtw_lps_conf *conf = &rtwdev->lps_conf; in rtw_enter_lps_core()
88 rtw_coex_lps_notify(rtwdev, COEX_LPS_ENABLE); in rtw_enter_lps_core()
90 rtw_fw_set_pwr_mode(rtwdev); in rtw_enter_lps_core()
91 rtw_flag_set(rtwdev, RTW_FLAG_LEISURE_PS); in rtw_enter_lps_core()
96 struct rtw_dev *rtwdev = container_of(work, struct rtw_dev, in rtw_lps_work() local
98 struct rtw_lps_conf *conf = &rtwdev->lps_conf; in rtw_lps_work()
105 rtw_enter_lps_core(rtwdev); in rtw_lps_work()
107 rtw_leave_lps_core(rtwdev); in rtw_lps_work()
110 void rtw_enter_lps_irqsafe(struct rtw_dev *rtwdev, struct rtw_vif *rtwvif) in rtw_enter_lps_irqsafe() argument
112 struct rtw_lps_conf *conf = &rtwdev->lps_conf; in rtw_enter_lps_irqsafe()
121 ieee80211_queue_delayed_work(rtwdev->hw, &rtwdev->lps_work, 0); in rtw_enter_lps_irqsafe()
124 void rtw_leave_lps_irqsafe(struct rtw_dev *rtwdev, struct rtw_vif *rtwvif) in rtw_leave_lps_irqsafe() argument
126 struct rtw_lps_conf *conf = &rtwdev->lps_conf; in rtw_leave_lps_irqsafe()
135 ieee80211_queue_delayed_work(rtwdev->hw, &rtwdev->lps_work, 0); in rtw_leave_lps_irqsafe()
138 bool rtw_in_lps(struct rtw_dev *rtwdev) in rtw_in_lps() argument
140 return rtw_flag_check(rtwdev, RTW_FLAG_LEISURE_PS); in rtw_in_lps()
143 void rtw_enter_lps(struct rtw_dev *rtwdev, struct rtw_vif *rtwvif) in rtw_enter_lps() argument
145 struct rtw_lps_conf *conf = &rtwdev->lps_conf; in rtw_enter_lps()
157 rtw_enter_lps_core(rtwdev); in rtw_enter_lps()
160 void rtw_leave_lps(struct rtw_dev *rtwdev, struct rtw_vif *rtwvif) in rtw_leave_lps() argument
162 struct rtw_lps_conf *conf = &rtwdev->lps_conf; in rtw_leave_lps()
174 rtw_leave_lps_core(rtwdev); in rtw_leave_lps()