Lines Matching refs:local

27 	struct ieee80211_local *local = sdata->local;
31 /* FIXME: what to do when local->pspolling is true? */
33 del_timer_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, 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 static void __ieee80211_roc_work(struct ieee80211_local *local)
421 lockdep_assert_wiphy(local->hw.wiphy);
423 if (WARN_ON(local->ops->remain_on_channel))
426 roc = list_first_entry_or_null(&local->roc_list,
432 WARN_ON(!local->emulate_chanctx);
433 _ieee80211_start_next_roc(local);
436 if (ieee80211_recalc_sw_work(local, jiffies))
442 ieee80211_flush_queues(local, NULL, false);
444 local->tmp_channel = NULL;
445 ieee80211_hw_conf_chan(local);
447 ieee80211_offchannel_return(local);
450 ieee80211_recalc_idle(local);
451 ieee80211_start_next_roc(local);
457 struct ieee80211_local *local =
460 lockdep_assert_wiphy(local->hw.wiphy);
462 __ieee80211_roc_work(local);
467 struct ieee80211_local *local =
470 lockdep_assert_wiphy(local->hw.wiphy);
472 ieee80211_end_finished_rocs(local, jiffies);
475 ieee80211_start_next_roc(local);
480 struct ieee80211_local *local = hw_to_local(hw);
482 trace_api_remain_on_channel_expired(local);
484 wiphy_work_queue(hw->wiphy, &local->hw_roc_done);
489 ieee80211_coalesce_hw_started_roc(struct ieee80211_local *local,
528 static int ieee80211_start_roc_work(struct ieee80211_local *local,
539 lockdep_assert_wiphy(local->hw.wiphy);
545 if (!local->emulate_chanctx && !local->ops->remain_on_channel)
576 roc->cookie = ieee80211_mgmt_tx_cookie(local);
583 if (list_empty(&local->roc_list) &&
584 !local->scanning && !ieee80211_is_radar_required(local)) {
586 if (!local->ops->remain_on_channel) {
587 list_add_tail(&roc->list, &local->roc_list);
588 wiphy_delayed_work_queue(local->hw.wiphy,
589 &local->roc_work, 0);
594 ret = drv_remain_on_channel(local, sdata, channel,
601 list_add_tail(&roc->list, &local->roc_list);
609 list_for_each_entry(tmp, &local->roc_list, list) {
626 if (!local->ops->remain_on_channel) {
638 struct wiphy *wiphy = local->hw.wiphy;
650 ieee80211_recalc_sw_work(local, now);
654 queued = ieee80211_coalesce_hw_started_roc(local, roc, tmp);
666 list_add_tail(&roc->list, &local->roc_list);
676 struct ieee80211_local *local = sdata->local;
678 lockdep_assert_wiphy(local->hw.wiphy);
680 return ieee80211_start_roc_work(local, sdata, chan,
685 static int ieee80211_cancel_roc(struct ieee80211_local *local,
691 lockdep_assert_wiphy(local->hw.wiphy);
696 wiphy_work_flush(local->hw.wiphy, &local->hw_roc_start);
698 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) {
717 if (local->ops->remain_on_channel) {
718 ret = drv_cancel_remain_on_channel(local, roc->sdata);
738 wiphy_work_cancel(local->hw.wiphy, &local->hw_roc_done);
745 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) {
756 ieee80211_start_next_roc(local);
760 wiphy_delayed_work_queue(local->hw.wiphy, &local->roc_work, 0);
772 struct ieee80211_local *local = sdata->local;
774 return ieee80211_cancel_roc(local, cookie, false);
781 struct ieee80211_local *local = sdata->local;
792 lockdep_assert_wiphy(local->hw.wiphy);
851 local->ops->remain_on_channel &&
921 skb = dev_alloc_skb(local->hw.extra_tx_headroom + params->len);
926 skb_reserve(skb, local->hw.extra_tx_headroom);
964 ret = ieee80211_attach_ack_skb(local, skb, cookie, GFP_KERNEL);
986 if (ieee80211_hw_check(&local->hw, QUEUE_CONTROL))
988 local->hw.offchannel_tx_hw_queue;
991 ret = ieee80211_start_roc_work(local, sdata, params->chan,
995 ieee80211_free_txskb(&local->hw, skb);
1003 struct ieee80211_local *local = wiphy_priv(wiphy);
1005 return ieee80211_cancel_roc(local, cookie, true);
1008 void ieee80211_roc_setup(struct ieee80211_local *local)
1010 wiphy_work_init(&local->hw_roc_start, ieee80211_hw_roc_start);
1011 wiphy_work_init(&local->hw_roc_done, ieee80211_hw_roc_done);
1012 wiphy_delayed_work_init(&local->roc_work, ieee80211_roc_work);
1013 INIT_LIST_HEAD(&local->roc_list);
1016 void ieee80211_roc_purge(struct ieee80211_local *local,
1022 lockdep_assert_wiphy(local->hw.wiphy);
1024 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) {
1029 if (local->ops->remain_on_channel) {
1031 drv_cancel_remain_on_channel(local, roc->sdata);
1042 __ieee80211_roc_work(local);