Lines Matching refs:local
12 static int ieee80211_chanctx_num_assigned(struct ieee80211_local *local, in ieee80211_chanctx_num_assigned() argument
18 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_num_assigned()
26 static int ieee80211_chanctx_num_reserved(struct ieee80211_local *local, in ieee80211_chanctx_num_reserved() argument
32 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_num_reserved()
40 int ieee80211_chanctx_refcount(struct ieee80211_local *local, in ieee80211_chanctx_refcount() argument
43 return ieee80211_chanctx_num_assigned(local, ctx) + in ieee80211_chanctx_refcount()
44 ieee80211_chanctx_num_reserved(local, ctx); in ieee80211_chanctx_refcount()
47 static int ieee80211_num_chanctx(struct ieee80211_local *local) in ieee80211_num_chanctx() argument
52 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_num_chanctx()
54 list_for_each_entry(ctx, &local->chanctx_list, list) in ieee80211_num_chanctx()
60 static bool ieee80211_can_create_new_chanctx(struct ieee80211_local *local) in ieee80211_can_create_new_chanctx() argument
62 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_can_create_new_chanctx()
63 return ieee80211_num_chanctx(local) < ieee80211_max_num_channels(local); in ieee80211_can_create_new_chanctx()
69 struct ieee80211_local *local __maybe_unused = sdata->local; in ieee80211_vif_get_chanctx()
73 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_vif_get_chanctx()
81 ieee80211_chanctx_reserved_chandef(struct ieee80211_local *local, in ieee80211_chanctx_reserved_chandef() argument
87 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_reserved_chandef()
104 ieee80211_chanctx_non_reserved_chandef(struct ieee80211_local *local, in ieee80211_chanctx_non_reserved_chandef() argument
110 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_non_reserved_chandef()
130 ieee80211_chanctx_combined_chandef(struct ieee80211_local *local, in ieee80211_chanctx_combined_chandef() argument
134 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_combined_chandef()
136 compat = ieee80211_chanctx_reserved_chandef(local, ctx, compat); in ieee80211_chanctx_combined_chandef()
140 compat = ieee80211_chanctx_non_reserved_chandef(local, ctx, compat); in ieee80211_chanctx_combined_chandef()
148 ieee80211_chanctx_can_reserve_chandef(struct ieee80211_local *local, in ieee80211_chanctx_can_reserve_chandef() argument
152 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_can_reserve_chandef()
154 if (ieee80211_chanctx_combined_chandef(local, ctx, def)) in ieee80211_chanctx_can_reserve_chandef()
158 ieee80211_chanctx_reserved_chandef(local, ctx, def)) in ieee80211_chanctx_can_reserve_chandef()
165 ieee80211_find_reservation_chanctx(struct ieee80211_local *local, in ieee80211_find_reservation_chanctx() argument
171 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_find_reservation_chanctx()
176 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_find_reservation_chanctx()
183 if (!ieee80211_chanctx_can_reserve_chandef(local, ctx, in ieee80211_find_reservation_chanctx()
229 list_for_each_entry_rcu(sta, &sdata->local->sta_list, list) { in ieee80211_get_max_required_bw()
245 ieee80211_get_chanctx_max_required_bw(struct ieee80211_local *local, in ieee80211_get_chanctx_max_required_bw() argument
252 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_get_chanctx_max_required_bw()
287 sdata = rcu_dereference(local->monitor_sdata); in ieee80211_get_chanctx_max_required_bw()
301 void ieee80211_recalc_chanctx_min_def(struct ieee80211_local *local, in ieee80211_recalc_chanctx_min_def() argument
307 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_recalc_chanctx_min_def()
317 max_bw = ieee80211_get_chanctx_max_required_bw(local, &ctx->conf); in ieee80211_recalc_chanctx_min_def()
331 drv_change_chanctx(local, ctx, IEEE80211_CHANCTX_CHANGE_MIN_WIDTH); in ieee80211_recalc_chanctx_min_def()
334 static void ieee80211_change_chanctx(struct ieee80211_local *local, in ieee80211_change_chanctx() argument
344 drv_change_chanctx(local, ctx, IEEE80211_CHANCTX_CHANGE_WIDTH); in ieee80211_change_chanctx()
345 ieee80211_recalc_chanctx_min_def(local, ctx); in ieee80211_change_chanctx()
347 if (!local->use_chanctx) { in ieee80211_change_chanctx()
348 local->_oper_chandef = *chandef; in ieee80211_change_chanctx()
349 ieee80211_hw_config(local, 0); in ieee80211_change_chanctx()
354 ieee80211_find_chanctx(struct ieee80211_local *local, in ieee80211_find_chanctx() argument
360 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_find_chanctx()
365 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_find_chanctx()
378 compat = ieee80211_chanctx_reserved_chandef(local, ctx, in ieee80211_find_chanctx()
383 ieee80211_change_chanctx(local, ctx, compat); in ieee80211_find_chanctx()
391 bool ieee80211_is_radar_required(struct ieee80211_local *local) in ieee80211_is_radar_required() argument
395 lockdep_assert_held(&local->mtx); in ieee80211_is_radar_required()
398 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_is_radar_required()
410 ieee80211_chanctx_radar_required(struct ieee80211_local *local, in ieee80211_chanctx_radar_required() argument
417 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_radar_required()
418 lockdep_assert_held(&local->mtx); in ieee80211_chanctx_radar_required()
421 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_chanctx_radar_required()
438 ieee80211_alloc_chanctx(struct ieee80211_local *local, in ieee80211_alloc_chanctx() argument
444 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_alloc_chanctx()
446 ctx = kzalloc(sizeof(*ctx) + local->hw.chanctx_data_size, GFP_KERNEL); in ieee80211_alloc_chanctx()
457 ieee80211_recalc_chanctx_min_def(local, ctx); in ieee80211_alloc_chanctx()
462 static int ieee80211_add_chanctx(struct ieee80211_local *local, in ieee80211_add_chanctx() argument
468 lockdep_assert_held(&local->mtx); in ieee80211_add_chanctx()
469 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_add_chanctx()
471 if (!local->use_chanctx) in ieee80211_add_chanctx()
472 local->hw.conf.radar_enabled = ctx->conf.radar_enabled; in ieee80211_add_chanctx()
475 changed = ieee80211_idle_off(local); in ieee80211_add_chanctx()
477 ieee80211_hw_config(local, changed); in ieee80211_add_chanctx()
479 if (!local->use_chanctx) { in ieee80211_add_chanctx()
480 local->_oper_chandef = ctx->conf.def; in ieee80211_add_chanctx()
481 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); in ieee80211_add_chanctx()
483 err = drv_add_chanctx(local, ctx); in ieee80211_add_chanctx()
485 ieee80211_recalc_idle(local); in ieee80211_add_chanctx()
494 ieee80211_new_chanctx(struct ieee80211_local *local, in ieee80211_new_chanctx() argument
501 lockdep_assert_held(&local->mtx); in ieee80211_new_chanctx()
502 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_new_chanctx()
504 ctx = ieee80211_alloc_chanctx(local, chandef, mode); in ieee80211_new_chanctx()
508 err = ieee80211_add_chanctx(local, ctx); in ieee80211_new_chanctx()
514 list_add_rcu(&ctx->list, &local->chanctx_list); in ieee80211_new_chanctx()
518 static void ieee80211_del_chanctx(struct ieee80211_local *local, in ieee80211_del_chanctx() argument
521 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_del_chanctx()
523 if (!local->use_chanctx) { in ieee80211_del_chanctx()
524 struct cfg80211_chan_def *chandef = &local->_oper_chandef; in ieee80211_del_chanctx()
532 WARN_ON(local->hw.conf.radar_enabled && in ieee80211_del_chanctx()
533 !list_empty(&local->chanctx_list)); in ieee80211_del_chanctx()
535 local->hw.conf.radar_enabled = false; in ieee80211_del_chanctx()
537 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); in ieee80211_del_chanctx()
539 drv_remove_chanctx(local, ctx); in ieee80211_del_chanctx()
542 ieee80211_recalc_idle(local); in ieee80211_del_chanctx()
545 static void ieee80211_free_chanctx(struct ieee80211_local *local, in ieee80211_free_chanctx() argument
548 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_free_chanctx()
550 WARN_ON_ONCE(ieee80211_chanctx_refcount(local, ctx) != 0); in ieee80211_free_chanctx()
553 ieee80211_del_chanctx(local, ctx); in ieee80211_free_chanctx()
557 static void ieee80211_recalc_chanctx_chantype(struct ieee80211_local *local, in ieee80211_recalc_chanctx_chantype() argument
564 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_recalc_chanctx_chantype()
567 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_recalc_chanctx_chantype()
589 ieee80211_change_chanctx(local, ctx, compat); in ieee80211_recalc_chanctx_chantype()
592 static void ieee80211_recalc_radar_chanctx(struct ieee80211_local *local, in ieee80211_recalc_radar_chanctx() argument
597 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_recalc_radar_chanctx()
599 lockdep_assert_held(&local->mtx); in ieee80211_recalc_radar_chanctx()
601 radar_enabled = ieee80211_chanctx_radar_required(local, chanctx); in ieee80211_recalc_radar_chanctx()
608 if (!local->use_chanctx) { in ieee80211_recalc_radar_chanctx()
609 local->hw.conf.radar_enabled = chanctx->conf.radar_enabled; in ieee80211_recalc_radar_chanctx()
610 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); in ieee80211_recalc_radar_chanctx()
613 drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RADAR); in ieee80211_recalc_radar_chanctx()
619 struct ieee80211_local *local = sdata->local; in ieee80211_assign_vif_chanctx() local
625 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_assign_vif_chanctx()
630 drv_unassign_vif_chanctx(local, sdata, curr_ctx); in ieee80211_assign_vif_chanctx()
636 ret = drv_assign_vif_chanctx(local, sdata, new_ctx); in ieee80211_assign_vif_chanctx()
650 if (curr_ctx && ieee80211_chanctx_num_assigned(local, curr_ctx) > 0) { in ieee80211_assign_vif_chanctx()
651 ieee80211_recalc_chanctx_chantype(local, curr_ctx); in ieee80211_assign_vif_chanctx()
652 ieee80211_recalc_smps_chanctx(local, curr_ctx); in ieee80211_assign_vif_chanctx()
653 ieee80211_recalc_radar_chanctx(local, curr_ctx); in ieee80211_assign_vif_chanctx()
654 ieee80211_recalc_chanctx_min_def(local, curr_ctx); in ieee80211_assign_vif_chanctx()
657 if (new_ctx && ieee80211_chanctx_num_assigned(local, new_ctx) > 0) { in ieee80211_assign_vif_chanctx()
659 ieee80211_recalc_chanctx_min_def(local, new_ctx); in ieee80211_assign_vif_chanctx()
670 void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local, in ieee80211_recalc_smps_chanctx() argument
676 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_recalc_smps_chanctx()
682 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_recalc_smps_chanctx()
735 sdata = rcu_dereference(local->monitor_sdata); in ieee80211_recalc_smps_chanctx()
738 rx_chains_dynamic = rx_chains_static = local->rx_chains; in ieee80211_recalc_smps_chanctx()
742 if (!local->use_chanctx) { in ieee80211_recalc_smps_chanctx()
744 local->smps_mode = IEEE80211_SMPS_OFF; in ieee80211_recalc_smps_chanctx()
746 local->smps_mode = IEEE80211_SMPS_DYNAMIC; in ieee80211_recalc_smps_chanctx()
748 local->smps_mode = IEEE80211_SMPS_STATIC; in ieee80211_recalc_smps_chanctx()
749 ieee80211_hw_config(local, 0); in ieee80211_recalc_smps_chanctx()
758 drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RX_CHAINS); in ieee80211_recalc_smps_chanctx()
765 struct ieee80211_local *local __maybe_unused = sdata->local; in __ieee80211_vif_copy_chanctx_to_vlans()
772 lockdep_assert_held(&local->mtx); in __ieee80211_vif_copy_chanctx_to_vlans()
781 lockdep_is_held(&local->chanctx_mtx)); in __ieee80211_vif_copy_chanctx_to_vlans()
794 struct ieee80211_local *local = sdata->local; in ieee80211_vif_copy_chanctx_to_vlans() local
796 mutex_lock(&local->chanctx_mtx); in ieee80211_vif_copy_chanctx_to_vlans()
800 mutex_unlock(&local->chanctx_mtx); in ieee80211_vif_copy_chanctx_to_vlans()
807 lockdep_assert_held(&sdata->local->chanctx_mtx); in ieee80211_vif_unreserve_chanctx()
815 if (ieee80211_chanctx_refcount(sdata->local, ctx) == 0) { in ieee80211_vif_unreserve_chanctx()
831 ieee80211_free_chanctx(sdata->local, ctx); in ieee80211_vif_unreserve_chanctx()
843 struct ieee80211_local *local = sdata->local; in ieee80211_vif_reserve_chanctx() local
846 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_vif_reserve_chanctx()
849 if (curr_ctx && local->use_chanctx && !local->ops->switch_vif_chanctx) in ieee80211_vif_reserve_chanctx()
852 new_ctx = ieee80211_find_reservation_chanctx(local, chandef, mode); in ieee80211_vif_reserve_chanctx()
854 if (ieee80211_can_create_new_chanctx(local)) { in ieee80211_vif_reserve_chanctx()
855 new_ctx = ieee80211_new_chanctx(local, chandef, mode); in ieee80211_vif_reserve_chanctx()
885 list_for_each_entry(ctx, &local->chanctx_list, in ieee80211_vif_reserve_chanctx()
909 new_ctx = ieee80211_alloc_chanctx(local, chandef, mode); in ieee80211_vif_reserve_chanctx()
921 list_add_rcu(&new_ctx->list, &local->chanctx_list); in ieee80211_vif_reserve_chanctx()
942 ieee80211_queue_work(&sdata->local->hw, in ieee80211_vif_chanctx_reservation_complete()
946 ieee80211_queue_work(&sdata->local->hw, in ieee80211_vif_chanctx_reservation_complete()
980 struct ieee80211_local *local = sdata->local; in ieee80211_vif_use_reserved_reassign() local
987 lockdep_assert_held(&local->mtx); in ieee80211_vif_use_reserved_reassign()
988 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_vif_use_reserved_reassign()
1006 chandef = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_vif_use_reserved_reassign()
1018 err = drv_switch_vif_chanctx(local, vif_chsw, 1, in ieee80211_vif_use_reserved_reassign()
1021 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_vif_use_reserved_reassign()
1022 ieee80211_free_chanctx(local, new_ctx); in ieee80211_vif_use_reserved_reassign()
1033 if (ieee80211_chanctx_refcount(local, old_ctx) == 0) in ieee80211_vif_use_reserved_reassign()
1034 ieee80211_free_chanctx(local, old_ctx); in ieee80211_vif_use_reserved_reassign()
1041 ieee80211_recalc_smps_chanctx(local, new_ctx); in ieee80211_vif_use_reserved_reassign()
1042 ieee80211_recalc_radar_chanctx(local, new_ctx); in ieee80211_vif_use_reserved_reassign()
1043 ieee80211_recalc_chanctx_min_def(local, new_ctx); in ieee80211_vif_use_reserved_reassign()
1056 struct ieee80211_local *local = sdata->local; in ieee80211_vif_use_reserved_assign() local
1077 chandef = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_vif_use_reserved_assign()
1087 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_vif_use_reserved_assign()
1088 ieee80211_free_chanctx(local, new_ctx); in ieee80211_vif_use_reserved_assign()
1103 lockdep_assert_held(&sdata->local->chanctx_mtx); in ieee80211_vif_has_in_place_reservation()
1123 static int ieee80211_chsw_switch_hwconf(struct ieee80211_local *local, in ieee80211_chsw_switch_hwconf() argument
1128 lockdep_assert_held(&local->mtx); in ieee80211_chsw_switch_hwconf()
1129 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chsw_switch_hwconf()
1131 chandef = ieee80211_chanctx_reserved_chandef(local, new_ctx, NULL); in ieee80211_chsw_switch_hwconf()
1135 local->hw.conf.radar_enabled = new_ctx->conf.radar_enabled; in ieee80211_chsw_switch_hwconf()
1136 local->_oper_chandef = *chandef; in ieee80211_chsw_switch_hwconf()
1137 ieee80211_hw_config(local, 0); in ieee80211_chsw_switch_hwconf()
1142 static int ieee80211_chsw_switch_vifs(struct ieee80211_local *local, in ieee80211_chsw_switch_vifs() argument
1150 lockdep_assert_held(&local->mtx); in ieee80211_chsw_switch_vifs()
1151 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chsw_switch_vifs()
1158 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_vifs()
1182 err = drv_switch_vif_chanctx(local, vif_chsw, n_vifs, in ieee80211_chsw_switch_vifs()
1190 static int ieee80211_chsw_switch_ctxs(struct ieee80211_local *local) in ieee80211_chsw_switch_ctxs() argument
1195 lockdep_assert_held(&local->mtx); in ieee80211_chsw_switch_ctxs()
1196 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chsw_switch_ctxs()
1198 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_ctxs()
1205 ieee80211_del_chanctx(local, ctx->replace_ctx); in ieee80211_chsw_switch_ctxs()
1206 err = ieee80211_add_chanctx(local, ctx); in ieee80211_chsw_switch_ctxs()
1214 WARN_ON(ieee80211_add_chanctx(local, ctx)); in ieee80211_chsw_switch_ctxs()
1215 list_for_each_entry_continue_reverse(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_ctxs()
1222 ieee80211_del_chanctx(local, ctx); in ieee80211_chsw_switch_ctxs()
1223 WARN_ON(ieee80211_add_chanctx(local, ctx->replace_ctx)); in ieee80211_chsw_switch_ctxs()
1229 static int ieee80211_vif_use_reserved_switch(struct ieee80211_local *local) in ieee80211_vif_use_reserved_switch() argument
1237 lockdep_assert_held(&local->mtx); in ieee80211_vif_use_reserved_switch()
1238 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_vif_use_reserved_switch()
1256 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1265 if (!local->use_chanctx) in ieee80211_vif_use_reserved_switch()
1286 wiphy_info(local->hw.wiphy, in ieee80211_vif_use_reserved_switch()
1322 WARN_ON(n_ctx > 1 && !local->use_chanctx) || in ieee80211_vif_use_reserved_switch()
1323 WARN_ON(!new_ctx && !local->use_chanctx)) { in ieee80211_vif_use_reserved_switch()
1333 if (local->use_chanctx) { in ieee80211_vif_use_reserved_switch()
1335 err = ieee80211_chsw_switch_vifs(local, n_vifs_switch); in ieee80211_vif_use_reserved_switch()
1341 err = ieee80211_chsw_switch_ctxs(local); in ieee80211_vif_use_reserved_switch()
1346 err = ieee80211_chsw_switch_hwconf(local, new_ctx); in ieee80211_vif_use_reserved_switch()
1357 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1393 ieee80211_recalc_chanctx_chantype(local, ctx); in ieee80211_vif_use_reserved_switch()
1394 ieee80211_recalc_smps_chanctx(local, ctx); in ieee80211_vif_use_reserved_switch()
1395 ieee80211_recalc_radar_chanctx(local, ctx); in ieee80211_vif_use_reserved_switch()
1396 ieee80211_recalc_chanctx_min_def(local, ctx); in ieee80211_vif_use_reserved_switch()
1441 cfg80211_stop_iface(local->hw.wiphy, in ieee80211_vif_use_reserved_switch()
1452 list_for_each_entry_safe(ctx, ctx_tmp, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1467 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1483 struct ieee80211_local *local = sdata->local; in __ieee80211_vif_release_channel() local
1488 lockdep_assert_held(&local->chanctx_mtx); in __ieee80211_vif_release_channel()
1491 lockdep_is_held(&local->chanctx_mtx)); in __ieee80211_vif_release_channel()
1500 ieee80211_chanctx_num_reserved(local, in __ieee80211_vif_release_channel()
1508 if (ieee80211_chanctx_refcount(local, ctx) == 0) in __ieee80211_vif_release_channel()
1509 ieee80211_free_chanctx(local, ctx); in __ieee80211_vif_release_channel()
1515 ieee80211_vif_use_reserved_switch(local); in __ieee80211_vif_release_channel()
1522 struct ieee80211_local *local = sdata->local; in ieee80211_vif_use_channel() local
1527 lockdep_assert_held(&local->mtx); in ieee80211_vif_use_channel()
1531 mutex_lock(&local->chanctx_mtx); in ieee80211_vif_use_channel()
1533 ret = cfg80211_chandef_dfs_required(local->hw.wiphy, in ieee80211_vif_use_channel()
1550 ctx = ieee80211_find_chanctx(local, chandef, mode); in ieee80211_vif_use_channel()
1552 ctx = ieee80211_new_chanctx(local, chandef, mode); in ieee80211_vif_use_channel()
1563 if (ieee80211_chanctx_refcount(local, ctx) == 0) in ieee80211_vif_use_channel()
1564 ieee80211_free_chanctx(local, ctx); in ieee80211_vif_use_channel()
1568 ieee80211_recalc_smps_chanctx(local, ctx); in ieee80211_vif_use_channel()
1569 ieee80211_recalc_radar_chanctx(local, ctx); in ieee80211_vif_use_channel()
1574 mutex_unlock(&local->chanctx_mtx); in ieee80211_vif_use_channel()
1580 struct ieee80211_local *local = sdata->local; in ieee80211_vif_use_reserved_context() local
1585 lockdep_assert_held(&local->mtx); in ieee80211_vif_use_reserved_context()
1586 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_vif_use_reserved_context()
1627 err = ieee80211_vif_use_reserved_switch(local); in ieee80211_vif_use_reserved_context()
1633 wiphy_info(local->hw.wiphy, in ieee80211_vif_use_reserved_context()
1646 struct ieee80211_local *local = sdata->local; in ieee80211_vif_change_bandwidth() local
1652 if (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef, in ieee80211_vif_change_bandwidth()
1656 mutex_lock(&local->chanctx_mtx); in ieee80211_vif_change_bandwidth()
1669 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_vif_change_bandwidth()
1685 if (!ieee80211_chanctx_reserved_chandef(local, ctx, compat)) { in ieee80211_vif_change_bandwidth()
1705 ieee80211_recalc_chanctx_chantype(local, ctx); in ieee80211_vif_change_bandwidth()
1710 mutex_unlock(&local->chanctx_mtx); in ieee80211_vif_change_bandwidth()
1718 lockdep_assert_held(&sdata->local->mtx); in ieee80211_vif_release_channel()
1720 mutex_lock(&sdata->local->chanctx_mtx); in ieee80211_vif_release_channel()
1722 mutex_unlock(&sdata->local->chanctx_mtx); in ieee80211_vif_release_channel()
1727 struct ieee80211_local *local = sdata->local; in ieee80211_vif_vlan_copy_chanctx() local
1736 mutex_lock(&local->chanctx_mtx); in ieee80211_vif_vlan_copy_chanctx()
1739 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_vif_vlan_copy_chanctx()
1741 mutex_unlock(&local->chanctx_mtx); in ieee80211_vif_vlan_copy_chanctx()
1751 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iter_chan_contexts_atomic() local
1755 list_for_each_entry_rcu(ctx, &local->chanctx_list, list) in ieee80211_iter_chan_contexts_atomic()