Lines Matching refs:mtp
3248 mactype_t *mtp; in mactype_register() local
3267 mtp = kmem_zalloc(sizeof (*mtp), KM_SLEEP); in mactype_register()
3268 mtp->mt_ident = mtrp->mtr_ident; in mactype_register()
3269 mtp->mt_ops = *ops; in mactype_register()
3270 mtp->mt_type = mtrp->mtr_mactype; in mactype_register()
3271 mtp->mt_nativetype = mtrp->mtr_nativetype; in mactype_register()
3272 mtp->mt_addr_length = mtrp->mtr_addrlen; in mactype_register()
3274 mtp->mt_brdcst_addr = kmem_alloc(mtrp->mtr_addrlen, KM_SLEEP); in mactype_register()
3275 bcopy(mtrp->mtr_brdcst_addr, mtp->mt_brdcst_addr, in mactype_register()
3279 mtp->mt_stats = mtrp->mtr_stats; in mactype_register()
3280 mtp->mt_statcount = mtrp->mtr_statcount; in mactype_register()
3282 mtp->mt_mapping = mtrp->mtr_mapping; in mactype_register()
3283 mtp->mt_mappingcount = mtrp->mtr_mappingcount; in mactype_register()
3286 (mod_hash_key_t)mtp->mt_ident, (mod_hash_val_t)mtp) != 0) { in mactype_register()
3287 kmem_free(mtp->mt_brdcst_addr, mtp->mt_addr_length); in mactype_register()
3288 kmem_free(mtp, sizeof (*mtp)); in mactype_register()
3297 mactype_t *mtp; in mactype_unregister() local
3310 (mod_hash_val_t *)&mtp)) != 0) { in mactype_unregister()
3316 if (mtp->mt_ref != 0) { in mactype_unregister()
3328 ASSERT(mtp == (mactype_t *)val); in mactype_unregister()
3330 if (mtp->mt_brdcst_addr != NULL) in mactype_unregister()
3331 kmem_free(mtp->mt_brdcst_addr, mtp->mt_addr_length); in mactype_unregister()
3332 kmem_free(mtp, sizeof (mactype_t)); in mactype_unregister()