• Home
  • Raw
  • Download

Lines Matching full: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()
242 ieee80211_get_chanctx_max_required_bw(struct ieee80211_local *local, in ieee80211_get_chanctx_max_required_bw() argument
249 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_get_chanctx_max_required_bw()
293 sdata = rcu_dereference(local->monitor_sdata); in ieee80211_get_chanctx_max_required_bw()
307 void ieee80211_recalc_chanctx_min_def(struct ieee80211_local *local, in ieee80211_recalc_chanctx_min_def() argument
313 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_recalc_chanctx_min_def()
323 max_bw = ieee80211_get_chanctx_max_required_bw(local, &ctx->conf); in ieee80211_recalc_chanctx_min_def()
337 drv_change_chanctx(local, ctx, IEEE80211_CHANCTX_CHANGE_MIN_WIDTH); in ieee80211_recalc_chanctx_min_def()
340 static void ieee80211_change_chanctx(struct ieee80211_local *local, in ieee80211_change_chanctx() argument
345 ieee80211_recalc_chanctx_min_def(local, ctx); in ieee80211_change_chanctx()
352 drv_change_chanctx(local, ctx, IEEE80211_CHANCTX_CHANGE_WIDTH); in ieee80211_change_chanctx()
353 ieee80211_recalc_chanctx_min_def(local, ctx); in ieee80211_change_chanctx()
355 if (!local->use_chanctx) { in ieee80211_change_chanctx()
356 local->_oper_chandef = *chandef; in ieee80211_change_chanctx()
357 ieee80211_hw_config(local, 0); in ieee80211_change_chanctx()
362 ieee80211_find_chanctx(struct ieee80211_local *local, in ieee80211_find_chanctx() argument
368 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_find_chanctx()
373 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_find_chanctx()
386 compat = ieee80211_chanctx_reserved_chandef(local, ctx, in ieee80211_find_chanctx()
391 ieee80211_change_chanctx(local, ctx, compat); in ieee80211_find_chanctx()
399 bool ieee80211_is_radar_required(struct ieee80211_local *local) in ieee80211_is_radar_required() argument
403 lockdep_assert_held(&local->mtx); in ieee80211_is_radar_required()
406 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_is_radar_required()
418 ieee80211_chanctx_radar_required(struct ieee80211_local *local, in ieee80211_chanctx_radar_required() argument
425 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_radar_required()
426 lockdep_assert_held(&local->mtx); in ieee80211_chanctx_radar_required()
429 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_chanctx_radar_required()
446 ieee80211_alloc_chanctx(struct ieee80211_local *local, in ieee80211_alloc_chanctx() argument
452 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_alloc_chanctx()
454 ctx = kzalloc(sizeof(*ctx) + local->hw.chanctx_data_size, GFP_KERNEL); in ieee80211_alloc_chanctx()
465 ieee80211_recalc_chanctx_min_def(local, ctx); in ieee80211_alloc_chanctx()
470 static int ieee80211_add_chanctx(struct ieee80211_local *local, in ieee80211_add_chanctx() argument
476 lockdep_assert_held(&local->mtx); in ieee80211_add_chanctx()
477 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_add_chanctx()
479 if (!local->use_chanctx) in ieee80211_add_chanctx()
480 local->hw.conf.radar_enabled = ctx->conf.radar_enabled; in ieee80211_add_chanctx()
483 changed = ieee80211_idle_off(local); in ieee80211_add_chanctx()
485 ieee80211_hw_config(local, changed); in ieee80211_add_chanctx()
487 if (!local->use_chanctx) { in ieee80211_add_chanctx()
488 local->_oper_chandef = ctx->conf.def; in ieee80211_add_chanctx()
489 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); in ieee80211_add_chanctx()
491 err = drv_add_chanctx(local, ctx); in ieee80211_add_chanctx()
493 ieee80211_recalc_idle(local); in ieee80211_add_chanctx()
502 ieee80211_new_chanctx(struct ieee80211_local *local, in ieee80211_new_chanctx() argument
509 lockdep_assert_held(&local->mtx); in ieee80211_new_chanctx()
510 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_new_chanctx()
512 ctx = ieee80211_alloc_chanctx(local, chandef, mode); in ieee80211_new_chanctx()
516 err = ieee80211_add_chanctx(local, ctx); in ieee80211_new_chanctx()
522 list_add_rcu(&ctx->list, &local->chanctx_list); in ieee80211_new_chanctx()
526 static void ieee80211_del_chanctx(struct ieee80211_local *local, in ieee80211_del_chanctx() argument
529 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_del_chanctx()
531 if (!local->use_chanctx) { in ieee80211_del_chanctx()
532 struct cfg80211_chan_def *chandef = &local->_oper_chandef; in ieee80211_del_chanctx()
540 WARN_ON(local->hw.conf.radar_enabled && in ieee80211_del_chanctx()
541 !list_empty(&local->chanctx_list)); in ieee80211_del_chanctx()
543 local->hw.conf.radar_enabled = false; in ieee80211_del_chanctx()
545 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); in ieee80211_del_chanctx()
547 drv_remove_chanctx(local, ctx); in ieee80211_del_chanctx()
550 ieee80211_recalc_idle(local); in ieee80211_del_chanctx()
553 static void ieee80211_free_chanctx(struct ieee80211_local *local, in ieee80211_free_chanctx() argument
556 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_free_chanctx()
558 WARN_ON_ONCE(ieee80211_chanctx_refcount(local, ctx) != 0); in ieee80211_free_chanctx()
561 ieee80211_del_chanctx(local, ctx); in ieee80211_free_chanctx()
565 void ieee80211_recalc_chanctx_chantype(struct ieee80211_local *local, in ieee80211_recalc_chanctx_chantype() argument
573 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_recalc_chanctx_chantype()
576 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_recalc_chanctx_chantype()
595 list_for_each_entry_rcu(sta, &local->sta_list, list) { in ieee80211_recalc_chanctx_chantype()
612 ieee80211_change_chanctx(local, ctx, compat); in ieee80211_recalc_chanctx_chantype()
615 static void ieee80211_recalc_radar_chanctx(struct ieee80211_local *local, in ieee80211_recalc_radar_chanctx() argument
620 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_recalc_radar_chanctx()
622 lockdep_assert_held(&local->mtx); in ieee80211_recalc_radar_chanctx()
624 radar_enabled = ieee80211_chanctx_radar_required(local, chanctx); in ieee80211_recalc_radar_chanctx()
631 if (!local->use_chanctx) { in ieee80211_recalc_radar_chanctx()
632 local->hw.conf.radar_enabled = chanctx->conf.radar_enabled; in ieee80211_recalc_radar_chanctx()
633 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); in ieee80211_recalc_radar_chanctx()
636 drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RADAR); in ieee80211_recalc_radar_chanctx()
642 struct ieee80211_local *local = sdata->local; in ieee80211_assign_vif_chanctx() local
651 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_assign_vif_chanctx()
656 drv_unassign_vif_chanctx(local, sdata, curr_ctx); in ieee80211_assign_vif_chanctx()
662 ret = drv_assign_vif_chanctx(local, sdata, new_ctx); in ieee80211_assign_vif_chanctx()
676 if (curr_ctx && ieee80211_chanctx_num_assigned(local, curr_ctx) > 0) { in ieee80211_assign_vif_chanctx()
677 ieee80211_recalc_chanctx_chantype(local, curr_ctx); in ieee80211_assign_vif_chanctx()
678 ieee80211_recalc_smps_chanctx(local, curr_ctx); in ieee80211_assign_vif_chanctx()
679 ieee80211_recalc_radar_chanctx(local, curr_ctx); in ieee80211_assign_vif_chanctx()
680 ieee80211_recalc_chanctx_min_def(local, curr_ctx); in ieee80211_assign_vif_chanctx()
683 if (new_ctx && ieee80211_chanctx_num_assigned(local, new_ctx) > 0) { in ieee80211_assign_vif_chanctx()
685 ieee80211_recalc_chanctx_min_def(local, new_ctx); in ieee80211_assign_vif_chanctx()
698 void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local, in ieee80211_recalc_smps_chanctx() argument
704 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_recalc_smps_chanctx()
710 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_recalc_smps_chanctx()
764 sdata = rcu_dereference(local->monitor_sdata); in ieee80211_recalc_smps_chanctx()
767 rx_chains_dynamic = rx_chains_static = local->rx_chains; in ieee80211_recalc_smps_chanctx()
771 if (!local->use_chanctx) { in ieee80211_recalc_smps_chanctx()
773 local->smps_mode = IEEE80211_SMPS_OFF; in ieee80211_recalc_smps_chanctx()
775 local->smps_mode = IEEE80211_SMPS_DYNAMIC; in ieee80211_recalc_smps_chanctx()
777 local->smps_mode = IEEE80211_SMPS_STATIC; in ieee80211_recalc_smps_chanctx()
778 ieee80211_hw_config(local, 0); in ieee80211_recalc_smps_chanctx()
787 drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RX_CHAINS); in ieee80211_recalc_smps_chanctx()
794 struct ieee80211_local *local __maybe_unused = sdata->local; in __ieee80211_vif_copy_chanctx_to_vlans()
801 lockdep_assert_held(&local->mtx); in __ieee80211_vif_copy_chanctx_to_vlans()
810 lockdep_is_held(&local->chanctx_mtx)); in __ieee80211_vif_copy_chanctx_to_vlans()
823 struct ieee80211_local *local = sdata->local; in ieee80211_vif_copy_chanctx_to_vlans() local
825 mutex_lock(&local->chanctx_mtx); in ieee80211_vif_copy_chanctx_to_vlans()
829 mutex_unlock(&local->chanctx_mtx); in ieee80211_vif_copy_chanctx_to_vlans()
836 lockdep_assert_held(&sdata->local->chanctx_mtx); in ieee80211_vif_unreserve_chanctx()
844 if (ieee80211_chanctx_refcount(sdata->local, ctx) == 0) { in ieee80211_vif_unreserve_chanctx()
860 ieee80211_free_chanctx(sdata->local, ctx); in ieee80211_vif_unreserve_chanctx()
872 struct ieee80211_local *local = sdata->local; in ieee80211_vif_reserve_chanctx() local
875 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_vif_reserve_chanctx()
878 if (curr_ctx && local->use_chanctx && !local->ops->switch_vif_chanctx) in ieee80211_vif_reserve_chanctx()
881 new_ctx = ieee80211_find_reservation_chanctx(local, chandef, mode); in ieee80211_vif_reserve_chanctx()
883 if (ieee80211_can_create_new_chanctx(local)) { in ieee80211_vif_reserve_chanctx()
884 new_ctx = ieee80211_new_chanctx(local, chandef, mode); in ieee80211_vif_reserve_chanctx()
914 list_for_each_entry(ctx, &local->chanctx_list, in ieee80211_vif_reserve_chanctx()
938 new_ctx = ieee80211_alloc_chanctx(local, chandef, mode); in ieee80211_vif_reserve_chanctx()
950 list_add_rcu(&new_ctx->list, &local->chanctx_list); in ieee80211_vif_reserve_chanctx()
971 ieee80211_queue_work(&sdata->local->hw, in ieee80211_vif_chanctx_reservation_complete()
975 ieee80211_queue_work(&sdata->local->hw, in ieee80211_vif_chanctx_reservation_complete()
1010 struct ieee80211_local *local = sdata->local; in ieee80211_vif_use_reserved_reassign() local
1017 lockdep_assert_held(&local->mtx); in ieee80211_vif_use_reserved_reassign()
1018 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_vif_use_reserved_reassign()
1036 chandef = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_vif_use_reserved_reassign()
1041 ieee80211_change_chanctx(local, new_ctx, chandef); in ieee80211_vif_use_reserved_reassign()
1050 err = drv_switch_vif_chanctx(local, vif_chsw, 1, in ieee80211_vif_use_reserved_reassign()
1053 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_vif_use_reserved_reassign()
1054 ieee80211_free_chanctx(local, new_ctx); in ieee80211_vif_use_reserved_reassign()
1067 if (ieee80211_chanctx_refcount(local, old_ctx) == 0) in ieee80211_vif_use_reserved_reassign()
1068 ieee80211_free_chanctx(local, old_ctx); in ieee80211_vif_use_reserved_reassign()
1075 ieee80211_recalc_smps_chanctx(local, new_ctx); in ieee80211_vif_use_reserved_reassign()
1076 ieee80211_recalc_radar_chanctx(local, new_ctx); in ieee80211_vif_use_reserved_reassign()
1077 ieee80211_recalc_chanctx_min_def(local, new_ctx); in ieee80211_vif_use_reserved_reassign()
1090 struct ieee80211_local *local = sdata->local; in ieee80211_vif_use_reserved_assign() local
1111 chandef = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_vif_use_reserved_assign()
1116 ieee80211_change_chanctx(local, new_ctx, chandef); in ieee80211_vif_use_reserved_assign()
1123 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_vif_use_reserved_assign()
1124 ieee80211_free_chanctx(local, new_ctx); in ieee80211_vif_use_reserved_assign()
1139 lockdep_assert_held(&sdata->local->chanctx_mtx); in ieee80211_vif_has_in_place_reservation()
1159 static int ieee80211_chsw_switch_hwconf(struct ieee80211_local *local, in ieee80211_chsw_switch_hwconf() argument
1164 lockdep_assert_held(&local->mtx); in ieee80211_chsw_switch_hwconf()
1165 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chsw_switch_hwconf()
1167 chandef = ieee80211_chanctx_reserved_chandef(local, new_ctx, NULL); in ieee80211_chsw_switch_hwconf()
1171 local->hw.conf.radar_enabled = new_ctx->conf.radar_enabled; in ieee80211_chsw_switch_hwconf()
1172 local->_oper_chandef = *chandef; in ieee80211_chsw_switch_hwconf()
1173 ieee80211_hw_config(local, 0); in ieee80211_chsw_switch_hwconf()
1178 static int ieee80211_chsw_switch_vifs(struct ieee80211_local *local, in ieee80211_chsw_switch_vifs() argument
1186 lockdep_assert_held(&local->mtx); in ieee80211_chsw_switch_vifs()
1187 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chsw_switch_vifs()
1194 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_vifs()
1218 err = drv_switch_vif_chanctx(local, vif_chsw, n_vifs, in ieee80211_chsw_switch_vifs()
1226 static int ieee80211_chsw_switch_ctxs(struct ieee80211_local *local) in ieee80211_chsw_switch_ctxs() argument
1231 lockdep_assert_held(&local->mtx); in ieee80211_chsw_switch_ctxs()
1232 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chsw_switch_ctxs()
1234 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_ctxs()
1241 ieee80211_del_chanctx(local, ctx->replace_ctx); in ieee80211_chsw_switch_ctxs()
1242 err = ieee80211_add_chanctx(local, ctx); in ieee80211_chsw_switch_ctxs()
1250 WARN_ON(ieee80211_add_chanctx(local, ctx)); in ieee80211_chsw_switch_ctxs()
1251 list_for_each_entry_continue_reverse(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_ctxs()
1258 ieee80211_del_chanctx(local, ctx); in ieee80211_chsw_switch_ctxs()
1259 WARN_ON(ieee80211_add_chanctx(local, ctx->replace_ctx)); in ieee80211_chsw_switch_ctxs()
1265 static int ieee80211_vif_use_reserved_switch(struct ieee80211_local *local) in ieee80211_vif_use_reserved_switch() argument
1273 lockdep_assert_held(&local->mtx); in ieee80211_vif_use_reserved_switch()
1274 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_vif_use_reserved_switch()
1292 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1301 if (!local->use_chanctx) in ieee80211_vif_use_reserved_switch()
1322 wiphy_info(local->hw.wiphy, in ieee80211_vif_use_reserved_switch()
1358 WARN_ON(n_ctx > 1 && !local->use_chanctx) || in ieee80211_vif_use_reserved_switch()
1359 WARN_ON(!new_ctx && !local->use_chanctx)) { in ieee80211_vif_use_reserved_switch()
1369 if (local->use_chanctx) { in ieee80211_vif_use_reserved_switch()
1371 err = ieee80211_chsw_switch_vifs(local, n_vifs_switch); in ieee80211_vif_use_reserved_switch()
1377 err = ieee80211_chsw_switch_ctxs(local); in ieee80211_vif_use_reserved_switch()
1382 err = ieee80211_chsw_switch_hwconf(local, new_ctx); in ieee80211_vif_use_reserved_switch()
1391 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1429 ieee80211_recalc_chanctx_chantype(local, ctx); in ieee80211_vif_use_reserved_switch()
1430 ieee80211_recalc_smps_chanctx(local, ctx); in ieee80211_vif_use_reserved_switch()
1431 ieee80211_recalc_radar_chanctx(local, ctx); in ieee80211_vif_use_reserved_switch()
1432 ieee80211_recalc_chanctx_min_def(local, ctx); in ieee80211_vif_use_reserved_switch()
1477 cfg80211_stop_iface(local->hw.wiphy, in ieee80211_vif_use_reserved_switch()
1488 list_for_each_entry_safe(ctx, ctx_tmp, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1503 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1519 struct ieee80211_local *local = sdata->local; in __ieee80211_vif_release_channel() local
1524 lockdep_assert_held(&local->chanctx_mtx); in __ieee80211_vif_release_channel()
1527 lockdep_is_held(&local->chanctx_mtx)); in __ieee80211_vif_release_channel()
1536 ieee80211_chanctx_num_reserved(local, in __ieee80211_vif_release_channel()
1544 if (ieee80211_chanctx_refcount(local, ctx) == 0) in __ieee80211_vif_release_channel()
1545 ieee80211_free_chanctx(local, ctx); in __ieee80211_vif_release_channel()
1551 ieee80211_vif_use_reserved_switch(local); in __ieee80211_vif_release_channel()
1558 struct ieee80211_local *local = sdata->local; in ieee80211_vif_use_channel() local
1563 lockdep_assert_held(&local->mtx); in ieee80211_vif_use_channel()
1567 mutex_lock(&local->chanctx_mtx); in ieee80211_vif_use_channel()
1569 ret = cfg80211_chandef_dfs_required(local->hw.wiphy, in ieee80211_vif_use_channel()
1586 ctx = ieee80211_find_chanctx(local, chandef, mode); in ieee80211_vif_use_channel()
1588 ctx = ieee80211_new_chanctx(local, chandef, mode); in ieee80211_vif_use_channel()
1599 if (ieee80211_chanctx_refcount(local, ctx) == 0) in ieee80211_vif_use_channel()
1600 ieee80211_free_chanctx(local, ctx); in ieee80211_vif_use_channel()
1604 ieee80211_recalc_smps_chanctx(local, ctx); in ieee80211_vif_use_channel()
1605 ieee80211_recalc_radar_chanctx(local, ctx); in ieee80211_vif_use_channel()
1610 mutex_unlock(&local->chanctx_mtx); in ieee80211_vif_use_channel()
1616 struct ieee80211_local *local = sdata->local; in ieee80211_vif_use_reserved_context() local
1621 lockdep_assert_held(&local->mtx); in ieee80211_vif_use_reserved_context()
1622 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_vif_use_reserved_context()
1663 err = ieee80211_vif_use_reserved_switch(local); in ieee80211_vif_use_reserved_context()
1669 wiphy_info(local->hw.wiphy, in ieee80211_vif_use_reserved_context()
1682 struct ieee80211_local *local = sdata->local; in ieee80211_vif_change_bandwidth() local
1688 if (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef, in ieee80211_vif_change_bandwidth()
1692 mutex_lock(&local->chanctx_mtx); in ieee80211_vif_change_bandwidth()
1705 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_vif_change_bandwidth()
1721 if (!ieee80211_chanctx_reserved_chandef(local, ctx, compat)) { in ieee80211_vif_change_bandwidth()
1741 ieee80211_recalc_chanctx_chantype(local, ctx); in ieee80211_vif_change_bandwidth()
1746 mutex_unlock(&local->chanctx_mtx); in ieee80211_vif_change_bandwidth()
1754 lockdep_assert_held(&sdata->local->mtx); in ieee80211_vif_release_channel()
1756 mutex_lock(&sdata->local->chanctx_mtx); in ieee80211_vif_release_channel()
1758 mutex_unlock(&sdata->local->chanctx_mtx); in ieee80211_vif_release_channel()
1763 struct ieee80211_local *local = sdata->local; in ieee80211_vif_vlan_copy_chanctx() local
1772 mutex_lock(&local->chanctx_mtx); in ieee80211_vif_vlan_copy_chanctx()
1775 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_vif_vlan_copy_chanctx()
1777 mutex_unlock(&local->chanctx_mtx); in ieee80211_vif_vlan_copy_chanctx()
1787 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iter_chan_contexts_atomic() local
1791 list_for_each_entry_rcu(ctx, &local->chanctx_list, list) in ieee80211_iter_chan_contexts_atomic()