Lines Matching refs:local

42 	struct ieee80211_local *local;  in wiphy_to_ieee80211_hw()  local
44 local = wiphy_priv(wiphy); in wiphy_to_ieee80211_hw()
45 return &local->hw; in wiphy_to_ieee80211_hw()
204 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_rts_duration() local
212 sband = local->hw.wiphy->bands[frame_txctl->band]; in ieee80211_rts_duration()
247 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_ctstoself_duration() local
255 sband = local->hw.wiphy->bands[frame_txctl->band]; in ieee80211_ctstoself_duration()
283 static void wake_tx_push_queue(struct ieee80211_local *local, in wake_tx_push_queue() argument
293 skb = ieee80211_tx_dequeue(&local->hw, queue); in wake_tx_push_queue()
297 drv_tx(local, &control, skb); in wake_tx_push_queue()
305 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_handle_wake_tx_queue() local
309 spin_lock(&local->handle_wake_tx_queue_lock); in ieee80211_handle_wake_tx_queue()
314 wake_tx_push_queue(local, sdata, queue); in ieee80211_handle_wake_tx_queue()
318 spin_unlock(&local->handle_wake_tx_queue_lock); in ieee80211_handle_wake_tx_queue()
324 struct ieee80211_local *local = sdata->local; in __ieee80211_wake_txqs() local
326 struct fq *fq = &local->fq; in __ieee80211_wake_txqs()
341 list_for_each_entry_rcu(sta, &local->sta_list, list) { in __ieee80211_wake_txqs()
361 drv_wake_tx_queue(local, txqi); in __ieee80211_wake_txqs()
377 drv_wake_tx_queue(local, txqi); in __ieee80211_wake_txqs()
386 __releases(&local->queue_stop_reason_lock)
387 __acquires(&local->queue_stop_reason_lock)
388 _ieee80211_wake_txqs(struct ieee80211_local *local, unsigned long *flags) in _ieee80211_wake_txqs() argument
396 if (local->hw.queues < IEEE80211_NUM_ACS) in _ieee80211_wake_txqs()
399 for (i = 0; i < local->hw.queues; i++) { in _ieee80211_wake_txqs()
400 if (local->queue_stop_reasons[i]) in _ieee80211_wake_txqs()
403 spin_unlock_irqrestore(&local->queue_stop_reason_lock, *flags); in _ieee80211_wake_txqs()
404 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in _ieee80211_wake_txqs()
415 spin_lock_irqsave(&local->queue_stop_reason_lock, *flags); in _ieee80211_wake_txqs()
423 struct ieee80211_local *local = from_tasklet(local, t, in ieee80211_wake_txqs() local
427 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_wake_txqs()
428 _ieee80211_wake_txqs(local, &flags); in ieee80211_wake_txqs()
429 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_wake_txqs()
437 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_wake_queue() local
442 if (!test_bit(reason, &local->queue_stop_reasons[queue])) in __ieee80211_wake_queue()
446 local->q_stop_reasons[queue][reason] = 0; in __ieee80211_wake_queue()
448 local->q_stop_reasons[queue][reason]--; in __ieee80211_wake_queue()
449 if (WARN_ON(local->q_stop_reasons[queue][reason] < 0)) in __ieee80211_wake_queue()
450 local->q_stop_reasons[queue][reason] = 0; in __ieee80211_wake_queue()
453 if (local->q_stop_reasons[queue][reason] == 0) in __ieee80211_wake_queue()
454 __clear_bit(reason, &local->queue_stop_reasons[queue]); in __ieee80211_wake_queue()
456 trace_wake_queue(local, queue, reason, in __ieee80211_wake_queue()
457 local->q_stop_reasons[queue][reason]); in __ieee80211_wake_queue()
459 if (local->queue_stop_reasons[queue] != 0) in __ieee80211_wake_queue()
463 if (!skb_queue_empty(&local->pending[queue])) in __ieee80211_wake_queue()
464 tasklet_schedule(&local->tx_pending_tasklet); in __ieee80211_wake_queue()
474 tasklet_schedule(&local->wake_txqs_tasklet); in __ieee80211_wake_queue()
476 _ieee80211_wake_txqs(local, flags); in __ieee80211_wake_queue()
483 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_wake_queue_by_reason() local
486 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queue_by_reason()
488 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queue_by_reason()
503 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_stop_queue() local
509 local->q_stop_reasons[queue][reason] = 1; in __ieee80211_stop_queue()
511 local->q_stop_reasons[queue][reason]++; in __ieee80211_stop_queue()
513 trace_stop_queue(local, queue, reason, in __ieee80211_stop_queue()
514 local->q_stop_reasons[queue][reason]); in __ieee80211_stop_queue()
516 set_bit(reason, &local->queue_stop_reasons[queue]); in __ieee80211_stop_queue()
523 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_stop_queue_by_reason() local
526 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queue_by_reason()
528 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queue_by_reason()
539 void ieee80211_add_pending_skb(struct ieee80211_local *local, in ieee80211_add_pending_skb() argument
542 struct ieee80211_hw *hw = &local->hw; in ieee80211_add_pending_skb()
548 ieee80211_free_txskb(&local->hw, skb); in ieee80211_add_pending_skb()
552 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skb()
555 __skb_queue_tail(&local->pending[queue], skb); in ieee80211_add_pending_skb()
558 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skb()
561 void ieee80211_add_pending_skbs(struct ieee80211_local *local, in ieee80211_add_pending_skbs() argument
564 struct ieee80211_hw *hw = &local->hw; in ieee80211_add_pending_skbs()
569 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skbs()
574 ieee80211_free_txskb(&local->hw, skb); in ieee80211_add_pending_skbs()
584 __skb_queue_tail(&local->pending[queue], skb); in ieee80211_add_pending_skbs()
591 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skbs()
599 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_stop_queues_by_reason() local
603 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queues_by_reason()
608 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queues_by_reason()
621 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_queue_stopped() local
628 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_queue_stopped()
630 &local->queue_stop_reasons[queue]); in ieee80211_queue_stopped()
631 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_queue_stopped()
641 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_wake_queues_by_reason() local
645 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queues_by_reason()
650 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queues_by_reason()
662 ieee80211_get_vif_queues(struct ieee80211_local *local, in ieee80211_get_vif_queues() argument
667 if (sdata && ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) { in ieee80211_get_vif_queues()
679 queues = BIT(local->hw.queues) - 1; in ieee80211_get_vif_queues()
685 void __ieee80211_flush_queues(struct ieee80211_local *local, in __ieee80211_flush_queues() argument
689 if (!local->ops->flush && !drop) in __ieee80211_flush_queues()
696 if (!queues || !ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) in __ieee80211_flush_queues()
697 queues = ieee80211_get_vif_queues(local, sdata); in __ieee80211_flush_queues()
699 ieee80211_stop_queues_by_reason(&local->hw, queues, in __ieee80211_flush_queues()
709 list_for_each_entry(sta, &local->sta_list, list) { in __ieee80211_flush_queues()
716 if (local->ops->flush) in __ieee80211_flush_queues()
717 drv_flush(local, sdata, queues, drop); in __ieee80211_flush_queues()
719 ieee80211_wake_queues_by_reason(&local->hw, queues, in __ieee80211_flush_queues()
724 void ieee80211_flush_queues(struct ieee80211_local *local, in ieee80211_flush_queues() argument
727 __ieee80211_flush_queues(local, sdata, 0, drop); in ieee80211_flush_queues()
730 static void __iterate_interfaces(struct ieee80211_local *local, in __iterate_interfaces() argument
739 list_for_each_entry_rcu(sdata, &local->interfaces, list, in __iterate_interfaces()
740 lockdep_is_held(&local->iflist_mtx) || in __iterate_interfaces()
741 lockdep_is_held(&local->hw.wiphy->mtx)) { in __iterate_interfaces()
745 !ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR)) in __iterate_interfaces()
764 sdata = rcu_dereference_check(local->monitor_sdata, in __iterate_interfaces()
765 lockdep_is_held(&local->iflist_mtx) || in __iterate_interfaces()
766 lockdep_is_held(&local->hw.wiphy->mtx)); in __iterate_interfaces()
767 if (sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF) && in __iterate_interfaces()
779 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_interfaces() local
781 mutex_lock(&local->iflist_mtx); in ieee80211_iterate_interfaces()
782 __iterate_interfaces(local, iter_flags, iterator, data); in ieee80211_iterate_interfaces()
783 mutex_unlock(&local->iflist_mtx); in ieee80211_iterate_interfaces()
793 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_active_interfaces_atomic() local
796 __iterate_interfaces(local, iter_flags | IEEE80211_IFACE_ITER_ACTIVE, in ieee80211_iterate_active_interfaces_atomic()
809 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_iterate_interfaces() local
816 monitor = rcu_dereference_check(local->monitor_sdata, in __ieee80211_iterate_interfaces()
821 sdata = list_prepare_entry(sdata, &local->interfaces, list); in __ieee80211_iterate_interfaces()
822 list_for_each_entry_continue(sdata, &local->interfaces, list) { in __ieee80211_iterate_interfaces()
826 !ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR)) in __ieee80211_iterate_interfaces()
844 if (monitor && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF) && in __ieee80211_iterate_interfaces()
853 static void __iterate_stations(struct ieee80211_local *local, in __iterate_stations() argument
860 list_for_each_entry_rcu(sta, &local->sta_list, list, in __iterate_stations()
861 lockdep_is_held(&local->hw.wiphy->mtx)) { in __iterate_stations()
874 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_stations_atomic() local
877 __iterate_stations(local, iterator, data); in ieee80211_iterate_stations_atomic()
886 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_iterate_stations() local
889 lockdep_assert_wiphy(local->hw.wiphy); in __ieee80211_iterate_stations()
894 sta = list_prepare_entry(sta, &local->sta_list, list); in __ieee80211_iterate_stations()
895 list_for_each_entry_continue(sta, &local->sta_list, list) { in __ieee80211_iterate_stations()
935 static bool ieee80211_can_queue_work(struct ieee80211_local *local) in ieee80211_can_queue_work() argument
937 if (local->quiescing || (local->suspended && !local->resuming)) { in ieee80211_can_queue_work()
947 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_queue_work() local
949 if (!ieee80211_can_queue_work(local)) in ieee80211_queue_work()
952 queue_work(local->workqueue, work); in ieee80211_queue_work()
960 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_queue_delayed_work() local
962 if (!ieee80211_can_queue_work(local)) in ieee80211_queue_delayed_work()
965 queue_delayed_work(local->workqueue, dwork, delay); in ieee80211_queue_delayed_work()
1014 struct ieee80211_local *local = sdata->local; in ieee80211_set_wmm_default() local
1022 if (!local->ops->conf_tx) in ieee80211_set_wmm_default()
1025 if (local->hw.queues < IEEE80211_NUM_ACS) in ieee80211_set_wmm_default()
1109 drv_conf_tx(local, link, ac, &qparam); in ieee80211_set_wmm_default()
1128 struct ieee80211_local *local = sdata->local; in ieee80211_send_auth() local
1153 skb = dev_alloc_skb(local->hw.extra_tx_headroom + IEEE80211_WEP_IV_LEN + in ieee80211_send_auth()
1159 skb_reserve(skb, local->hw.extra_tx_headroom + IEEE80211_WEP_IV_LEN); in ieee80211_send_auth()
1180 err = ieee80211_wep_encrypt(local, skb, key, key_len, key_idx); in ieee80211_send_auth()
1197 struct ieee80211_local *local = sdata->local; in ieee80211_send_deauth_disassoc() local
1212 skb = dev_alloc_skb(local->hw.extra_tx_headroom + in ieee80211_send_deauth_disassoc()
1217 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_send_deauth_disassoc()
1255 struct ieee80211_local *local = sdata->local; in ieee80211_put_preq_ies_band() local
1263 sband = local->hw.wiphy->bands[band]; in ieee80211_put_preq_ies_band()
1405 if (cfg80211_any_usable_channels(local->hw.wiphy, BIT(sband->band), in ieee80211_put_preq_ies_band()
1412 if (cfg80211_any_usable_channels(local->hw.wiphy, BIT(sband->band), in ieee80211_put_preq_ies_band()
1424 if (cfg80211_any_usable_channels(local->hw.wiphy, BIT(sband->band), in ieee80211_put_preq_ies_band()
1536 struct ieee80211_local *local = sdata->local; in ieee80211_build_probe_req() local
1554 skb = ieee80211_probereq_get(&local->hw, src, ssid, ssid_len, in ieee80211_build_probe_req()
1555 local->scan_ies_len + ie_len); in ieee80211_build_probe_req()
1584 sband = sdata->local->hw.wiphy->bands[band]; in ieee80211_sta_get_rates()
1619 void ieee80211_stop_device(struct ieee80211_local *local, bool suspend) in ieee80211_stop_device() argument
1622 ieee80211_handle_queued_frames(local); in ieee80211_stop_device()
1625 ieee80211_led_radio(local, false); in ieee80211_stop_device()
1626 ieee80211_mod_tpt_led_trig(local, 0, IEEE80211_TPT_LEDTRIG_FL_RADIO); in ieee80211_stop_device()
1628 wiphy_work_cancel(local->hw.wiphy, &local->reconfig_filter); in ieee80211_stop_device()
1630 flush_workqueue(local->workqueue); in ieee80211_stop_device()
1631 wiphy_work_flush(local->hw.wiphy, NULL); in ieee80211_stop_device()
1632 drv_stop(local, suspend); in ieee80211_stop_device()
1635 static void ieee80211_flush_completed_scan(struct ieee80211_local *local, in ieee80211_flush_completed_scan() argument
1645 if (test_bit(SCAN_COMPLETED, &local->scanning)) { in ieee80211_flush_completed_scan()
1652 set_bit(SCAN_ABORTED, &local->scanning); in ieee80211_flush_completed_scan()
1653 wiphy_delayed_work_queue(local->hw.wiphy, &local->scan_work, 0); in ieee80211_flush_completed_scan()
1654 wiphy_delayed_work_flush(local->hw.wiphy, &local->scan_work); in ieee80211_flush_completed_scan()
1658 static void ieee80211_handle_reconfig_failure(struct ieee80211_local *local) in ieee80211_handle_reconfig_failure() argument
1663 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_handle_reconfig_failure()
1675 local->resuming = false; in ieee80211_handle_reconfig_failure()
1676 local->suspended = false; in ieee80211_handle_reconfig_failure()
1677 local->in_reconfig = false; in ieee80211_handle_reconfig_failure()
1678 local->reconfig_failure = true; in ieee80211_handle_reconfig_failure()
1680 ieee80211_flush_completed_scan(local, true); in ieee80211_handle_reconfig_failure()
1685 ieee80211_sched_scan_end(local); in ieee80211_handle_reconfig_failure()
1687 list_for_each_entry(sdata, &local->interfaces, list) in ieee80211_handle_reconfig_failure()
1693 list_for_each_entry(ctx, &local->chanctx_list, list) in ieee80211_handle_reconfig_failure()
1697 static void ieee80211_assign_chanctx(struct ieee80211_local *local, in ieee80211_assign_chanctx() argument
1704 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_assign_chanctx()
1707 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_assign_chanctx()
1710 drv_assign_vif_chanctx(local, sdata, link->conf, ctx); in ieee80211_assign_chanctx()
1716 struct ieee80211_local *local = sdata->local; in ieee80211_reconfig_stations() local
1719 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_reconfig_stations()
1722 list_for_each_entry(sta, &local->sta_list, list) { in ieee80211_reconfig_stations()
1730 WARN_ON(drv_sta_state(local, sta->sdata, sta, state, in ieee80211_reconfig_stations()
1740 res = drv_start_nan(sdata->local, sdata, in ieee80211_reconfig_nan()
1745 funcs = kzalloc_objs(*funcs, sdata->local->hw.max_nan_de_entries + 1); in ieee80211_reconfig_nan()
1761 res = drv_add_nan_func(sdata->local, sdata, funcs[i]); in ieee80211_reconfig_nan()
1774 static void ieee80211_reconfig_ap_links(struct ieee80211_local *local, in ieee80211_reconfig_ap_links() argument
1791 drv_start_ap(local, sdata, link->conf); in ieee80211_reconfig_ap_links()
1803 int ieee80211_reconfig(struct ieee80211_local *local) in ieee80211_reconfig() argument
1805 struct ieee80211_hw *hw = &local->hw; in ieee80211_reconfig()
1814 bool suspended = local->suspended; in ieee80211_reconfig()
1817 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_reconfig()
1820 if (!local->open_count) in ieee80211_reconfig()
1825 local->resuming = true; in ieee80211_reconfig()
1827 if (local->wowlan) { in ieee80211_reconfig()
1834 local->suspended = false; in ieee80211_reconfig()
1835 res = drv_resume(local); in ieee80211_reconfig()
1836 local->wowlan = false; in ieee80211_reconfig()
1838 local->resuming = false; in ieee80211_reconfig()
1850 local->suspended = true; in ieee80211_reconfig()
1861 if (suspended && local->in_reconfig && !reconfig_due_to_wowlan) in ieee80211_reconfig()
1862 cancel_work_sync(&local->restart_work); in ieee80211_reconfig()
1864 local->started = false; in ieee80211_reconfig()
1872 res = drv_start(local); in ieee80211_reconfig()
1881 ieee80211_handle_reconfig_failure(local); in ieee80211_reconfig()
1886 drv_set_frag_threshold(local, -1, hw->wiphy->frag_threshold); in ieee80211_reconfig()
1894 drv_set_rts_threshold(local, i, rts_threshold); in ieee80211_reconfig()
1897 drv_set_rts_threshold(local, -1, hw->wiphy->rts_threshold); in ieee80211_reconfig()
1901 drv_set_coverage_class(local, -1, hw->wiphy->coverage_class); in ieee80211_reconfig()
1903 ieee80211_led_radio(local, true); in ieee80211_reconfig()
1904 ieee80211_mod_tpt_led_trig(local, in ieee80211_reconfig()
1908 sdata = wiphy_dereference(local->hw.wiphy, local->monitor_sdata); in ieee80211_reconfig()
1909 if (sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF)) { in ieee80211_reconfig()
1911 WARN_ON(local->resuming); in ieee80211_reconfig()
1912 res = drv_add_interface(local, sdata); in ieee80211_reconfig()
1914 RCU_INIT_POINTER(local->monitor_sdata, NULL); in ieee80211_reconfig()
1920 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
1922 !ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR)) in ieee80211_reconfig()
1926 res = drv_add_interface(local, sdata); in ieee80211_reconfig()
1936 list_for_each_entry_continue_reverse(sdata, &local->interfaces, in ieee80211_reconfig()
1939 !ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR)) in ieee80211_reconfig()
1943 drv_remove_interface(local, sdata); in ieee80211_reconfig()
1945 ieee80211_handle_reconfig_failure(local); in ieee80211_reconfig()
1950 list_for_each_entry(ctx, &local->chanctx_list, list) in ieee80211_reconfig()
1952 WARN_ON(drv_add_chanctx(local, ctx)); in ieee80211_reconfig()
1954 sdata = wiphy_dereference(local->hw.wiphy, local->monitor_sdata); in ieee80211_reconfig()
1956 ieee80211_assign_chanctx(local, sdata, &sdata->deflink); in ieee80211_reconfig()
1959 ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_LISTEN_INTERVAL | in ieee80211_reconfig()
1965 ieee80211_configure_filter(local); in ieee80211_reconfig()
1968 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2000 drv_change_vif_links(local, sdata, 0, in ieee80211_reconfig()
2017 ieee80211_assign_chanctx(local, sdata, link); in ieee80211_reconfig()
2026 WARN_ON(drv_join_ibss(local, sdata)); in ieee80211_reconfig()
2033 drv_conf_tx(local, &sdata->deflink, i, in ieee80211_reconfig()
2088 wiphy_ext_feature_isset(sdata->local->hw.wiphy, in ieee80211_reconfig()
2096 ieee80211_reconfig_ap_links(local, in ieee80211_reconfig()
2103 drv_start_ap(local, sdata, in ieee80211_reconfig()
2117 ieee80211_handle_reconfig_failure(local); in ieee80211_reconfig()
2136 ieee80211_recalc_ps(local); in ieee80211_reconfig()
2144 if (!(local->hw.conf.flags & IEEE80211_CONF_PS)) { in ieee80211_reconfig()
2145 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2151 ieee80211_send_nullfunc(local, sdata, false); in ieee80211_reconfig()
2156 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2171 list_for_each_entry(sdata, &local->interfaces, list) in ieee80211_reconfig()
2175 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2184 wiphy_work_queue(sdata->local->hw.wiphy, in ieee80211_reconfig()
2189 sched_scan_sdata = rcu_dereference_protected(local->sched_scan_sdata, in ieee80211_reconfig()
2190 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_reconfig()
2191 sched_scan_req = rcu_dereference_protected(local->sched_scan_req, in ieee80211_reconfig()
2192 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_reconfig()
2204 RCU_INIT_POINTER(local->sched_scan_sdata, NULL); in ieee80211_reconfig()
2205 RCU_INIT_POINTER(local->sched_scan_req, NULL); in ieee80211_reconfig()
2210 cfg80211_sched_scan_stopped_locked(local->hw.wiphy, 0); in ieee80211_reconfig()
2224 list_for_each_entry(sta, &local->sta_list, list) { in ieee80211_reconfig()
2225 if (!local->resuming) in ieee80211_reconfig()
2236 if (local->open_count && (!suspended || reconfig_due_to_wowlan)) in ieee80211_reconfig()
2237 drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_RESTART); in ieee80211_reconfig()
2239 if (local->in_reconfig) { in ieee80211_reconfig()
2240 in_reconfig = local->in_reconfig; in ieee80211_reconfig()
2241 local->in_reconfig = false; in ieee80211_reconfig()
2244 ieee80211_reconfig_roc(local); in ieee80211_reconfig()
2247 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2249 wiphy_work_queue(local->hw.wiphy, &sdata->work); in ieee80211_reconfig()
2258 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2267 if (local->virt_monitors > 0 && in ieee80211_reconfig()
2268 local->virt_monitors == local->open_count) in ieee80211_reconfig()
2269 ieee80211_add_virtual_monitor(local, NULL); in ieee80211_reconfig()
2276 local->suspended = false; in ieee80211_reconfig()
2278 local->resuming = false; in ieee80211_reconfig()
2280 ieee80211_flush_completed_scan(local, false); in ieee80211_reconfig()
2282 if (local->open_count && !reconfig_due_to_wowlan) in ieee80211_reconfig()
2283 drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_SUSPEND); in ieee80211_reconfig()
2285 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2292 mod_timer(&local->sta_cleanup, jiffies + 1); in ieee80211_reconfig()
2303 struct ieee80211_local *local; in ieee80211_reconfig_disconnect() local
2310 local = sdata->local; in ieee80211_reconfig_disconnect()
2312 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_reconfig_disconnect()
2315 !local->resuming)) in ieee80211_reconfig_disconnect()
2319 !local->in_reconfig)) in ieee80211_reconfig_disconnect()
2346 struct ieee80211_local *local = sdata->local; in ieee80211_recalc_smps() local
2350 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_smps()
2353 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_recalc_smps()
2365 ieee80211_recalc_smps_chanctx(local, chanctx); in ieee80211_recalc_smps()
2371 struct ieee80211_local *local = sdata->local; in ieee80211_recalc_min_chandef() local
2376 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_min_chandef()
2392 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_recalc_min_chandef()
2408 ieee80211_recalc_chanctx_min_def(local, chanctx); in ieee80211_recalc_min_chandef()
2643 if (!cfg80211_any_usable_channels(sdata->local->hw.wiphy, in ieee80211_put_he_6ghz_cap()
2648 sband = sdata->local->hw.wiphy->bands[NL80211_BAND_6GHZ]; in ieee80211_put_he_6ghz_cap()
3178 bool ieee80211_chandef_he_6ghz_oper(struct ieee80211_local *local, in ieee80211_chandef_he_6ghz_oper() argument
3204 he_chandef.chan = ieee80211_get_channel(local->hw.wiphy, freq); in ieee80211_chandef_he_6ghz_oper()
3260 bool ieee80211_chandef_s1g_oper(struct ieee80211_local *local, in ieee80211_chandef_s1g_oper() argument
3316 ieee80211_get_channel_khz(local->hw.wiphy, pri_1mhz_khz); in ieee80211_chandef_s1g_oper()
3387 link_data = wiphy_dereference(sdata->local->hw.wiphy, in ieee80211_ave_rssi()
3426 u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, in ieee80211_calculate_rx_timestamp() argument
3545 sband = local->hw.wiphy->bands[status->band]; in ieee80211_calculate_rx_timestamp()
3581 void ieee80211_dfs_cac_cancel(struct ieee80211_local *local, in ieee80211_dfs_cac_cancel() argument
3590 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_dfs_cac_cancel()
3592 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_dfs_cac_cancel()
3605 wiphy_hrtimer_work_cancel(local->hw.wiphy, in ieee80211_dfs_cac_cancel()
3623 struct ieee80211_local *local = in ieee80211_dfs_radar_detected_work() local
3628 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_dfs_radar_detected_work()
3630 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_dfs_radar_detected_work()
3641 ieee80211_dfs_cac_cancel(local, ctx); in ieee80211_dfs_radar_detected_work()
3642 cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL); in ieee80211_dfs_radar_detected_work()
3667 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_radar_detected() local
3669 trace_api_radar_detected(local); in ieee80211_radar_detected()
3674 wiphy_work_queue(hw->wiphy, &local->radar_detected_work); in ieee80211_radar_detected()
3771 struct ieee80211_local *local = sdata->local; in ieee80211_send_action_csa() local
3781 skb = dev_alloc_skb(local->tx_headroom + hdr_len + in ieee80211_send_action_csa()
3789 skb_reserve(skb, local->tx_headroom); in ieee80211_send_action_csa()
4066 static u8 ieee80211_chanctx_radar_detect(struct ieee80211_local *local, in ieee80211_chanctx_radar_detect() argument
4072 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_radar_detect()
4077 for_each_sdata_link(local, link) { in ieee80211_chanctx_radar_detect()
4159 ieee80211_fill_ifcomb_params(struct ieee80211_local *local, in ieee80211_fill_ifcomb_params() argument
4168 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_fill_ifcomb_params()
4177 ieee80211_chanctx_radar_detect(local, ctx); in ieee80211_fill_ifcomb_params()
4186 list_for_each_entry(sdata_iter, &local->interfaces, list) { in ieee80211_fill_ifcomb_params()
4193 cfg80211_iftype_allowed(local->hw.wiphy, in ieee80211_fill_ifcomb_params()
4213 struct ieee80211_local *local = sdata->local; in ieee80211_check_combinations() local
4221 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_check_combinations()
4244 if (cfg80211_iftype_allowed(local->hw.wiphy, iftype, 0, 1)) { in ieee80211_check_combinations()
4256 total = ieee80211_fill_ifcomb_params(local, &params, in ieee80211_check_combinations()
4262 return cfg80211_check_combinations(local->hw.wiphy, &params); in ieee80211_check_combinations()
4275 int ieee80211_max_num_channels(struct ieee80211_local *local, int radio_idx) in ieee80211_max_num_channels() argument
4283 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_max_num_channels()
4285 ieee80211_fill_ifcomb_params(local, &params, NULL, NULL); in ieee80211_max_num_channels()
4287 err = cfg80211_iter_combinations(local->hw.wiphy, &params, in ieee80211_max_num_channels()