Lines Matching refs:local
32 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_add_iface() local
37 err = ieee80211_if_add(local, name, name_assign_type, &wdev, type, params); in ieee80211_add_iface()
76 struct ieee80211_local *local = sdata->local; in ieee80211_change_iface() local
98 ieee80211_configure_filter(local); in ieee80211_change_iface()
118 mutex_lock(&sdata->local->chanctx_mtx); in ieee80211_start_p2p_device()
120 mutex_unlock(&sdata->local->chanctx_mtx); in ieee80211_start_p2p_device()
148 struct ieee80211_local *local = sdata->local; in ieee80211_add_key() local
162 if (IS_ERR(local->wep_tx_tfm)) in ieee80211_add_key()
175 cs = ieee80211_cs_get(local, params->cipher, sdata->vif.type); in ieee80211_add_key()
188 mutex_lock(&local->sta_mtx); in ieee80211_add_key()
251 mutex_unlock(&local->sta_mtx); in ieee80211_add_key()
260 struct ieee80211_local *local = sdata->local; in ieee80211_del_key() local
265 mutex_lock(&local->sta_mtx); in ieee80211_del_key()
266 mutex_lock(&local->key_mtx); in ieee80211_del_key()
276 key = key_mtx_dereference(local, sta->ptk[key_idx]); in ieee80211_del_key()
278 key = key_mtx_dereference(local, sta->gtk[key_idx]); in ieee80211_del_key()
280 key = key_mtx_dereference(local, sdata->keys[key_idx]); in ieee80211_del_key()
291 mutex_unlock(&local->key_mtx); in ieee80211_del_key()
292 mutex_unlock(&local->sta_mtx); in ieee80211_del_key()
343 drv_get_tkip_seq(sdata->local, in ieee80211_get_key()
457 sband = sta->local->hw.wiphy->bands[ in sta_set_rate_info_tx()
490 sband = sta->local->hw.wiphy->bands[ in sta_set_rate_info_rx()
517 struct ieee80211_local *local = sdata->local; in ieee80211_dump_station() local
521 mutex_lock(&local->sta_mtx); in ieee80211_dump_station()
530 mutex_unlock(&local->sta_mtx); in ieee80211_dump_station()
538 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_dump_survey() local
540 return drv_get_survey(local, idx, survey); in ieee80211_dump_survey()
547 struct ieee80211_local *local = sdata->local; in ieee80211_get_station() local
551 mutex_lock(&local->sta_mtx); in ieee80211_get_station()
559 mutex_unlock(&local->sta_mtx); in ieee80211_get_station()
567 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_monitor_channel() local
571 if (cfg80211_chandef_identical(&local->monitor_chandef, chandef)) in ieee80211_set_monitor_channel()
574 mutex_lock(&local->mtx); in ieee80211_set_monitor_channel()
575 mutex_lock(&local->iflist_mtx); in ieee80211_set_monitor_channel()
576 if (local->use_chanctx) { in ieee80211_set_monitor_channel()
578 local->monitor_sdata, in ieee80211_set_monitor_channel()
579 lockdep_is_held(&local->iflist_mtx)); in ieee80211_set_monitor_channel()
585 } else if (local->open_count == local->monitors) { in ieee80211_set_monitor_channel()
586 local->_oper_chandef = *chandef; in ieee80211_set_monitor_channel()
587 ieee80211_hw_config(local, 0); in ieee80211_set_monitor_channel()
591 local->monitor_chandef = *chandef; in ieee80211_set_monitor_channel()
592 mutex_unlock(&local->iflist_mtx); in ieee80211_set_monitor_channel()
593 mutex_unlock(&local->mtx); in ieee80211_set_monitor_channel()
713 struct ieee80211_local *local = sdata->local; in ieee80211_start_ap() local
741 sdata->needed_rx_chains = sdata->local->rx_chains; in ieee80211_start_ap()
743 mutex_lock(&local->mtx); in ieee80211_start_ap()
748 mutex_unlock(&local->mtx); in ieee80211_start_ap()
758 sdata->encrypt_headroom = ieee80211_cs_headroom(sdata->local, in ieee80211_start_ap()
768 ieee80211_cs_headroom(sdata->local, in ieee80211_start_ap()
799 err = drv_start_ap(sdata->local, sdata); in ieee80211_start_ap()
810 ieee80211_recalc_dtim(local, sdata); in ieee80211_start_ap()
851 struct ieee80211_local *local = sdata->local; in ieee80211_stop_ap() local
864 mutex_lock(&local->mtx); in ieee80211_stop_ap()
867 ieee80211_wake_vif_queues(local, sdata, in ieee80211_stop_ap()
872 mutex_unlock(&local->mtx); in ieee80211_stop_ap()
906 drv_stop_ap(sdata->local, sdata); in ieee80211_stop_ap()
909 local->total_ps_buffered -= skb_queue_len(&sdata->u.ap.ps.bc_buf); in ieee80211_stop_ap()
912 mutex_lock(&local->mtx); in ieee80211_stop_ap()
915 mutex_unlock(&local->mtx); in ieee80211_stop_ap()
964 static int sta_apply_auth_flags(struct ieee80211_local *local, in sta_apply_auth_flags() argument
1024 static int sta_apply_parameters(struct ieee80211_local *local, in sta_apply_parameters() argument
1034 sband = local->hw.wiphy->bands[band]; in sta_apply_parameters()
1063 local->hw.queues >= IEEE80211_NUM_ACS) in sta_apply_parameters()
1068 ret = sta_apply_auth_flags(local, sta, mask, set); in sta_apply_parameters()
1208 ret = sta_apply_auth_flags(local, sta, mask, set); in sta_apply_parameters()
1220 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_add_station() local
1256 err = sta_apply_parameters(local, sta, params); in ieee80211_add_station()
1258 sta_info_free(local, sta); in ieee80211_add_station()
1305 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_change_station() local
1311 mutex_lock(&local->sta_mtx); in ieee80211_change_station()
1387 err = sta_apply_parameters(local, sta, params); in ieee80211_change_station()
1391 mutex_unlock(&local->sta_mtx); in ieee80211_change_station()
1409 ieee80211_recalc_ps(local, -1); in ieee80211_change_station()
1415 mutex_unlock(&local->sta_mtx); in ieee80211_change_station()
1767 if (!(sdata->local->hw.flags & IEEE80211_HW_SIGNAL_DBM)) in ieee80211_update_mesh_config()
1813 sdata->needed_rx_chains = sdata->local->rx_chains; in ieee80211_join_mesh()
1815 mutex_lock(&sdata->local->mtx); in ieee80211_join_mesh()
1818 mutex_unlock(&sdata->local->mtx); in ieee80211_join_mesh()
1830 mutex_lock(&sdata->local->mtx); in ieee80211_leave_mesh()
1832 mutex_unlock(&sdata->local->mtx); in ieee80211_leave_mesh()
1922 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_txq_params() local
1926 if (!local->ops->conf_tx) in ieee80211_set_txq_params()
1929 if (local->hw.queues < IEEE80211_NUM_ACS) in ieee80211_set_txq_params()
1945 if (drv_conf_tx(local, sdata, params->ac, &p)) { in ieee80211_set_txq_params()
1946 wiphy_debug(local->hw.wiphy, in ieee80211_set_txq_params()
1988 if (sdata->local->ops->hw_scan) in ieee80211_scan()
2022 if (!sdata->local->ops->sched_scan_start) in ieee80211_sched_scan_start()
2033 if (!sdata->local->ops->sched_scan_stop) in ieee80211_sched_scan_stop()
2098 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_wiphy_params() local
2102 err = drv_set_frag_threshold(local, wiphy->frag_threshold); in ieee80211_set_wiphy_params()
2114 err = drv_set_coverage_class(local, coverage_class); in ieee80211_set_wiphy_params()
2121 err = drv_set_rts_threshold(local, wiphy->rts_threshold); in ieee80211_set_wiphy_params()
2130 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short; in ieee80211_set_wiphy_params()
2135 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long; in ieee80211_set_wiphy_params()
2139 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_RETRY_LIMITS); in ieee80211_set_wiphy_params()
2148 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_tx_power() local
2181 local->user_power_level = IEEE80211_UNSET_POWER_LEVEL; in ieee80211_set_tx_power()
2188 local->user_power_level = MBM_TO_DBM(mbm); in ieee80211_set_tx_power()
2192 mutex_lock(&local->iflist_mtx); in ieee80211_set_tx_power()
2193 list_for_each_entry(sdata, &local->interfaces, list) { in ieee80211_set_tx_power()
2194 sdata->user_power_level = local->user_power_level; in ieee80211_set_tx_power()
2199 list_for_each_entry(sdata, &local->interfaces, list) in ieee80211_set_tx_power()
2201 mutex_unlock(&local->iflist_mtx); in ieee80211_set_tx_power()
2210 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_get_tx_power() local
2213 if (local->ops->get_txpower) in ieee80211_get_tx_power()
2214 return drv_get_txpower(local, sdata, dbm); in ieee80211_get_tx_power()
2216 if (!local->use_chanctx) in ieee80211_get_tx_power()
2217 *dbm = local->hw.conf.power_level; in ieee80211_get_tx_power()
2236 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_rfkill_poll() local
2238 drv_rfkill_poll(local); in ieee80211_rfkill_poll()
2246 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_testmode_cmd() local
2249 if (!local->ops->testmode_cmd) in ieee80211_testmode_cmd()
2260 return local->ops->testmode_cmd(&local->hw, vif, data, len); in ieee80211_testmode_cmd()
2268 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_testmode_dump() local
2270 if (!local->ops->testmode_dump) in ieee80211_testmode_dump()
2273 return local->ops->testmode_dump(&local->hw, skb, cb, data, len); in ieee80211_testmode_dump()
2300 ieee80211_queue_work(&sdata->local->hw, &sdata->recalc_smps); in __ieee80211_request_smps_ap()
2308 mutex_lock(&sdata->local->sta_mtx); in __ieee80211_request_smps_ap()
2309 list_for_each_entry(sta, &sdata->local->sta_list, list) { in __ieee80211_request_smps_ap()
2344 mutex_unlock(&sdata->local->sta_mtx); in __ieee80211_request_smps_ap()
2347 ieee80211_queue_work(&sdata->local->hw, &sdata->recalc_smps); in __ieee80211_request_smps_ap()
2402 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_set_power_mgmt() local
2407 if (!(local->hw.flags & IEEE80211_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 (local->hw.flags & IEEE80211_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, -1); in ieee80211_set_power_mgmt()
2460 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_set_bitrate_mask() local
2466 if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) { in ieee80211_set_bitrate_mask()
2467 ret = drv_set_bitrate_mask(local, sdata, mask); in ieee80211_set_bitrate_mask()
2494 static bool ieee80211_coalesce_started_roc(struct ieee80211_local *local, in ieee80211_coalesce_started_roc() argument
2517 static int ieee80211_start_roc_work(struct ieee80211_local *local, in ieee80211_start_roc_work() argument
2528 lockdep_assert_held(&local->mtx); in ieee80211_start_roc_work()
2530 if (local->use_chanctx && !local->ops->remain_on_channel) in ieee80211_start_roc_work()
2565 local->roc_cookie_counter++; in ieee80211_start_roc_work()
2566 roc->cookie = local->roc_cookie_counter; in ieee80211_start_roc_work()
2570 local->roc_cookie_counter++; in ieee80211_start_roc_work()
2578 if (!list_empty(&local->roc_list) || in ieee80211_start_roc_work()
2579 local->scanning || ieee80211_is_radar_required(local)) in ieee80211_start_roc_work()
2583 if (!local->ops->remain_on_channel) { in ieee80211_start_roc_work()
2584 ieee80211_queue_delayed_work(&local->hw, &roc->work, 0); in ieee80211_start_roc_work()
2590 ret = drv_remain_on_channel(local, sdata, channel, duration, type); in ieee80211_start_roc_work()
2600 list_for_each_entry(tmp, &local->roc_list, list) { in ieee80211_start_roc_work()
2621 if (local->ops->remain_on_channel) { in ieee80211_start_roc_work()
2636 if (ieee80211_coalesce_started_roc(local, roc, tmp)) in ieee80211_start_roc_work()
2667 list_add_tail(&roc->list, &local->roc_list); in ieee80211_start_roc_work()
2679 struct ieee80211_local *local = sdata->local; in ieee80211_remain_on_channel() local
2682 mutex_lock(&local->mtx); in ieee80211_remain_on_channel()
2683 ret = ieee80211_start_roc_work(local, sdata, chan, in ieee80211_remain_on_channel()
2686 mutex_unlock(&local->mtx); in ieee80211_remain_on_channel()
2691 static int ieee80211_cancel_roc(struct ieee80211_local *local, in ieee80211_cancel_roc() argument
2697 mutex_lock(&local->mtx); in ieee80211_cancel_roc()
2698 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) { in ieee80211_cancel_roc()
2708 mutex_unlock(&local->mtx); in ieee80211_cancel_roc()
2724 mutex_unlock(&local->mtx); in ieee80211_cancel_roc()
2735 if (local->ops->remain_on_channel) { in ieee80211_cancel_roc()
2737 ret = drv_cancel_remain_on_channel(local); in ieee80211_cancel_roc()
2739 mutex_unlock(&local->mtx); in ieee80211_cancel_roc()
2747 ieee80211_start_next_roc(local); in ieee80211_cancel_roc()
2748 mutex_unlock(&local->mtx); in ieee80211_cancel_roc()
2754 ieee80211_queue_delayed_work(&local->hw, &found->work, 0); in ieee80211_cancel_roc()
2756 mutex_unlock(&local->mtx); in ieee80211_cancel_roc()
2772 struct ieee80211_local *local = sdata->local; in ieee80211_cancel_remain_on_channel() local
2774 return ieee80211_cancel_roc(local, cookie, false); in ieee80211_cancel_remain_on_channel()
2783 struct ieee80211_local *local = sdata->local; in ieee80211_start_radar_detection() local
2786 mutex_lock(&local->mtx); in ieee80211_start_radar_detection()
2787 if (!list_empty(&local->roc_list) || local->scanning) { in ieee80211_start_radar_detection()
2794 sdata->needed_rx_chains = local->rx_chains; in ieee80211_start_radar_detection()
2801 ieee80211_queue_delayed_work(&sdata->local->hw, in ieee80211_start_radar_detection()
2806 mutex_unlock(&local->mtx); in ieee80211_start_radar_detection()
2870 ieee80211_queue_work(&sdata->local->hw, in ieee80211_csa_finish()
2915 struct ieee80211_local *local = sdata->local; in __ieee80211_csa_finalize() local
2920 lockdep_assert_held(&local->mtx); in __ieee80211_csa_finalize()
2921 lockdep_assert_held(&local->chanctx_mtx); in __ieee80211_csa_finalize()
2955 ieee80211_wake_vif_queues(local, sdata, in __ieee80211_csa_finalize()
2973 cfg80211_stop_iface(sdata->local->hw.wiphy, &sdata->wdev, in ieee80211_csa_finalize()
2983 struct ieee80211_local *local = sdata->local; in ieee80211_csa_finalize_work() local
2986 mutex_lock(&local->mtx); in ieee80211_csa_finalize_work()
2987 mutex_lock(&local->chanctx_mtx); in ieee80211_csa_finalize_work()
2999 mutex_unlock(&local->chanctx_mtx); in ieee80211_csa_finalize_work()
3000 mutex_unlock(&local->mtx); in ieee80211_csa_finalize_work()
3142 struct ieee80211_local *local = sdata->local; in __ieee80211_channel_switch() local
3150 lockdep_assert_held(&local->mtx); in __ieee80211_channel_switch()
3152 if (!list_empty(&local->roc_list) || local->scanning) in __ieee80211_channel_switch()
3166 mutex_lock(&local->chanctx_mtx); in __ieee80211_channel_switch()
3168 lockdep_is_held(&local->chanctx_mtx)); in __ieee80211_channel_switch()
3214 ieee80211_stop_vif_queues(local, sdata, in __ieee80211_channel_switch()
3229 mutex_unlock(&local->chanctx_mtx); in __ieee80211_channel_switch()
3237 struct ieee80211_local *local = sdata->local; in ieee80211_channel_switch() local
3240 mutex_lock(&local->mtx); in ieee80211_channel_switch()
3242 mutex_unlock(&local->mtx); in ieee80211_channel_switch()
3252 struct ieee80211_local *local = sdata->local; in ieee80211_mgmt_tx() local
3318 mutex_lock(&local->mtx); in ieee80211_mgmt_tx()
3346 skb = dev_alloc_skb(local->hw.extra_tx_headroom + params->len); in ieee80211_mgmt_tx()
3351 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_mgmt_tx()
3395 if (local->hw.flags & IEEE80211_HW_QUEUE_CONTROL) in ieee80211_mgmt_tx()
3397 local->hw.offchannel_tx_hw_queue; in ieee80211_mgmt_tx()
3400 ret = ieee80211_start_roc_work(local, sdata, params->chan, in ieee80211_mgmt_tx()
3406 mutex_unlock(&local->mtx); in ieee80211_mgmt_tx()
3414 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_mgmt_tx_cancel_wait() local
3416 return ieee80211_cancel_roc(local, cookie, true); in ieee80211_mgmt_tx_cancel_wait()
3423 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_mgmt_frame_register() local
3428 local->probe_req_reg++; in ieee80211_mgmt_frame_register()
3430 local->probe_req_reg--; in ieee80211_mgmt_frame_register()
3432 if (!local->open_count) in ieee80211_mgmt_frame_register()
3435 ieee80211_queue_work(&local->hw, &local->reconfig_filter); in ieee80211_mgmt_frame_register()
3444 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_antenna() local
3446 if (local->started) in ieee80211_set_antenna()
3449 return drv_set_antenna(local, tx_ant, rx_ant); in ieee80211_set_antenna()
3454 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_get_antenna() local
3456 return drv_get_antenna(local, tx_ant, rx_ant); in ieee80211_get_antenna()
3463 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_set_rekey_data() local
3466 if (!local->ops->set_rekey_data) in ieee80211_set_rekey_data()
3469 drv_set_rekey_data(local, sdata, data); in ieee80211_set_rekey_data()
3478 struct ieee80211_local *local = sdata->local; in ieee80211_probe_client() local
3515 skb = dev_alloc_skb(local->hw.extra_tx_headroom + size); in ieee80211_probe_client()
3523 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_probe_client()
3558 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_cfg_get_channel() local
3567 } else if (local->open_count > 0 && in ieee80211_cfg_get_channel()
3568 local->open_count == local->monitors && in ieee80211_cfg_get_channel()
3570 if (local->use_chanctx) in ieee80211_cfg_get_channel()
3571 *chandef = local->monitor_chandef; in ieee80211_cfg_get_channel()
3573 *chandef = local->_oper_chandef; in ieee80211_cfg_get_channel()
3659 struct ieee80211_local *local = wiphy_priv(wiphy); in ieee80211_del_tx_ts() local
3680 ieee80211_flush_queues(local, sdata, false); in ieee80211_del_tx_ts()