Lines Matching refs:new_ctx
835 struct ieee80211_chanctx *new_ctx) in ieee80211_assign_link_chanctx() argument
857 if (new_ctx) { in ieee80211_assign_link_chanctx()
858 ret = drv_assign_vif_chanctx(local, sdata, link->conf, new_ctx); in ieee80211_assign_link_chanctx()
862 conf = &new_ctx->conf; in ieee80211_assign_link_chanctx()
864 &new_ctx->assigned_links); in ieee80211_assign_link_chanctx()
879 if (new_ctx && ieee80211_chanctx_num_assigned(local, new_ctx) > 0) { in ieee80211_assign_link_chanctx()
881 ieee80211_recalc_chanctx_min_def(local, new_ctx); in ieee80211_assign_link_chanctx()
1085 struct ieee80211_chanctx *new_ctx, *curr_ctx, *ctx; in ieee80211_link_reserve_chanctx() local
1093 new_ctx = ieee80211_find_reservation_chanctx(local, chandef, mode); in ieee80211_link_reserve_chanctx()
1094 if (!new_ctx) { in ieee80211_link_reserve_chanctx()
1096 new_ctx = ieee80211_new_chanctx(local, chandef, mode); in ieee80211_link_reserve_chanctx()
1097 if (IS_ERR(new_ctx)) in ieee80211_link_reserve_chanctx()
1098 return PTR_ERR(new_ctx); in ieee80211_link_reserve_chanctx()
1150 new_ctx = ieee80211_alloc_chanctx(local, chandef, mode); in ieee80211_link_reserve_chanctx()
1151 if (!new_ctx) in ieee80211_link_reserve_chanctx()
1154 new_ctx->replace_ctx = curr_ctx; in ieee80211_link_reserve_chanctx()
1155 new_ctx->replace_state = in ieee80211_link_reserve_chanctx()
1158 curr_ctx->replace_ctx = new_ctx; in ieee80211_link_reserve_chanctx()
1162 list_add_rcu(&new_ctx->list, &local->chanctx_list); in ieee80211_link_reserve_chanctx()
1166 list_add(&link->reserved_chanctx_list, &new_ctx->reserved_links); in ieee80211_link_reserve_chanctx()
1167 link->reserved_chanctx = new_ctx; in ieee80211_link_reserve_chanctx()
1239 struct ieee80211_chanctx *old_ctx, *new_ctx; in ieee80211_link_use_reserved_reassign() local
1247 new_ctx = link->reserved_chanctx; in ieee80211_link_use_reserved_reassign()
1253 if (WARN_ON(!new_ctx)) in ieee80211_link_use_reserved_reassign()
1259 if (WARN_ON(new_ctx->replace_state == in ieee80211_link_use_reserved_reassign()
1263 chandef = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_link_use_reserved_reassign()
1273 ieee80211_change_chanctx(local, new_ctx, old_ctx, chandef); in ieee80211_link_use_reserved_reassign()
1277 vif_chsw[0].new_ctx = &new_ctx->conf; in ieee80211_link_use_reserved_reassign()
1286 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_link_use_reserved_reassign()
1287 ieee80211_free_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1292 list_move(&link->assigned_chanctx_list, &new_ctx->assigned_links); in ieee80211_link_use_reserved_reassign()
1293 rcu_assign_pointer(link_conf->chanctx_conf, &new_ctx->conf); in ieee80211_link_use_reserved_reassign()
1303 ieee80211_recalc_chanctx_min_def(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1304 ieee80211_recalc_smps_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1305 ieee80211_recalc_radar_chanctx(local, new_ctx); in ieee80211_link_use_reserved_reassign()
1320 struct ieee80211_chanctx *old_ctx, *new_ctx; in ieee80211_link_use_reserved_assign() local
1325 new_ctx = link->reserved_chanctx; in ieee80211_link_use_reserved_assign()
1333 if (WARN_ON(!new_ctx)) in ieee80211_link_use_reserved_assign()
1336 if (WARN_ON(new_ctx->replace_state == in ieee80211_link_use_reserved_assign()
1340 chandef = ieee80211_chanctx_non_reserved_chandef(local, new_ctx, in ieee80211_link_use_reserved_assign()
1345 ieee80211_change_chanctx(local, new_ctx, new_ctx, chandef); in ieee80211_link_use_reserved_assign()
1350 err = ieee80211_assign_link_chanctx(link, new_ctx); in ieee80211_link_use_reserved_assign()
1352 if (ieee80211_chanctx_refcount(local, new_ctx) == 0) in ieee80211_link_use_reserved_assign()
1353 ieee80211_free_chanctx(local, new_ctx); in ieee80211_link_use_reserved_assign()
1367 struct ieee80211_chanctx *old_ctx, *new_ctx; in ieee80211_link_has_in_place_reservation() local
1371 new_ctx = link->reserved_chanctx; in ieee80211_link_has_in_place_reservation()
1377 if (WARN_ON(!new_ctx)) in ieee80211_link_has_in_place_reservation()
1383 if (new_ctx->replace_state != IEEE80211_CHANCTX_REPLACES_OTHER) in ieee80211_link_has_in_place_reservation()
1390 struct ieee80211_chanctx *new_ctx) in ieee80211_chsw_switch_hwconf() argument
1397 chandef = ieee80211_chanctx_reserved_chandef(local, new_ctx, NULL); in ieee80211_chsw_switch_hwconf()
1401 local->hw.conf.radar_enabled = new_ctx->conf.radar_enabled; in ieee80211_chsw_switch_hwconf()
1441 vif_chsw[i].new_ctx = &ctx->conf; in ieee80211_chsw_switch_vifs()
1498 struct ieee80211_chanctx *new_ctx = NULL; in ieee80211_vif_use_reserved_switch() local
1533 new_ctx = ctx; in ieee80211_vif_use_reserved_switch()
1590 WARN_ON(!new_ctx && !local->use_chanctx)) { in ieee80211_vif_use_reserved_switch()
1613 err = ieee80211_chsw_switch_hwconf(local, new_ctx); in ieee80211_vif_use_reserved_switch()
1859 struct ieee80211_chanctx *new_ctx; in ieee80211_link_use_reserved_context() local
1866 new_ctx = link->reserved_chanctx; in ieee80211_link_use_reserved_context()
1869 if (WARN_ON(!new_ctx)) in ieee80211_link_use_reserved_context()
1872 if (WARN_ON(new_ctx->replace_state == in ieee80211_link_use_reserved_context()
1881 if (new_ctx->replace_state == IEEE80211_CHANCTX_REPLACE_NONE) { in ieee80211_link_use_reserved_context()
1901 new_ctx->replace_state == IEEE80211_CHANCTX_REPLACES_OTHER) { in ieee80211_link_use_reserved_context()
1904 if (new_ctx->replace_state == in ieee80211_link_use_reserved_context()