Lines Matching refs:local
63 struct ieee80211_local *local = sdata->local; in ieee80211_set_mon_options() local
84 monitor_sdata = rtnl_dereference(local->monitor_sdata); in ieee80211_set_mon_options()
101 ieee80211_configure_filter(local); in ieee80211_set_mon_options()
121 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_add_iface() local
126 err = ieee80211_if_add(local, name, name_assign_type, &wdev, type, params); in ieee80211_add_iface()
184 mutex_lock(&sdata->local->chanctx_mtx); in ieee80211_start_p2p_device()
186 mutex_unlock(&sdata->local->chanctx_mtx); in ieee80211_start_p2p_device()
206 mutex_lock(&sdata->local->chanctx_mtx); in ieee80211_start_nan()
208 mutex_unlock(&sdata->local->chanctx_mtx); in ieee80211_start_nan()
216 ret = drv_start_nan(sdata->local, sdata, conf); in ieee80211_start_nan()
230 drv_stop_nan(sdata->local, sdata); in ieee80211_stop_nan()
257 ret = drv_nan_change_conf(sdata->local, sdata, &new_conf, changes); in ieee80211_nan_change_conf()
280 nan_func, 1, sdata->local->hw.max_nan_de_entries + 1, in ieee80211_add_nan_func()
291 ret = drv_add_nan_func(sdata->local, sdata, nan_func); in ieee80211_add_nan_func()
339 drv_del_nan_func(sdata->local, sdata, instance_id); in ieee80211_del_nan_func()
358 struct ieee80211_local *local = sdata->local; in ieee80211_set_tx() local
363 if (!wiphy_ext_feature_isset(local->hw.wiphy, in ieee80211_set_tx()
375 mutex_lock(&local->key_mtx); in ieee80211_set_tx()
376 key = key_mtx_dereference(local, sta->ptk[key_idx]); in ieee80211_set_tx()
381 mutex_unlock(&local->key_mtx); in ieee80211_set_tx()
390 struct ieee80211_local *local = sdata->local; in ieee80211_add_key() local
419 cs = ieee80211_cs_get(local, params->cipher, sdata->vif.type); in ieee80211_add_key()
435 mutex_lock(&local->sta_mtx); in ieee80211_add_key()
496 mutex_unlock(&local->sta_mtx); in ieee80211_add_key()
505 struct ieee80211_local *local = sdata->local; in ieee80211_del_key() local
510 mutex_lock(&local->sta_mtx); in ieee80211_del_key()
511 mutex_lock(&local->key_mtx); in ieee80211_del_key()
521 key = key_mtx_dereference(local, sta->ptk[key_idx]); in ieee80211_del_key()
523 key = key_mtx_dereference(local, sta->gtk[key_idx]); in ieee80211_del_key()
525 key = key_mtx_dereference(local, sdata->keys[key_idx]); in ieee80211_del_key()
536 mutex_unlock(&local->key_mtx); in ieee80211_del_key()
537 mutex_unlock(&local->sta_mtx); in ieee80211_del_key()
591 drv_get_key_seq(sdata->local, key, &kseq); in ieee80211_get_key()
624 drv_get_key_seq(sdata->local, key, &kseq); in ieee80211_get_key()
643 drv_get_key_seq(sdata->local, key, &kseq); in ieee80211_get_key()
722 struct ieee80211_local *local = sdata->local; in ieee80211_dump_station() local
726 mutex_lock(&local->sta_mtx); in ieee80211_dump_station()
735 mutex_unlock(&local->sta_mtx); in ieee80211_dump_station()
743 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_dump_survey() local
745 return drv_get_survey(local, idx, survey); in ieee80211_dump_survey()
752 struct ieee80211_local *local = sdata->local; in ieee80211_get_station() local
756 mutex_lock(&local->sta_mtx); in ieee80211_get_station()
764 mutex_unlock(&local->sta_mtx); in ieee80211_get_station()
772 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_monitor_channel() local
776 if (cfg80211_chandef_identical(&local->monitor_chandef, chandef)) in ieee80211_set_monitor_channel()
779 mutex_lock(&local->mtx); in ieee80211_set_monitor_channel()
780 if (local->use_chanctx) { in ieee80211_set_monitor_channel()
781 sdata = rtnl_dereference(local->monitor_sdata); in ieee80211_set_monitor_channel()
787 } else if (local->open_count == local->monitors) { in ieee80211_set_monitor_channel()
788 local->_oper_chandef = *chandef; in ieee80211_set_monitor_channel()
789 ieee80211_hw_config(local, 0); in ieee80211_set_monitor_channel()
793 local->monitor_chandef = *chandef; in ieee80211_set_monitor_channel()
794 mutex_unlock(&local->mtx); in ieee80211_set_monitor_channel()
974 struct ieee80211_local *local = sdata->local; in ieee80211_start_ap() local
1007 sdata->needed_rx_chains = sdata->local->rx_chains; in ieee80211_start_ap()
1015 mutex_lock(&local->mtx); in ieee80211_start_ap()
1020 mutex_unlock(&local->mtx); in ieee80211_start_ap()
1034 sdata->encrypt_headroom = ieee80211_cs_headroom(sdata->local, in ieee80211_start_ap()
1046 ieee80211_cs_headroom(sdata->local, in ieee80211_start_ap()
1080 err = drv_start_ap(sdata->local, sdata); in ieee80211_start_ap()
1091 ieee80211_recalc_dtim(local, sdata); in ieee80211_start_ap()
1132 struct ieee80211_local *local = sdata->local; in ieee80211_stop_ap() local
1145 mutex_lock(&local->mtx); in ieee80211_stop_ap()
1148 ieee80211_wake_vif_queues(local, sdata, in ieee80211_stop_ap()
1153 mutex_unlock(&local->mtx); in ieee80211_stop_ap()
1190 drv_stop_ap(sdata->local, sdata); in ieee80211_stop_ap()
1193 local->total_ps_buffered -= skb_queue_len(&sdata->u.ap.ps.bc_buf); in ieee80211_stop_ap()
1194 ieee80211_purge_tx_queue(&local->hw, &sdata->u.ap.ps.bc_buf); in ieee80211_stop_ap()
1196 mutex_lock(&local->mtx); in ieee80211_stop_ap()
1199 mutex_unlock(&local->mtx); in ieee80211_stop_ap()
1204 static int sta_apply_auth_flags(struct ieee80211_local *local, in sta_apply_auth_flags() argument
1264 static void sta_apply_mesh_params(struct ieee80211_local *local, in sta_apply_mesh_params() argument
1329 static int sta_apply_parameters(struct ieee80211_local *local, in sta_apply_parameters() argument
1369 local->hw.queues >= IEEE80211_NUM_ACS) in sta_apply_parameters()
1377 ret = sta_apply_auth_flags(local, sta, mask, set); in sta_apply_parameters()
1413 ieee80211_hw_check(&local->hw, TDLS_WIDER_BW) && in sta_apply_parameters()
1473 ret = drv_sta_set_txpwr(local, sdata, sta); in sta_apply_parameters()
1511 sta_apply_mesh_params(local, sta, params); in sta_apply_parameters()
1519 ret = sta_apply_auth_flags(local, sta, mask, set); in sta_apply_parameters()
1531 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_add_station() local
1563 err = sta_apply_parameters(local, sta, params); in ieee80211_add_station()
1565 sta_info_free(local, sta); in ieee80211_add_station()
1608 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_change_station() local
1614 mutex_lock(&local->sta_mtx); in ieee80211_change_station()
1688 err = sta_apply_parameters(local, sta, params); in ieee80211_change_station()
1692 mutex_unlock(&local->sta_mtx); in ieee80211_change_station()
1710 ieee80211_recalc_ps(local); in ieee80211_change_station()
1716 mutex_unlock(&local->sta_mtx); in ieee80211_change_station()
2073 if (!ieee80211_hw_check(&sdata->local->hw, SIGNAL_DBM)) in ieee80211_update_mesh_config()
2124 sdata->needed_rx_chains = sdata->local->rx_chains; in ieee80211_join_mesh()
2126 mutex_lock(&sdata->local->mtx); in ieee80211_join_mesh()
2129 mutex_unlock(&sdata->local->mtx); in ieee80211_join_mesh()
2141 mutex_lock(&sdata->local->mtx); in ieee80211_leave_mesh()
2143 mutex_unlock(&sdata->local->mtx); in ieee80211_leave_mesh()
2237 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_txq_params() local
2241 if (!local->ops->conf_tx) in ieee80211_set_txq_params()
2244 if (local->hw.queues < IEEE80211_NUM_ACS) in ieee80211_set_txq_params()
2262 if (drv_conf_tx(local, sdata, params->ac, &p)) { in ieee80211_set_txq_params()
2263 wiphy_debug(local->hw.wiphy, in ieee80211_set_txq_params()
2305 if (sdata->local->ops->hw_scan) in ieee80211_scan()
2346 if (!sdata->local->ops->sched_scan_start) in ieee80211_sched_scan_start()
2356 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_sched_scan_stop() local
2358 if (!local->ops->sched_scan_stop) in ieee80211_sched_scan_stop()
2361 return ieee80211_request_sched_scan_stop(local); in ieee80211_sched_scan_stop()
2425 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_wiphy_params() local
2429 ieee80211_check_fast_xmit_all(local); in ieee80211_set_wiphy_params()
2431 err = drv_set_frag_threshold(local, wiphy->frag_threshold); in ieee80211_set_wiphy_params()
2434 ieee80211_check_fast_xmit_all(local); in ieee80211_set_wiphy_params()
2445 err = drv_set_coverage_class(local, coverage_class); in ieee80211_set_wiphy_params()
2452 err = drv_set_rts_threshold(local, wiphy->rts_threshold); in ieee80211_set_wiphy_params()
2461 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short; in ieee80211_set_wiphy_params()
2466 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long; in ieee80211_set_wiphy_params()
2470 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_RETRY_LIMITS); in ieee80211_set_wiphy_params()
2475 ieee80211_txq_set_params(local); in ieee80211_set_wiphy_params()
2484 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_tx_power() local
2494 sdata = rtnl_dereference(local->monitor_sdata); in ieee80211_set_tx_power()
2524 local->user_power_level = IEEE80211_UNSET_POWER_LEVEL; in ieee80211_set_tx_power()
2531 local->user_power_level = MBM_TO_DBM(mbm); in ieee80211_set_tx_power()
2535 mutex_lock(&local->iflist_mtx); in ieee80211_set_tx_power()
2536 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_set_tx_power()
2541 sdata->user_power_level = local->user_power_level; in ieee80211_set_tx_power()
2546 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_set_tx_power()
2551 mutex_unlock(&local->iflist_mtx); in ieee80211_set_tx_power()
2554 sdata = rtnl_dereference(local->monitor_sdata); in ieee80211_set_tx_power()
2556 sdata->user_power_level = local->user_power_level; in ieee80211_set_tx_power()
2572 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_get_tx_power() local
2575 if (local->ops->get_txpower) in ieee80211_get_tx_power()
2576 return drv_get_txpower(local, sdata, dbm); in ieee80211_get_tx_power()
2578 if (!local->use_chanctx) in ieee80211_get_tx_power()
2579 *dbm = local->hw.conf.power_level; in ieee80211_get_tx_power()
2598 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_rfkill_poll() local
2600 drv_rfkill_poll(local); in ieee80211_rfkill_poll()
2608 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_testmode_cmd() local
2611 if (!local->ops->testmode_cmd) in ieee80211_testmode_cmd()
2622 return local->ops->testmode_cmd(&local->hw, vif, data, len); in ieee80211_testmode_cmd()
2630 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_testmode_dump() local
2632 if (!local->ops->testmode_dump) in ieee80211_testmode_dump()
2635 return local->ops->testmode_dump(&local->hw, skb, cb, data, len); in ieee80211_testmode_dump()
2663 mutex_lock(&sdata->local->sta_mtx); in __ieee80211_request_smps_ap()
2664 list_for_each_entry(sta, &sdata->local->sta_list, list) { in __ieee80211_request_smps_ap()
2699 mutex_unlock(&sdata->local->sta_mtx); in __ieee80211_request_smps_ap()
2702 ieee80211_queue_work(&sdata->local->hw, &sdata->recalc_smps); in __ieee80211_request_smps_ap()
2740 list_for_each_entry_rcu(sta, &sdata->local->sta_list, list) { in __ieee80211_request_smps_mgd()
2772 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_set_power_mgmt() local
2777 if (!ieee80211_hw_check(&local->hw, SUPPORTS_PS)) in ieee80211_set_power_mgmt()
2781 timeout == local->dynamic_ps_forced_timeout) in ieee80211_set_power_mgmt()
2785 local->dynamic_ps_forced_timeout = timeout; in ieee80211_set_power_mgmt()
2792 if (ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS)) in ieee80211_set_power_mgmt()
2793 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); in ieee80211_set_power_mgmt()
2795 ieee80211_recalc_ps(local); in ieee80211_set_power_mgmt()
2863 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_set_bitrate_mask() local
2884 if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) { in ieee80211_set_bitrate_mask()
2885 ret = drv_set_bitrate_mask(local, sdata, mask); in ieee80211_set_bitrate_mask()
2930 struct ieee80211_local *local = sdata->local; in ieee80211_start_radar_detection() local
2933 mutex_lock(&local->mtx); in ieee80211_start_radar_detection()
2934 if (!list_empty(&local->roc_list) || local->scanning) { in ieee80211_start_radar_detection()
2941 sdata->needed_rx_chains = local->rx_chains; in ieee80211_start_radar_detection()
2948 ieee80211_queue_delayed_work(&sdata->local->hw, in ieee80211_start_radar_detection()
2953 mutex_unlock(&local->mtx); in ieee80211_start_radar_detection()
3032 ieee80211_queue_work(&sdata->local->hw, in ieee80211_csa_finish()
3077 struct ieee80211_local *local = sdata->local; in __ieee80211_csa_finalize() local
3082 lockdep_assert_held(&local->mtx); in __ieee80211_csa_finalize()
3083 lockdep_assert_held(&local->chanctx_mtx); in __ieee80211_csa_finalize()
3117 ieee80211_wake_vif_queues(local, sdata, in __ieee80211_csa_finalize()
3135 cfg80211_stop_iface(sdata->local->hw.wiphy, &sdata->wdev, in ieee80211_csa_finalize()
3145 struct ieee80211_local *local = sdata->local; in ieee80211_csa_finalize_work() local
3148 mutex_lock(&local->mtx); in ieee80211_csa_finalize_work()
3149 mutex_lock(&local->chanctx_mtx); in ieee80211_csa_finalize_work()
3161 mutex_unlock(&local->chanctx_mtx); in ieee80211_csa_finalize_work()
3162 mutex_unlock(&local->mtx); in ieee80211_csa_finalize_work()
3304 struct ieee80211_local *local = sdata->local; in __ieee80211_channel_switch() local
3312 lockdep_assert_held(&local->mtx); in __ieee80211_channel_switch()
3314 if (!list_empty(&local->roc_list) || local->scanning) in __ieee80211_channel_switch()
3328 mutex_lock(&local->chanctx_mtx); in __ieee80211_channel_switch()
3330 lockdep_is_held(&local->chanctx_mtx)); in __ieee80211_channel_switch()
3372 ieee80211_stop_vif_queues(local, sdata, in __ieee80211_channel_switch()
3387 mutex_unlock(&local->chanctx_mtx); in __ieee80211_channel_switch()
3395 struct ieee80211_local *local = sdata->local; in ieee80211_channel_switch() local
3398 mutex_lock(&local->mtx); in ieee80211_channel_switch()
3400 mutex_unlock(&local->mtx); in ieee80211_channel_switch()
3405 u64 ieee80211_mgmt_tx_cookie(struct ieee80211_local *local) in ieee80211_mgmt_tx_cookie() argument
3407 lockdep_assert_held(&local->mtx); in ieee80211_mgmt_tx_cookie()
3409 local->roc_cookie_counter++; in ieee80211_mgmt_tx_cookie()
3412 if (WARN_ON(local->roc_cookie_counter == 0)) in ieee80211_mgmt_tx_cookie()
3413 local->roc_cookie_counter++; in ieee80211_mgmt_tx_cookie()
3415 return local->roc_cookie_counter; in ieee80211_mgmt_tx_cookie()
3418 int ieee80211_attach_ack_skb(struct ieee80211_local *local, struct sk_buff *skb, in ieee80211_attach_ack_skb() argument
3429 spin_lock_irqsave(&local->ack_status_lock, spin_flags); in ieee80211_attach_ack_skb()
3430 id = idr_alloc(&local->ack_status_frames, ack_skb, in ieee80211_attach_ack_skb()
3432 spin_unlock_irqrestore(&local->ack_status_lock, spin_flags); in ieee80211_attach_ack_skb()
3441 *cookie = ieee80211_mgmt_tx_cookie(local); in ieee80211_attach_ack_skb()
3451 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_mgmt_frame_register() local
3457 local->probe_req_reg++; in ieee80211_mgmt_frame_register()
3460 if (local->probe_req_reg) in ieee80211_mgmt_frame_register()
3461 local->probe_req_reg--; in ieee80211_mgmt_frame_register()
3467 if (!local->open_count) in ieee80211_mgmt_frame_register()
3471 drv_config_iface_filter(local, sdata, FIF_PROBE_REQ, in ieee80211_mgmt_frame_register()
3474 drv_config_iface_filter(local, sdata, 0, in ieee80211_mgmt_frame_register()
3477 ieee80211_configure_filter(local); in ieee80211_mgmt_frame_register()
3486 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_antenna() local
3488 if (local->started) in ieee80211_set_antenna()
3491 return drv_set_antenna(local, tx_ant, rx_ant); in ieee80211_set_antenna()
3496 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_get_antenna() local
3498 return drv_get_antenna(local, tx_ant, rx_ant); in ieee80211_get_antenna()
3505 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_rekey_data() local
3508 if (!local->ops->set_rekey_data) in ieee80211_set_rekey_data()
3511 drv_set_rekey_data(local, sdata, data); in ieee80211_set_rekey_data()
3520 struct ieee80211_local *local = sdata->local; in ieee80211_probe_client() local
3533 mutex_lock(&local->mtx); in ieee80211_probe_client()
3561 skb = dev_alloc_skb(local->hw.extra_tx_headroom + size); in ieee80211_probe_client()
3569 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_probe_client()
3590 ret = ieee80211_attach_ack_skb(local, skb, cookie, GFP_ATOMIC); in ieee80211_probe_client()
3603 mutex_unlock(&local->mtx); in ieee80211_probe_client()
3613 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_cfg_get_channel() local
3622 } else if (local->open_count > 0 && in ieee80211_cfg_get_channel()
3623 local->open_count == local->monitors && in ieee80211_cfg_get_channel()
3625 if (local->use_chanctx) in ieee80211_cfg_get_channel()
3626 *chandef = local->monitor_chandef; in ieee80211_cfg_get_channel()
3628 *chandef = local->_oper_chandef; in ieee80211_cfg_get_channel()
3714 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_del_tx_ts() local
3735 ieee80211_flush_queues(local, sdata, false); in ieee80211_del_tx_ts()
3874 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_get_txq_stats() local
3878 if (!local->ops->wake_tx_queue) in ieee80211_get_txq_stats()
3881 spin_lock_bh(&local->fq.lock); in ieee80211_get_txq_stats()
3899 txqstats->backlog_packets = local->fq.backlog; in ieee80211_get_txq_stats()
3900 txqstats->backlog_bytes = local->fq.memory_usage; in ieee80211_get_txq_stats()
3901 txqstats->overlimit = local->fq.overlimit; in ieee80211_get_txq_stats()
3902 txqstats->overmemory = local->fq.overmemory; in ieee80211_get_txq_stats()
3903 txqstats->collisions = local->fq.collisions; in ieee80211_get_txq_stats()
3904 txqstats->max_flows = local->fq.flows_cnt; in ieee80211_get_txq_stats()
3909 spin_unlock_bh(&local->fq.lock); in ieee80211_get_txq_stats()
3919 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_get_ftm_responder_stats() local
3922 return drv_get_ftm_responder_stats(local, sdata, ftm_stats); in ieee80211_get_ftm_responder_stats()
3929 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_start_pmsr() local
3932 return drv_start_pmsr(local, sdata, request); in ieee80211_start_pmsr()
3939 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_abort_pmsr() local
3942 return drv_abort_pmsr(local, sdata, request); in ieee80211_abort_pmsr()