Lines Matching refs:mlo_dev_ctxt
1184 struct dp_mlo_dev_ctxt *mlo_dev_ctxt) in dp_attach_vdev_list_in_mlo_dev_ctxt() argument
1188 qdf_spin_lock_bh(&mlo_dev_ctxt->vdev_list_lock); in dp_attach_vdev_list_in_mlo_dev_ctxt()
1190 if (mlo_dev_ctxt->bridge_vdev[be_soc->mlo_chip_id][pdev_id] in dp_attach_vdev_list_in_mlo_dev_ctxt()
1196 mlo_dev_ctxt->bridge_vdev[be_soc->mlo_chip_id][pdev_id], in dp_attach_vdev_list_in_mlo_dev_ctxt()
1199 mlo_dev_ctxt->bridge_vdev[be_soc->mlo_chip_id][pdev_id] = in dp_attach_vdev_list_in_mlo_dev_ctxt()
1201 mlo_dev_ctxt->is_bridge_vdev_present = 1; in dp_attach_vdev_list_in_mlo_dev_ctxt()
1203 if (mlo_dev_ctxt->vdev_list[be_soc->mlo_chip_id][pdev_id] in dp_attach_vdev_list_in_mlo_dev_ctxt()
1209 mlo_dev_ctxt->vdev_list[be_soc->mlo_chip_id][pdev_id], in dp_attach_vdev_list_in_mlo_dev_ctxt()
1212 mlo_dev_ctxt->vdev_list[be_soc->mlo_chip_id][pdev_id] = in dp_attach_vdev_list_in_mlo_dev_ctxt()
1215 mlo_dev_ctxt->vdev_count++; in dp_attach_vdev_list_in_mlo_dev_ctxt()
1216 qdf_spin_unlock_bh(&mlo_dev_ctxt->vdev_list_lock); in dp_attach_vdev_list_in_mlo_dev_ctxt()
1222 struct dp_mlo_dev_ctxt *mlo_dev_ctxt) in dp_detach_vdev_list_in_mlo_dev_ctxt() argument
1226 if (mlo_dev_ctxt->vdev_list[be_soc->mlo_chip_id][pdev_id] == in dp_detach_vdev_list_in_mlo_dev_ctxt()
1231 qdf_spin_lock_bh(&mlo_dev_ctxt->vdev_list_lock); in dp_detach_vdev_list_in_mlo_dev_ctxt()
1233 mlo_dev_ctxt->bridge_vdev[be_soc->mlo_chip_id][pdev_id] = in dp_detach_vdev_list_in_mlo_dev_ctxt()
1236 mlo_dev_ctxt->vdev_list[be_soc->mlo_chip_id][pdev_id] = in dp_detach_vdev_list_in_mlo_dev_ctxt()
1239 mlo_dev_ctxt->vdev_count--; in dp_detach_vdev_list_in_mlo_dev_ctxt()
1240 qdf_spin_unlock_bh(&mlo_dev_ctxt->vdev_list_lock); in dp_detach_vdev_list_in_mlo_dev_ctxt()
1266 struct dp_mlo_dev_ctxt *mlo_dev_ctxt) in dp_attach_vdev_list_in_mlo_dev_ctxt() argument
1273 struct dp_mlo_dev_ctxt *mlo_dev_ctxt) in dp_detach_vdev_list_in_mlo_dev_ctxt() argument
3085 void dp_mlo_dev_ctxt_unref_delete(struct dp_mlo_dev_ctxt *mlo_dev_ctxt, in dp_mlo_dev_ctxt_unref_delete() argument
3088 QDF_ASSERT(qdf_atomic_dec_return(&mlo_dev_ctxt->mod_refs[mod_id]) >= 0); in dp_mlo_dev_ctxt_unref_delete()
3091 if (!qdf_atomic_dec_and_test(&mlo_dev_ctxt->ref_cnt)) in dp_mlo_dev_ctxt_unref_delete()
3094 QDF_ASSERT(mlo_dev_ctxt->ref_delete_pending); in dp_mlo_dev_ctxt_unref_delete()
3095 qdf_spinlock_destroy(&mlo_dev_ctxt->vdev_list_lock); in dp_mlo_dev_ctxt_unref_delete()
3096 qdf_mem_free(mlo_dev_ctxt); in dp_mlo_dev_ctxt_unref_delete()
3099 QDF_STATUS dp_mlo_dev_get_ref(struct dp_mlo_dev_ctxt *mlo_dev_ctxt, in dp_mlo_dev_get_ref() argument
3102 if (!qdf_atomic_inc_return(&mlo_dev_ctxt->ref_cnt)) in dp_mlo_dev_get_ref()
3105 qdf_atomic_inc(&mlo_dev_ctxt->mod_refs[mod_id]); in dp_mlo_dev_get_ref()
3156 struct dp_mlo_dev_ctxt *mlo_dev_ctxt = NULL; in dp_mlo_dev_ctxt_create() local
3168 mlo_dev_ctxt = dp_get_mlo_dev_ctx_by_mld_mac_addr(be_soc, in dp_mlo_dev_ctxt_create()
3171 if (mlo_dev_ctxt) { in dp_mlo_dev_ctxt_create()
3172 dp_mlo_dev_ctxt_unref_delete(mlo_dev_ctxt, DP_MOD_ID_MLO_DEV); in dp_mlo_dev_ctxt_create()
3178 mlo_dev_ctxt = qdf_mem_malloc(sizeof(struct dp_mlo_dev_ctxt)); in dp_mlo_dev_ctxt_create()
3180 if (!mlo_dev_ctxt) { in dp_mlo_dev_ctxt_create()
3185 qdf_copy_macaddr((struct qdf_mac_addr *)&mlo_dev_ctxt->mld_mac_addr.raw[0], in dp_mlo_dev_ctxt_create()
3188 qdf_mem_set(mlo_dev_ctxt->vdev_list, in dp_mlo_dev_ctxt_create()
3191 qdf_mem_set(mlo_dev_ctxt->bridge_vdev, in dp_mlo_dev_ctxt_create()
3194 mlo_dev_ctxt->seq_num = 0; in dp_mlo_dev_ctxt_create()
3199 mlo_dev_ctxt, ml_dev_list_elem); in dp_mlo_dev_ctxt_create()
3203 dp_mlo_dev_get_ref(mlo_dev_ctxt, DP_MOD_ID_CONFIG); in dp_mlo_dev_ctxt_create()
3205 mlo_dev_ctxt->ref_delete_pending = 0; in dp_mlo_dev_ctxt_create()
3206 qdf_spinlock_create(&mlo_dev_ctxt->vdev_list_lock); in dp_mlo_dev_ctxt_create()
3221 struct dp_mlo_dev_ctxt *mlo_dev_ctxt = NULL; in dp_mlo_dev_ctxt_destroy() local
3233 mlo_dev_ctxt = dp_get_mlo_dev_ctx_by_mld_mac_addr(be_soc, in dp_mlo_dev_ctxt_destroy()
3236 if (!mlo_dev_ctxt) { in dp_mlo_dev_ctxt_destroy()
3241 if (mlo_dev_ctxt->vdev_count) in dp_mlo_dev_ctxt_destroy()
3246 mlo_dev_ctxt, ml_dev_list_elem); in dp_mlo_dev_ctxt_destroy()
3250 dp_mlo_dev_ctxt_unref_delete(mlo_dev_ctxt, DP_MOD_ID_CONFIG); in dp_mlo_dev_ctxt_destroy()
3252 mlo_dev_ctxt->ref_delete_pending = 1; in dp_mlo_dev_ctxt_destroy()
3253 dp_mlo_dev_ctxt_unref_delete(mlo_dev_ctxt, DP_MOD_ID_MLO_DEV); in dp_mlo_dev_ctxt_destroy()
3270 struct dp_mlo_dev_ctxt *mlo_dev_ctxt = NULL; in dp_mlo_dev_ctxt_vdev_attach() local
3282 mlo_dev_ctxt = dp_get_mlo_dev_ctx_by_mld_mac_addr(be_soc, in dp_mlo_dev_ctxt_vdev_attach()
3285 if (!mlo_dev_ctxt) { in dp_mlo_dev_ctxt_vdev_attach()
3292 dp_attach_vdev_list_in_mlo_dev_ctxt(be_soc, vdev, mlo_dev_ctxt); in dp_mlo_dev_ctxt_vdev_attach()
3293 be_vdev->mlo_dev_ctxt = mlo_dev_ctxt; in dp_mlo_dev_ctxt_vdev_attach()
3296 dp_mlo_dev_get_ref(mlo_dev_ctxt, DP_MOD_ID_CHILD); in dp_mlo_dev_ctxt_vdev_attach()
3299 dp_mlo_dev_ctxt_unref_delete(mlo_dev_ctxt, DP_MOD_ID_MLO_DEV); in dp_mlo_dev_ctxt_vdev_attach()
3320 struct dp_mlo_dev_ctxt *mlo_dev_ctxt = NULL; in dp_mlo_dev_ctxt_vdev_detach() local
3331 mlo_dev_ctxt = dp_get_mlo_dev_ctx_by_mld_mac_addr(be_soc, in dp_mlo_dev_ctxt_vdev_detach()
3335 if (!mlo_dev_ctxt) { in dp_mlo_dev_ctxt_vdev_detach()
3337 if (!be_vdev->mlo_dev_ctxt) { in dp_mlo_dev_ctxt_vdev_detach()
3342 mlo_dev_ctxt = be_vdev->mlo_dev_ctxt; in dp_mlo_dev_ctxt_vdev_detach()
3343 dp_mlo_dev_get_ref(mlo_dev_ctxt, DP_MOD_ID_MLO_DEV); in dp_mlo_dev_ctxt_vdev_detach()
3346 if (dp_detach_vdev_list_in_mlo_dev_ctxt(be_soc, vdev, mlo_dev_ctxt) in dp_mlo_dev_ctxt_vdev_detach()
3348 dp_mlo_dev_ctxt_unref_delete(mlo_dev_ctxt, DP_MOD_ID_MLO_DEV); in dp_mlo_dev_ctxt_vdev_detach()
3353 be_vdev->mlo_dev_ctxt = NULL; in dp_mlo_dev_ctxt_vdev_detach()
3356 dp_update_mlo_mld_vdev_ctxt_stats(&mlo_dev_ctxt->stats, &vdev->stats); in dp_mlo_dev_ctxt_vdev_detach()
3362 dp_mlo_dev_ctxt_unref_delete(mlo_dev_ctxt, DP_MOD_ID_CHILD); in dp_mlo_dev_ctxt_vdev_detach()
3365 dp_mlo_dev_ctxt_unref_delete(mlo_dev_ctxt, DP_MOD_ID_MLO_DEV); in dp_mlo_dev_ctxt_vdev_detach()