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
651 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_is_radar_required()
653 for_each_sdata_link(local, link) { in ieee80211_is_radar_required()
662 ieee80211_chanctx_radar_required(struct ieee80211_local *local, in ieee80211_chanctx_radar_required() argument
668 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_radar_required()
670 for_each_sdata_link(local, link) { in ieee80211_chanctx_radar_required()
682 ieee80211_alloc_chanctx(struct ieee80211_local *local, in ieee80211_alloc_chanctx() argument
689 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_alloc_chanctx()
691 ctx = kzalloc(sizeof(*ctx) + local->hw.chanctx_data_size, GFP_KERNEL); in ieee80211_alloc_chanctx()
705 _ieee80211_recalc_chanctx_min_def(local, ctx, NULL, false); in ieee80211_alloc_chanctx()
710 static int ieee80211_add_chanctx(struct ieee80211_local *local, in ieee80211_add_chanctx() argument
716 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_add_chanctx()
718 ieee80211_add_wbrf(local, &ctx->conf.def); in ieee80211_add_chanctx()
721 changed = ieee80211_idle_off(local); in ieee80211_add_chanctx()
723 ieee80211_hw_config(local, changed); in ieee80211_add_chanctx()
725 err = drv_add_chanctx(local, ctx); in ieee80211_add_chanctx()
727 ieee80211_recalc_idle(local); in ieee80211_add_chanctx()
735 ieee80211_new_chanctx(struct ieee80211_local *local, in ieee80211_new_chanctx() argument
744 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_new_chanctx()
746 ctx = ieee80211_alloc_chanctx(local, chanreq, mode, radio_idx); in ieee80211_new_chanctx()
750 err = ieee80211_add_chanctx(local, ctx); in ieee80211_new_chanctx()
756 WARN_ON_ONCE(err && !local->in_reconfig); in ieee80211_new_chanctx()
758 list_add_rcu(&ctx->list, &local->chanctx_list); in ieee80211_new_chanctx()
762 static void ieee80211_del_chanctx(struct ieee80211_local *local, in ieee80211_del_chanctx() argument
766 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_del_chanctx()
768 drv_remove_chanctx(local, ctx); in ieee80211_del_chanctx()
771 ieee80211_recalc_idle(local); in ieee80211_del_chanctx()
773 ieee80211_remove_wbrf(local, &ctx->conf.def); in ieee80211_del_chanctx()
776 static void ieee80211_free_chanctx(struct ieee80211_local *local, in ieee80211_free_chanctx() argument
780 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_free_chanctx()
782 WARN_ON_ONCE(ieee80211_chanctx_refcount(local, ctx) != 0); in ieee80211_free_chanctx()
785 ieee80211_del_chanctx(local, ctx, skip_idle_recalc); in ieee80211_free_chanctx()
789 void ieee80211_recalc_chanctx_chantype(struct ieee80211_local *local, in ieee80211_recalc_chanctx_chantype() argument
798 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_chanctx_chantype()
800 for_each_sdata_link(local, link) { in ieee80211_recalc_chanctx_chantype()
824 list_for_each_entry(sta, &local->sta_list, list) { in ieee80211_recalc_chanctx_chantype()
852 ieee80211_change_chanctx(local, ctx, ctx, compat); in ieee80211_recalc_chanctx_chantype()
855 static void ieee80211_recalc_radar_chanctx(struct ieee80211_local *local, in ieee80211_recalc_radar_chanctx() argument
860 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_radar_chanctx()
862 radar_enabled = ieee80211_chanctx_radar_required(local, chanctx); in ieee80211_recalc_radar_chanctx()
869 drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RADAR); in ieee80211_recalc_radar_chanctx()
877 struct ieee80211_local *local = sdata->local; in ieee80211_assign_link_chanctx() local
887 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_assign_link_chanctx()
892 drv_unassign_vif_chanctx(local, sdata, link->conf, curr_ctx); in ieee80211_assign_link_chanctx()
899 ieee80211_recalc_chanctx_min_def(local, new_ctx, link, false); in ieee80211_assign_link_chanctx()
901 ret = drv_assign_vif_chanctx(local, sdata, link->conf, new_ctx); in ieee80211_assign_link_chanctx()
904 WARN_ON_ONCE(ret && !local->in_reconfig); in ieee80211_assign_link_chanctx()
918 if (curr_ctx && ieee80211_chanctx_num_assigned(local, curr_ctx) > 0) { in ieee80211_assign_link_chanctx()
919 ieee80211_recalc_chanctx_chantype(local, curr_ctx); in ieee80211_assign_link_chanctx()
920 ieee80211_recalc_smps_chanctx(local, curr_ctx); in ieee80211_assign_link_chanctx()
921 ieee80211_recalc_radar_chanctx(local, curr_ctx); in ieee80211_assign_link_chanctx()
922 ieee80211_recalc_chanctx_min_def(local, curr_ctx, NULL, false); in ieee80211_assign_link_chanctx()
925 if (new_ctx && ieee80211_chanctx_num_assigned(local, new_ctx) > 0) { in ieee80211_assign_link_chanctx()
927 ieee80211_recalc_chanctx_min_def(local, new_ctx, NULL, false); in ieee80211_assign_link_chanctx()
936 for_each_sdata_link(local, tmp) { in ieee80211_assign_link_chanctx()
957 void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local, in ieee80211_recalc_smps_chanctx() argument
964 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_recalc_smps_chanctx()
969 for_each_sdata_link(local, link) { in ieee80211_recalc_smps_chanctx()
978 if (!ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR)) in ieee80211_recalc_smps_chanctx()
994 rx_chains_dynamic = rx_chains_static = local->rx_chains; in ieee80211_recalc_smps_chanctx()
1022 sdata = wiphy_dereference(local->hw.wiphy, local->monitor_sdata); in ieee80211_recalc_smps_chanctx()
1025 rx_chains_dynamic = rx_chains_static = local->rx_chains; in ieee80211_recalc_smps_chanctx()
1033 drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RX_CHAINS); in ieee80211_recalc_smps_chanctx()
1043 struct ieee80211_local *local __maybe_unused = sdata->local; in __ieee80211_link_copy_chanctx_to_vlans()
1050 lockdep_assert_wiphy(local->hw.wiphy); in __ieee80211_link_copy_chanctx_to_vlans()
1059 lockdep_is_held(&local->hw.wiphy->mtx)); in __ieee80211_link_copy_chanctx_to_vlans()
1068 vlan_conf = wiphy_dereference(local->hw.wiphy, in __ieee80211_link_copy_chanctx_to_vlans()
1080 struct ieee80211_local *local = link->sdata->local; in ieee80211_link_copy_chanctx_to_vlans() local
1082 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_copy_chanctx_to_vlans()
1092 lockdep_assert_wiphy(sdata->local->hw.wiphy); in ieee80211_link_unreserve_chanctx()
1100 if (ieee80211_chanctx_refcount(sdata->local, ctx) == 0) { in ieee80211_link_unreserve_chanctx()
1116 ieee80211_free_chanctx(sdata->local, ctx, false); in ieee80211_link_unreserve_chanctx()
1124 ieee80211_replace_chanctx(struct ieee80211_local *local, in ieee80211_replace_chanctx() argument
1130 struct wiphy *wiphy = local->hw.wiphy; in ieee80211_replace_chanctx()
1153 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_replace_chanctx()
1181 new_ctx = ieee80211_alloc_chanctx(local, chanreq, mode, -1); in ieee80211_replace_chanctx()
1191 list_add_rcu(&new_ctx->list, &local->chanctx_list); in ieee80211_replace_chanctx()
1197 ieee80211_find_available_radio(struct ieee80211_local *local, in ieee80211_find_available_radio() argument
1201 struct wiphy *wiphy = local->hw.wiphy; in ieee80211_find_available_radio()
1217 if (!ieee80211_can_create_new_chanctx(local, i)) in ieee80211_find_available_radio()
1233 struct ieee80211_local *local = sdata->local; in ieee80211_link_reserve_chanctx() local
1237 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_reserve_chanctx()
1240 if (curr_ctx && !local->ops->switch_vif_chanctx) in ieee80211_link_reserve_chanctx()
1243 new_ctx = ieee80211_find_reservation_chanctx(local, chanreq, mode); in ieee80211_link_reserve_chanctx()
1245 if (ieee80211_can_create_new_chanctx(local, -1) && in ieee80211_link_reserve_chanctx()
1246 ieee80211_find_available_radio(local, chanreq, in ieee80211_link_reserve_chanctx()
1249 new_ctx = ieee80211_new_chanctx(local, chanreq, mode, in ieee80211_link_reserve_chanctx()
1252 new_ctx = ieee80211_replace_chanctx(local, chanreq, in ieee80211_link_reserve_chanctx()
1277 wiphy_work_queue(sdata->local->hw.wiphy, in ieee80211_link_chanctx_reservation_complete()
1281 wiphy_delayed_work_queue(sdata->local->hw.wiphy, in ieee80211_link_chanctx_reservation_complete()
1314 vlan_conf = wiphy_dereference(sdata->local->hw.wiphy, in ieee80211_link_update_chanreq()
1328 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_reserved_reassign() local
1336 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_use_reserved_reassign()
1354 chanreq = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_link_use_reserved_reassign()
1365 _ieee80211_change_chanctx(local, new_ctx, old_ctx, chanreq, link); in ieee80211_link_use_reserved_reassign()
1375 err = drv_switch_vif_chanctx(local, vif_chsw, 1, in ieee80211_link_use_reserved_reassign()
1378 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_link_use_reserved_reassign()
1379 ieee80211_free_chanctx(local, new_ctx, false); in ieee80211_link_use_reserved_reassign()
1392 if (ieee80211_chanctx_refcount(local, old_ctx) == 0) in ieee80211_link_use_reserved_reassign()
1393 ieee80211_free_chanctx(local, old_ctx, false); in ieee80211_link_use_reserved_reassign()
1395 ieee80211_recalc_chanctx_min_def(local, new_ctx, NULL, false); in ieee80211_link_use_reserved_reassign()
1396 ieee80211_recalc_smps_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1397 ieee80211_recalc_radar_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1411 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_reserved_assign() local
1433 chanreq = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_link_use_reserved_assign()
1439 ieee80211_change_chanctx(local, new_ctx, new_ctx, chanreq); in ieee80211_link_use_reserved_assign()
1446 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_link_use_reserved_assign()
1447 ieee80211_free_chanctx(local, new_ctx, false); in ieee80211_link_use_reserved_assign()
1463 lockdep_assert_wiphy(sdata->local->hw.wiphy); in ieee80211_link_has_in_place_reservation()
1483 static int ieee80211_chsw_switch_vifs(struct ieee80211_local *local, in ieee80211_chsw_switch_vifs() argument
1491 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chsw_switch_vifs()
1498 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_vifs()
1522 err = drv_switch_vif_chanctx(local, vif_chsw, n_vifs, in ieee80211_chsw_switch_vifs()
1530 static int ieee80211_chsw_switch_ctxs(struct ieee80211_local *local) in ieee80211_chsw_switch_ctxs() argument
1535 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chsw_switch_ctxs()
1537 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_ctxs()
1544 ieee80211_del_chanctx(local, ctx->replace_ctx, false); in ieee80211_chsw_switch_ctxs()
1545 err = ieee80211_add_chanctx(local, ctx); in ieee80211_chsw_switch_ctxs()
1553 WARN_ON(ieee80211_add_chanctx(local, ctx)); in ieee80211_chsw_switch_ctxs()
1554 list_for_each_entry_continue_reverse(ctx, &local->chanctx_list, list) { in ieee80211_chsw_switch_ctxs()
1561 ieee80211_del_chanctx(local, ctx, false); in ieee80211_chsw_switch_ctxs()
1562 WARN_ON(ieee80211_add_chanctx(local, ctx->replace_ctx)); in ieee80211_chsw_switch_ctxs()
1568 static int ieee80211_vif_use_reserved_switch(struct ieee80211_local *local) in ieee80211_vif_use_reserved_switch() argument
1574 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_vif_use_reserved_switch()
1592 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1621 wiphy_info(local->hw.wiphy, in ieee80211_vif_use_reserved_switch()
1662 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1678 ieee80211_chan_bw_change(local, in ieee80211_vif_use_reserved_switch()
1683 ieee80211_recalc_chanctx_min_def(local, ctx, NULL, true); in ieee80211_vif_use_reserved_switch()
1692 err = ieee80211_chsw_switch_vifs(local, n_vifs_switch); in ieee80211_vif_use_reserved_switch()
1698 err = ieee80211_chsw_switch_ctxs(local); in ieee80211_vif_use_reserved_switch()
1707 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1750 ieee80211_recalc_chanctx_chantype(local, ctx); in ieee80211_vif_use_reserved_switch()
1751 ieee80211_recalc_smps_chanctx(local, ctx); in ieee80211_vif_use_reserved_switch()
1752 ieee80211_recalc_radar_chanctx(local, ctx); in ieee80211_vif_use_reserved_switch()
1753 ieee80211_recalc_chanctx_min_def(local, ctx, NULL, false); in ieee80211_vif_use_reserved_switch()
1766 ieee80211_chan_bw_change(local, ctx, false, false); in ieee80211_vif_use_reserved_switch()
1797 cfg80211_stop_iface(local->hw.wiphy, in ieee80211_vif_use_reserved_switch()
1808 list_for_each_entry_safe(ctx, ctx_tmp, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1823 list_for_each_entry(ctx, &local->chanctx_list, list) { in ieee80211_vif_use_reserved_switch()
1844 struct ieee80211_local *local = sdata->local; in __ieee80211_link_release_channel() local
1849 lockdep_assert_wiphy(local->hw.wiphy); in __ieee80211_link_release_channel()
1852 lockdep_is_held(&local->hw.wiphy->mtx)); in __ieee80211_link_release_channel()
1860 ieee80211_chanctx_num_reserved(local, link->reserved_chanctx) > 1) in __ieee80211_link_release_channel()
1867 if (ieee80211_chanctx_refcount(local, ctx) == 0) in __ieee80211_link_release_channel()
1868 ieee80211_free_chanctx(local, ctx, skip_idle_recalc); in __ieee80211_link_release_channel()
1874 ieee80211_vif_use_reserved_switch(local); in __ieee80211_link_release_channel()
1883 struct ieee80211_local *local = sdata->local; in _ieee80211_link_use_channel() local
1890 lockdep_assert_wiphy(local->hw.wiphy); in _ieee80211_link_use_channel()
1897 ret = cfg80211_chandef_dfs_required(local->hw.wiphy, in _ieee80211_link_use_channel()
1914 ctx = ieee80211_find_chanctx(local, link, chanreq, mode); in _ieee80211_link_use_channel()
1918 else if (!ieee80211_find_available_radio(local, chanreq, in _ieee80211_link_use_channel()
1923 ctx = ieee80211_new_chanctx(local, chanreq, mode, in _ieee80211_link_use_channel()
1943 if (ieee80211_chanctx_refcount(local, ctx) == 0) in _ieee80211_link_use_channel()
1944 ieee80211_free_chanctx(local, ctx, false); in _ieee80211_link_use_channel()
1948 ieee80211_recalc_smps_chanctx(local, ctx); in _ieee80211_link_use_channel()
1949 ieee80211_recalc_radar_chanctx(local, ctx); in _ieee80211_link_use_channel()
1960 struct ieee80211_local *local = sdata->local; in ieee80211_link_use_reserved_context() local
1965 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_use_reserved_context()
2003 err = ieee80211_vif_use_reserved_switch(local); in ieee80211_link_use_reserved_context()
2009 wiphy_info(local->hw.wiphy, in ieee80211_link_use_reserved_context()
2028 ieee80211_chanctx_recheck(struct ieee80211_local *local, in ieee80211_chanctx_recheck() argument
2037 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_chanctx_recheck()
2039 for_each_sdata_link(local, link) { in ieee80211_chanctx_recheck()
2070 struct ieee80211_local *local = sdata->local; in ieee80211_link_change_chanreq() local
2076 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_change_chanreq()
2078 if (!cfg80211_chandef_usable(sdata->local->hw.wiphy, in ieee80211_link_change_chanreq()
2094 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_link_change_chanreq()
2100 compat = ieee80211_chanctx_recheck(local, link, ctx, chanreq, &tmp); in ieee80211_link_change_chanreq()
2106 if (!ieee80211_chanctx_reserved_chanreq(local, ctx, compat, in ieee80211_link_change_chanreq()
2124 ieee80211_recalc_chanctx_chantype(local, ctx); in ieee80211_link_change_chanreq()
2134 lockdep_assert_wiphy(sdata->local->hw.wiphy); in ieee80211_link_release_channel()
2146 struct ieee80211_local *local = sdata->local; in ieee80211_link_vlan_copy_chanctx() local
2150 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_link_vlan_copy_chanctx()
2157 ap_conf = wiphy_dereference(local->hw.wiphy, in ieee80211_link_vlan_copy_chanctx()
2159 conf = wiphy_dereference(local->hw.wiphy, in ieee80211_link_vlan_copy_chanctx()
2171 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_iter_chan_contexts_atomic() local
2175 list_for_each_entry_rcu(ctx, &local->chanctx_list, list) in ieee80211_iter_chan_contexts_atomic()