• Home
  • Raw
  • Download

Lines Matching refs:wl

37 	struct wl1271 *wl;  in wl1271_elp_work()  local
42 wl = container_of(dwork, struct wl1271, elp_work); in wl1271_elp_work()
46 mutex_lock(&wl->mutex); in wl1271_elp_work()
48 if (unlikely(wl->state != WLCORE_STATE_ON)) in wl1271_elp_work()
52 if (unlikely(!test_bit(WL1271_FLAG_ELP_REQUESTED, &wl->flags))) in wl1271_elp_work()
55 if (test_bit(WL1271_FLAG_IN_ELP, &wl->flags)) in wl1271_elp_work()
58 wl12xx_for_each_wlvif(wl, wlvif) { in wl1271_elp_work()
65 ret = wlcore_raw_write32(wl, HW_ACCESS_ELP_CTRL_REG, ELPCTRL_SLEEP); in wl1271_elp_work()
67 wl12xx_queue_recovery_work(wl); in wl1271_elp_work()
71 set_bit(WL1271_FLAG_IN_ELP, &wl->flags); in wl1271_elp_work()
74 mutex_unlock(&wl->mutex); in wl1271_elp_work()
78 void wl1271_ps_elp_sleep(struct wl1271 *wl) in wl1271_ps_elp_sleep() argument
84 if (wl->plt) in wl1271_ps_elp_sleep()
87 if (wl->sleep_auth != WL1271_PSM_ELP) in wl1271_ps_elp_sleep()
91 if (WARN_ON(test_and_set_bit(WL1271_FLAG_ELP_REQUESTED, &wl->flags))) in wl1271_ps_elp_sleep()
94 wl12xx_for_each_wlvif(wl, wlvif) { in wl1271_ps_elp_sleep()
100 timeout = wl->conf.conn.forced_ps ? in wl1271_ps_elp_sleep()
102 ieee80211_queue_delayed_work(wl->hw, &wl->elp_work, in wl1271_ps_elp_sleep()
107 int wl1271_ps_elp_wakeup(struct wl1271 *wl) in wl1271_ps_elp_wakeup() argument
119 if (!test_and_clear_bit(WL1271_FLAG_ELP_REQUESTED, &wl->flags)) in wl1271_ps_elp_wakeup()
123 cancel_delayed_work(&wl->elp_work); in wl1271_ps_elp_wakeup()
125 if (!test_bit(WL1271_FLAG_IN_ELP, &wl->flags)) in wl1271_ps_elp_wakeup()
134 spin_lock_irqsave(&wl->wl_lock, flags); in wl1271_ps_elp_wakeup()
135 if (test_bit(WL1271_FLAG_IRQ_RUNNING, &wl->flags)) in wl1271_ps_elp_wakeup()
138 wl->elp_compl = &compl; in wl1271_ps_elp_wakeup()
139 spin_unlock_irqrestore(&wl->wl_lock, flags); in wl1271_ps_elp_wakeup()
141 ret = wlcore_raw_write32(wl, HW_ACCESS_ELP_CTRL_REG, ELPCTRL_WAKE_UP); in wl1271_ps_elp_wakeup()
143 wl12xx_queue_recovery_work(wl); in wl1271_ps_elp_wakeup()
152 wl12xx_queue_recovery_work(wl); in wl1271_ps_elp_wakeup()
158 clear_bit(WL1271_FLAG_IN_ELP, &wl->flags); in wl1271_ps_elp_wakeup()
165 spin_lock_irqsave(&wl->wl_lock, flags); in wl1271_ps_elp_wakeup()
166 wl->elp_compl = NULL; in wl1271_ps_elp_wakeup()
167 spin_unlock_irqrestore(&wl->wl_lock, flags); in wl1271_ps_elp_wakeup()
175 int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl1271_ps_set_mode() argument
179 u16 timeout = wl->conf.conn.dynamic_ps_timeout; in wl1271_ps_set_mode()
187 ret = wl1271_acx_wake_up_conditions(wl, wlvif, in wl1271_ps_set_mode()
188 wl->conf.conn.wake_up_event, in wl1271_ps_set_mode()
189 wl->conf.conn.listen_interval); in wl1271_ps_set_mode()
195 ret = wl1271_cmd_ps_mode(wl, wlvif, mode, timeout); in wl1271_ps_set_mode()
207 ret = wl1271_acx_bet_enable(wl, wlvif, true); in wl1271_ps_set_mode()
218 ret = wl1271_acx_bet_enable(wl, wlvif, false); in wl1271_ps_set_mode()
223 ret = wl1271_cmd_ps_mode(wl, wlvif, mode, 0); in wl1271_ps_set_mode()
237 static void wl1271_ps_filter_frames(struct wl1271 *wl, u8 hlid) in wl1271_ps_filter_frames() argument
244 struct wl1271_link *lnk = &wl->links[hlid]; in wl1271_ps_filter_frames()
252 if (WARN_ON(wl12xx_is_dummy_packet(wl, skb))) in wl1271_ps_filter_frames()
258 ieee80211_tx_status_ni(wl->hw, skb); in wl1271_ps_filter_frames()
262 spin_lock_irqsave(&wl->wl_lock, flags); in wl1271_ps_filter_frames()
264 wl->tx_queue_count[i] -= filtered[i]; in wl1271_ps_filter_frames()
268 spin_unlock_irqrestore(&wl->wl_lock, flags); in wl1271_ps_filter_frames()
270 wl1271_handle_tx_low_watermark(wl); in wl1271_ps_filter_frames()
273 void wl12xx_ps_link_start(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_ps_link_start() argument
283 test_bit(hlid, &wl->ap_ps_map)) in wl12xx_ps_link_start()
287 "clean_queues %d", hlid, wl->links[hlid].allocated_pkts, in wl12xx_ps_link_start()
291 sta = ieee80211_find_sta(vif, wl->links[hlid].addr); in wl12xx_ps_link_start()
294 wl->links[hlid].addr); in wl12xx_ps_link_start()
304 wl1271_ps_filter_frames(wl, hlid); in wl12xx_ps_link_start()
306 __set_bit(hlid, &wl->ap_ps_map); in wl12xx_ps_link_start()
309 void wl12xx_ps_link_end(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 hlid) in wl12xx_ps_link_end() argument
314 if (!test_bit(hlid, &wl->ap_ps_map)) in wl12xx_ps_link_end()
319 __clear_bit(hlid, &wl->ap_ps_map); in wl12xx_ps_link_end()
322 sta = ieee80211_find_sta(vif, wl->links[hlid].addr); in wl12xx_ps_link_end()
325 wl->links[hlid].addr); in wl12xx_ps_link_end()