Lines Matching full:local

27 	struct ieee80211_local *local = sdata->local;
31 /* FIXME: what to do when local->pspolling is true? */
33 timer_delete_sync(&local->dynamic_ps_timer);
37 wiphy_work_cancel(local->hw.wiphy, &local->dynamic_ps_enable_work);
39 if (local->hw.conf.flags & IEEE80211_CONF_PS) {
41 local->hw.conf.flags &= ~IEEE80211_CONF_PS;
42 ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_PS);
46 !ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK))
57 ieee80211_send_nullfunc(local, sdata, true);
63 struct ieee80211_local *local = sdata->local;
65 if (!local->ps_sdata)
66 ieee80211_send_nullfunc(local, sdata, false);
67 else if (local->hw.conf.dynamic_ps_timeout > 0) {
74 ieee80211_send_nullfunc(local, sdata, false);
75 mod_timer(&local->dynamic_ps_timer, jiffies +
76 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
83 void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local)
87 lockdep_assert_wiphy(local->hw.wiphy);
89 if (WARN_ON(!local->emulate_chanctx))
101 ieee80211_stop_queues_by_reason(&local->hw, IEEE80211_MAX_QUEUE_MAP,
104 ieee80211_flush_queues(local, NULL, false);
106 list_for_each_entry(sdata, &local->interfaces, list) {
133 void ieee80211_offchannel_return(struct ieee80211_local *local)
137 lockdep_assert_wiphy(local->hw.wiphy);
139 if (WARN_ON(!local->emulate_chanctx))
142 list_for_each_entry(sdata, &local->interfaces, list) {
166 ieee80211_wake_queues_by_reason(&local->hw, IEEE80211_MAX_QUEUE_MAP,
178 ieee80211_free_txskb(&roc->sdata->local->hw, roc->frame);
194 static unsigned long ieee80211_end_finished_rocs(struct ieee80211_local *local,
200 lockdep_assert_wiphy(local->hw.wiphy);
202 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) {
225 static bool ieee80211_recalc_sw_work(struct ieee80211_local *local,
228 long dur = ieee80211_end_finished_rocs(local, now);
233 wiphy_delayed_work_queue(local->hw.wiphy, &local->roc_work, dur);
263 struct ieee80211_local *local =
267 lockdep_assert_wiphy(local->hw.wiphy);
269 list_for_each_entry(roc, &local->roc_list, list) {
274 ieee80211_handle_roc_started(roc, local->hw_roc_start_time);
280 struct ieee80211_local *local = hw_to_local(hw);
282 local->hw_roc_start_time = jiffies;
284 trace_api_ready_on_channel(local);
286 wiphy_work_queue(hw->wiphy, &local->hw_roc_start);
290 static void _ieee80211_start_next_roc(struct ieee80211_local *local)
296 lockdep_assert_wiphy(local->hw.wiphy);
298 if (WARN_ON(list_empty(&local->roc_list)))
301 roc = list_first_entry(&local->roc_list, struct ieee80211_roc_work,
311 list_for_each_entry(tmp, &local->roc_list, list) {
321 if (local->ops->remain_on_channel) {
322 int ret = drv_remain_on_channel(local, roc->sdata, roc->chan,
326 wiphy_warn(local->hw.wiphy,
332 list_for_each_entry(tmp, &local->roc_list, list) {
339 wiphy_work_queue(local->hw.wiphy, &local->hw_roc_done);
344 list_for_each_entry(tmp, &local->roc_list, list) {
358 roc->on_channel = roc->chan == local->hw.conf.chandef.chan &&
359 local->hw.conf.chandef.width != NL80211_CHAN_WIDTH_5 &&
360 local->hw.conf.chandef.width != NL80211_CHAN_WIDTH_10;
363 ieee80211_recalc_idle(local);
366 ieee80211_offchannel_stop_vifs(local);
368 local->tmp_channel = roc->chan;
369 ieee80211_hw_conf_chan(local);
372 wiphy_delayed_work_queue(local->hw.wiphy, &local->roc_work,
376 list_for_each_entry(tmp, &local->roc_list, list) {
386 void ieee80211_start_next_roc(struct ieee80211_local *local)
390 lockdep_assert_wiphy(local->hw.wiphy);
392 if (list_empty(&local->roc_list)) {
393 ieee80211_run_deferred_scan(local);
398 if (local->in_reconfig)
401 roc = list_first_entry(&local->roc_list, struct ieee80211_roc_work,
407 if (local->ops->remain_on_channel) {
408 _ieee80211_start_next_roc(local);
411 wiphy_delayed_work_queue(local->hw.wiphy, &local->roc_work,
416 void ieee80211_reconfig_roc(struct ieee80211_local *local)
425 if (!local->ops->remain_on_channel)
429 wiphy_work_flush(local->hw.wiphy, &local->hw_roc_start);
430 wiphy_work_flush(local->hw.wiphy, &local->hw_roc_done);
432 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) {
446 ieee80211_start_next_roc(local);
449 static void __ieee80211_roc_work(struct ieee80211_local *local)
454 lockdep_assert_wiphy(local->hw.wiphy);
456 if (WARN_ON(local->ops->remain_on_channel))
459 roc = list_first_entry_or_null(&local->roc_list,
465 WARN_ON(!local->emulate_chanctx);
466 _ieee80211_start_next_roc(local);
469 if (ieee80211_recalc_sw_work(local, jiffies))
475 ieee80211_flush_queues(local, NULL, false);
477 local->tmp_channel = NULL;
478 ieee80211_hw_conf_chan(local);
480 ieee80211_offchannel_return(local);
483 ieee80211_recalc_idle(local);
484 ieee80211_start_next_roc(local);
490 struct ieee80211_local *local =
493 lockdep_assert_wiphy(local->hw.wiphy);
495 __ieee80211_roc_work(local);
500 struct ieee80211_local *local =
503 lockdep_assert_wiphy(local->hw.wiphy);
505 ieee80211_end_finished_rocs(local, jiffies);
508 ieee80211_start_next_roc(local);
513 struct ieee80211_local *local = hw_to_local(hw);
515 trace_api_remain_on_channel_expired(local);
517 wiphy_work_queue(hw->wiphy, &local->hw_roc_done);
522 ieee80211_coalesce_hw_started_roc(struct ieee80211_local *local,
561 static int ieee80211_start_roc_work(struct ieee80211_local *local,
573 lockdep_assert_wiphy(local->hw.wiphy);
579 if (!local->emulate_chanctx && !local->ops->remain_on_channel)
610 roc->cookie = ieee80211_mgmt_tx_cookie(local);
616 req = wiphy_dereference(local->hw.wiphy, local->scan_req);
619 if (list_empty(&local->roc_list) &&
620 !local->scanning && !ieee80211_is_radar_required(local, req)) {
622 if (!local->ops->remain_on_channel) {
623 list_add_tail(&roc->list, &local->roc_list);
624 wiphy_delayed_work_queue(local->hw.wiphy,
625 &local->roc_work, 0);
630 ret = drv_remain_on_channel(local, sdata, channel,
637 list_add_tail(&roc->list, &local->roc_list);
645 list_for_each_entry(tmp, &local->roc_list, list) {
662 if (!local->ops->remain_on_channel) {
674 struct wiphy *wiphy = local->hw.wiphy;
686 ieee80211_recalc_sw_work(local, now);
690 queued = ieee80211_coalesce_hw_started_roc(local, roc, tmp);
702 list_add_tail(&roc->list, &local->roc_list);
712 struct ieee80211_local *local = sdata->local;
714 lockdep_assert_wiphy(local->hw.wiphy);
716 return ieee80211_start_roc_work(local, sdata, chan,
721 static int ieee80211_cancel_roc(struct ieee80211_local *local,
727 lockdep_assert_wiphy(local->hw.wiphy);
732 wiphy_work_flush(local->hw.wiphy, &local->hw_roc_start);
734 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) {
753 if (local->ops->remain_on_channel) {
754 ret = drv_cancel_remain_on_channel(local, roc->sdata);
774 wiphy_work_cancel(local->hw.wiphy, &local->hw_roc_done);
781 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) {
792 ieee80211_start_next_roc(local);
796 wiphy_delayed_work_queue(local->hw.wiphy, &local->roc_work, 0);
808 struct ieee80211_local *local = sdata->local;
810 return ieee80211_cancel_roc(local, cookie, false);
817 struct ieee80211_local *local = sdata->local;
828 lockdep_assert_wiphy(local->hw.wiphy);
887 local->ops->remain_on_channel &&
970 skb = dev_alloc_skb(local->hw.extra_tx_headroom + params->len);
975 skb_reserve(skb, local->hw.extra_tx_headroom);
1014 ret = ieee80211_attach_ack_skb(local, skb, cookie, GFP_KERNEL);
1036 if (ieee80211_hw_check(&local->hw, QUEUE_CONTROL))
1038 local->hw.offchannel_tx_hw_queue;
1041 ret = ieee80211_start_roc_work(local, sdata, params->chan,
1045 ieee80211_free_txskb(&local->hw, skb);
1053 struct ieee80211_local *local = wiphy_priv(wiphy);
1055 return ieee80211_cancel_roc(local, cookie, true);
1058 void ieee80211_roc_setup(struct ieee80211_local *local)
1060 wiphy_work_init(&local->hw_roc_start, ieee80211_hw_roc_start);
1061 wiphy_work_init(&local->hw_roc_done, ieee80211_hw_roc_done);
1062 wiphy_delayed_work_init(&local->roc_work, ieee80211_roc_work);
1063 INIT_LIST_HEAD(&local->roc_list);
1066 void ieee80211_roc_purge(struct ieee80211_local *local,
1072 lockdep_assert_wiphy(local->hw.wiphy);
1074 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) {
1079 if (local->ops->remain_on_channel) {
1081 drv_cancel_remain_on_channel(local, roc->sdata);
1092 __ieee80211_roc_work(local);