• Home
  • Raw
  • Download

Lines Matching refs:roc

171 static void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc)  in ieee80211_roc_notify_destroy()  argument
174 if (roc->frame) { in ieee80211_roc_notify_destroy()
175 cfg80211_mgmt_tx_status(&roc->sdata->wdev, roc->mgmt_tx_cookie, in ieee80211_roc_notify_destroy()
176 roc->frame->data, roc->frame->len, in ieee80211_roc_notify_destroy()
178 ieee80211_free_txskb(&roc->sdata->local->hw, roc->frame); in ieee80211_roc_notify_destroy()
181 if (!roc->mgmt_tx_cookie) in ieee80211_roc_notify_destroy()
182 cfg80211_remain_on_channel_expired(&roc->sdata->wdev, in ieee80211_roc_notify_destroy()
183 roc->cookie, roc->chan, in ieee80211_roc_notify_destroy()
186 cfg80211_tx_mgmt_expired(&roc->sdata->wdev, in ieee80211_roc_notify_destroy()
187 roc->mgmt_tx_cookie, in ieee80211_roc_notify_destroy()
188 roc->chan, GFP_KERNEL); in ieee80211_roc_notify_destroy()
190 list_del(&roc->list); in ieee80211_roc_notify_destroy()
191 kfree(roc); in ieee80211_roc_notify_destroy()
197 struct ieee80211_roc_work *roc, *tmp; in ieee80211_end_finished_rocs() local
202 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) { in ieee80211_end_finished_rocs()
205 if (!roc->started) in ieee80211_end_finished_rocs()
208 remaining = roc->start_time + in ieee80211_end_finished_rocs()
209 msecs_to_jiffies(roc->duration) - in ieee80211_end_finished_rocs()
216 if (roc->abort || roc->hw_begun || remaining <= 0) in ieee80211_end_finished_rocs()
217 ieee80211_roc_notify_destroy(roc); in ieee80211_end_finished_rocs()
237 static void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc, in ieee80211_handle_roc_started() argument
240 if (WARN_ON(roc->notified)) in ieee80211_handle_roc_started()
243 roc->start_time = start_time; in ieee80211_handle_roc_started()
244 roc->started = true; in ieee80211_handle_roc_started()
246 if (roc->mgmt_tx_cookie) { in ieee80211_handle_roc_started()
247 if (!WARN_ON(!roc->frame)) { in ieee80211_handle_roc_started()
248 ieee80211_tx_skb_tid_band(roc->sdata, roc->frame, 7, in ieee80211_handle_roc_started()
249 roc->chan->band); in ieee80211_handle_roc_started()
250 roc->frame = NULL; in ieee80211_handle_roc_started()
253 cfg80211_ready_on_channel(&roc->sdata->wdev, roc->cookie, in ieee80211_handle_roc_started()
254 roc->chan, roc->req_duration, in ieee80211_handle_roc_started()
258 roc->notified = true; in ieee80211_handle_roc_started()
265 struct ieee80211_roc_work *roc; in ieee80211_hw_roc_start() local
269 list_for_each_entry(roc, &local->roc_list, list) { in ieee80211_hw_roc_start()
270 if (!roc->started) in ieee80211_hw_roc_start()
273 roc->hw_begun = true; in ieee80211_hw_roc_start()
274 ieee80211_handle_roc_started(roc, local->hw_roc_start_time); in ieee80211_hw_roc_start()
294 struct ieee80211_roc_work *roc, *tmp; in _ieee80211_start_next_roc() local
303 roc = list_first_entry(&local->roc_list, struct ieee80211_roc_work, in _ieee80211_start_next_roc()
306 if (WARN_ON(roc->started)) in _ieee80211_start_next_roc()
309 min_dur = roc->duration; in _ieee80211_start_next_roc()
310 max_dur = roc->duration; in _ieee80211_start_next_roc()
311 type = roc->type; in _ieee80211_start_next_roc()
314 if (tmp == roc) in _ieee80211_start_next_roc()
316 if (tmp->sdata != roc->sdata || tmp->chan != roc->chan) in _ieee80211_start_next_roc()
324 int ret = drv_remain_on_channel(local, roc->sdata, roc->chan, in _ieee80211_start_next_roc()
335 if (tmp->sdata != roc->sdata || in _ieee80211_start_next_roc()
336 tmp->chan != roc->chan) in _ieee80211_start_next_roc()
347 if (tmp->sdata != roc->sdata || tmp->chan != roc->chan) in _ieee80211_start_next_roc()
357 roc->on_channel = roc->chan == local->_oper_chandef.chan && in _ieee80211_start_next_roc()
364 if (!roc->on_channel) { in _ieee80211_start_next_roc()
367 local->tmp_channel = roc->chan; in _ieee80211_start_next_roc()
376 if (tmp->sdata != roc->sdata || tmp->chan != roc->chan) in _ieee80211_start_next_roc()
379 tmp->on_channel = roc->on_channel; in _ieee80211_start_next_roc()
387 struct ieee80211_roc_work *roc; in ieee80211_start_next_roc() local
400 roc = list_first_entry(&local->roc_list, struct ieee80211_roc_work, in ieee80211_start_next_roc()
403 if (WARN_ON_ONCE(roc->started)) in ieee80211_start_next_roc()
417 struct ieee80211_roc_work *roc; in __ieee80211_roc_work() local
425 roc = list_first_entry_or_null(&local->roc_list, in __ieee80211_roc_work()
427 if (!roc) in __ieee80211_roc_work()
430 if (!roc->started) { in __ieee80211_roc_work()
434 on_channel = roc->on_channel; in __ieee80211_roc_work()
536 struct ieee80211_roc_work *roc, *tmp; in ieee80211_start_roc_work() local
549 roc = kzalloc(sizeof(*roc), GFP_KERNEL); in ieee80211_start_roc_work()
550 if (!roc) in ieee80211_start_roc_work()
565 roc->chan = channel; in ieee80211_start_roc_work()
566 roc->duration = duration; in ieee80211_start_roc_work()
567 roc->req_duration = duration; in ieee80211_start_roc_work()
568 roc->frame = txskb; in ieee80211_start_roc_work()
569 roc->type = type; in ieee80211_start_roc_work()
570 roc->sdata = sdata; in ieee80211_start_roc_work()
577 roc->cookie = ieee80211_mgmt_tx_cookie(local); in ieee80211_start_roc_work()
578 *cookie = roc->cookie; in ieee80211_start_roc_work()
580 roc->mgmt_tx_cookie = *cookie; in ieee80211_start_roc_work()
588 list_add_tail(&roc->list, &local->roc_list); in ieee80211_start_roc_work()
598 kfree(roc); in ieee80211_start_roc_work()
601 roc->started = true; in ieee80211_start_roc_work()
602 list_add_tail(&roc->list, &local->roc_list); in ieee80211_start_roc_work()
619 list_add(&roc->list, &tmp->list); in ieee80211_start_roc_work()
642 if (elapsed + roc->duration > max_roc) { in ieee80211_start_roc_work()
647 list_add(&roc->list, &tmp->list); in ieee80211_start_roc_work()
649 roc->on_channel = tmp->on_channel; in ieee80211_start_roc_work()
650 ieee80211_handle_roc_started(roc, now); in ieee80211_start_roc_work()
655 queued = ieee80211_coalesce_hw_started_roc(local, roc, tmp); in ieee80211_start_roc_work()
667 list_add_tail(&roc->list, &local->roc_list); in ieee80211_start_roc_work()
692 struct ieee80211_roc_work *roc, *tmp, *found = NULL; in ieee80211_cancel_roc() local
701 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) { in ieee80211_cancel_roc()
702 if (!mgmt_tx && roc->cookie != cookie) in ieee80211_cancel_roc()
704 else if (mgmt_tx && roc->mgmt_tx_cookie != cookie) in ieee80211_cancel_roc()
707 found = roc; in ieee80211_cancel_roc()
722 ret = drv_cancel_remain_on_channel(local, roc->sdata); in ieee80211_cancel_roc()
733 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) { in ieee80211_cancel_roc()
734 if (!roc->started) in ieee80211_cancel_roc()
736 if (roc == found) in ieee80211_cancel_roc()
738 ieee80211_roc_notify_destroy(roc); in ieee80211_cancel_roc()
1006 struct ieee80211_roc_work *roc, *tmp; in ieee80211_roc_purge() local
1010 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) { in ieee80211_roc_purge()
1011 if (sdata && roc->sdata != sdata) in ieee80211_roc_purge()
1014 if (roc->started) { in ieee80211_roc_purge()
1017 drv_cancel_remain_on_channel(local, roc->sdata); in ieee80211_roc_purge()
1018 ieee80211_roc_notify_destroy(roc); in ieee80211_roc_purge()
1020 roc->abort = true; in ieee80211_roc_purge()
1024 ieee80211_roc_notify_destroy(roc); in ieee80211_roc_purge()