Lines Matching full:local
15 static int ieee80211_chanctx_num_assigned(struct ieee80211_local *local, in ieee80211_chanctx_num_assigned() argument
21 lockdep_assert_held(&local->chanctx_mtx); 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_held(&local->chanctx_mtx); 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_held(&local->chanctx_mtx); 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_held(&local->chanctx_mtx); in ieee80211_can_create_new_chanctx()
66 return ieee80211_num_chanctx(local) < ieee80211_max_num_channels(local); in ieee80211_can_create_new_chanctx()
72 struct ieee80211_local *local __maybe_unused = link->sdata->local; in ieee80211_link_get_chanctx()
76 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_link_get_chanctx()
84 ieee80211_chanctx_reserved_chandef(struct ieee80211_local *local, in ieee80211_chanctx_reserved_chandef() argument
90 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_reserved_chandef()
107 ieee80211_chanctx_non_reserved_chandef(struct ieee80211_local *local, in ieee80211_chanctx_non_reserved_chandef() argument
113 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_non_reserved_chandef()
135 ieee80211_chanctx_combined_chandef(struct ieee80211_local *local, in ieee80211_chanctx_combined_chandef() argument
139 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_combined_chandef()
141 compat = ieee80211_chanctx_reserved_chandef(local, ctx, compat); in ieee80211_chanctx_combined_chandef()
145 compat = ieee80211_chanctx_non_reserved_chandef(local, ctx, compat); in ieee80211_chanctx_combined_chandef()
153 ieee80211_chanctx_can_reserve_chandef(struct ieee80211_local *local, in ieee80211_chanctx_can_reserve_chandef() argument
157 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_can_reserve_chandef()
159 if (ieee80211_chanctx_combined_chandef(local, ctx, def)) in ieee80211_chanctx_can_reserve_chandef()
163 ieee80211_chanctx_reserved_chandef(local, ctx, def)) in ieee80211_chanctx_can_reserve_chandef()
170 ieee80211_find_reservation_chanctx(struct ieee80211_local *local, in ieee80211_find_reservation_chanctx() argument
176 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_find_reservation_chanctx()
181 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_find_reservation_chanctx()
188 if (!ieee80211_chanctx_can_reserve_chandef(local, ctx, in ieee80211_find_reservation_chanctx()
248 list_for_each_entry_rcu(sta, &sdata->local->sta_list, list) { in ieee80211_get_max_required_bw()
320 ieee80211_get_chanctx_max_required_bw(struct ieee80211_local *local, in ieee80211_get_chanctx_max_required_bw() argument
328 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_get_chanctx_max_required_bw()
341 sdata = rcu_dereference(local->monitor_sdata); in ieee80211_get_chanctx_max_required_bw()
357 _ieee80211_recalc_chanctx_min_def(struct ieee80211_local *local, in _ieee80211_recalc_chanctx_min_def() argument
364 lockdep_assert_held(&local->chanctx_mtx); in _ieee80211_recalc_chanctx_min_def()
379 max_bw = ieee80211_get_chanctx_max_required_bw(local, ctx, rsvd_for); in _ieee80211_recalc_chanctx_min_def()
399 static void ieee80211_chan_bw_change(struct ieee80211_local *local, in ieee80211_chan_bw_change() argument
405 local->hw.wiphy->bands[ctx->conf.def.chan->band]; in ieee80211_chan_bw_change()
408 list_for_each_entry_rcu(sta, &local->sta_list, in ieee80211_chan_bw_change()
444 rate_control_rate_update(local, sband, sta, link_id, in ieee80211_chan_bw_change()
456 void ieee80211_recalc_chanctx_min_def(struct ieee80211_local *local, in ieee80211_recalc_chanctx_min_def() argument
460 u32 changed = _ieee80211_recalc_chanctx_min_def(local, ctx, rsvd_for); in ieee80211_recalc_chanctx_min_def()
466 ieee80211_chan_bw_change(local, ctx, true); in ieee80211_recalc_chanctx_min_def()
468 drv_change_chanctx(local, ctx, changed); in ieee80211_recalc_chanctx_min_def()
471 ieee80211_chan_bw_change(local, ctx, false); in ieee80211_recalc_chanctx_min_def()
474 static void _ieee80211_change_chanctx(struct ieee80211_local *local, in _ieee80211_change_chanctx() argument
500 ieee80211_chan_bw_change(local, old_ctx, true); in _ieee80211_change_chanctx()
503 ieee80211_recalc_chanctx_min_def(local, ctx, rsvd_for); in _ieee80211_change_chanctx()
513 _ieee80211_recalc_chanctx_min_def(local, ctx, rsvd_for); in _ieee80211_change_chanctx()
514 drv_change_chanctx(local, ctx, changed); in _ieee80211_change_chanctx()
516 if (!local->use_chanctx) { in _ieee80211_change_chanctx()
517 local->_oper_chandef = *chandef; in _ieee80211_change_chanctx()
518 ieee80211_hw_config(local, 0); in _ieee80211_change_chanctx()
522 ieee80211_chan_bw_change(local, old_ctx, false); in _ieee80211_change_chanctx()
525 static void ieee80211_change_chanctx(struct ieee80211_local *local, in ieee80211_change_chanctx() argument
530 _ieee80211_change_chanctx(local, ctx, old_ctx, chandef, NULL); in ieee80211_change_chanctx()
534 ieee80211_find_chanctx(struct ieee80211_local *local, in ieee80211_find_chanctx() argument
540 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_find_chanctx()
545 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_find_chanctx()
558 compat = ieee80211_chanctx_reserved_chandef(local, ctx, in ieee80211_find_chanctx()
563 ieee80211_change_chanctx(local, ctx, ctx, compat); in ieee80211_find_chanctx()
571 bool ieee80211_is_radar_required(struct ieee80211_local *local) in ieee80211_is_radar_required() argument
575 lockdep_assert_held(&local->mtx); in ieee80211_is_radar_required()
578 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_is_radar_required()
598 ieee80211_chanctx_radar_required(struct ieee80211_local *local, in ieee80211_chanctx_radar_required() argument
605 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chanctx_radar_required()
606 lockdep_assert_held(&local->mtx); in ieee80211_chanctx_radar_required()
609 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_chanctx_radar_required()
638 ieee80211_alloc_chanctx(struct ieee80211_local *local, in ieee80211_alloc_chanctx() argument
644 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_alloc_chanctx()
646 ctx = kzalloc(sizeof(*ctx) + local->hw.chanctx_data_size, GFP_KERNEL); in ieee80211_alloc_chanctx()
657 _ieee80211_recalc_chanctx_min_def(local, ctx, NULL); in ieee80211_alloc_chanctx()
662 static int ieee80211_add_chanctx(struct ieee80211_local *local, in ieee80211_add_chanctx() argument
668 lockdep_assert_held(&local->mtx); in ieee80211_add_chanctx()
669 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_add_chanctx()
671 if (!local->use_chanctx) in ieee80211_add_chanctx()
672 local->hw.conf.radar_enabled = ctx->conf.radar_enabled; in ieee80211_add_chanctx()
675 changed = ieee80211_idle_off(local); in ieee80211_add_chanctx()
677 ieee80211_hw_config(local, changed); in ieee80211_add_chanctx()
679 if (!local->use_chanctx) { in ieee80211_add_chanctx()
680 local->_oper_chandef = ctx->conf.def; in ieee80211_add_chanctx()
681 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); in ieee80211_add_chanctx()
683 err = drv_add_chanctx(local, ctx); in ieee80211_add_chanctx()
685 ieee80211_recalc_idle(local); in ieee80211_add_chanctx()
694 ieee80211_new_chanctx(struct ieee80211_local *local, in ieee80211_new_chanctx() argument
701 lockdep_assert_held(&local->mtx); in ieee80211_new_chanctx()
702 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_new_chanctx()
704 ctx = ieee80211_alloc_chanctx(local, chandef, mode); in ieee80211_new_chanctx()
708 err = ieee80211_add_chanctx(local, ctx); in ieee80211_new_chanctx()
714 list_add_rcu(&ctx->list, &local->chanctx_list); in ieee80211_new_chanctx()
718 static void ieee80211_del_chanctx(struct ieee80211_local *local, in ieee80211_del_chanctx() argument
721 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_del_chanctx()
723 if (!local->use_chanctx) { in ieee80211_del_chanctx()
724 struct cfg80211_chan_def *chandef = &local->_oper_chandef; in ieee80211_del_chanctx()
740 WARN_ON(local->hw.conf.radar_enabled && in ieee80211_del_chanctx()
741 !list_empty(&local->chanctx_list)); in ieee80211_del_chanctx()
743 local->hw.conf.radar_enabled = false; in ieee80211_del_chanctx()
745 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); in ieee80211_del_chanctx()
747 drv_remove_chanctx(local, ctx); in ieee80211_del_chanctx()
750 ieee80211_recalc_idle(local); in ieee80211_del_chanctx()
753 static void ieee80211_free_chanctx(struct ieee80211_local *local, in ieee80211_free_chanctx() argument
756 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_free_chanctx()
758 WARN_ON_ONCE(ieee80211_chanctx_refcount(local, ctx) != 0); in ieee80211_free_chanctx()
761 ieee80211_del_chanctx(local, ctx); in ieee80211_free_chanctx()
765 void ieee80211_recalc_chanctx_chantype(struct ieee80211_local *local, in ieee80211_recalc_chanctx_chantype() argument
773 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_recalc_chanctx_chantype()
776 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_recalc_chanctx_chantype()
811 list_for_each_entry_rcu(sta, &local->sta_list, list) { in ieee80211_recalc_chanctx_chantype()
828 ieee80211_change_chanctx(local, ctx, ctx, compat); in ieee80211_recalc_chanctx_chantype()
831 static void ieee80211_recalc_radar_chanctx(struct ieee80211_local *local, in ieee80211_recalc_radar_chanctx() argument
836 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_recalc_radar_chanctx()
838 lockdep_assert_held(&local->mtx); in ieee80211_recalc_radar_chanctx()
840 radar_enabled = ieee80211_chanctx_radar_required(local, chanctx); in ieee80211_recalc_radar_chanctx()
847 if (!local->use_chanctx) { in ieee80211_recalc_radar_chanctx()
848 local->hw.conf.radar_enabled = chanctx->conf.radar_enabled; in ieee80211_recalc_radar_chanctx()
849 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); in ieee80211_recalc_radar_chanctx()
852 drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RADAR); in ieee80211_recalc_radar_chanctx()
859 struct ieee80211_local *local = sdata->local; in ieee80211_assign_link_chanctx() local
868 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_assign_link_chanctx()
873 drv_unassign_vif_chanctx(local, sdata, link->conf, curr_ctx); in ieee80211_assign_link_chanctx()
880 ieee80211_recalc_chanctx_min_def(local, new_ctx, link); in ieee80211_assign_link_chanctx()
882 ret = drv_assign_vif_chanctx(local, sdata, link->conf, new_ctx); in ieee80211_assign_link_chanctx()
896 if (curr_ctx && ieee80211_chanctx_num_assigned(local, curr_ctx) > 0) { in ieee80211_assign_link_chanctx()
897 ieee80211_recalc_chanctx_chantype(local, curr_ctx); in ieee80211_assign_link_chanctx()
898 ieee80211_recalc_smps_chanctx(local, curr_ctx); in ieee80211_assign_link_chanctx()
899 ieee80211_recalc_radar_chanctx(local, curr_ctx); in ieee80211_assign_link_chanctx()
900 ieee80211_recalc_chanctx_min_def(local, curr_ctx, NULL); in ieee80211_assign_link_chanctx()
903 if (new_ctx && ieee80211_chanctx_num_assigned(local, new_ctx) > 0) { in ieee80211_assign_link_chanctx()
905 ieee80211_recalc_chanctx_min_def(local, new_ctx, NULL); in ieee80211_assign_link_chanctx()
917 void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local, in ieee80211_recalc_smps_chanctx() argument
923 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_recalc_smps_chanctx()
929 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in ieee80211_recalc_smps_chanctx()
986 sdata = rcu_dereference(local->monitor_sdata); in ieee80211_recalc_smps_chanctx()
989 rx_chains_dynamic = rx_chains_static = local->rx_chains; in ieee80211_recalc_smps_chanctx()
993 if (!local->use_chanctx) { in ieee80211_recalc_smps_chanctx()
995 local->smps_mode = IEEE80211_SMPS_OFF; in ieee80211_recalc_smps_chanctx()
997 local->smps_mode = IEEE80211_SMPS_DYNAMIC; in ieee80211_recalc_smps_chanctx()
999 local->smps_mode = IEEE80211_SMPS_STATIC; in ieee80211_recalc_smps_chanctx()
1000 ieee80211_hw_config(local, 0); in ieee80211_recalc_smps_chanctx()
1009 drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RX_CHAINS); in ieee80211_recalc_smps_chanctx()
1019 struct ieee80211_local *local __maybe_unused = sdata->local; in __ieee80211_link_copy_chanctx_to_vlans()
1026 lockdep_assert_held(&local->mtx); in __ieee80211_link_copy_chanctx_to_vlans()
1035 lockdep_is_held(&local->chanctx_mtx)); in __ieee80211_link_copy_chanctx_to_vlans()
1057 struct ieee80211_local *local = link->sdata->local; in ieee80211_link_copy_chanctx_to_vlans() local
1059 mutex_lock(&local->chanctx_mtx); in ieee80211_link_copy_chanctx_to_vlans()
1063 mutex_unlock(&local->chanctx_mtx); in ieee80211_link_copy_chanctx_to_vlans()
1071 lockdep_assert_held(&sdata->local->chanctx_mtx); in ieee80211_link_unreserve_chanctx()
1079 if (ieee80211_chanctx_refcount(sdata->local, ctx) == 0) { in ieee80211_link_unreserve_chanctx()
1095 ieee80211_free_chanctx(sdata->local, ctx); in ieee80211_link_unreserve_chanctx()
1108 struct ieee80211_local *local = sdata->local; in ieee80211_link_reserve_chanctx() local
1111 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_link_reserve_chanctx()
1114 if (curr_ctx && local->use_chanctx && !local->ops->switch_vif_chanctx) in ieee80211_link_reserve_chanctx()
1117 new_ctx = ieee80211_find_reservation_chanctx(local, chandef, mode); in ieee80211_link_reserve_chanctx()
1119 if (ieee80211_can_create_new_chanctx(local)) { in ieee80211_link_reserve_chanctx()
1120 new_ctx = ieee80211_new_chanctx(local, chandef, mode); in ieee80211_link_reserve_chanctx()
1150 list_for_each_entry(ctx, &local->chanctx_list, in ieee80211_link_reserve_chanctx()
1174 new_ctx = ieee80211_alloc_chanctx(local, chandef, mode); in ieee80211_link_reserve_chanctx()
1186 list_add_rcu(&new_ctx->list, &local->chanctx_list); in ieee80211_link_reserve_chanctx()
1209 ieee80211_queue_work(&sdata->local->hw, in ieee80211_link_chanctx_reservation_complete()
1213 wiphy_delayed_work_queue(sdata->local->hw.wiphy, in ieee80211_link_chanctx_reservation_complete()
1261 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_reserved_reassign() local
1268 lockdep_assert_held(&local->mtx); in ieee80211_link_use_reserved_reassign()
1269 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_link_use_reserved_reassign()
1287 chandef = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_link_use_reserved_reassign()
1297 _ieee80211_change_chanctx(local, new_ctx, old_ctx, chandef, link); in ieee80211_link_use_reserved_reassign()
1307 err = drv_switch_vif_chanctx(local, vif_chsw, 1, in ieee80211_link_use_reserved_reassign()
1310 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_link_use_reserved_reassign()
1311 ieee80211_free_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1324 if (ieee80211_chanctx_refcount(local, old_ctx) == 0) in ieee80211_link_use_reserved_reassign()
1325 ieee80211_free_chanctx(local, old_ctx); in ieee80211_link_use_reserved_reassign()
1327 ieee80211_recalc_chanctx_min_def(local, new_ctx, NULL); in ieee80211_link_use_reserved_reassign()
1328 ieee80211_recalc_smps_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1329 ieee80211_recalc_radar_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1343 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_reserved_assign() local
1364 chandef = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_link_use_reserved_assign()
1369 ieee80211_change_chanctx(local, new_ctx, new_ctx, chandef); in ieee80211_link_use_reserved_assign()
1376 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_link_use_reserved_assign()
1377 ieee80211_free_chanctx(local, new_ctx); in ieee80211_link_use_reserved_assign()
1393 lockdep_assert_held(&sdata->local->chanctx_mtx); in ieee80211_link_has_in_place_reservation()
1413 static int ieee80211_chsw_switch_hwconf(struct ieee80211_local *local, in ieee80211_chsw_switch_hwconf() argument
1418 lockdep_assert_held(&local->mtx); in ieee80211_chsw_switch_hwconf()
1419 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chsw_switch_hwconf()
1421 chandef = ieee80211_chanctx_reserved_chandef(local, new_ctx, NULL); in ieee80211_chsw_switch_hwconf()
1425 local->hw.conf.radar_enabled = new_ctx->conf.radar_enabled; in ieee80211_chsw_switch_hwconf()
1426 local->_oper_chandef = *chandef; in ieee80211_chsw_switch_hwconf()
1427 ieee80211_hw_config(local, 0); in ieee80211_chsw_switch_hwconf()
1432 static int ieee80211_chsw_switch_vifs(struct ieee80211_local *local, in ieee80211_chsw_switch_vifs() argument
1440 lockdep_assert_held(&local->mtx); in ieee80211_chsw_switch_vifs()
1441 lockdep_assert_held(&local->chanctx_mtx); 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_held(&local->mtx); in ieee80211_chsw_switch_ctxs()
1486 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_chsw_switch_ctxs()
1488 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_ctxs()
1495 ieee80211_del_chanctx(local, ctx->replace_ctx); in ieee80211_chsw_switch_ctxs()
1496 err = ieee80211_add_chanctx(local, ctx); in ieee80211_chsw_switch_ctxs()
1504 WARN_ON(ieee80211_add_chanctx(local, ctx)); in ieee80211_chsw_switch_ctxs()
1505 list_for_each_entry_continue_reverse(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_ctxs()
1512 ieee80211_del_chanctx(local, ctx); in ieee80211_chsw_switch_ctxs()
1513 WARN_ON(ieee80211_add_chanctx(local, ctx->replace_ctx)); in ieee80211_chsw_switch_ctxs()
1519 static int ieee80211_vif_use_reserved_switch(struct ieee80211_local *local) in ieee80211_vif_use_reserved_switch() argument
1526 lockdep_assert_held(&local->mtx); in ieee80211_vif_use_reserved_switch()
1527 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_vif_use_reserved_switch()
1545 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1556 if (!local->use_chanctx) in ieee80211_vif_use_reserved_switch()
1577 wiphy_info(local->hw.wiphy, in ieee80211_vif_use_reserved_switch()
1613 WARN_ON(n_ctx > 1 && !local->use_chanctx) || in ieee80211_vif_use_reserved_switch()
1614 WARN_ON(!new_ctx && !local->use_chanctx)) { in ieee80211_vif_use_reserved_switch()
1624 if (local->use_chanctx) { in ieee80211_vif_use_reserved_switch()
1626 err = ieee80211_chsw_switch_vifs(local, n_vifs_switch); in ieee80211_vif_use_reserved_switch()
1632 err = ieee80211_chsw_switch_ctxs(local); in ieee80211_vif_use_reserved_switch()
1637 err = ieee80211_chsw_switch_hwconf(local, new_ctx); in ieee80211_vif_use_reserved_switch()
1646 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1689 ieee80211_recalc_chanctx_chantype(local, ctx); in ieee80211_vif_use_reserved_switch()
1690 ieee80211_recalc_smps_chanctx(local, ctx); in ieee80211_vif_use_reserved_switch()
1691 ieee80211_recalc_radar_chanctx(local, ctx); in ieee80211_vif_use_reserved_switch()
1692 ieee80211_recalc_chanctx_min_def(local, ctx, NULL); in ieee80211_vif_use_reserved_switch()
1735 cfg80211_stop_iface(local->hw.wiphy, in ieee80211_vif_use_reserved_switch()
1746 list_for_each_entry_safe(ctx, ctx_tmp, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1761 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1781 struct ieee80211_local *local = sdata->local; in __ieee80211_link_release_channel() local
1786 lockdep_assert_held(&local->chanctx_mtx); in __ieee80211_link_release_channel()
1789 lockdep_is_held(&local->chanctx_mtx)); in __ieee80211_link_release_channel()
1797 ieee80211_chanctx_num_reserved(local, link->reserved_chanctx) > 1) in __ieee80211_link_release_channel()
1804 if (ieee80211_chanctx_refcount(local, ctx) == 0) in __ieee80211_link_release_channel()
1805 ieee80211_free_chanctx(local, ctx); in __ieee80211_link_release_channel()
1811 ieee80211_vif_use_reserved_switch(local); in __ieee80211_link_release_channel()
1819 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_channel() local
1824 lockdep_assert_held(&local->mtx); in ieee80211_link_use_channel()
1832 mutex_lock(&local->chanctx_mtx); in ieee80211_link_use_channel()
1834 ret = cfg80211_chandef_dfs_required(local->hw.wiphy, in ieee80211_link_use_channel()
1851 ctx = ieee80211_find_chanctx(local, chandef, mode); in ieee80211_link_use_channel()
1853 ctx = ieee80211_new_chanctx(local, chandef, mode); in ieee80211_link_use_channel()
1864 if (ieee80211_chanctx_refcount(local, ctx) == 0) in ieee80211_link_use_channel()
1865 ieee80211_free_chanctx(local, ctx); in ieee80211_link_use_channel()
1869 ieee80211_recalc_smps_chanctx(local, ctx); in ieee80211_link_use_channel()
1870 ieee80211_recalc_radar_chanctx(local, ctx); in ieee80211_link_use_channel()
1875 mutex_unlock(&local->chanctx_mtx); in ieee80211_link_use_channel()
1882 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_reserved_context() local
1887 lockdep_assert_held(&local->mtx); in ieee80211_link_use_reserved_context()
1888 lockdep_assert_held(&local->chanctx_mtx); in ieee80211_link_use_reserved_context()
1926 err = ieee80211_vif_use_reserved_switch(local); in ieee80211_link_use_reserved_context()
1932 wiphy_info(local->hw.wiphy, in ieee80211_link_use_reserved_context()
1947 struct ieee80211_local *local = sdata->local; in ieee80211_link_change_bandwidth() local
1953 if (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef, in ieee80211_link_change_bandwidth()
1957 mutex_lock(&local->chanctx_mtx); in ieee80211_link_change_bandwidth()
1970 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_link_change_bandwidth()
1986 if (!ieee80211_chanctx_reserved_chandef(local, ctx, compat)) { in ieee80211_link_change_bandwidth()
2006 ieee80211_recalc_chanctx_chantype(local, ctx); in ieee80211_link_change_bandwidth()
2011 mutex_unlock(&local->chanctx_mtx); in ieee80211_link_change_bandwidth()
2019 mutex_lock(&sdata->local->chanctx_mtx); in ieee80211_link_release_channel()
2021 lockdep_assert_held(&sdata->local->mtx); in ieee80211_link_release_channel()
2024 mutex_unlock(&sdata->local->chanctx_mtx); in ieee80211_link_release_channel()
2033 struct ieee80211_local *local = sdata->local; in ieee80211_link_vlan_copy_chanctx() local
2042 mutex_lock(&local->chanctx_mtx); in ieee80211_link_vlan_copy_chanctx()
2047 lockdep_is_held(&local->chanctx_mtx)); in ieee80211_link_vlan_copy_chanctx()
2050 mutex_unlock(&local->chanctx_mtx); in ieee80211_link_vlan_copy_chanctx()
2060 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iter_chan_contexts_atomic() local
2064 list_for_each_entry_rcu(ctx, &local->chanctx_list, list) in ieee80211_iter_chan_contexts_atomic()