Lines Matching refs:mtp
2895 mactype_t *mtp; in mactype_register() local
2914 mtp = kmem_zalloc(sizeof (*mtp), KM_SLEEP); in mactype_register()
2915 mtp->mt_ident = mtrp->mtr_ident; in mactype_register()
2916 mtp->mt_ops = *ops; in mactype_register()
2917 mtp->mt_type = mtrp->mtr_mactype; in mactype_register()
2918 mtp->mt_nativetype = mtrp->mtr_nativetype; in mactype_register()
2919 mtp->mt_addr_length = mtrp->mtr_addrlen; in mactype_register()
2921 mtp->mt_brdcst_addr = kmem_alloc(mtrp->mtr_addrlen, KM_SLEEP); in mactype_register()
2922 bcopy(mtrp->mtr_brdcst_addr, mtp->mt_brdcst_addr, in mactype_register()
2926 mtp->mt_stats = mtrp->mtr_stats; in mactype_register()
2927 mtp->mt_statcount = mtrp->mtr_statcount; in mactype_register()
2929 mtp->mt_mapping = mtrp->mtr_mapping; in mactype_register()
2930 mtp->mt_mappingcount = mtrp->mtr_mappingcount; in mactype_register()
2933 (mod_hash_key_t)mtp->mt_ident, (mod_hash_val_t)mtp) != 0) { in mactype_register()
2934 kmem_free(mtp->mt_brdcst_addr, mtp->mt_addr_length); in mactype_register()
2935 kmem_free(mtp, sizeof (*mtp)); in mactype_register()
2944 mactype_t *mtp; in mactype_unregister() local
2957 (mod_hash_val_t *)&mtp)) != 0) { in mactype_unregister()
2963 if (mtp->mt_ref != 0) { in mactype_unregister()
2975 ASSERT(mtp == (mactype_t *)val); in mactype_unregister()
2977 if (mtp->mt_brdcst_addr != NULL) in mactype_unregister()
2978 kmem_free(mtp->mt_brdcst_addr, mtp->mt_addr_length); in mactype_unregister()
2979 kmem_free(mtp, sizeof (mactype_t)); in mactype_unregister()