Lines Matching refs:local

41 	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()
159 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_rts_duration() local
167 sband = local->hw.wiphy->bands[frame_txctl->band]; in ieee80211_rts_duration()
203 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_ctstoself_duration() local
211 sband = local->hw.wiphy->bands[frame_txctl->band]; in ieee80211_ctstoself_duration()
242 struct ieee80211_local *local = sdata->local; in __ieee80211_wake_txqs() local
244 struct fq *fq = &local->fq; in __ieee80211_wake_txqs()
258 list_for_each_entry_rcu(sta, &local->sta_list, list) { in __ieee80211_wake_txqs()
278 drv_wake_tx_queue(local, txqi); in __ieee80211_wake_txqs()
294 drv_wake_tx_queue(local, txqi); in __ieee80211_wake_txqs()
303 __releases(&local->queue_stop_reason_lock)
304 __acquires(&local->queue_stop_reason_lock)
305 _ieee80211_wake_txqs(struct ieee80211_local *local, unsigned long *flags) in _ieee80211_wake_txqs() argument
313 if (local->hw.queues < IEEE80211_NUM_ACS) in _ieee80211_wake_txqs()
316 for (i = 0; i < local->hw.queues; i++) { in _ieee80211_wake_txqs()
317 if (local->queue_stop_reasons[i]) in _ieee80211_wake_txqs()
320 spin_unlock_irqrestore(&local->queue_stop_reason_lock, *flags); in _ieee80211_wake_txqs()
321 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in _ieee80211_wake_txqs()
332 spin_lock_irqsave(&local->queue_stop_reason_lock, *flags); in _ieee80211_wake_txqs()
340 struct ieee80211_local *local = (struct ieee80211_local *)data; in ieee80211_wake_txqs() local
343 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_wake_txqs()
344 _ieee80211_wake_txqs(local, &flags); in ieee80211_wake_txqs()
345 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_wake_txqs()
348 void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue) in ieee80211_propagate_queue_wake() argument
353 if (local->ops->wake_tx_queue) in ieee80211_propagate_queue_wake()
356 if (local->hw.queues < IEEE80211_NUM_ACS) in ieee80211_propagate_queue_wake()
359 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_propagate_queue_wake()
366 local->queue_stop_reasons[sdata->vif.cab_queue] != 0) in ieee80211_propagate_queue_wake()
374 local->queue_stop_reasons[ac_queue] == 0 && in ieee80211_propagate_queue_wake()
375 skb_queue_empty(&local->pending[ac_queue]))) in ieee80211_propagate_queue_wake()
386 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_wake_queue() local
388 trace_wake_queue(local, queue, reason); in __ieee80211_wake_queue()
393 if (!test_bit(reason, &local->queue_stop_reasons[queue])) in __ieee80211_wake_queue()
397 local->q_stop_reasons[queue][reason] = 0; in __ieee80211_wake_queue()
399 local->q_stop_reasons[queue][reason]--; in __ieee80211_wake_queue()
400 if (WARN_ON(local->q_stop_reasons[queue][reason] < 0)) in __ieee80211_wake_queue()
401 local->q_stop_reasons[queue][reason] = 0; in __ieee80211_wake_queue()
404 if (local->q_stop_reasons[queue][reason] == 0) in __ieee80211_wake_queue()
405 __clear_bit(reason, &local->queue_stop_reasons[queue]); in __ieee80211_wake_queue()
407 if (local->queue_stop_reasons[queue] != 0) in __ieee80211_wake_queue()
411 if (skb_queue_empty(&local->pending[queue])) { in __ieee80211_wake_queue()
413 ieee80211_propagate_queue_wake(local, queue); in __ieee80211_wake_queue()
416 tasklet_schedule(&local->tx_pending_tasklet); in __ieee80211_wake_queue()
425 if (local->ops->wake_tx_queue) { in __ieee80211_wake_queue()
427 tasklet_schedule(&local->wake_txqs_tasklet); in __ieee80211_wake_queue()
429 _ieee80211_wake_txqs(local, flags); in __ieee80211_wake_queue()
437 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_wake_queue_by_reason() local
440 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queue_by_reason()
442 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queue_by_reason()
457 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_stop_queue() local
461 trace_stop_queue(local, queue, reason); in __ieee80211_stop_queue()
467 local->q_stop_reasons[queue][reason] = 1; in __ieee80211_stop_queue()
469 local->q_stop_reasons[queue][reason]++; in __ieee80211_stop_queue()
471 if (__test_and_set_bit(reason, &local->queue_stop_reasons[queue])) in __ieee80211_stop_queue()
474 if (local->hw.queues < IEEE80211_NUM_ACS) in __ieee80211_stop_queue()
478 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in __ieee80211_stop_queue()
487 if (!local->ops->wake_tx_queue) { in __ieee80211_stop_queue()
491 spin_lock(&local->fq.lock); in __ieee80211_stop_queue()
493 spin_unlock(&local->fq.lock); in __ieee80211_stop_queue()
504 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_stop_queue_by_reason() local
507 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queue_by_reason()
509 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queue_by_reason()
520 void ieee80211_add_pending_skb(struct ieee80211_local *local, in ieee80211_add_pending_skb() argument
523 struct ieee80211_hw *hw = &local->hw; in ieee80211_add_pending_skb()
529 ieee80211_free_txskb(&local->hw, skb); in ieee80211_add_pending_skb()
533 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skb()
536 __skb_queue_tail(&local->pending[queue], skb); in ieee80211_add_pending_skb()
539 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skb()
542 void ieee80211_add_pending_skbs(struct ieee80211_local *local, in ieee80211_add_pending_skbs() argument
545 struct ieee80211_hw *hw = &local->hw; in ieee80211_add_pending_skbs()
550 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skbs()
555 ieee80211_free_txskb(&local->hw, skb); in ieee80211_add_pending_skbs()
565 __skb_queue_tail(&local->pending[queue], skb); in ieee80211_add_pending_skbs()
572 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_add_pending_skbs()
580 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_stop_queues_by_reason() local
584 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queues_by_reason()
589 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_stop_queues_by_reason()
602 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_queue_stopped() local
609 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_queue_stopped()
611 &local->queue_stop_reasons[queue]); in ieee80211_queue_stopped()
612 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_queue_stopped()
622 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_wake_queues_by_reason() local
626 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queues_by_reason()
631 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_wake_queues_by_reason()
643 ieee80211_get_vif_queues(struct ieee80211_local *local, in ieee80211_get_vif_queues() argument
648 if (sdata && ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) { in ieee80211_get_vif_queues()
659 queues = BIT(local->hw.queues) - 1; in ieee80211_get_vif_queues()
665 void __ieee80211_flush_queues(struct ieee80211_local *local, in __ieee80211_flush_queues() argument
669 if (!local->ops->flush) in __ieee80211_flush_queues()
676 if (!queues || !ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) in __ieee80211_flush_queues()
677 queues = ieee80211_get_vif_queues(local, sdata); in __ieee80211_flush_queues()
679 ieee80211_stop_queues_by_reason(&local->hw, queues, in __ieee80211_flush_queues()
683 drv_flush(local, sdata, queues, drop); in __ieee80211_flush_queues()
685 ieee80211_wake_queues_by_reason(&local->hw, queues, in __ieee80211_flush_queues()
690 void ieee80211_flush_queues(struct ieee80211_local *local, in ieee80211_flush_queues() argument
693 __ieee80211_flush_queues(local, sdata, 0, drop); in ieee80211_flush_queues()
696 void ieee80211_stop_vif_queues(struct ieee80211_local *local, in ieee80211_stop_vif_queues() argument
700 ieee80211_stop_queues_by_reason(&local->hw, in ieee80211_stop_vif_queues()
701 ieee80211_get_vif_queues(local, sdata), in ieee80211_stop_vif_queues()
705 void ieee80211_wake_vif_queues(struct ieee80211_local *local, in ieee80211_wake_vif_queues() argument
709 ieee80211_wake_queues_by_reason(&local->hw, in ieee80211_wake_vif_queues()
710 ieee80211_get_vif_queues(local, sdata), in ieee80211_wake_vif_queues()
714 static void __iterate_interfaces(struct ieee80211_local *local, in __iterate_interfaces() argument
723 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in __iterate_interfaces()
742 sdata = rcu_dereference_check(local->monitor_sdata, in __iterate_interfaces()
743 lockdep_is_held(&local->iflist_mtx) || in __iterate_interfaces()
757 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_interfaces() local
759 mutex_lock(&local->iflist_mtx); in ieee80211_iterate_interfaces()
760 __iterate_interfaces(local, iter_flags, iterator, data); in ieee80211_iterate_interfaces()
761 mutex_unlock(&local->iflist_mtx); in ieee80211_iterate_interfaces()
771 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_active_interfaces_atomic() local
774 __iterate_interfaces(local, iter_flags | IEEE80211_IFACE_ITER_ACTIVE, in ieee80211_iterate_active_interfaces_atomic()
786 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_active_interfaces_rtnl() local
790 __iterate_interfaces(local, iter_flags | IEEE80211_IFACE_ITER_ACTIVE, in ieee80211_iterate_active_interfaces_rtnl()
795 static void __iterate_stations(struct ieee80211_local *local, in __iterate_stations() argument
802 list_for_each_entry_rcu(sta, &local->sta_list, list) { in __iterate_stations()
815 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iterate_stations_atomic() local
818 __iterate_stations(local, iterator, data); in ieee80211_iterate_stations_atomic()
860 static bool ieee80211_can_queue_work(struct ieee80211_local *local) in ieee80211_can_queue_work() argument
862 if (local->quiescing || (local->suspended && !local->resuming)) { in ieee80211_can_queue_work()
872 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_queue_work() local
874 if (!ieee80211_can_queue_work(local)) in ieee80211_queue_work()
877 queue_work(local->workqueue, work); in ieee80211_queue_work()
885 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_queue_delayed_work() local
887 if (!ieee80211_can_queue_work(local)) in ieee80211_queue_delayed_work()
890 queue_delayed_work(local->workqueue, dwork, delay); in ieee80211_queue_delayed_work()
1438 struct ieee80211_local *local = sdata->local; in ieee80211_set_wmm_default() local
1446 if (!local->ops->conf_tx) in ieee80211_set_wmm_default()
1449 if (local->hw.queues < IEEE80211_NUM_ACS) in ieee80211_set_wmm_default()
1533 drv_conf_tx(local, sdata, ac, &qparam); in ieee80211_set_wmm_default()
1552 struct ieee80211_local *local = sdata->local; in ieee80211_send_auth() local
1558 skb = dev_alloc_skb(local->hw.extra_tx_headroom + IEEE80211_WEP_IV_LEN + in ieee80211_send_auth()
1563 skb_reserve(skb, local->hw.extra_tx_headroom + IEEE80211_WEP_IV_LEN); in ieee80211_send_auth()
1579 err = ieee80211_wep_encrypt(local, skb, key, key_len, key_idx); in ieee80211_send_auth()
1593 struct ieee80211_local *local = sdata->local; in ieee80211_send_deauth_disassoc() local
1608 skb = dev_alloc_skb(local->hw.extra_tx_headroom + in ieee80211_send_deauth_disassoc()
1613 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_send_deauth_disassoc()
1627 static int ieee80211_build_preq_ies_band(struct ieee80211_local *local, in ieee80211_build_preq_ies_band() argument
1649 sband = local->hw.wiphy->bands[band]; in ieee80211_build_preq_ies_band()
1826 int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, in ieee80211_build_preq_ies() argument
1841 pos += ieee80211_build_preq_ies_band(local, in ieee80211_build_preq_ies()
1878 struct ieee80211_local *local = sdata->local; in ieee80211_build_probe_req() local
1897 skb = ieee80211_probereq_get(&local->hw, src, ssid, ssid_len, in ieee80211_build_probe_req()
1903 ies_len = ieee80211_build_preq_ies(local, skb_tail_pointer(skb), in ieee80211_build_probe_req()
1929 sband = sdata->local->hw.wiphy->bands[band]; in ieee80211_sta_get_rates()
1973 void ieee80211_stop_device(struct ieee80211_local *local) in ieee80211_stop_device() argument
1975 ieee80211_led_radio(local, false); in ieee80211_stop_device()
1976 ieee80211_mod_tpt_led_trig(local, 0, IEEE80211_TPT_LEDTRIG_FL_RADIO); in ieee80211_stop_device()
1978 cancel_work_sync(&local->reconfig_filter); in ieee80211_stop_device()
1980 flush_workqueue(local->workqueue); in ieee80211_stop_device()
1981 drv_stop(local); in ieee80211_stop_device()
1984 static void ieee80211_flush_completed_scan(struct ieee80211_local *local, in ieee80211_flush_completed_scan() argument
1994 if (test_bit(SCAN_COMPLETED, &local->scanning)) { in ieee80211_flush_completed_scan()
2001 set_bit(SCAN_ABORTED, &local->scanning); in ieee80211_flush_completed_scan()
2002 ieee80211_queue_delayed_work(&local->hw, &local->scan_work, 0); in ieee80211_flush_completed_scan()
2003 flush_delayed_work(&local->scan_work); in ieee80211_flush_completed_scan()
2007 static void ieee80211_handle_reconfig_failure(struct ieee80211_local *local) in ieee80211_handle_reconfig_failure() argument
2022 local->resuming = false; in ieee80211_handle_reconfig_failure()
2023 local->suspended = false; in ieee80211_handle_reconfig_failure()
2024 local->in_reconfig = false; in ieee80211_handle_reconfig_failure()
2026 ieee80211_flush_completed_scan(local, true); in ieee80211_handle_reconfig_failure()
2031 ieee80211_sched_scan_end(local); in ieee80211_handle_reconfig_failure()
2033 list_for_each_entry(sdata, &local->interfaces, list) in ieee80211_handle_reconfig_failure()
2039 mutex_lock(&local->chanctx_mtx); in ieee80211_handle_reconfig_failure()
2040 list_for_each_entry(ctx, &local->chanctx_list, list) in ieee80211_handle_reconfig_failure()
2042 mutex_unlock(&local->chanctx_mtx); in ieee80211_handle_reconfig_failure()
2044 cfg80211_shutdown_all_interfaces(local->hw.wiphy); in ieee80211_handle_reconfig_failure()
2047 static void ieee80211_assign_chanctx(struct ieee80211_local *local, in ieee80211_assign_chanctx() argument
2053 if (!local->use_chanctx) in ieee80211_assign_chanctx()
2056 mutex_lock(&local->chanctx_mtx); in ieee80211_assign_chanctx()
2058 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_assign_chanctx()
2061 drv_assign_vif_chanctx(local, sdata, ctx); in ieee80211_assign_chanctx()
2063 mutex_unlock(&local->chanctx_mtx); in ieee80211_assign_chanctx()
2068 struct ieee80211_local *local = sdata->local; in ieee80211_reconfig_stations() local
2072 mutex_lock(&local->sta_mtx); in ieee80211_reconfig_stations()
2073 list_for_each_entry(sta, &local->sta_list, list) { in ieee80211_reconfig_stations()
2081 WARN_ON(drv_sta_state(local, sta->sdata, sta, state, in ieee80211_reconfig_stations()
2084 mutex_unlock(&local->sta_mtx); in ieee80211_reconfig_stations()
2092 res = drv_start_nan(sdata->local, sdata, in ieee80211_reconfig_nan()
2097 funcs = kcalloc(sdata->local->hw.max_nan_de_entries + 1, in ieee80211_reconfig_nan()
2115 res = drv_add_nan_func(sdata->local, sdata, funcs[i]); in ieee80211_reconfig_nan()
2128 int ieee80211_reconfig(struct ieee80211_local *local) in ieee80211_reconfig() argument
2130 struct ieee80211_hw *hw = &local->hw; in ieee80211_reconfig()
2139 bool suspended = local->suspended; in ieee80211_reconfig()
2142 if (!local->open_count) in ieee80211_reconfig()
2147 local->resuming = true; in ieee80211_reconfig()
2149 if (local->wowlan) { in ieee80211_reconfig()
2156 local->suspended = false; in ieee80211_reconfig()
2157 res = drv_resume(local); in ieee80211_reconfig()
2158 local->wowlan = false; in ieee80211_reconfig()
2160 local->resuming = false; in ieee80211_reconfig()
2172 local->suspended = true; in ieee80211_reconfig()
2183 if (suspended && local->in_reconfig && !reconfig_due_to_wowlan) in ieee80211_reconfig()
2184 cancel_work_sync(&local->restart_work); in ieee80211_reconfig()
2186 local->started = false; in ieee80211_reconfig()
2194 res = drv_start(local); in ieee80211_reconfig()
2200 ieee80211_handle_reconfig_failure(local); in ieee80211_reconfig()
2205 drv_set_frag_threshold(local, hw->wiphy->frag_threshold); in ieee80211_reconfig()
2208 drv_set_rts_threshold(local, hw->wiphy->rts_threshold); in ieee80211_reconfig()
2211 drv_set_coverage_class(local, hw->wiphy->coverage_class); in ieee80211_reconfig()
2213 ieee80211_led_radio(local, true); in ieee80211_reconfig()
2214 ieee80211_mod_tpt_led_trig(local, in ieee80211_reconfig()
2218 sdata = rtnl_dereference(local->monitor_sdata); in ieee80211_reconfig()
2221 WARN_ON(local->resuming); in ieee80211_reconfig()
2222 res = drv_add_interface(local, sdata); in ieee80211_reconfig()
2224 RCU_INIT_POINTER(local->monitor_sdata, NULL); in ieee80211_reconfig()
2230 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2234 res = drv_add_interface(local, sdata); in ieee80211_reconfig()
2244 list_for_each_entry_continue_reverse(sdata, &local->interfaces, in ieee80211_reconfig()
2249 drv_remove_interface(local, sdata); in ieee80211_reconfig()
2250 ieee80211_handle_reconfig_failure(local); in ieee80211_reconfig()
2255 if (local->use_chanctx) { in ieee80211_reconfig()
2256 mutex_lock(&local->chanctx_mtx); in ieee80211_reconfig()
2257 list_for_each_entry(ctx, &local->chanctx_list, list) in ieee80211_reconfig()
2260 WARN_ON(drv_add_chanctx(local, ctx)); in ieee80211_reconfig()
2261 mutex_unlock(&local->chanctx_mtx); in ieee80211_reconfig()
2263 sdata = rtnl_dereference(local->monitor_sdata); in ieee80211_reconfig()
2265 ieee80211_assign_chanctx(local, sdata); in ieee80211_reconfig()
2269 ieee80211_hw_config(local, ~0); in ieee80211_reconfig()
2271 ieee80211_configure_filter(local); in ieee80211_reconfig()
2274 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2280 ieee80211_assign_chanctx(local, sdata); in ieee80211_reconfig()
2288 WARN_ON(drv_join_ibss(local, sdata)); in ieee80211_reconfig()
2295 drv_conf_tx(local, sdata, i, in ieee80211_reconfig()
2346 wiphy_ext_feature_isset(sdata->local->hw.wiphy, in ieee80211_reconfig()
2354 drv_start_ap(local, sdata); in ieee80211_reconfig()
2368 ieee80211_handle_reconfig_failure(local); in ieee80211_reconfig()
2387 ieee80211_recalc_ps(local); in ieee80211_reconfig()
2395 if (!(local->hw.conf.flags & IEEE80211_CONF_PS)) { in ieee80211_reconfig()
2396 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2402 ieee80211_send_nullfunc(local, sdata, false); in ieee80211_reconfig()
2407 mutex_lock(&local->sta_mtx); in ieee80211_reconfig()
2408 list_for_each_entry(sta, &local->sta_list, list) { in ieee80211_reconfig()
2420 WARN_ON(drv_sta_state(local, sta->sdata, sta, state, in ieee80211_reconfig()
2423 mutex_unlock(&local->sta_mtx); in ieee80211_reconfig()
2426 list_for_each_entry(sdata, &local->interfaces, list) in ieee80211_reconfig()
2430 mutex_lock(&local->mtx); in ieee80211_reconfig()
2431 sched_scan_sdata = rcu_dereference_protected(local->sched_scan_sdata, in ieee80211_reconfig()
2432 lockdep_is_held(&local->mtx)); in ieee80211_reconfig()
2433 sched_scan_req = rcu_dereference_protected(local->sched_scan_req, in ieee80211_reconfig()
2434 lockdep_is_held(&local->mtx)); in ieee80211_reconfig()
2446 RCU_INIT_POINTER(local->sched_scan_sdata, NULL); in ieee80211_reconfig()
2447 RCU_INIT_POINTER(local->sched_scan_req, NULL); in ieee80211_reconfig()
2450 mutex_unlock(&local->mtx); in ieee80211_reconfig()
2453 cfg80211_sched_scan_stopped_rtnl(local->hw.wiphy, 0); in ieee80211_reconfig()
2457 if (local->monitors == local->open_count && local->monitors > 0) in ieee80211_reconfig()
2458 ieee80211_add_virtual_monitor(local); in ieee80211_reconfig()
2471 mutex_lock(&local->sta_mtx); in ieee80211_reconfig()
2473 list_for_each_entry(sta, &local->sta_list, list) { in ieee80211_reconfig()
2474 if (!local->resuming) in ieee80211_reconfig()
2480 mutex_unlock(&local->sta_mtx); in ieee80211_reconfig()
2483 if (local->in_reconfig) { in ieee80211_reconfig()
2484 local->in_reconfig = false; in ieee80211_reconfig()
2488 mutex_lock(&local->mtx); in ieee80211_reconfig()
2489 ieee80211_start_next_roc(local); in ieee80211_reconfig()
2490 mutex_unlock(&local->mtx); in ieee80211_reconfig()
2493 list_for_each_entry(sdata, &local->interfaces, list) in ieee80211_reconfig()
2494 ieee80211_queue_work(&local->hw, &sdata->work); in ieee80211_reconfig()
2505 if (local->open_count && (!suspended || reconfig_due_to_wowlan)) in ieee80211_reconfig()
2506 drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_RESTART); in ieee80211_reconfig()
2513 local->suspended = false; in ieee80211_reconfig()
2515 local->resuming = false; in ieee80211_reconfig()
2517 ieee80211_flush_completed_scan(local, false); in ieee80211_reconfig()
2519 if (local->open_count && !reconfig_due_to_wowlan) in ieee80211_reconfig()
2520 drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_SUSPEND); in ieee80211_reconfig()
2522 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_reconfig()
2529 mod_timer(&local->sta_cleanup, jiffies + 1); in ieee80211_reconfig()
2540 struct ieee80211_local *local; in ieee80211_resume_disconnect() local
2547 local = sdata->local; in ieee80211_resume_disconnect()
2549 if (WARN_ON(!local->resuming)) in ieee80211_resume_disconnect()
2557 mutex_lock(&local->key_mtx); in ieee80211_resume_disconnect()
2560 mutex_unlock(&local->key_mtx); in ieee80211_resume_disconnect()
2566 struct ieee80211_local *local = sdata->local; in ieee80211_recalc_smps() local
2570 mutex_lock(&local->chanctx_mtx); in ieee80211_recalc_smps()
2573 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_recalc_smps()
2585 ieee80211_recalc_smps_chanctx(local, chanctx); in ieee80211_recalc_smps()
2587 mutex_unlock(&local->chanctx_mtx); in ieee80211_recalc_smps()
2592 struct ieee80211_local *local = sdata->local; in ieee80211_recalc_min_chandef() local
2596 mutex_lock(&local->chanctx_mtx); in ieee80211_recalc_min_chandef()
2599 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_recalc_min_chandef()
2605 ieee80211_recalc_chanctx_min_def(local, chanctx); in ieee80211_recalc_min_chandef()
2607 mutex_unlock(&local->chanctx_mtx); in ieee80211_recalc_min_chandef()
3086 struct ieee80211_local *local = sdata->local; in ieee80211_add_srates_ie() local
3095 sband = local->hw.wiphy->bands[band]; in ieee80211_add_srates_ie()
3130 struct ieee80211_local *local = sdata->local; in ieee80211_add_ext_srates_ie() local
3140 sband = local->hw.wiphy->bands[band]; in ieee80211_add_ext_srates_ie()
3215 u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, in ieee80211_calculate_rx_timestamp() argument
3263 sband = local->hw.wiphy->bands[status->band]; in ieee80211_calculate_rx_timestamp()
3298 void ieee80211_dfs_cac_cancel(struct ieee80211_local *local) in ieee80211_dfs_cac_cancel() argument
3306 mutex_lock(&local->mtx); in ieee80211_dfs_cac_cancel()
3307 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_dfs_cac_cancel()
3323 mutex_unlock(&local->mtx); in ieee80211_dfs_cac_cancel()
3328 struct ieee80211_local *local = in ieee80211_dfs_radar_detected_work() local
3330 struct cfg80211_chan_def chandef = local->hw.conf.chandef; in ieee80211_dfs_radar_detected_work()
3334 mutex_lock(&local->chanctx_mtx); in ieee80211_dfs_radar_detected_work()
3335 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_dfs_radar_detected_work()
3342 mutex_unlock(&local->chanctx_mtx); in ieee80211_dfs_radar_detected_work()
3345 ieee80211_dfs_cac_cancel(local); in ieee80211_dfs_radar_detected_work()
3352 cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL); in ieee80211_dfs_radar_detected_work()
3357 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_radar_detected() local
3359 trace_api_radar_detected(local); in ieee80211_radar_detected()
3361 schedule_work(&local->radar_detected_work); in ieee80211_radar_detected()
3455 struct ieee80211_local *local = sdata->local; in ieee80211_send_action_csa() local
3465 skb = dev_alloc_skb(local->tx_headroom + hdr_len + in ieee80211_send_action_csa()
3473 skb_reserve(skb, local->tx_headroom); in ieee80211_send_action_csa()
3561 ieee80211_cs_get(struct ieee80211_local *local, u32 cipher, in ieee80211_cs_get() argument
3564 const struct ieee80211_cipher_scheme *l = local->hw.cipher_schemes; in ieee80211_cs_get()
3565 int n = local->hw.n_cipher_schemes; in ieee80211_cs_get()
3582 int ieee80211_cs_headroom(struct ieee80211_local *local, in ieee80211_cs_headroom() argument
3591 cs = ieee80211_cs_get(local, crypto->ciphers_pairwise[i], in ieee80211_cs_headroom()
3598 cs = ieee80211_cs_get(local, crypto->cipher_group, iftype); in ieee80211_cs_headroom()
3752 void ieee80211_recalc_dtim(struct ieee80211_local *local, in ieee80211_recalc_dtim() argument
3755 u64 tsf = drv_get_tsf(local, sdata); in ieee80211_recalc_dtim()
3793 static u8 ieee80211_chanctx_radar_detect(struct ieee80211_local *local, in ieee80211_chanctx_radar_detect() argument
3799 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_radar_detect()
3827 struct ieee80211_local *local = sdata->local; in ieee80211_check_combinations() local
3836 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_check_combinations()
3859 if (cfg80211_iftype_allowed(local->hw.wiphy, iftype, 0, 1)) { in ieee80211_check_combinations()
3871 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_check_combinations()
3875 ieee80211_chanctx_radar_detect(local, ctx); in ieee80211_check_combinations()
3887 list_for_each_entry_rcu(sdata_iter, &local->interfaces, list) { in ieee80211_check_combinations()
3894 cfg80211_iftype_allowed(local->hw.wiphy, in ieee80211_check_combinations()
3905 return cfg80211_check_combinations(local->hw.wiphy, &params); in ieee80211_check_combinations()
3918 int ieee80211_max_num_channels(struct ieee80211_local *local) in ieee80211_max_num_channels() argument
3926 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_max_num_channels()
3928 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_max_num_channels()
3935 ieee80211_chanctx_radar_detect(local, ctx); in ieee80211_max_num_channels()
3938 list_for_each_entry_rcu(sdata, &local->interfaces, list) in ieee80211_max_num_channels()
3941 err = cfg80211_iter_combinations(local->hw.wiphy, &params, in ieee80211_max_num_channels()