Lines Matching full:local

15 static int ieee80211_chanctx_num_assigned(struct ieee80211_local *local,  in ieee80211_chanctx_num_assigned()  argument
21 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_num_assigned()
29 static int ieee80211_chanctx_num_reserved(struct ieee80211_local *local, in ieee80211_chanctx_num_reserved() argument
35 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_num_reserved()
43 int ieee80211_chanctx_refcount(struct ieee80211_local *local, in ieee80211_chanctx_refcount() argument
46 return ieee80211_chanctx_num_assigned(local, ctx) + in ieee80211_chanctx_refcount()
47 ieee80211_chanctx_num_reserved(local, ctx); in ieee80211_chanctx_refcount()
50 static int ieee80211_num_chanctx(struct ieee80211_local *local, int radio_idx) in ieee80211_num_chanctx() argument
55 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_num_chanctx()
57 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_num_chanctx()
66 static bool ieee80211_can_create_new_chanctx(struct ieee80211_local *local, in ieee80211_can_create_new_chanctx() argument
69 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_can_create_new_chanctx()
71 return ieee80211_num_chanctx(local, radio_idx) < in ieee80211_can_create_new_chanctx()
72 ieee80211_max_num_channels(local, radio_idx); in ieee80211_can_create_new_chanctx()
78 struct ieee80211_local *local __maybe_unused = link->sdata->local; in ieee80211_link_get_chanctx()
82 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_link_get_chanctx()
141 ieee80211_chanctx_reserved_chanreq(struct ieee80211_local *local, in ieee80211_chanctx_reserved_chanreq() argument
148 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_reserved_chanreq()
163 ieee80211_chanctx_non_reserved_chandef(struct ieee80211_local *local, in ieee80211_chanctx_non_reserved_chandef() argument
171 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_non_reserved_chandef()
189 ieee80211_chanctx_can_reserve(struct ieee80211_local *local, in ieee80211_chanctx_can_reserve() argument
195 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_can_reserve()
197 if (!ieee80211_chanctx_reserved_chanreq(local, ctx, req, &tmp)) in ieee80211_chanctx_can_reserve()
200 if (!ieee80211_chanctx_non_reserved_chandef(local, ctx, req, &tmp)) in ieee80211_chanctx_can_reserve()
204 ieee80211_chanctx_reserved_chanreq(local, ctx, req, &tmp)) in ieee80211_chanctx_can_reserve()
211 ieee80211_find_reservation_chanctx(struct ieee80211_local *local, in ieee80211_find_reservation_chanctx() argument
217 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_find_reservation_chanctx()
222 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_find_reservation_chanctx()
229 if (!ieee80211_chanctx_can_reserve(local, ctx, chanreq)) in ieee80211_find_reservation_chanctx()
244 link_sta = wiphy_dereference(sta->local->hw.wiphy, sta->link[link_id]); in ieee80211_get_sta_bw()
296 lockdep_assert_wiphy(sdata->local->hw.wiphy); in ieee80211_get_max_required_bw()
298 list_for_each_entry(sta, &sdata->local->sta_list, list) { in ieee80211_get_max_required_bw()
310 ieee80211_get_chanctx_max_required_bw(struct ieee80211_local *local, in ieee80211_get_chanctx_max_required_bw() argument
322 for_each_sdata_link(local, link) { in ieee80211_get_chanctx_max_required_bw()
358 WARN_ON_ONCE(!ieee80211_hw_check(&local->hw, in ieee80211_get_chanctx_max_required_bw()
378 sdata = wiphy_dereference(local->hw.wiphy, local->monitor_sdata); in ieee80211_get_chanctx_max_required_bw()
392 _ieee80211_recalc_chanctx_min_def(struct ieee80211_local *local, in _ieee80211_recalc_chanctx_min_def() argument
400 lockdep_assert_wiphy(local->hw.wiphy); in _ieee80211_recalc_chanctx_min_def()
415 max_bw = ieee80211_get_chanctx_max_required_bw(local, ctx, rsvd_for, in _ieee80211_recalc_chanctx_min_def()
433 static void ieee80211_chan_bw_change(struct ieee80211_local *local, in ieee80211_chan_bw_change() argument
439 local->hw.wiphy->bands[ctx->conf.def.chan->band]; in ieee80211_chan_bw_change()
442 list_for_each_entry_rcu(sta, &local->sta_list, in ieee80211_chan_bw_change()
488 rate_control_rate_update(local, sband, link_sta, in ieee80211_chan_bw_change()
500 void ieee80211_recalc_chanctx_min_def(struct ieee80211_local *local, in ieee80211_recalc_chanctx_min_def() argument
505 u32 changed = _ieee80211_recalc_chanctx_min_def(local, ctx, rsvd_for, in ieee80211_recalc_chanctx_min_def()
512 ieee80211_chan_bw_change(local, ctx, false, true); in ieee80211_recalc_chanctx_min_def()
514 drv_change_chanctx(local, ctx, changed); in ieee80211_recalc_chanctx_min_def()
517 ieee80211_chan_bw_change(local, ctx, false, false); in ieee80211_recalc_chanctx_min_def()
520 static void _ieee80211_change_chanctx(struct ieee80211_local *local, in _ieee80211_change_chanctx() argument
551 ieee80211_chan_bw_change(local, old_ctx, false, true); in _ieee80211_change_chanctx()
554 ieee80211_recalc_chanctx_min_def(local, ctx, rsvd_for, false); in _ieee80211_change_chanctx()
558 WARN_ON(ieee80211_chanctx_refcount(local, ctx) > 1 && in _ieee80211_change_chanctx()
561 ieee80211_remove_wbrf(local, &ctx->conf.def); in _ieee80211_change_chanctx()
575 changed |= _ieee80211_recalc_chanctx_min_def(local, ctx, rsvd_for, false); in _ieee80211_change_chanctx()
577 ieee80211_add_wbrf(local, &ctx->conf.def); in _ieee80211_change_chanctx()
579 drv_change_chanctx(local, ctx, changed); in _ieee80211_change_chanctx()
582 ieee80211_chan_bw_change(local, old_ctx, false, false); in _ieee80211_change_chanctx()
585 static void ieee80211_change_chanctx(struct ieee80211_local *local, in ieee80211_change_chanctx() argument
590 _ieee80211_change_chanctx(local, ctx, old_ctx, chanreq, NULL); in ieee80211_change_chanctx()
595 ieee80211_find_chanctx(struct ieee80211_local *local, in ieee80211_find_chanctx() argument
603 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_find_chanctx()
611 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_find_chanctx()
624 compat = ieee80211_chanctx_reserved_chanreq(local, ctx, in ieee80211_find_chanctx()
639 ieee80211_change_chanctx(local, ctx, ctx, compat); in ieee80211_find_chanctx()
647 bool ieee80211_is_radar_required(struct ieee80211_local *local, in ieee80211_is_radar_required() argument
650 struct wiphy *wiphy = local->hw.wiphy; in ieee80211_is_radar_required()
655 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_is_radar_required()
660 for_each_sdata_link(local, link) { in ieee80211_is_radar_required()
675 ieee80211_chanctx_radar_required(struct ieee80211_local *local, in ieee80211_chanctx_radar_required() argument
681 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_radar_required()
683 for_each_sdata_link(local, link) { in ieee80211_chanctx_radar_required()
695 ieee80211_alloc_chanctx(struct ieee80211_local *local, in ieee80211_alloc_chanctx() argument
702 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_alloc_chanctx()
704 ctx = kzalloc(sizeof(*ctx) + local->hw.chanctx_data_size, GFP_KERNEL); in ieee80211_alloc_chanctx()
718 _ieee80211_recalc_chanctx_min_def(local, ctx, NULL, false); in ieee80211_alloc_chanctx()
723 static int ieee80211_add_chanctx(struct ieee80211_local *local, in ieee80211_add_chanctx() argument
729 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_add_chanctx()
731 ieee80211_add_wbrf(local, &ctx->conf.def); in ieee80211_add_chanctx()
734 changed = ieee80211_idle_off(local); in ieee80211_add_chanctx()
736 ieee80211_hw_config(local, -1, changed); in ieee80211_add_chanctx()
738 err = drv_add_chanctx(local, ctx); in ieee80211_add_chanctx()
740 ieee80211_recalc_idle(local); in ieee80211_add_chanctx()
748 ieee80211_new_chanctx(struct ieee80211_local *local, in ieee80211_new_chanctx() argument
757 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_new_chanctx()
759 ctx = ieee80211_alloc_chanctx(local, chanreq, mode, radio_idx); in ieee80211_new_chanctx()
763 err = ieee80211_add_chanctx(local, ctx); in ieee80211_new_chanctx()
769 WARN_ON_ONCE(err && !local->in_reconfig); in ieee80211_new_chanctx()
771 list_add_rcu(&ctx->list, &local->chanctx_list); in ieee80211_new_chanctx()
775 static void ieee80211_del_chanctx(struct ieee80211_local *local, in ieee80211_del_chanctx() argument
779 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_del_chanctx()
781 drv_remove_chanctx(local, ctx); in ieee80211_del_chanctx()
784 ieee80211_recalc_idle(local); in ieee80211_del_chanctx()
786 ieee80211_remove_wbrf(local, &ctx->conf.def); in ieee80211_del_chanctx()
789 static void ieee80211_free_chanctx(struct ieee80211_local *local, in ieee80211_free_chanctx() argument
793 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_free_chanctx()
795 WARN_ON_ONCE(ieee80211_chanctx_refcount(local, ctx) != 0); in ieee80211_free_chanctx()
798 ieee80211_del_chanctx(local, ctx, skip_idle_recalc); in ieee80211_free_chanctx()
802 void ieee80211_recalc_chanctx_chantype(struct ieee80211_local *local, in ieee80211_recalc_chanctx_chantype() argument
811 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_chanctx_chantype()
813 for_each_sdata_link(local, link) { in ieee80211_recalc_chanctx_chantype()
837 list_for_each_entry(sta, &local->sta_list, list) { in ieee80211_recalc_chanctx_chantype()
865 ieee80211_change_chanctx(local, ctx, ctx, compat); in ieee80211_recalc_chanctx_chantype()
868 static void ieee80211_recalc_radar_chanctx(struct ieee80211_local *local, in ieee80211_recalc_radar_chanctx() argument
873 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_radar_chanctx()
875 radar_enabled = ieee80211_chanctx_radar_required(local, chanctx); in ieee80211_recalc_radar_chanctx()
882 drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RADAR); in ieee80211_recalc_radar_chanctx()
890 struct ieee80211_local *local = sdata->local; in ieee80211_assign_link_chanctx() local
900 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_assign_link_chanctx()
902 if (conf && !local->in_reconfig) { in ieee80211_assign_link_chanctx()
905 drv_unassign_vif_chanctx(local, sdata, link->conf, curr_ctx); in ieee80211_assign_link_chanctx()
912 ieee80211_recalc_chanctx_min_def(local, new_ctx, link, false); in ieee80211_assign_link_chanctx()
914 ret = drv_assign_vif_chanctx(local, sdata, link->conf, new_ctx); in ieee80211_assign_link_chanctx()
917 WARN_ON_ONCE(ret && !local->in_reconfig); in ieee80211_assign_link_chanctx()
922 if (!local->in_reconfig) in ieee80211_assign_link_chanctx()
932 if (curr_ctx && ieee80211_chanctx_num_assigned(local, curr_ctx) > 0) { in ieee80211_assign_link_chanctx()
933 ieee80211_recalc_chanctx_chantype(local, curr_ctx); in ieee80211_assign_link_chanctx()
934 ieee80211_recalc_smps_chanctx(local, curr_ctx); in ieee80211_assign_link_chanctx()
935 ieee80211_recalc_radar_chanctx(local, curr_ctx); in ieee80211_assign_link_chanctx()
936 ieee80211_recalc_chanctx_min_def(local, curr_ctx, NULL, false); in ieee80211_assign_link_chanctx()
939 if (new_ctx && ieee80211_chanctx_num_assigned(local, new_ctx) > 0) { in ieee80211_assign_link_chanctx()
941 ieee80211_recalc_chanctx_min_def(local, new_ctx, NULL, false); in ieee80211_assign_link_chanctx()
950 for_each_sdata_link(local, tmp) { in ieee80211_assign_link_chanctx()
971 void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local, in ieee80211_recalc_smps_chanctx() argument
978 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_smps_chanctx()
983 for_each_sdata_link(local, link) { in ieee80211_recalc_smps_chanctx()
992 if (!ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR)) in ieee80211_recalc_smps_chanctx()
1008 rx_chains_dynamic = rx_chains_static = local->rx_chains; in ieee80211_recalc_smps_chanctx()
1036 sdata = wiphy_dereference(local->hw.wiphy, local->monitor_sdata); in ieee80211_recalc_smps_chanctx()
1039 rx_chains_dynamic = rx_chains_static = local->rx_chains; in ieee80211_recalc_smps_chanctx()
1047 drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RX_CHAINS); in ieee80211_recalc_smps_chanctx()
1057 struct ieee80211_local *local __maybe_unused = sdata->local; in __ieee80211_link_copy_chanctx_to_vlans()
1064 lockdep_assert_wiphy(local->hw.wiphy); in __ieee80211_link_copy_chanctx_to_vlans()
1073 lockdep_is_held(&local->hw.wiphy->mtx)); in __ieee80211_link_copy_chanctx_to_vlans()
1082 vlan_conf = wiphy_dereference(local->hw.wiphy, in __ieee80211_link_copy_chanctx_to_vlans()
1094 struct ieee80211_local *local = link->sdata->local; in ieee80211_link_copy_chanctx_to_vlans() local
1096 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_copy_chanctx_to_vlans()
1106 lockdep_assert_wiphy(sdata->local->hw.wiphy); in ieee80211_link_unreserve_chanctx()
1114 if (ieee80211_chanctx_refcount(sdata->local, ctx) == 0) { in ieee80211_link_unreserve_chanctx()
1130 ieee80211_free_chanctx(sdata->local, ctx, false); in ieee80211_link_unreserve_chanctx()
1136 ieee80211_replace_chanctx(struct ieee80211_local *local, in ieee80211_replace_chanctx() argument
1142 struct wiphy *wiphy = local->hw.wiphy; in ieee80211_replace_chanctx()
1165 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_replace_chanctx()
1193 new_ctx = ieee80211_alloc_chanctx(local, chanreq, mode, -1); in ieee80211_replace_chanctx()
1203 list_add_rcu(&new_ctx->list, &local->chanctx_list); in ieee80211_replace_chanctx()
1209 ieee80211_find_available_radio(struct ieee80211_local *local, in ieee80211_find_available_radio() argument
1213 struct wiphy *wiphy = local->hw.wiphy; in ieee80211_find_available_radio()
1229 if (!ieee80211_can_create_new_chanctx(local, i)) in ieee80211_find_available_radio()
1245 struct ieee80211_local *local = sdata->local; in ieee80211_link_reserve_chanctx() local
1249 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_reserve_chanctx()
1252 if (curr_ctx && !local->ops->switch_vif_chanctx) in ieee80211_link_reserve_chanctx()
1255 new_ctx = ieee80211_find_reservation_chanctx(local, chanreq, mode); in ieee80211_link_reserve_chanctx()
1257 if (ieee80211_can_create_new_chanctx(local, -1) && in ieee80211_link_reserve_chanctx()
1258 ieee80211_find_available_radio(local, chanreq, in ieee80211_link_reserve_chanctx()
1261 new_ctx = ieee80211_new_chanctx(local, chanreq, mode, in ieee80211_link_reserve_chanctx()
1264 new_ctx = ieee80211_replace_chanctx(local, chanreq, in ieee80211_link_reserve_chanctx()
1289 wiphy_work_queue(sdata->local->hw.wiphy, in ieee80211_link_chanctx_reservation_complete()
1293 wiphy_hrtimer_work_queue(sdata->local->hw.wiphy, in ieee80211_link_chanctx_reservation_complete()
1326 vlan_conf = wiphy_dereference(sdata->local->hw.wiphy, in ieee80211_link_update_chanreq()
1340 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_reserved_reassign() local
1348 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_use_reserved_reassign()
1366 chanreq = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_link_use_reserved_reassign()
1377 _ieee80211_change_chanctx(local, new_ctx, old_ctx, chanreq, link); in ieee80211_link_use_reserved_reassign()
1387 err = drv_switch_vif_chanctx(local, vif_chsw, 1, in ieee80211_link_use_reserved_reassign()
1390 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_link_use_reserved_reassign()
1391 ieee80211_free_chanctx(local, new_ctx, false); in ieee80211_link_use_reserved_reassign()
1405 if (ieee80211_chanctx_refcount(local, old_ctx) == 0) in ieee80211_link_use_reserved_reassign()
1406 ieee80211_free_chanctx(local, old_ctx, false); in ieee80211_link_use_reserved_reassign()
1408 ieee80211_recalc_chanctx_min_def(local, new_ctx, NULL, false); in ieee80211_link_use_reserved_reassign()
1409 ieee80211_recalc_smps_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1410 ieee80211_recalc_radar_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1424 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_reserved_assign() local
1446 chanreq = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_link_use_reserved_assign()
1452 ieee80211_change_chanctx(local, new_ctx, new_ctx, chanreq); in ieee80211_link_use_reserved_assign()
1459 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_link_use_reserved_assign()
1460 ieee80211_free_chanctx(local, new_ctx, false); in ieee80211_link_use_reserved_assign()
1476 lockdep_assert_wiphy(sdata->local->hw.wiphy); in ieee80211_link_has_in_place_reservation()
1496 static int ieee80211_chsw_switch_vifs(struct ieee80211_local *local, in ieee80211_chsw_switch_vifs() argument
1504 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chsw_switch_vifs()
1511 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_vifs()
1535 err = drv_switch_vif_chanctx(local, vif_chsw, n_vifs, in ieee80211_chsw_switch_vifs()
1543 static int ieee80211_chsw_switch_ctxs(struct ieee80211_local *local) in ieee80211_chsw_switch_ctxs() argument
1548 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chsw_switch_ctxs()
1550 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_ctxs()
1557 ieee80211_del_chanctx(local, ctx->replace_ctx, false); in ieee80211_chsw_switch_ctxs()
1558 err = ieee80211_add_chanctx(local, ctx); in ieee80211_chsw_switch_ctxs()
1566 WARN_ON(ieee80211_add_chanctx(local, ctx)); in ieee80211_chsw_switch_ctxs()
1567 list_for_each_entry_continue_reverse(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_ctxs()
1574 ieee80211_del_chanctx(local, ctx, false); in ieee80211_chsw_switch_ctxs()
1575 WARN_ON(ieee80211_add_chanctx(local, ctx->replace_ctx)); in ieee80211_chsw_switch_ctxs()
1581 static int ieee80211_vif_use_reserved_switch(struct ieee80211_local *local) in ieee80211_vif_use_reserved_switch() argument
1587 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_vif_use_reserved_switch()
1605 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1634 wiphy_info(local->hw.wiphy, in ieee80211_vif_use_reserved_switch()
1675 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1691 ieee80211_chan_bw_change(local, in ieee80211_vif_use_reserved_switch()
1696 ieee80211_recalc_chanctx_min_def(local, ctx, NULL, true); in ieee80211_vif_use_reserved_switch()
1705 err = ieee80211_chsw_switch_vifs(local, n_vifs_switch); in ieee80211_vif_use_reserved_switch()
1711 err = ieee80211_chsw_switch_ctxs(local); in ieee80211_vif_use_reserved_switch()
1720 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1763 ieee80211_recalc_chanctx_chantype(local, ctx); in ieee80211_vif_use_reserved_switch()
1764 ieee80211_recalc_smps_chanctx(local, ctx); in ieee80211_vif_use_reserved_switch()
1765 ieee80211_recalc_radar_chanctx(local, ctx); in ieee80211_vif_use_reserved_switch()
1766 ieee80211_recalc_chanctx_min_def(local, ctx, NULL, false); in ieee80211_vif_use_reserved_switch()
1779 ieee80211_chan_bw_change(local, ctx, false, false); in ieee80211_vif_use_reserved_switch()
1810 cfg80211_stop_iface(local->hw.wiphy, in ieee80211_vif_use_reserved_switch()
1821 list_for_each_entry_safe(ctx, ctx_tmp, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1836 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1857 struct ieee80211_local *local = sdata->local; in __ieee80211_link_release_channel() local
1862 lockdep_assert_wiphy(local->hw.wiphy); in __ieee80211_link_release_channel()
1865 lockdep_is_held(&local->hw.wiphy->mtx)); in __ieee80211_link_release_channel()
1873 ieee80211_chanctx_num_reserved(local, link->reserved_chanctx) > 1) in __ieee80211_link_release_channel()
1880 if (ieee80211_chanctx_refcount(local, ctx) == 0) in __ieee80211_link_release_channel()
1881 ieee80211_free_chanctx(local, ctx, skip_idle_recalc); in __ieee80211_link_release_channel()
1887 ieee80211_vif_use_reserved_switch(local); in __ieee80211_link_release_channel()
1896 struct ieee80211_local *local = sdata->local; in _ieee80211_link_use_channel() local
1903 lockdep_assert_wiphy(local->hw.wiphy); in _ieee80211_link_use_channel()
1910 ret = cfg80211_chandef_dfs_required(local->hw.wiphy, in _ieee80211_link_use_channel()
1925 if (!local->in_reconfig) in _ieee80211_link_use_channel()
1928 ctx = ieee80211_find_chanctx(local, link, chanreq, mode); in _ieee80211_link_use_channel()
1932 else if (!ieee80211_find_available_radio(local, chanreq, in _ieee80211_link_use_channel()
1937 ctx = ieee80211_new_chanctx(local, chanreq, mode, in _ieee80211_link_use_channel()
1957 if (ieee80211_chanctx_refcount(local, ctx) == 0) in _ieee80211_link_use_channel()
1958 ieee80211_free_chanctx(local, ctx, false); in _ieee80211_link_use_channel()
1962 ieee80211_recalc_smps_chanctx(local, ctx); in _ieee80211_link_use_channel()
1963 ieee80211_recalc_radar_chanctx(local, ctx); in _ieee80211_link_use_channel()
1974 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_reserved_context() local
1979 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_use_reserved_context()
2017 err = ieee80211_vif_use_reserved_switch(local); in ieee80211_link_use_reserved_context()
2023 wiphy_info(local->hw.wiphy, in ieee80211_link_use_reserved_context()
2042 ieee80211_chanctx_recheck(struct ieee80211_local *local, in ieee80211_chanctx_recheck() argument
2051 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_recheck()
2053 for_each_sdata_link(local, link) { in ieee80211_chanctx_recheck()
2084 struct ieee80211_local *local = sdata->local; in ieee80211_link_change_chanreq() local
2090 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_change_chanreq()
2092 if (!cfg80211_chandef_usable(sdata->local->hw.wiphy, in ieee80211_link_change_chanreq()
2108 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_link_change_chanreq()
2114 compat = ieee80211_chanctx_recheck(local, link, ctx, chanreq, &tmp); in ieee80211_link_change_chanreq()
2120 if (!ieee80211_chanctx_reserved_chanreq(local, ctx, compat, in ieee80211_link_change_chanreq()
2138 ieee80211_recalc_chanctx_chantype(local, ctx); in ieee80211_link_change_chanreq()
2151 lockdep_assert_wiphy(sdata->local->hw.wiphy); in ieee80211_link_release_channel()
2163 struct ieee80211_local *local = sdata->local; in ieee80211_link_vlan_copy_chanctx() local
2167 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_vlan_copy_chanctx()
2174 ap_conf = wiphy_dereference(local->hw.wiphy, in ieee80211_link_vlan_copy_chanctx()
2176 conf = wiphy_dereference(local->hw.wiphy, in ieee80211_link_vlan_copy_chanctx()
2188 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iter_chan_contexts_atomic() local
2192 list_for_each_entry_rcu(ctx, &local->chanctx_list, list) in ieee80211_iter_chan_contexts_atomic()
2206 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iter_chan_contexts_mtx() local
2211 list_for_each_entry(ctx, &local->chanctx_list, list) in ieee80211_iter_chan_contexts_mtx()