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()
205 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_rts_duration() local
213 sband = local->hw.wiphy->bands[frame_txctl->band]; in ieee80211_rts_duration()
248 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_ctstoself_duration() local
256 sband = local->hw.wiphy->bands[frame_txctl->band]; in ieee80211_ctstoself_duration()
284 static void wake_tx_push_queue(struct ieee80211_local *local, in wake_tx_push_queue() argument
294 skb = ieee80211_tx_dequeue(&local->hw, queue); in wake_tx_push_queue()
298 drv_tx(local, &control, skb); in wake_tx_push_queue()
306 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_handle_wake_tx_queue() local
310 spin_lock(&local->handle_wake_tx_queue_lock); in ieee80211_handle_wake_tx_queue()
315 wake_tx_push_queue(local, sdata, queue); in ieee80211_handle_wake_tx_queue()
319 spin_unlock(&local->handle_wake_tx_queue_lock); in ieee80211_handle_wake_tx_queue()
325 struct ieee80211_local *local = sdata->local; in __ieee80211_wake_txqs() local
327 struct fq *fq = &local->fq; in __ieee80211_wake_txqs()
342 list_for_each_entry_rcu(sta, &local->sta_list, list) { in __ieee80211_wake_txqs()
362 drv_wake_tx_queue(local, txqi); in __ieee80211_wake_txqs()
378 drv_wake_tx_queue(local, txqi); in __ieee80211_wake_txqs()
387 __releases(&local->queue_stop_reason_lock)
388 __acquires(&local->queue_stop_reason_lock)
389 _ieee80211_wake_txqs(struct ieee80211_local *local, unsigned long *flags) in _ieee80211_wake_txqs() argument
397 if (local->hw.queues < IEEE80211_NUM_ACS) in _ieee80211_wake_txqs()
400 for (i = 0; i < local->hw.queues; i++) { in _ieee80211_wake_txqs()
401 if (local->queue_stop_reasons[i]) in _ieee80211_wake_txqs()
404 spin_unlock_irqrestore(&local->queue_stop_reason_lock, *flags); in _ieee80211_wake_txqs()
405 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in _ieee80211_wake_txqs()
416 spin_lock_irqsave(&local->queue_stop_reason_lock, *flags); in _ieee80211_wake_txqs()
424 struct ieee80211_local *local = from_tasklet(local, t, in ieee80211_wake_txqs() local
428 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_wake_txqs()
429 _ieee80211_wake_txqs(local, &flags); in ieee80211_wake_txqs()
430 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_wake_txqs()
438 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_wake_queue() local
443 if (!test_bit(reason, &local->queue_stop_reasons[queue])) in __ieee80211_wake_queue()
447 local->q_stop_reasons[queue][reason] = 0; in __ieee80211_wake_queue()
449 local->q_stop_reasons[queue][reason]--; in __ieee80211_wake_queue()
450 if (WARN_ON(local->q_stop_reasons[queue][reason] < 0)) in __ieee80211_wake_queue()
451 local->q_stop_reasons[queue][reason] = 0; in __ieee80211_wake_queue()
454 if (local->q_stop_reasons[queue][reason] == 0) in __ieee80211_wake_queue()
455 __clear_bit(reason, &local->queue_stop_reasons[queue]); in __ieee80211_wake_queue()
457 trace_wake_queue(local, queue, reason, in __ieee80211_wake_queue()
458 local->q_stop_reasons[queue][reason]); in __ieee80211_wake_queue()
460 if (local->queue_stop_reasons[queue] != 0) in __ieee80211_wake_queue()
464 if (!skb_queue_empty(&local->pending[queue])) in __ieee80211_wake_queue()
465 tasklet_schedule(&local->tx_pending_tasklet); in __ieee80211_wake_queue()
475 tasklet_schedule(&local->wake_txqs_tasklet); in __ieee80211_wake_queue()
477 _ieee80211_wake_txqs(local, flags); in __ieee80211_wake_queue()
484 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_wake_queue_by_reason() local
487 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queue_by_reason()
489 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queue_by_reason()
504 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_stop_queue() local
510 local->q_stop_reasons[queue][reason] = 1; in __ieee80211_stop_queue()
512 local->q_stop_reasons[queue][reason]++; in __ieee80211_stop_queue()
514 trace_stop_queue(local, queue, reason, in __ieee80211_stop_queue()
515 local->q_stop_reasons[queue][reason]); in __ieee80211_stop_queue()
517 set_bit(reason, &local->queue_stop_reasons[queue]); in __ieee80211_stop_queue()
524 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_stop_queue_by_reason() local
527 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queue_by_reason()
529 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queue_by_reason()
540 void ieee80211_add_pending_skb(struct ieee80211_local *local, in ieee80211_add_pending_skb() argument
543 struct ieee80211_hw *hw = &local->hw; in ieee80211_add_pending_skb()
549 ieee80211_free_txskb(&local->hw, skb); in ieee80211_add_pending_skb()
553 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skb()
556 __skb_queue_tail(&local->pending[queue], skb); in ieee80211_add_pending_skb()
559 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skb()
562 void ieee80211_add_pending_skbs(struct ieee80211_local *local, in ieee80211_add_pending_skbs() argument
565 struct ieee80211_hw *hw = &local->hw; in ieee80211_add_pending_skbs()
570 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skbs()
575 ieee80211_free_txskb(&local->hw, skb); in ieee80211_add_pending_skbs()
585 __skb_queue_tail(&local->pending[queue], skb); in ieee80211_add_pending_skbs()
592 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skbs()
600 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_stop_queues_by_reason() local
604 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queues_by_reason()
609 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queues_by_reason()
622 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_queue_stopped() local
629 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_queue_stopped()
631 &local->queue_stop_reasons[queue]); in ieee80211_queue_stopped()
632 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_queue_stopped()
642 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_wake_queues_by_reason() local
646 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queues_by_reason()
651 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queues_by_reason()
663 ieee80211_get_vif_queues(struct ieee80211_local *local, in ieee80211_get_vif_queues() argument
668 if (sdata && ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) { in ieee80211_get_vif_queues()
680 queues = BIT(local->hw.queues) - 1; in ieee80211_get_vif_queues()
686 void __ieee80211_flush_queues(struct ieee80211_local *local, in __ieee80211_flush_queues() argument
690 if (!local->ops->flush && !drop) in __ieee80211_flush_queues()
697 if (!queues || !ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) in __ieee80211_flush_queues()
698 queues = ieee80211_get_vif_queues(local, sdata); in __ieee80211_flush_queues()
700 ieee80211_stop_queues_by_reason(&local->hw, queues, in __ieee80211_flush_queues()
710 list_for_each_entry(sta, &local->sta_list, list) { in __ieee80211_flush_queues()
717 if (local->ops->flush) in __ieee80211_flush_queues()
718 drv_flush(local, sdata, queues, drop); in __ieee80211_flush_queues()
720 ieee80211_wake_queues_by_reason(&local->hw, queues, in __ieee80211_flush_queues()
725 void ieee80211_flush_queues(struct ieee80211_local *local, in ieee80211_flush_queues() argument
728 __ieee80211_flush_queues(local, sdata, 0, drop); in ieee80211_flush_queues()
731 static void __iterate_interfaces(struct ieee80211_local *local, in __iterate_interfaces() argument
740 list_for_each_entry_rcu(sdata, &local->interfaces, list, in __iterate_interfaces()
741 lockdep_is_held(&local->iflist_mtx) || in __iterate_interfaces()
742 lockdep_is_held(&local->hw.wiphy->mtx)) { in __iterate_interfaces()
746 !ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR)) in __iterate_interfaces()
765 sdata = rcu_dereference_check(local->monitor_sdata, in __iterate_interfaces()
766 lockdep_is_held(&local->iflist_mtx) || in __iterate_interfaces()
767 lockdep_is_held(&local->hw.wiphy->mtx)); in __iterate_interfaces()
768 if (sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF) && in __iterate_interfaces()
780 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_interfaces() local
782 mutex_lock(&local->iflist_mtx); in ieee80211_iterate_interfaces()
783 __iterate_interfaces(local, iter_flags, iterator, data); in ieee80211_iterate_interfaces()
784 mutex_unlock(&local->iflist_mtx); in ieee80211_iterate_interfaces()
794 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_active_interfaces_atomic() local
797 __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_active_interfaces_mtx() local
813 __iterate_interfaces(local, iter_flags | IEEE80211_IFACE_ITER_ACTIVE, in ieee80211_iterate_active_interfaces_mtx()
818 static void __iterate_stations(struct ieee80211_local *local, in __iterate_stations() argument
825 list_for_each_entry_rcu(sta, &local->sta_list, list, in __iterate_stations()
826 lockdep_is_held(&local->hw.wiphy->mtx)) { in __iterate_stations()
839 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_stations_atomic() local
842 __iterate_stations(local, iterator, data); in ieee80211_iterate_stations_atomic()
852 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_stations_mtx() local
854 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_iterate_stations_mtx()
856 __iterate_stations(local, iterator, data); in ieee80211_iterate_stations_mtx()
889 static bool ieee80211_can_queue_work(struct ieee80211_local *local) in ieee80211_can_queue_work() argument
891 if (local->quiescing || (local->suspended && !local->resuming)) { in ieee80211_can_queue_work()
901 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_queue_work() local
903 if (!ieee80211_can_queue_work(local)) in ieee80211_queue_work()
906 queue_work(local->workqueue, work); in ieee80211_queue_work()
914 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_queue_delayed_work() local
916 if (!ieee80211_can_queue_work(local)) in ieee80211_queue_delayed_work()
919 queue_delayed_work(local->workqueue, dwork, delay); in ieee80211_queue_delayed_work()
968 struct ieee80211_local *local = sdata->local; in ieee80211_set_wmm_default() local
976 if (!local->ops->conf_tx) in ieee80211_set_wmm_default()
979 if (local->hw.queues < IEEE80211_NUM_ACS) in ieee80211_set_wmm_default()
1063 drv_conf_tx(local, link, ac, &qparam); in ieee80211_set_wmm_default()
1082 struct ieee80211_local *local = sdata->local; in ieee80211_send_auth() local
1104 skb = dev_alloc_skb(local->hw.extra_tx_headroom + IEEE80211_WEP_IV_LEN + in ieee80211_send_auth()
1110 skb_reserve(skb, local->hw.extra_tx_headroom + IEEE80211_WEP_IV_LEN); in ieee80211_send_auth()
1128 err = ieee80211_wep_encrypt(local, skb, key, key_len, key_idx); in ieee80211_send_auth()
1145 struct ieee80211_local *local = sdata->local; in ieee80211_send_deauth_disassoc() local
1160 skb = dev_alloc_skb(local->hw.extra_tx_headroom + in ieee80211_send_deauth_disassoc()
1165 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_send_deauth_disassoc()
1203 struct ieee80211_local *local = sdata->local; in ieee80211_put_preq_ies_band() local
1211 sband = local->hw.wiphy->bands[band]; in ieee80211_put_preq_ies_band()
1353 if (cfg80211_any_usable_channels(local->hw.wiphy, BIT(sband->band), in ieee80211_put_preq_ies_band()
1360 if (cfg80211_any_usable_channels(local->hw.wiphy, BIT(sband->band), in ieee80211_put_preq_ies_band()
1477 struct ieee80211_local *local = sdata->local; in ieee80211_build_probe_req() local
1495 skb = ieee80211_probereq_get(&local->hw, src, ssid, ssid_len, in ieee80211_build_probe_req()
1496 local->scan_ies_len + ie_len); in ieee80211_build_probe_req()
1525 sband = sdata->local->hw.wiphy->bands[band]; in ieee80211_sta_get_rates()
1560 void ieee80211_stop_device(struct ieee80211_local *local, bool suspend) in ieee80211_stop_device() argument
1563 ieee80211_handle_queued_frames(local); in ieee80211_stop_device()
1566 ieee80211_led_radio(local, false); in ieee80211_stop_device()
1567 ieee80211_mod_tpt_led_trig(local, 0, IEEE80211_TPT_LEDTRIG_FL_RADIO); in ieee80211_stop_device()
1569 wiphy_work_cancel(local->hw.wiphy, &local->reconfig_filter); in ieee80211_stop_device()
1571 flush_workqueue(local->workqueue); in ieee80211_stop_device()
1572 wiphy_work_flush(local->hw.wiphy, NULL); in ieee80211_stop_device()
1573 drv_stop(local, suspend); in ieee80211_stop_device()
1576 static void ieee80211_flush_completed_scan(struct ieee80211_local *local, in ieee80211_flush_completed_scan() argument
1586 if (test_bit(SCAN_COMPLETED, &local->scanning)) { in ieee80211_flush_completed_scan()
1593 set_bit(SCAN_ABORTED, &local->scanning); in ieee80211_flush_completed_scan()
1594 wiphy_delayed_work_queue(local->hw.wiphy, &local->scan_work, 0); in ieee80211_flush_completed_scan()
1595 wiphy_delayed_work_flush(local->hw.wiphy, &local->scan_work); in ieee80211_flush_completed_scan()
1599 static void ieee80211_handle_reconfig_failure(struct ieee80211_local *local) in ieee80211_handle_reconfig_failure() argument
1604 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_handle_reconfig_failure()
1616 local->resuming = false; in ieee80211_handle_reconfig_failure()
1617 local->suspended = false; in ieee80211_handle_reconfig_failure()
1618 local->in_reconfig = false; in ieee80211_handle_reconfig_failure()
1619 local->reconfig_failure = true; in ieee80211_handle_reconfig_failure()
1621 ieee80211_flush_completed_scan(local, true); in ieee80211_handle_reconfig_failure()
1626 ieee80211_sched_scan_end(local); in ieee80211_handle_reconfig_failure()
1628 list_for_each_entry(sdata, &local->interfaces, list) in ieee80211_handle_reconfig_failure()
1634 list_for_each_entry(ctx, &local->chanctx_list, list) in ieee80211_handle_reconfig_failure()
1638 static void ieee80211_assign_chanctx(struct ieee80211_local *local, in ieee80211_assign_chanctx() argument
1645 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_assign_chanctx()
1648 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_assign_chanctx()
1651 drv_assign_vif_chanctx(local, sdata, link->conf, ctx); in ieee80211_assign_chanctx()
1657 struct ieee80211_local *local = sdata->local; in ieee80211_reconfig_stations() local
1660 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_reconfig_stations()
1663 list_for_each_entry(sta, &local->sta_list, list) { in ieee80211_reconfig_stations()
1671 WARN_ON(drv_sta_state(local, sta->sdata, sta, state, in ieee80211_reconfig_stations()
1681 res = drv_start_nan(sdata->local, sdata, in ieee80211_reconfig_nan()
1686 funcs = kcalloc(sdata->local->hw.max_nan_de_entries + 1, in ieee80211_reconfig_nan()
1704 res = drv_add_nan_func(sdata->local, sdata, funcs[i]); in ieee80211_reconfig_nan()
1717 static void ieee80211_reconfig_ap_links(struct ieee80211_local *local, in ieee80211_reconfig_ap_links() argument
1734 drv_start_ap(local, sdata, link->conf); in ieee80211_reconfig_ap_links()
1746 int ieee80211_reconfig(struct ieee80211_local *local) in ieee80211_reconfig() argument
1748 struct ieee80211_hw *hw = &local->hw; in ieee80211_reconfig()
1757 bool suspended = local->suspended; in ieee80211_reconfig()
1761 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_reconfig()
1764 if (!local->open_count) in ieee80211_reconfig()
1769 local->resuming = true; in ieee80211_reconfig()
1771 if (local->wowlan) { in ieee80211_reconfig()
1778 local->suspended = false; in ieee80211_reconfig()
1779 res = drv_resume(local); in ieee80211_reconfig()
1780 local->wowlan = false; in ieee80211_reconfig()
1782 local->resuming = false; in ieee80211_reconfig()
1794 local->suspended = true; in ieee80211_reconfig()
1805 if (suspended && local->in_reconfig && !reconfig_due_to_wowlan) in ieee80211_reconfig()
1806 cancel_work_sync(&local->restart_work); in ieee80211_reconfig()
1808 local->started = false; in ieee80211_reconfig()
1816 res = drv_start(local); in ieee80211_reconfig()
1825 ieee80211_handle_reconfig_failure(local); in ieee80211_reconfig()
1830 drv_set_frag_threshold(local, -1, hw->wiphy->frag_threshold); in ieee80211_reconfig()
1836 drv_set_rts_threshold(local, i, rts_threshold); in ieee80211_reconfig()
1839 drv_set_rts_threshold(local, -1, hw->wiphy->rts_threshold); in ieee80211_reconfig()
1843 drv_set_coverage_class(local, -1, hw->wiphy->coverage_class); in ieee80211_reconfig()
1845 ieee80211_led_radio(local, true); in ieee80211_reconfig()
1846 ieee80211_mod_tpt_led_trig(local, in ieee80211_reconfig()
1850 sdata = wiphy_dereference(local->hw.wiphy, local->monitor_sdata); in ieee80211_reconfig()
1851 if (sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF)) { in ieee80211_reconfig()
1853 WARN_ON(local->resuming); in ieee80211_reconfig()
1854 res = drv_add_interface(local, sdata); in ieee80211_reconfig()
1856 RCU_INIT_POINTER(local->monitor_sdata, NULL); in ieee80211_reconfig()
1862 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
1864 !ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR)) in ieee80211_reconfig()
1868 res = drv_add_interface(local, sdata); in ieee80211_reconfig()
1878 list_for_each_entry_continue_reverse(sdata, &local->interfaces, in ieee80211_reconfig()
1881 !ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR)) in ieee80211_reconfig()
1885 drv_remove_interface(local, sdata); in ieee80211_reconfig()
1887 ieee80211_handle_reconfig_failure(local); in ieee80211_reconfig()
1892 list_for_each_entry(ctx, &local->chanctx_list, list) in ieee80211_reconfig()
1894 WARN_ON(drv_add_chanctx(local, ctx)); in ieee80211_reconfig()
1896 sdata = wiphy_dereference(local->hw.wiphy, local->monitor_sdata); in ieee80211_reconfig()
1898 ieee80211_assign_chanctx(local, sdata, &sdata->deflink); in ieee80211_reconfig()
1901 ieee80211_hw_config(local, -1, IEEE80211_CONF_CHANGE_LISTEN_INTERVAL | in ieee80211_reconfig()
1907 ieee80211_configure_filter(local); in ieee80211_reconfig()
1910 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
1942 drv_change_vif_links(local, sdata, 0, in ieee80211_reconfig()
1959 ieee80211_assign_chanctx(local, sdata, link); in ieee80211_reconfig()
1968 WARN_ON(drv_join_ibss(local, sdata)); in ieee80211_reconfig()
1975 drv_conf_tx(local, &sdata->deflink, i, in ieee80211_reconfig()
2030 wiphy_ext_feature_isset(sdata->local->hw.wiphy, in ieee80211_reconfig()
2038 ieee80211_reconfig_ap_links(local, in ieee80211_reconfig()
2045 drv_start_ap(local, sdata, in ieee80211_reconfig()
2059 ieee80211_handle_reconfig_failure(local); in ieee80211_reconfig()
2078 ieee80211_recalc_ps(local); in ieee80211_reconfig()
2086 if (!(local->hw.conf.flags & IEEE80211_CONF_PS)) { in ieee80211_reconfig()
2087 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2093 ieee80211_send_nullfunc(local, sdata, false); in ieee80211_reconfig()
2098 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2113 list_for_each_entry(sdata, &local->interfaces, list) in ieee80211_reconfig()
2117 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2126 wiphy_work_queue(sdata->local->hw.wiphy, in ieee80211_reconfig()
2131 sched_scan_sdata = rcu_dereference_protected(local->sched_scan_sdata, in ieee80211_reconfig()
2132 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_reconfig()
2133 sched_scan_req = rcu_dereference_protected(local->sched_scan_req, in ieee80211_reconfig()
2134 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_reconfig()
2146 RCU_INIT_POINTER(local->sched_scan_sdata, NULL); in ieee80211_reconfig()
2147 RCU_INIT_POINTER(local->sched_scan_req, NULL); in ieee80211_reconfig()
2152 cfg80211_sched_scan_stopped_locked(local->hw.wiphy, 0); in ieee80211_reconfig()
2166 list_for_each_entry(sta, &local->sta_list, list) { in ieee80211_reconfig()
2167 if (!local->resuming) in ieee80211_reconfig()
2178 if (local->open_count && (!suspended || reconfig_due_to_wowlan)) in ieee80211_reconfig()
2179 drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_RESTART); in ieee80211_reconfig()
2181 if (local->in_reconfig) { in ieee80211_reconfig()
2182 in_reconfig = local->in_reconfig; in ieee80211_reconfig()
2183 local->in_reconfig = false; in ieee80211_reconfig()
2186 ieee80211_reconfig_roc(local); in ieee80211_reconfig()
2189 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2191 wiphy_work_queue(local->hw.wiphy, &sdata->work); in ieee80211_reconfig()
2200 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2208 if (local->virt_monitors > 0 && in ieee80211_reconfig()
2209 local->virt_monitors == local->open_count) in ieee80211_reconfig()
2210 ieee80211_add_virtual_monitor(local); in ieee80211_reconfig()
2217 local->suspended = false; in ieee80211_reconfig()
2219 local->resuming = false; in ieee80211_reconfig()
2221 ieee80211_flush_completed_scan(local, false); in ieee80211_reconfig()
2223 if (local->open_count && !reconfig_due_to_wowlan) in ieee80211_reconfig()
2224 drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_SUSPEND); in ieee80211_reconfig()
2226 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2233 mod_timer(&local->sta_cleanup, jiffies + 1); in ieee80211_reconfig()
2244 struct ieee80211_local *local; in ieee80211_reconfig_disconnect() local
2251 local = sdata->local; in ieee80211_reconfig_disconnect()
2253 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_reconfig_disconnect()
2256 !local->resuming)) in ieee80211_reconfig_disconnect()
2260 !local->in_reconfig)) in ieee80211_reconfig_disconnect()
2287 struct ieee80211_local *local = sdata->local; in ieee80211_recalc_smps() local
2291 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_smps()
2294 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_recalc_smps()
2306 ieee80211_recalc_smps_chanctx(local, chanctx); in ieee80211_recalc_smps()
2312 struct ieee80211_local *local = sdata->local; in ieee80211_recalc_min_chandef() local
2317 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_min_chandef()
2333 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_recalc_min_chandef()
2349 ieee80211_recalc_chanctx_min_def(local, chanctx, NULL, false); in ieee80211_recalc_min_chandef()
2584 if (!cfg80211_any_usable_channels(sdata->local->hw.wiphy, in ieee80211_put_he_6ghz_cap()
2589 sband = sdata->local->hw.wiphy->bands[NL80211_BAND_6GHZ]; in ieee80211_put_he_6ghz_cap()
3119 bool ieee80211_chandef_he_6ghz_oper(struct ieee80211_local *local, in ieee80211_chandef_he_6ghz_oper() argument
3145 he_chandef.chan = ieee80211_get_channel(local->hw.wiphy, freq); in ieee80211_chandef_he_6ghz_oper()
3303 link_data = wiphy_dereference(sdata->local->hw.wiphy, in ieee80211_ave_rssi()
3342 u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, in ieee80211_calculate_rx_timestamp() argument
3461 sband = local->hw.wiphy->bands[status->band]; in ieee80211_calculate_rx_timestamp()
3497 void ieee80211_dfs_cac_cancel(struct ieee80211_local *local, in ieee80211_dfs_cac_cancel() argument
3506 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_dfs_cac_cancel()
3508 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_dfs_cac_cancel()
3521 wiphy_delayed_work_cancel(local->hw.wiphy, in ieee80211_dfs_cac_cancel()
3539 struct ieee80211_local *local = in ieee80211_dfs_radar_detected_work() local
3544 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_dfs_radar_detected_work()
3546 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_dfs_radar_detected_work()
3557 ieee80211_dfs_cac_cancel(local, ctx); in ieee80211_dfs_radar_detected_work()
3558 cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL); in ieee80211_dfs_radar_detected_work()
3583 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_radar_detected() local
3585 trace_api_radar_detected(local); in ieee80211_radar_detected()
3590 wiphy_work_queue(hw->wiphy, &local->radar_detected_work); in ieee80211_radar_detected()
3687 struct ieee80211_local *local = sdata->local; in ieee80211_send_action_csa() local
3697 skb = dev_alloc_skb(local->tx_headroom + hdr_len + in ieee80211_send_action_csa()
3705 skb_reserve(skb, local->tx_headroom); in ieee80211_send_action_csa()
3982 static u8 ieee80211_chanctx_radar_detect(struct ieee80211_local *local, in ieee80211_chanctx_radar_detect() argument
3988 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_radar_detect()
4078 ieee80211_fill_ifcomb_params(struct ieee80211_local *local, in ieee80211_fill_ifcomb_params() argument
4087 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_fill_ifcomb_params()
4096 ieee80211_chanctx_radar_detect(local, ctx); in ieee80211_fill_ifcomb_params()
4105 list_for_each_entry(sdata_iter, &local->interfaces, list) { in ieee80211_fill_ifcomb_params()
4112 cfg80211_iftype_allowed(local->hw.wiphy, in ieee80211_fill_ifcomb_params()
4132 struct ieee80211_local *local = sdata->local; in ieee80211_check_combinations() local
4140 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_check_combinations()
4163 if (cfg80211_iftype_allowed(local->hw.wiphy, iftype, 0, 1)) { in ieee80211_check_combinations()
4175 total = ieee80211_fill_ifcomb_params(local, &params, in ieee80211_check_combinations()
4181 return cfg80211_check_combinations(local->hw.wiphy, &params); in ieee80211_check_combinations()
4194 int ieee80211_max_num_channels(struct ieee80211_local *local, int radio_idx) in ieee80211_max_num_channels() argument
4202 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_max_num_channels()
4204 ieee80211_fill_ifcomb_params(local, &params, NULL, NULL); in ieee80211_max_num_channels()
4206 err = cfg80211_iter_combinations(local->hw.wiphy, &params, in ieee80211_max_num_channels()