Lines Matching refs:local
31 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_add_iface() local
36 err = ieee80211_if_add(local, name, name_assign_type, &wdev, type, params); in ieee80211_add_iface()
75 struct ieee80211_local *local = sdata->local; in ieee80211_change_iface() local
97 ieee80211_configure_filter(local); in ieee80211_change_iface()
117 mutex_lock(&sdata->local->chanctx_mtx); in ieee80211_start_p2p_device()
119 mutex_unlock(&sdata->local->chanctx_mtx); in ieee80211_start_p2p_device()
150 struct ieee80211_local *local = sdata->local; in ieee80211_add_key() local
164 if (IS_ERR(local->wep_tx_tfm)) in ieee80211_add_key()
177 cs = ieee80211_cs_get(local, params->cipher, sdata->vif.type); in ieee80211_add_key()
190 mutex_lock(&local->sta_mtx); in ieee80211_add_key()
253 mutex_unlock(&local->sta_mtx); in ieee80211_add_key()
262 struct ieee80211_local *local = sdata->local; in ieee80211_del_key() local
267 mutex_lock(&local->sta_mtx); in ieee80211_del_key()
268 mutex_lock(&local->key_mtx); in ieee80211_del_key()
278 key = key_mtx_dereference(local, sta->ptk[key_idx]); in ieee80211_del_key()
280 key = key_mtx_dereference(local, sta->gtk[key_idx]); in ieee80211_del_key()
282 key = key_mtx_dereference(local, sdata->keys[key_idx]); in ieee80211_del_key()
293 mutex_unlock(&local->key_mtx); in ieee80211_del_key()
294 mutex_unlock(&local->sta_mtx); in ieee80211_del_key()
347 drv_get_key_seq(sdata->local, key, &kseq); in ieee80211_get_key()
378 drv_get_key_seq(sdata->local, key, &kseq); in ieee80211_get_key()
397 drv_get_key_seq(sdata->local, key, &kseq); in ieee80211_get_key()
454 sband = sta->local->hw.wiphy->bands[ in sta_set_rate_info_tx()
475 struct ieee80211_local *local = sdata->local; in ieee80211_dump_station() local
479 mutex_lock(&local->sta_mtx); in ieee80211_dump_station()
488 mutex_unlock(&local->sta_mtx); in ieee80211_dump_station()
496 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_dump_survey() local
498 return drv_get_survey(local, idx, survey); in ieee80211_dump_survey()
505 struct ieee80211_local *local = sdata->local; in ieee80211_get_station() local
509 mutex_lock(&local->sta_mtx); in ieee80211_get_station()
517 mutex_unlock(&local->sta_mtx); in ieee80211_get_station()
525 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_monitor_channel() local
529 if (cfg80211_chandef_identical(&local->monitor_chandef, chandef)) in ieee80211_set_monitor_channel()
532 mutex_lock(&local->mtx); in ieee80211_set_monitor_channel()
533 mutex_lock(&local->iflist_mtx); in ieee80211_set_monitor_channel()
534 if (local->use_chanctx) { in ieee80211_set_monitor_channel()
536 local->monitor_sdata, in ieee80211_set_monitor_channel()
537 lockdep_is_held(&local->iflist_mtx)); in ieee80211_set_monitor_channel()
543 } else if (local->open_count == local->monitors) { in ieee80211_set_monitor_channel()
544 local->_oper_chandef = *chandef; in ieee80211_set_monitor_channel()
545 ieee80211_hw_config(local, 0); in ieee80211_set_monitor_channel()
549 local->monitor_chandef = *chandef; in ieee80211_set_monitor_channel()
550 mutex_unlock(&local->iflist_mtx); in ieee80211_set_monitor_channel()
551 mutex_unlock(&local->mtx); in ieee80211_set_monitor_channel()
671 struct ieee80211_local *local = sdata->local; in ieee80211_start_ap() local
699 sdata->needed_rx_chains = sdata->local->rx_chains; in ieee80211_start_ap()
701 mutex_lock(&local->mtx); in ieee80211_start_ap()
706 mutex_unlock(&local->mtx); in ieee80211_start_ap()
716 sdata->encrypt_headroom = ieee80211_cs_headroom(sdata->local, in ieee80211_start_ap()
726 ieee80211_cs_headroom(sdata->local, in ieee80211_start_ap()
757 err = drv_start_ap(sdata->local, sdata); in ieee80211_start_ap()
768 ieee80211_recalc_dtim(local, sdata); in ieee80211_start_ap()
809 struct ieee80211_local *local = sdata->local; in ieee80211_stop_ap() local
822 mutex_lock(&local->mtx); in ieee80211_stop_ap()
825 ieee80211_wake_vif_queues(local, sdata, in ieee80211_stop_ap()
830 mutex_unlock(&local->mtx); in ieee80211_stop_ap()
864 drv_stop_ap(sdata->local, sdata); in ieee80211_stop_ap()
867 local->total_ps_buffered -= skb_queue_len(&sdata->u.ap.ps.bc_buf); in ieee80211_stop_ap()
870 mutex_lock(&local->mtx); in ieee80211_stop_ap()
873 mutex_unlock(&local->mtx); in ieee80211_stop_ap()
922 static int sta_apply_auth_flags(struct ieee80211_local *local, in sta_apply_auth_flags() argument
982 static void sta_apply_mesh_params(struct ieee80211_local *local, in sta_apply_mesh_params() argument
1041 static int sta_apply_parameters(struct ieee80211_local *local, in sta_apply_parameters() argument
1051 sband = local->hw.wiphy->bands[band]; in sta_apply_parameters()
1080 local->hw.queues >= IEEE80211_NUM_ACS) in sta_apply_parameters()
1088 ret = sta_apply_auth_flags(local, sta, mask, set); in sta_apply_parameters()
1124 ieee80211_hw_check(&local->hw, TDLS_WIDER_BW) && in sta_apply_parameters()
1176 sta_apply_mesh_params(local, sta, params); in sta_apply_parameters()
1181 ret = sta_apply_auth_flags(local, sta, mask, set); in sta_apply_parameters()
1193 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_add_station() local
1231 err = sta_apply_parameters(local, sta, params); in ieee80211_add_station()
1233 sta_info_free(local, sta); in ieee80211_add_station()
1282 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_change_station() local
1288 mutex_lock(&local->sta_mtx); in ieee80211_change_station()
1368 err = sta_apply_parameters(local, sta, params); in ieee80211_change_station()
1372 mutex_unlock(&local->sta_mtx); in ieee80211_change_station()
1390 ieee80211_recalc_ps(local); in ieee80211_change_station()
1396 mutex_unlock(&local->sta_mtx); in ieee80211_change_station()
1748 if (!ieee80211_hw_check(&sdata->local->hw, SIGNAL_DBM)) in ieee80211_update_mesh_config()
1794 sdata->needed_rx_chains = sdata->local->rx_chains; in ieee80211_join_mesh()
1796 mutex_lock(&sdata->local->mtx); in ieee80211_join_mesh()
1799 mutex_unlock(&sdata->local->mtx); in ieee80211_join_mesh()
1811 mutex_lock(&sdata->local->mtx); in ieee80211_leave_mesh()
1813 mutex_unlock(&sdata->local->mtx); in ieee80211_leave_mesh()
1903 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_txq_params() local
1907 if (!local->ops->conf_tx) in ieee80211_set_txq_params()
1910 if (local->hw.queues < IEEE80211_NUM_ACS) in ieee80211_set_txq_params()
1926 if (drv_conf_tx(local, sdata, params->ac, &p)) { in ieee80211_set_txq_params()
1927 wiphy_debug(local->hw.wiphy, in ieee80211_set_txq_params()
1969 if (sdata->local->ops->hw_scan) in ieee80211_scan()
2003 if (!sdata->local->ops->sched_scan_start) in ieee80211_sched_scan_start()
2012 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_sched_scan_stop() local
2014 if (!local->ops->sched_scan_stop) in ieee80211_sched_scan_stop()
2017 return ieee80211_request_sched_scan_stop(local); in ieee80211_sched_scan_stop()
2079 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_wiphy_params() local
2083 ieee80211_check_fast_xmit_all(local); in ieee80211_set_wiphy_params()
2085 err = drv_set_frag_threshold(local, wiphy->frag_threshold); in ieee80211_set_wiphy_params()
2088 ieee80211_check_fast_xmit_all(local); in ieee80211_set_wiphy_params()
2099 err = drv_set_coverage_class(local, coverage_class); in ieee80211_set_wiphy_params()
2106 err = drv_set_rts_threshold(local, wiphy->rts_threshold); in ieee80211_set_wiphy_params()
2115 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short; in ieee80211_set_wiphy_params()
2120 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long; in ieee80211_set_wiphy_params()
2124 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_RETRY_LIMITS); in ieee80211_set_wiphy_params()
2133 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_tx_power() local
2166 local->user_power_level = IEEE80211_UNSET_POWER_LEVEL; in ieee80211_set_tx_power()
2173 local->user_power_level = MBM_TO_DBM(mbm); in ieee80211_set_tx_power()
2177 mutex_lock(&local->iflist_mtx); in ieee80211_set_tx_power()
2178 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_set_tx_power()
2179 sdata->user_power_level = local->user_power_level; in ieee80211_set_tx_power()
2184 list_for_each_entry(sdata, &local->interfaces, list) in ieee80211_set_tx_power()
2186 mutex_unlock(&local->iflist_mtx); in ieee80211_set_tx_power()
2195 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_get_tx_power() local
2198 if (local->ops->get_txpower) in ieee80211_get_tx_power()
2199 return drv_get_txpower(local, sdata, dbm); in ieee80211_get_tx_power()
2201 if (!local->use_chanctx) in ieee80211_get_tx_power()
2202 *dbm = local->hw.conf.power_level; in ieee80211_get_tx_power()
2221 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_rfkill_poll() local
2223 drv_rfkill_poll(local); in ieee80211_rfkill_poll()
2231 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_testmode_cmd() local
2234 if (!local->ops->testmode_cmd) in ieee80211_testmode_cmd()
2245 return local->ops->testmode_cmd(&local->hw, vif, data, len); in ieee80211_testmode_cmd()
2253 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_testmode_dump() local
2255 if (!local->ops->testmode_dump) in ieee80211_testmode_dump()
2258 return local->ops->testmode_dump(&local->hw, skb, cb, data, len); in ieee80211_testmode_dump()
2285 ieee80211_queue_work(&sdata->local->hw, &sdata->recalc_smps); in __ieee80211_request_smps_ap()
2293 mutex_lock(&sdata->local->sta_mtx); in __ieee80211_request_smps_ap()
2294 list_for_each_entry(sta, &sdata->local->sta_list, list) { in __ieee80211_request_smps_ap()
2329 mutex_unlock(&sdata->local->sta_mtx); in __ieee80211_request_smps_ap()
2332 ieee80211_queue_work(&sdata->local->hw, &sdata->recalc_smps); in __ieee80211_request_smps_ap()
2370 list_for_each_entry_rcu(sta, &sdata->local->sta_list, list) { in __ieee80211_request_smps_mgd()
2402 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_set_power_mgmt() local
2407 if (!ieee80211_hw_check(&local->hw, SUPPORTS_PS)) in ieee80211_set_power_mgmt()
2411 timeout == local->dynamic_ps_forced_timeout) in ieee80211_set_power_mgmt()
2415 local->dynamic_ps_forced_timeout = timeout; in ieee80211_set_power_mgmt()
2422 if (ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS)) in ieee80211_set_power_mgmt()
2423 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); in ieee80211_set_power_mgmt()
2425 ieee80211_recalc_ps(local); in ieee80211_set_power_mgmt()
2465 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_set_bitrate_mask() local
2471 if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) { in ieee80211_set_bitrate_mask()
2472 ret = drv_set_bitrate_mask(local, sdata, mask); in ieee80211_set_bitrate_mask()
2511 static bool ieee80211_coalesce_started_roc(struct ieee80211_local *local, in ieee80211_coalesce_started_roc() argument
2534 static u64 ieee80211_mgmt_tx_cookie(struct ieee80211_local *local) in ieee80211_mgmt_tx_cookie() argument
2536 lockdep_assert_held(&local->mtx); in ieee80211_mgmt_tx_cookie()
2538 local->roc_cookie_counter++; in ieee80211_mgmt_tx_cookie()
2541 if (WARN_ON(local->roc_cookie_counter == 0)) in ieee80211_mgmt_tx_cookie()
2542 local->roc_cookie_counter++; in ieee80211_mgmt_tx_cookie()
2544 return local->roc_cookie_counter; in ieee80211_mgmt_tx_cookie()
2547 static int ieee80211_start_roc_work(struct ieee80211_local *local, in ieee80211_start_roc_work() argument
2558 lockdep_assert_held(&local->mtx); in ieee80211_start_roc_work()
2560 if (local->use_chanctx && !local->ops->remain_on_channel) in ieee80211_start_roc_work()
2593 roc->cookie = ieee80211_mgmt_tx_cookie(local); in ieee80211_start_roc_work()
2600 if (!list_empty(&local->roc_list) || in ieee80211_start_roc_work()
2601 local->scanning || ieee80211_is_radar_required(local)) in ieee80211_start_roc_work()
2605 if (!local->ops->remain_on_channel) { in ieee80211_start_roc_work()
2606 ieee80211_queue_delayed_work(&local->hw, &roc->work, 0); in ieee80211_start_roc_work()
2612 ret = drv_remain_on_channel(local, sdata, channel, duration, type); in ieee80211_start_roc_work()
2622 list_for_each_entry(tmp, &local->roc_list, list) { in ieee80211_start_roc_work()
2643 if (local->ops->remain_on_channel) { in ieee80211_start_roc_work()
2658 if (ieee80211_coalesce_started_roc(local, roc, tmp)) in ieee80211_start_roc_work()
2689 list_add_tail(&roc->list, &local->roc_list); in ieee80211_start_roc_work()
2701 struct ieee80211_local *local = sdata->local; in ieee80211_remain_on_channel() local
2704 mutex_lock(&local->mtx); in ieee80211_remain_on_channel()
2705 ret = ieee80211_start_roc_work(local, sdata, chan, in ieee80211_remain_on_channel()
2708 mutex_unlock(&local->mtx); in ieee80211_remain_on_channel()
2713 static int ieee80211_cancel_roc(struct ieee80211_local *local, in ieee80211_cancel_roc() argument
2719 mutex_lock(&local->mtx); in ieee80211_cancel_roc()
2720 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) { in ieee80211_cancel_roc()
2730 mutex_unlock(&local->mtx); in ieee80211_cancel_roc()
2746 mutex_unlock(&local->mtx); in ieee80211_cancel_roc()
2757 if (local->ops->remain_on_channel) { in ieee80211_cancel_roc()
2759 ret = drv_cancel_remain_on_channel(local); in ieee80211_cancel_roc()
2761 mutex_unlock(&local->mtx); in ieee80211_cancel_roc()
2769 ieee80211_start_next_roc(local); in ieee80211_cancel_roc()
2770 mutex_unlock(&local->mtx); in ieee80211_cancel_roc()
2776 ieee80211_queue_delayed_work(&local->hw, &found->work, 0); in ieee80211_cancel_roc()
2778 mutex_unlock(&local->mtx); in ieee80211_cancel_roc()
2794 struct ieee80211_local *local = sdata->local; in ieee80211_cancel_remain_on_channel() local
2796 return ieee80211_cancel_roc(local, cookie, false); in ieee80211_cancel_remain_on_channel()
2805 struct ieee80211_local *local = sdata->local; in ieee80211_start_radar_detection() local
2808 mutex_lock(&local->mtx); in ieee80211_start_radar_detection()
2809 if (!list_empty(&local->roc_list) || local->scanning) { in ieee80211_start_radar_detection()
2816 sdata->needed_rx_chains = local->rx_chains; in ieee80211_start_radar_detection()
2823 ieee80211_queue_delayed_work(&sdata->local->hw, in ieee80211_start_radar_detection()
2828 mutex_unlock(&local->mtx); in ieee80211_start_radar_detection()
2892 ieee80211_queue_work(&sdata->local->hw, in ieee80211_csa_finish()
2937 struct ieee80211_local *local = sdata->local; in __ieee80211_csa_finalize() local
2942 lockdep_assert_held(&local->mtx); in __ieee80211_csa_finalize()
2943 lockdep_assert_held(&local->chanctx_mtx); in __ieee80211_csa_finalize()
2977 ieee80211_wake_vif_queues(local, sdata, in __ieee80211_csa_finalize()
2995 cfg80211_stop_iface(sdata->local->hw.wiphy, &sdata->wdev, in ieee80211_csa_finalize()
3005 struct ieee80211_local *local = sdata->local; in ieee80211_csa_finalize_work() local
3008 mutex_lock(&local->mtx); in ieee80211_csa_finalize_work()
3009 mutex_lock(&local->chanctx_mtx); in ieee80211_csa_finalize_work()
3021 mutex_unlock(&local->chanctx_mtx); in ieee80211_csa_finalize_work()
3022 mutex_unlock(&local->mtx); in ieee80211_csa_finalize_work()
3164 struct ieee80211_local *local = sdata->local; in __ieee80211_channel_switch() local
3172 lockdep_assert_held(&local->mtx); in __ieee80211_channel_switch()
3174 if (!list_empty(&local->roc_list) || local->scanning) in __ieee80211_channel_switch()
3188 mutex_lock(&local->chanctx_mtx); in __ieee80211_channel_switch()
3190 lockdep_is_held(&local->chanctx_mtx)); in __ieee80211_channel_switch()
3236 ieee80211_stop_vif_queues(local, sdata, in __ieee80211_channel_switch()
3251 mutex_unlock(&local->chanctx_mtx); in __ieee80211_channel_switch()
3259 struct ieee80211_local *local = sdata->local; in ieee80211_channel_switch() local
3262 mutex_lock(&local->mtx); in ieee80211_channel_switch()
3264 mutex_unlock(&local->mtx); in ieee80211_channel_switch()
3269 static struct sk_buff *ieee80211_make_ack_skb(struct ieee80211_local *local, in ieee80211_make_ack_skb() argument
3281 spin_lock_irqsave(&local->ack_status_lock, spin_flags); in ieee80211_make_ack_skb()
3282 id = idr_alloc(&local->ack_status_frames, ack_skb, in ieee80211_make_ack_skb()
3284 spin_unlock_irqrestore(&local->ack_status_lock, spin_flags); in ieee80211_make_ack_skb()
3293 *cookie = ieee80211_mgmt_tx_cookie(local); in ieee80211_make_ack_skb()
3304 struct ieee80211_local *local = sdata->local; in ieee80211_mgmt_tx() local
3357 local->ops->remain_on_channel && in ieee80211_mgmt_tx()
3376 mutex_lock(&local->mtx); in ieee80211_mgmt_tx()
3404 skb = dev_alloc_skb(local->hw.extra_tx_headroom + params->len); in ieee80211_mgmt_tx()
3409 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_mgmt_tx()
3448 ack_skb = ieee80211_make_ack_skb(local, skb, cookie, in ieee80211_mgmt_tx()
3472 if (ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) in ieee80211_mgmt_tx()
3474 local->hw.offchannel_tx_hw_queue; in ieee80211_mgmt_tx()
3477 ret = ieee80211_start_roc_work(local, sdata, params->chan, in ieee80211_mgmt_tx()
3483 mutex_unlock(&local->mtx); in ieee80211_mgmt_tx()
3491 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_mgmt_tx_cancel_wait() local
3493 return ieee80211_cancel_roc(local, cookie, true); in ieee80211_mgmt_tx_cancel_wait()
3500 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_mgmt_frame_register() local
3506 local->probe_req_reg++; in ieee80211_mgmt_frame_register()
3509 if (local->probe_req_reg) in ieee80211_mgmt_frame_register()
3510 local->probe_req_reg--; in ieee80211_mgmt_frame_register()
3516 if (!local->open_count) in ieee80211_mgmt_frame_register()
3520 drv_config_iface_filter(local, sdata, FIF_PROBE_REQ, in ieee80211_mgmt_frame_register()
3523 drv_config_iface_filter(local, sdata, 0, in ieee80211_mgmt_frame_register()
3526 ieee80211_configure_filter(local); in ieee80211_mgmt_frame_register()
3535 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_antenna() local
3537 if (local->started) in ieee80211_set_antenna()
3540 return drv_set_antenna(local, tx_ant, rx_ant); in ieee80211_set_antenna()
3545 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_get_antenna() local
3547 return drv_get_antenna(local, tx_ant, rx_ant); in ieee80211_get_antenna()
3554 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_rekey_data() local
3557 if (!local->ops->set_rekey_data) in ieee80211_set_rekey_data()
3560 drv_set_rekey_data(local, sdata, data); in ieee80211_set_rekey_data()
3569 struct ieee80211_local *local = sdata->local; in ieee80211_probe_client() local
3582 mutex_lock(&local->mtx); in ieee80211_probe_client()
3610 skb = dev_alloc_skb(local->hw.extra_tx_headroom + size); in ieee80211_probe_client()
3618 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_probe_client()
3639 ack_skb = ieee80211_make_ack_skb(local, skb, cookie, GFP_ATOMIC); in ieee80211_probe_client()
3653 mutex_unlock(&local->mtx); in ieee80211_probe_client()
3663 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_cfg_get_channel() local
3672 } else if (local->open_count > 0 && in ieee80211_cfg_get_channel()
3673 local->open_count == local->monitors && in ieee80211_cfg_get_channel()
3675 if (local->use_chanctx) in ieee80211_cfg_get_channel()
3676 *chandef = local->monitor_chandef; in ieee80211_cfg_get_channel()
3678 *chandef = local->_oper_chandef; in ieee80211_cfg_get_channel()
3764 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_del_tx_ts() local
3785 ieee80211_flush_queues(local, sdata, false); in ieee80211_del_tx_ts()