Lines Matching defs:local

87 	struct ieee80211_local *local = sdata->local;
108 monitor_sdata = wiphy_dereference(local->hw.wiphy,
109 local->monitor_sdata);
126 ieee80211_configure_filter(local);
178 struct ieee80211_local *local = wiphy_priv(wiphy);
183 err = ieee80211_if_add(local, name, name_assign_type, &wdev, type, params);
213 struct ieee80211_local *local = sdata->local;
238 mutex_lock(&local->sta_mtx);
241 drv_sta_set_4addr(local, sdata, &sta->sta,
243 mutex_unlock(&local->sta_mtx);
246 ieee80211_send_4addr_nullfunc(local, sdata);
264 mutex_lock(&sdata->local->chanctx_mtx);
266 mutex_unlock(&sdata->local->chanctx_mtx);
286 mutex_lock(&sdata->local->chanctx_mtx);
288 mutex_unlock(&sdata->local->chanctx_mtx);
296 ret = drv_start_nan(sdata->local, sdata, conf);
310 drv_stop_nan(sdata->local, sdata);
337 ret = drv_nan_change_conf(sdata->local, sdata, &new_conf, changes);
360 nan_func, 1, sdata->local->hw.max_nan_de_entries + 1,
371 ret = drv_add_nan_func(sdata->local, sdata, nan_func);
419 drv_del_nan_func(sdata->local, sdata, instance_id);
438 struct ieee80211_local *local = sdata->local;
443 if (!wiphy_ext_feature_isset(local->hw.wiphy,
455 mutex_lock(&local->key_mtx);
456 key = key_mtx_dereference(local, sta->ptk[key_idx]);
461 mutex_unlock(&local->key_mtx);
472 struct ieee80211_local *local = sdata->local;
513 mutex_lock(&local->sta_mtx);
574 mutex_unlock(&local->sta_mtx);
583 struct ieee80211_local *local __maybe_unused = sdata->local;
604 lockdep_is_held(&local->sta_mtx));
612 return rcu_dereference_check_key_mtx(local,
619 return rcu_dereference_check_key_mtx(local,
626 return rcu_dereference_check_key_mtx(local,
629 key = rcu_dereference_check_key_mtx(local, link->gtk[key_idx]);
635 return rcu_dereference_check_key_mtx(local, sdata->keys[key_idx]);
645 struct ieee80211_local *local = sdata->local;
649 mutex_lock(&local->sta_mtx);
650 mutex_lock(&local->key_mtx);
662 mutex_unlock(&local->key_mtx);
663 mutex_unlock(&local->sta_mtx);
704 drv_get_key_seq(sdata->local, key, &kseq);
737 drv_get_key_seq(sdata->local, key, &kseq);
756 drv_get_key_seq(sdata->local, key, &kseq);
862 struct ieee80211_local *local = sdata->local;
866 mutex_lock(&local->sta_mtx);
875 mutex_unlock(&local->sta_mtx);
883 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
885 return drv_get_survey(local, idx, survey);
892 struct ieee80211_local *local = sdata->local;
896 mutex_lock(&local->sta_mtx);
904 mutex_unlock(&local->sta_mtx);
912 struct ieee80211_local *local = wiphy_priv(wiphy);
916 if (cfg80211_chandef_identical(&local->monitor_chandef, chandef))
919 if (local->use_chanctx) {
920 sdata = wiphy_dereference(local->hw.wiphy,
921 local->monitor_sdata);
924 mutex_lock(&local->mtx);
929 mutex_unlock(&local->mtx);
933 mutex_lock(&local->mtx);
934 if (local->open_count == local->monitors) {
935 local->_oper_chandef = *chandef;
936 ieee80211_hw_config(local, 0);
938 mutex_unlock(&local->mtx);
942 local->monitor_chandef = *chandef;
1266 struct ieee80211_local *local = sdata->local;
1296 link->needed_rx_chains = sdata->local->rx_chains;
1390 mutex_lock(&local->mtx);
1395 mutex_unlock(&local->mtx);
1448 if (wiphy_ext_feature_isset(local->hw.wiphy,
1458 if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL))
1484 err = drv_start_ap(sdata->local, sdata, link_conf);
1495 ieee80211_recalc_dtim(local, sdata);
1506 mutex_lock(&local->mtx);
1508 mutex_unlock(&local->mtx);
1572 struct ieee80211_local *local = sdata->local;
1596 mutex_lock(&local->mtx);
1600 ieee80211_wake_vif_queues(local, sdata,
1605 mutex_unlock(&local->mtx);
1655 drv_stop_ap(sdata->local, sdata, link_conf);
1658 local->total_ps_buffered -= skb_queue_len(&sdata->u.ap.ps.bc_buf);
1659 ieee80211_purge_tx_queue(&local->hw, &sdata->u.ap.ps.bc_buf);
1661 mutex_lock(&local->mtx);
1664 mutex_unlock(&local->mtx);
1669 static int sta_apply_auth_flags(struct ieee80211_local *local,
1729 static void sta_apply_mesh_params(struct ieee80211_local *local,
1794 static int sta_link_apply_parameters(struct ieee80211_local *local,
1806 lockdep_is_held(&local->sta_mtx));
1843 ret = drv_sta_set_txpwr(local, sdata, sta);
1895 static int sta_apply_parameters(struct ieee80211_local *local,
1930 local->hw.queues >= IEEE80211_NUM_ACS)
1938 ret = sta_apply_auth_flags(local, sta, mask, set);
1974 ieee80211_hw_check(&local->hw, TDLS_WIDER_BW) &&
2005 ret = sta_link_apply_parameters(local, sta, false,
2014 sta_apply_mesh_params(local, sta, params);
2022 ret = sta_apply_auth_flags(local, sta, mask, set);
2038 struct ieee80211_local *local = wiphy_priv(wiphy);
2086 mutex_lock(&local->sta_mtx);
2087 err = sta_apply_parameters(local, sta, params);
2088 mutex_unlock(&local->sta_mtx);
2090 sta_info_free(local, sta);
2125 struct ieee80211_local *local = wiphy_priv(wiphy);
2131 mutex_lock(&local->sta_mtx);
2186 drv_sta_set_4addr(local, sta->sdata, &sta->sta, true);
2211 err = sta_apply_parameters(local, sta, params);
2214 err = sta_apply_parameters(local, sta, params);
2219 mutex_unlock(&local->sta_mtx);
2223 ieee80211_recalc_ps(local);
2229 mutex_unlock(&local->sta_mtx);
2502 if (wiphy_ext_feature_isset(sdata->local->hw.wiphy,
2595 if (!ieee80211_hw_check(&sdata->local->hw, SIGNAL_DBM))
2652 sdata->deflink.needed_rx_chains = sdata->local->rx_chains;
2654 mutex_lock(&sdata->local->mtx);
2657 mutex_unlock(&sdata->local->mtx);
2669 mutex_lock(&sdata->local->mtx);
2672 mutex_unlock(&sdata->local->mtx);
2770 struct ieee80211_local *local = wiphy_priv(wiphy);
2776 if (!local->ops->conf_tx)
2779 if (local->hw.queues < IEEE80211_NUM_ACS)
2800 if (drv_conf_tx(local, link, params->ac, &p)) {
2801 wiphy_debug(local->hw.wiphy,
2844 if (sdata->local->ops->hw_scan)
2885 if (!sdata->local->ops->sched_scan_start)
2895 struct ieee80211_local *local = wiphy_priv(wiphy);
2897 if (!local->ops->sched_scan_stop)
2900 return ieee80211_request_sched_scan_stop(local);
2965 struct ieee80211_local *local = wiphy_priv(wiphy);
2969 ieee80211_check_fast_xmit_all(local);
2971 err = drv_set_frag_threshold(local, wiphy->frag_threshold);
2974 ieee80211_check_fast_xmit_all(local);
2985 err = drv_set_coverage_class(local, coverage_class);
2992 err = drv_set_rts_threshold(local, wiphy->rts_threshold);
3001 local->hw.conf.short_frame_max_tx_count = wiphy->retry_short;
3006 local->hw.conf.long_frame_max_tx_count = wiphy->retry_long;
3010 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_RETRY_LIMITS);
3015 ieee80211_txq_set_params(local);
3024 struct ieee80211_local *local = wiphy_priv(wiphy);
3034 sdata = wiphy_dereference(local->hw.wiphy,
3035 local->monitor_sdata);
3066 local->user_power_level = IEEE80211_UNSET_POWER_LEVEL;
3073 local->user_power_level = MBM_TO_DBM(mbm);
3077 mutex_lock(&local->iflist_mtx);
3078 list_for_each_entry(sdata, &local->interfaces, list) {
3083 sdata->deflink.user_power_level = local->user_power_level;
3088 list_for_each_entry(sdata, &local->interfaces, list) {
3093 mutex_unlock(&local->iflist_mtx);
3096 sdata = wiphy_dereference(local->hw.wiphy,
3097 local->monitor_sdata);
3099 sdata->deflink.user_power_level = local->user_power_level;
3115 struct ieee80211_local *local = wiphy_priv(wiphy);
3118 if (local->ops->get_txpower)
3119 return drv_get_txpower(local, sdata, dbm);
3121 if (!local->use_chanctx)
3122 *dbm = local->hw.conf.power_level;
3135 struct ieee80211_local *local = wiphy_priv(wiphy);
3137 drv_rfkill_poll(local);
3145 struct ieee80211_local *local = wiphy_priv(wiphy);
3148 if (!local->ops->testmode_cmd)
3159 return local->ops->testmode_cmd(&local->hw, vif, data, len);
3167 struct ieee80211_local *local = wiphy_priv(wiphy);
3169 if (!local->ops->testmode_dump)
3172 return local->ops->testmode_dump(&local->hw, skb, cb, data, len);
3210 list_for_each_entry_rcu(sta, &sdata->local->sta_list, list) {
3242 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
3248 if (!ieee80211_hw_check(&local->hw, SUPPORTS_PS))
3252 timeout == local->dynamic_ps_forced_timeout)
3256 local->dynamic_ps_forced_timeout = timeout;
3272 if (ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS))
3273 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
3275 ieee80211_recalc_ps(local);
3346 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
3367 if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) {
3368 ret = drv_set_bitrate_mask(local, sdata, mask);
3413 struct ieee80211_local *local = sdata->local;
3416 mutex_lock(&local->mtx);
3417 if (!list_empty(&local->roc_list) || local->scanning) {
3424 sdata->deflink.needed_rx_chains = local->rx_chains;
3431 ieee80211_queue_delayed_work(&sdata->local->hw,
3436 mutex_unlock(&local->mtx);
3444 struct ieee80211_local *local = sdata->local;
3446 mutex_lock(&local->mtx);
3447 list_for_each_entry(sdata, &local->interfaces, list) {
3448 /* it might be waiting for the local->mtx, but then
3459 mutex_unlock(&local->mtx);
3573 struct ieee80211_local *local = sdata->local;
3584 list_for_each_entry_rcu(iter, &local->interfaces, list) {
3591 ieee80211_queue_work(&iter->local->hw,
3595 ieee80211_queue_work(&local->hw, &sdata->deflink.csa_finalize_work);
3605 struct ieee80211_local *local = sdata->local;
3609 wiphy_work_queue(local->hw.wiphy, &ifmgd->csa_connection_drop_work);
3653 struct ieee80211_local *local = sdata->local;
3658 lockdep_assert_held(&local->mtx);
3659 lockdep_assert_held(&local->chanctx_mtx);
3699 ieee80211_wake_vif_queues(local, sdata,
3718 cfg80211_stop_iface(sdata->local->hw.wiphy, &sdata->wdev,
3728 struct ieee80211_local *local = sdata->local;
3731 mutex_lock(&local->mtx);
3732 mutex_lock(&local->chanctx_mtx);
3744 mutex_unlock(&local->chanctx_mtx);
3745 mutex_unlock(&local->mtx);
3895 struct ieee80211_local *local = sdata->local;
3903 lockdep_assert_held(&local->mtx);
3905 if (!list_empty(&local->roc_list) || local->scanning)
3919 mutex_lock(&local->chanctx_mtx);
3921 lockdep_is_held(&local->chanctx_mtx));
3977 ieee80211_stop_vif_queues(local, sdata,
3995 mutex_unlock(&local->chanctx_mtx);
4003 struct ieee80211_local *local = sdata->local;
4006 mutex_lock(&local->mtx);
4008 mutex_unlock(&local->mtx);
4013 u64 ieee80211_mgmt_tx_cookie(struct ieee80211_local *local)
4015 lockdep_assert_held(&local->mtx);
4017 local->roc_cookie_counter++;
4020 if (WARN_ON(local->roc_cookie_counter == 0))
4021 local->roc_cookie_counter++;
4023 return local->roc_cookie_counter;
4026 int ieee80211_attach_ack_skb(struct ieee80211_local *local, struct sk_buff *skb,
4037 spin_lock_irqsave(&local->ack_status_lock, spin_flags);
4038 id = idr_alloc(&local->ack_status_frames, ack_skb,
4040 spin_unlock_irqrestore(&local->ack_status_lock, spin_flags);
4049 *cookie = ieee80211_mgmt_tx_cookie(local);
4060 struct ieee80211_local *local = wiphy_priv(wiphy);
4067 (local->probe_req_reg != !!(upd->global_stypes & preq_mask)) ||
4068 (local->rx_mcast_action_reg !=
4070 local->probe_req_reg = upd->global_stypes & preq_mask;
4071 local->rx_mcast_action_reg = upd->global_mcast_stypes & action_mask;
4081 if (!local->open_count)
4085 drv_config_iface_filter(local, sdata,
4091 ieee80211_configure_filter(local);
4096 struct ieee80211_local *local = wiphy_priv(wiphy);
4098 if (local->started)
4101 return drv_set_antenna(local, tx_ant, rx_ant);
4106 struct ieee80211_local *local = wiphy_priv(wiphy);
4108 return drv_get_antenna(local, tx_ant, rx_ant);
4115 struct ieee80211_local *local = wiphy_priv(wiphy);
4118 if (!local->ops->set_rekey_data)
4121 drv_set_rekey_data(local, sdata, data);
4130 struct ieee80211_local *local = sdata->local;
4143 mutex_lock(&local->mtx);
4172 skb = dev_alloc_skb(local->hw.extra_tx_headroom + size);
4180 skb_reserve(skb, local->hw.extra_tx_headroom);
4201 ret = ieee80211_attach_ack_skb(local, skb, cookie, GFP_ATOMIC);
4214 mutex_unlock(&local->mtx);
4225 struct ieee80211_local *local = wiphy_priv(wiphy);
4241 } else if (local->open_count > 0 &&
4242 local->open_count == local->monitors &&
4244 if (local->use_chanctx)
4245 *chandef = local->monitor_chandef;
4247 *chandef = local->_oper_chandef;
4338 struct ieee80211_local *local = wiphy_priv(wiphy);
4359 ieee80211_flush_queues(local, sdata, false);
4498 struct ieee80211_local *local = wiphy_priv(wiphy);
4502 spin_lock_bh(&local->fq.lock);
4520 txqstats->backlog_packets = local->fq.backlog;
4521 txqstats->backlog_bytes = local->fq.memory_usage;
4522 txqstats->overlimit = local->fq.overlimit;
4523 txqstats->overmemory = local->fq.overmemory;
4524 txqstats->collisions = local->fq.collisions;
4525 txqstats->max_flows = local->fq.flows_cnt;
4530 spin_unlock_bh(&local->fq.lock);
4540 struct ieee80211_local *local = wiphy_priv(wiphy);
4543 return drv_get_ftm_responder_stats(local, sdata, ftm_stats);
4550 struct ieee80211_local *local = wiphy_priv(wiphy);
4553 return drv_start_pmsr(local, sdata, request);
4560 struct ieee80211_local *local = wiphy_priv(wiphy);
4563 return drv_abort_pmsr(local, sdata, request);
4574 if (!sdata->local->ops->set_tid_config)
4578 return drv_set_tid_config(sdata->local, sdata, NULL, tid_conf);
4580 mutex_lock(&sdata->local->sta_mtx);
4583 mutex_unlock(&sdata->local->sta_mtx);
4587 ret = drv_set_tid_config(sdata->local, sdata, &sta->sta, tid_conf);
4588 mutex_unlock(&sdata->local->sta_mtx);
4601 if (!sdata->local->ops->reset_tid_config)
4605 return drv_reset_tid_config(sdata->local, sdata, NULL, tids);
4607 mutex_lock(&sdata->local->sta_mtx);
4610 mutex_unlock(&sdata->local->sta_mtx);
4614 ret = drv_reset_tid_config(sdata->local, sdata, &sta->sta, tids);
4615 mutex_unlock(&sdata->local->sta_mtx);
4623 struct ieee80211_local *local = wiphy_priv(wiphy);
4625 if (!local->ops->set_sar_specs)
4628 return local->ops->set_sar_specs(&local->hw, sar);
4712 mutex_lock(&sdata->local->iflist_mtx);
4713 list_for_each_entry(child, &sdata->local->interfaces, list) {
4722 mutex_unlock(&sdata->local->iflist_mtx);
4728 struct ieee80211_local *local = sdata->local;
4733 lockdep_assert_held(&local->mtx);
4756 struct ieee80211_local *local = sdata->local;
4759 mutex_lock(&local->mtx);
4771 mutex_unlock(&local->mtx);
4792 ieee80211_queue_work(&sdata->local->hw,
4814 ieee80211_queue_delayed_work(&sdata->local->hw,
4825 struct ieee80211_local *local = sdata->local;
4834 mutex_lock(&local->mtx);
4860 mutex_unlock(&local->mtx);
4869 struct ieee80211_local *local = wiphy_priv(wiphy);
4871 if (!local->ops->set_radar_background)
4874 return local->ops->set_radar_background(&local->hw, chandef);
4887 mutex_lock(&sdata->local->mtx);
4889 mutex_unlock(&sdata->local->mtx);
4900 mutex_lock(&sdata->local->mtx);
4902 mutex_unlock(&sdata->local->mtx);
4905 static int sta_add_link_station(struct ieee80211_local *local,
4926 ret = sta_link_apply_parameters(local, sta, true, params);
4941 struct ieee80211_local *local = wiphy_priv(wiphy);
4944 mutex_lock(&sdata->local->sta_mtx);
4945 ret = sta_add_link_station(local, sdata, params);
4946 mutex_unlock(&sdata->local->sta_mtx);
4951 static int sta_mod_link_station(struct ieee80211_local *local,
4964 return sta_link_apply_parameters(local, sta, false, params);
4972 struct ieee80211_local *local = wiphy_priv(wiphy);
4975 mutex_lock(&sdata->local->sta_mtx);
4976 ret = sta_mod_link_station(local, sdata, params);
4977 mutex_unlock(&sdata->local->sta_mtx);
5010 mutex_lock(&sdata->local->sta_mtx);
5012 mutex_unlock(&sdata->local->sta_mtx);
5022 struct ieee80211_local *local = sdata->local;
5024 if (!local->ops->set_hw_timestamp)
5030 return local->ops->set_hw_timestamp(&local->hw, &sdata->vif, hwts);