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) 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()
63 static bool ieee80211_can_create_new_chanctx(struct ieee80211_local *local) in ieee80211_can_create_new_chanctx() argument
65 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_can_create_new_chanctx()
67 return ieee80211_num_chanctx(local) < ieee80211_max_num_channels(local); in ieee80211_can_create_new_chanctx()
73 struct ieee80211_local *local __maybe_unused = link->sdata->local; in ieee80211_link_get_chanctx()
77 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_link_get_chanctx()
85 ieee80211_chanctx_reserved_chandef(struct ieee80211_local *local, in ieee80211_chanctx_reserved_chandef() argument
91 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_reserved_chandef()
108 ieee80211_chanctx_non_reserved_chandef(struct ieee80211_local *local, in ieee80211_chanctx_non_reserved_chandef() argument
114 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_non_reserved_chandef()
136 ieee80211_chanctx_combined_chandef(struct ieee80211_local *local, in ieee80211_chanctx_combined_chandef() argument
140 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_combined_chandef()
142 compat = ieee80211_chanctx_reserved_chandef(local, ctx, compat); in ieee80211_chanctx_combined_chandef()
146 compat = ieee80211_chanctx_non_reserved_chandef(local, ctx, compat); in ieee80211_chanctx_combined_chandef()
154 ieee80211_chanctx_can_reserve_chandef(struct ieee80211_local *local, in ieee80211_chanctx_can_reserve_chandef() argument
158 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_can_reserve_chandef()
160 if (ieee80211_chanctx_combined_chandef(local, ctx, def)) in ieee80211_chanctx_can_reserve_chandef()
164 ieee80211_chanctx_reserved_chandef(local, ctx, def)) in ieee80211_chanctx_can_reserve_chandef()
171 ieee80211_find_reservation_chanctx(struct ieee80211_local *local, in ieee80211_find_reservation_chanctx() argument
177 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_find_reservation_chanctx()
182 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_find_reservation_chanctx()
189 if (!ieee80211_chanctx_can_reserve_chandef(local, ctx, in ieee80211_find_reservation_chanctx()
249 list_for_each_entry_rcu(sta, &sdata->local->sta_list, list) { in ieee80211_get_max_required_bw()
321 ieee80211_get_chanctx_max_required_bw(struct ieee80211_local *local, in ieee80211_get_chanctx_max_required_bw() argument
329 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_get_chanctx_max_required_bw()
342 sdata = rcu_dereference(local->monitor_sdata); in ieee80211_get_chanctx_max_required_bw()
358 _ieee80211_recalc_chanctx_min_def(struct ieee80211_local *local, in _ieee80211_recalc_chanctx_min_def() argument
365 lockdep_assert_wiphy(local->hw.wiphy); in _ieee80211_recalc_chanctx_min_def()
380 max_bw = ieee80211_get_chanctx_max_required_bw(local, ctx, rsvd_for); in _ieee80211_recalc_chanctx_min_def()
400 static void ieee80211_chan_bw_change(struct ieee80211_local *local, in ieee80211_chan_bw_change() argument
406 local->hw.wiphy->bands[ctx->conf.def.chan->band]; in ieee80211_chan_bw_change()
409 list_for_each_entry_rcu(sta, &local->sta_list, in ieee80211_chan_bw_change()
445 rate_control_rate_update(local, sband, sta, link_id, in ieee80211_chan_bw_change()
457 void ieee80211_recalc_chanctx_min_def(struct ieee80211_local *local, in ieee80211_recalc_chanctx_min_def() argument
461 u32 changed = _ieee80211_recalc_chanctx_min_def(local, ctx, rsvd_for); in ieee80211_recalc_chanctx_min_def()
467 ieee80211_chan_bw_change(local, ctx, true); in ieee80211_recalc_chanctx_min_def()
469 drv_change_chanctx(local, ctx, changed); in ieee80211_recalc_chanctx_min_def()
472 ieee80211_chan_bw_change(local, ctx, false); in ieee80211_recalc_chanctx_min_def()
475 static void _ieee80211_change_chanctx(struct ieee80211_local *local, in _ieee80211_change_chanctx() argument
501 ieee80211_chan_bw_change(local, old_ctx, true); in _ieee80211_change_chanctx()
504 ieee80211_recalc_chanctx_min_def(local, ctx, rsvd_for); in _ieee80211_change_chanctx()
510 ieee80211_remove_wbrf(local, &ctx->conf.def); in _ieee80211_change_chanctx()
516 _ieee80211_recalc_chanctx_min_def(local, ctx, rsvd_for); in _ieee80211_change_chanctx()
518 ieee80211_add_wbrf(local, &ctx->conf.def); in _ieee80211_change_chanctx()
520 drv_change_chanctx(local, ctx, changed); in _ieee80211_change_chanctx()
522 if (!local->use_chanctx) { in _ieee80211_change_chanctx()
523 local->_oper_chandef = *chandef; in _ieee80211_change_chanctx()
524 ieee80211_hw_config(local, 0); in _ieee80211_change_chanctx()
528 ieee80211_chan_bw_change(local, old_ctx, false); in _ieee80211_change_chanctx()
531 static void ieee80211_change_chanctx(struct ieee80211_local *local, in ieee80211_change_chanctx() argument
536 _ieee80211_change_chanctx(local, ctx, old_ctx, chandef, NULL); in ieee80211_change_chanctx()
540 ieee80211_find_chanctx(struct ieee80211_local *local, in ieee80211_find_chanctx() argument
546 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_find_chanctx()
551 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_find_chanctx()
564 compat = ieee80211_chanctx_reserved_chandef(local, ctx, in ieee80211_find_chanctx()
569 ieee80211_change_chanctx(local, ctx, ctx, compat); in ieee80211_find_chanctx()
577 bool ieee80211_is_radar_required(struct ieee80211_local *local) in ieee80211_is_radar_required() argument
581 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_is_radar_required()
584 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_is_radar_required()
604 ieee80211_chanctx_radar_required(struct ieee80211_local *local, in ieee80211_chanctx_radar_required() argument
611 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_radar_required()
614 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_chanctx_radar_required()
643 ieee80211_alloc_chanctx(struct ieee80211_local *local, in ieee80211_alloc_chanctx() argument
649 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_alloc_chanctx()
651 ctx = kzalloc(sizeof(*ctx) + local->hw.chanctx_data_size, GFP_KERNEL); in ieee80211_alloc_chanctx()
662 _ieee80211_recalc_chanctx_min_def(local, ctx, NULL); in ieee80211_alloc_chanctx()
667 static int ieee80211_add_chanctx(struct ieee80211_local *local, in ieee80211_add_chanctx() argument
673 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_add_chanctx()
675 ieee80211_add_wbrf(local, &ctx->conf.def); in ieee80211_add_chanctx()
677 if (!local->use_chanctx) in ieee80211_add_chanctx()
678 local->hw.conf.radar_enabled = ctx->conf.radar_enabled; in ieee80211_add_chanctx()
681 changed = ieee80211_idle_off(local); in ieee80211_add_chanctx()
683 ieee80211_hw_config(local, changed); in ieee80211_add_chanctx()
685 if (!local->use_chanctx) { in ieee80211_add_chanctx()
686 local->_oper_chandef = ctx->conf.def; in ieee80211_add_chanctx()
687 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); in ieee80211_add_chanctx()
689 err = drv_add_chanctx(local, ctx); in ieee80211_add_chanctx()
691 ieee80211_recalc_idle(local); in ieee80211_add_chanctx()
700 ieee80211_new_chanctx(struct ieee80211_local *local, in ieee80211_new_chanctx() argument
707 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_new_chanctx()
709 ctx = ieee80211_alloc_chanctx(local, chandef, mode); in ieee80211_new_chanctx()
713 err = ieee80211_add_chanctx(local, ctx); in ieee80211_new_chanctx()
719 list_add_rcu(&ctx->list, &local->chanctx_list); in ieee80211_new_chanctx()
723 static void ieee80211_del_chanctx(struct ieee80211_local *local, in ieee80211_del_chanctx() argument
726 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_del_chanctx()
728 if (!local->use_chanctx) { in ieee80211_del_chanctx()
729 struct cfg80211_chan_def *chandef = &local->_oper_chandef; in ieee80211_del_chanctx()
745 WARN_ON(local->hw.conf.radar_enabled && in ieee80211_del_chanctx()
746 !list_empty(&local->chanctx_list)); in ieee80211_del_chanctx()
748 local->hw.conf.radar_enabled = false; in ieee80211_del_chanctx()
750 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); in ieee80211_del_chanctx()
752 drv_remove_chanctx(local, ctx); in ieee80211_del_chanctx()
755 ieee80211_recalc_idle(local); in ieee80211_del_chanctx()
757 ieee80211_remove_wbrf(local, &ctx->conf.def); in ieee80211_del_chanctx()
760 static void ieee80211_free_chanctx(struct ieee80211_local *local, in ieee80211_free_chanctx() argument
763 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_free_chanctx()
765 WARN_ON_ONCE(ieee80211_chanctx_refcount(local, ctx) != 0); in ieee80211_free_chanctx()
768 ieee80211_del_chanctx(local, ctx); in ieee80211_free_chanctx()
772 void ieee80211_recalc_chanctx_chantype(struct ieee80211_local *local, in ieee80211_recalc_chanctx_chantype() argument
780 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_chanctx_chantype()
783 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_recalc_chanctx_chantype()
818 list_for_each_entry_rcu(sta, &local->sta_list, list) { in ieee80211_recalc_chanctx_chantype()
835 ieee80211_change_chanctx(local, ctx, ctx, compat); in ieee80211_recalc_chanctx_chantype()
838 static void ieee80211_recalc_radar_chanctx(struct ieee80211_local *local, in ieee80211_recalc_radar_chanctx() argument
843 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_radar_chanctx()
845 radar_enabled = ieee80211_chanctx_radar_required(local, chanctx); in ieee80211_recalc_radar_chanctx()
852 if (!local->use_chanctx) { in ieee80211_recalc_radar_chanctx()
853 local->hw.conf.radar_enabled = chanctx->conf.radar_enabled; in ieee80211_recalc_radar_chanctx()
854 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); in ieee80211_recalc_radar_chanctx()
857 drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RADAR); in ieee80211_recalc_radar_chanctx()
864 struct ieee80211_local *local = sdata->local; in ieee80211_assign_link_chanctx() local
873 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_assign_link_chanctx()
878 drv_unassign_vif_chanctx(local, sdata, link->conf, curr_ctx); in ieee80211_assign_link_chanctx()
885 ieee80211_recalc_chanctx_min_def(local, new_ctx, link); in ieee80211_assign_link_chanctx()
887 ret = drv_assign_vif_chanctx(local, sdata, link->conf, new_ctx); in ieee80211_assign_link_chanctx()
901 if (curr_ctx && ieee80211_chanctx_num_assigned(local, curr_ctx) > 0) { in ieee80211_assign_link_chanctx()
902 ieee80211_recalc_chanctx_chantype(local, curr_ctx); in ieee80211_assign_link_chanctx()
903 ieee80211_recalc_smps_chanctx(local, curr_ctx); in ieee80211_assign_link_chanctx()
904 ieee80211_recalc_radar_chanctx(local, curr_ctx); in ieee80211_assign_link_chanctx()
905 ieee80211_recalc_chanctx_min_def(local, curr_ctx, NULL); in ieee80211_assign_link_chanctx()
908 if (new_ctx && ieee80211_chanctx_num_assigned(local, new_ctx) > 0) { in ieee80211_assign_link_chanctx()
910 ieee80211_recalc_chanctx_min_def(local, new_ctx, NULL); in ieee80211_assign_link_chanctx()
922 void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local, in ieee80211_recalc_smps_chanctx() argument
928 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_smps_chanctx()
934 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_recalc_smps_chanctx()
991 sdata = rcu_dereference(local->monitor_sdata); in ieee80211_recalc_smps_chanctx()
994 rx_chains_dynamic = rx_chains_static = local->rx_chains; in ieee80211_recalc_smps_chanctx()
998 if (!local->use_chanctx) { in ieee80211_recalc_smps_chanctx()
1000 local->smps_mode = IEEE80211_SMPS_OFF; in ieee80211_recalc_smps_chanctx()
1002 local->smps_mode = IEEE80211_SMPS_DYNAMIC; in ieee80211_recalc_smps_chanctx()
1004 local->smps_mode = IEEE80211_SMPS_STATIC; in ieee80211_recalc_smps_chanctx()
1005 ieee80211_hw_config(local, 0); in ieee80211_recalc_smps_chanctx()
1014 drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RX_CHAINS); in ieee80211_recalc_smps_chanctx()
1024 struct ieee80211_local *local __maybe_unused = sdata->local; in __ieee80211_link_copy_chanctx_to_vlans()
1031 lockdep_assert_wiphy(local->hw.wiphy); in __ieee80211_link_copy_chanctx_to_vlans()
1040 lockdep_is_held(&local->hw.wiphy->mtx)); in __ieee80211_link_copy_chanctx_to_vlans()
1062 struct ieee80211_local *local = link->sdata->local; in ieee80211_link_copy_chanctx_to_vlans() local
1064 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_copy_chanctx_to_vlans()
1074 lockdep_assert_wiphy(sdata->local->hw.wiphy); in ieee80211_link_unreserve_chanctx()
1082 if (ieee80211_chanctx_refcount(sdata->local, ctx) == 0) { in ieee80211_link_unreserve_chanctx()
1098 ieee80211_free_chanctx(sdata->local, ctx); in ieee80211_link_unreserve_chanctx()
1111 struct ieee80211_local *local = sdata->local; in ieee80211_link_reserve_chanctx() local
1114 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_reserve_chanctx()
1117 if (curr_ctx && local->use_chanctx && !local->ops->switch_vif_chanctx) in ieee80211_link_reserve_chanctx()
1120 new_ctx = ieee80211_find_reservation_chanctx(local, chandef, mode); in ieee80211_link_reserve_chanctx()
1122 if (ieee80211_can_create_new_chanctx(local)) { in ieee80211_link_reserve_chanctx()
1123 new_ctx = ieee80211_new_chanctx(local, chandef, mode); in ieee80211_link_reserve_chanctx()
1153 list_for_each_entry(ctx, &local->chanctx_list, in ieee80211_link_reserve_chanctx()
1177 new_ctx = ieee80211_alloc_chanctx(local, chandef, mode); in ieee80211_link_reserve_chanctx()
1189 list_add_rcu(&new_ctx->list, &local->chanctx_list); in ieee80211_link_reserve_chanctx()
1212 wiphy_work_queue(sdata->local->hw.wiphy, in ieee80211_link_chanctx_reservation_complete()
1216 wiphy_delayed_work_queue(sdata->local->hw.wiphy, in ieee80211_link_chanctx_reservation_complete()
1264 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_reserved_reassign() local
1271 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_use_reserved_reassign()
1289 chandef = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_link_use_reserved_reassign()
1299 _ieee80211_change_chanctx(local, new_ctx, old_ctx, chandef, link); in ieee80211_link_use_reserved_reassign()
1309 err = drv_switch_vif_chanctx(local, vif_chsw, 1, in ieee80211_link_use_reserved_reassign()
1312 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_link_use_reserved_reassign()
1313 ieee80211_free_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1326 if (ieee80211_chanctx_refcount(local, old_ctx) == 0) in ieee80211_link_use_reserved_reassign()
1327 ieee80211_free_chanctx(local, old_ctx); in ieee80211_link_use_reserved_reassign()
1329 ieee80211_recalc_chanctx_min_def(local, new_ctx, NULL); in ieee80211_link_use_reserved_reassign()
1330 ieee80211_recalc_smps_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1331 ieee80211_recalc_radar_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1345 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_reserved_assign() local
1366 chandef = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_link_use_reserved_assign()
1371 ieee80211_change_chanctx(local, new_ctx, new_ctx, chandef); in ieee80211_link_use_reserved_assign()
1378 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_link_use_reserved_assign()
1379 ieee80211_free_chanctx(local, new_ctx); in ieee80211_link_use_reserved_assign()
1395 lockdep_assert_wiphy(sdata->local->hw.wiphy); in ieee80211_link_has_in_place_reservation()
1415 static int ieee80211_chsw_switch_hwconf(struct ieee80211_local *local, in ieee80211_chsw_switch_hwconf() argument
1420 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chsw_switch_hwconf()
1422 chandef = ieee80211_chanctx_reserved_chandef(local, new_ctx, NULL); in ieee80211_chsw_switch_hwconf()
1426 local->hw.conf.radar_enabled = new_ctx->conf.radar_enabled; in ieee80211_chsw_switch_hwconf()
1427 local->_oper_chandef = *chandef; in ieee80211_chsw_switch_hwconf()
1428 ieee80211_hw_config(local, 0); in ieee80211_chsw_switch_hwconf()
1433 static int ieee80211_chsw_switch_vifs(struct ieee80211_local *local, in ieee80211_chsw_switch_vifs() argument
1441 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chsw_switch_vifs()
1448 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_vifs()
1472 err = drv_switch_vif_chanctx(local, vif_chsw, n_vifs, in ieee80211_chsw_switch_vifs()
1480 static int ieee80211_chsw_switch_ctxs(struct ieee80211_local *local) in ieee80211_chsw_switch_ctxs() argument
1485 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chsw_switch_ctxs()
1487 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_ctxs()
1494 ieee80211_del_chanctx(local, ctx->replace_ctx); in ieee80211_chsw_switch_ctxs()
1495 err = ieee80211_add_chanctx(local, ctx); in ieee80211_chsw_switch_ctxs()
1503 WARN_ON(ieee80211_add_chanctx(local, ctx)); in ieee80211_chsw_switch_ctxs()
1504 list_for_each_entry_continue_reverse(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_ctxs()
1511 ieee80211_del_chanctx(local, ctx); in ieee80211_chsw_switch_ctxs()
1512 WARN_ON(ieee80211_add_chanctx(local, ctx->replace_ctx)); in ieee80211_chsw_switch_ctxs()
1518 static int ieee80211_vif_use_reserved_switch(struct ieee80211_local *local) in ieee80211_vif_use_reserved_switch() argument
1525 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_vif_use_reserved_switch()
1543 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1554 if (!local->use_chanctx) in ieee80211_vif_use_reserved_switch()
1575 wiphy_info(local->hw.wiphy, in ieee80211_vif_use_reserved_switch()
1611 WARN_ON(n_ctx > 1 && !local->use_chanctx) || in ieee80211_vif_use_reserved_switch()
1612 WARN_ON(!new_ctx && !local->use_chanctx)) { in ieee80211_vif_use_reserved_switch()
1622 if (local->use_chanctx) { in ieee80211_vif_use_reserved_switch()
1624 err = ieee80211_chsw_switch_vifs(local, n_vifs_switch); in ieee80211_vif_use_reserved_switch()
1630 err = ieee80211_chsw_switch_ctxs(local); in ieee80211_vif_use_reserved_switch()
1635 err = ieee80211_chsw_switch_hwconf(local, new_ctx); in ieee80211_vif_use_reserved_switch()
1644 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1687 ieee80211_recalc_chanctx_chantype(local, ctx); in ieee80211_vif_use_reserved_switch()
1688 ieee80211_recalc_smps_chanctx(local, ctx); in ieee80211_vif_use_reserved_switch()
1689 ieee80211_recalc_radar_chanctx(local, ctx); in ieee80211_vif_use_reserved_switch()
1690 ieee80211_recalc_chanctx_min_def(local, ctx, NULL); in ieee80211_vif_use_reserved_switch()
1733 cfg80211_stop_iface(local->hw.wiphy, in ieee80211_vif_use_reserved_switch()
1744 list_for_each_entry_safe(ctx, ctx_tmp, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1759 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1779 struct ieee80211_local *local = sdata->local; in __ieee80211_link_release_channel() local
1784 lockdep_assert_wiphy(local->hw.wiphy); in __ieee80211_link_release_channel()
1787 lockdep_is_held(&local->hw.wiphy->mtx)); in __ieee80211_link_release_channel()
1795 ieee80211_chanctx_num_reserved(local, link->reserved_chanctx) > 1) in __ieee80211_link_release_channel()
1802 if (ieee80211_chanctx_refcount(local, ctx) == 0) in __ieee80211_link_release_channel()
1803 ieee80211_free_chanctx(local, ctx); in __ieee80211_link_release_channel()
1809 ieee80211_vif_use_reserved_switch(local); in __ieee80211_link_release_channel()
1817 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_channel() local
1822 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_use_channel()
1830 ret = cfg80211_chandef_dfs_required(local->hw.wiphy, in ieee80211_link_use_channel()
1847 ctx = ieee80211_find_chanctx(local, chandef, mode); in ieee80211_link_use_channel()
1849 ctx = ieee80211_new_chanctx(local, chandef, mode); in ieee80211_link_use_channel()
1860 if (ieee80211_chanctx_refcount(local, ctx) == 0) in ieee80211_link_use_channel()
1861 ieee80211_free_chanctx(local, ctx); in ieee80211_link_use_channel()
1865 ieee80211_recalc_smps_chanctx(local, ctx); in ieee80211_link_use_channel()
1866 ieee80211_recalc_radar_chanctx(local, ctx); in ieee80211_link_use_channel()
1877 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_reserved_context() local
1882 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_use_reserved_context()
1920 err = ieee80211_vif_use_reserved_switch(local); in ieee80211_link_use_reserved_context()
1926 wiphy_info(local->hw.wiphy, in ieee80211_link_use_reserved_context()
1941 struct ieee80211_local *local = sdata->local; in ieee80211_link_change_bandwidth() local
1946 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_change_bandwidth()
1948 if (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef, in ieee80211_link_change_bandwidth()
1960 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_link_change_bandwidth()
1972 if (!ieee80211_chanctx_reserved_chandef(local, ctx, compat)) in ieee80211_link_change_bandwidth()
1989 ieee80211_recalc_chanctx_chantype(local, ctx); in ieee80211_link_change_bandwidth()
1999 lockdep_assert_wiphy(sdata->local->hw.wiphy); in ieee80211_link_release_channel()
2011 struct ieee80211_local *local = sdata->local; in ieee80211_link_vlan_copy_chanctx() local
2015 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_vlan_copy_chanctx()
2025 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_link_vlan_copy_chanctx()
2037 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iter_chan_contexts_atomic() local
2041 list_for_each_entry_rcu(ctx, &local->chanctx_list, list) in ieee80211_iter_chan_contexts_atomic()