Lines Matching refs:xnbop
92 xnbo_t *xnbop = xnbp->xnb_flavour_data;
96 if (!xnbop->o_running) {
101 if (mac_tx(xnbop->o_mch, mp, 0,
119 xnbo_t *xnbop = xnbp->xnb_flavour_data;
124 uint32_t capab = xnbop->o_hcksum_capab;
217 xnbo_t *xnbop = xnbp->xnb_flavour_data;
235 if (mac_header_info(xnbop->o_mh, mp, &hdr_info) != 0) {
266 xnbo_t *xnbop = xnbp->xnb_flavour_data;
274 if ((err = mac_open_by_linkname(mac, &xnbop->o_mh)) != 0) {
279 ASSERT(xnbop->o_mh != NULL);
281 mi = mac_info(xnbop->o_mh);
298 mac_sdu_get(xnbop->o_mh, NULL, &max_sdu);
315 if (mac_client_open(xnbop->o_mh, &xnbop->o_mch, NULL,
324 if (xnbop->o_need_rx_filter)
329 err = mac_unicast_add_set_rx(xnbop->o_mch, NULL, MAC_UNICAST_PRIMARY,
330 &xnbop->o_mah, 0, &diag, xnbop->o_multicast_control ? rx_fn : NULL,
338 if (!xnbop->o_multicast_control) {
339 err = mac_promisc_add(xnbop->o_mch, MAC_CLIENT_PROMISC_ALL,
340 rx_fn, xnbp, &xnbop->o_mphp, MAC_PROMISC_FLAGS_NO_TX_LOOP |
349 xnbop->o_promiscuous = B_TRUE;
352 if (xnbop->o_need_setphysaddr) {
353 err = mac_unicast_primary_set(xnbop->o_mh, xnbp->xnb_mac_addr);
364 if (!mac_capab_get(xnbop->o_mh, MAC_CAPAB_HCKSUM,
365 &xnbop->o_hcksum_capab))
366 xnbop->o_hcksum_capab = 0;
368 xnbop->o_running = B_TRUE;
382 xnbo_t *xnbop = xnbp->xnb_flavour_data;
387 if (xnbop->o_mh == NULL)
390 if (xnbop->o_running)
391 xnbop->o_running = B_FALSE;
395 loop = xnbop->o_mca;
396 xnbop->o_mca = NULL;
407 (void) mac_multicast_remove(xnbop->o_mch, loop->addr);
412 if (xnbop->o_promiscuous) {
413 if (xnbop->o_mphp != NULL) {
414 mac_promisc_remove(xnbop->o_mphp);
415 xnbop->o_mphp = NULL;
417 xnbop->o_promiscuous = B_FALSE;
419 if (xnbop->o_mch != NULL)
420 mac_rx_clear(xnbop->o_mch);
423 if (xnbop->o_mah != NULL) {
424 (void) mac_unicast_remove(xnbop->o_mch, xnbop->o_mah);
425 xnbop->o_mah = NULL;
428 if (xnbop->o_mch != NULL) {
429 mac_client_close(xnbop->o_mch, 0);
430 xnbop->o_mch = NULL;
433 mac_close(xnbop->o_mh);
434 xnbop->o_mh = NULL;
445 xnbo_t *xnbop = xnbp->xnb_flavour_data;
447 return (xnbo_open_mac(xnbp, xnbop->o_link_name));
461 xnbo_t *xnbop = xnbp->xnb_flavour_data;
468 xnbop->o_multicast_control = (request > 0);
492 xnbo_t *xnbop = xnbp->xnb_flavour_data;
498 "nic", "%s", xnbop->o_link_name) != 0) {
507 xnbop->o_need_rx_filter = (need > 0);
512 xnbop->o_need_setphysaddr = (need > 0);
524 xnbo_t *xnbop = xnbp->xnb_flavour_data;
528 ASSERT(xnbop->o_promiscuous == B_FALSE);
532 this = xnbop->o_mca;
539 xnbop->o_mca = this->next;
558 mac_multicast_remove(xnbop->o_mch, del->addr);
571 xnbo_t *xnbop = xnbp->xnb_flavour_data;
574 ASSERT(xnbop->o_promiscuous == B_FALSE);
580 } else if (mac_multicast_add(xnbop->o_mch,
592 mca->next = xnbop->o_mca;
593 xnbop->o_mca = mca;
627 xnbo_t *xnbop;
638 xnbop = kmem_zalloc(sizeof (*xnbop), KM_SLEEP);
640 if (xnb_attach(dip, &flavour, xnbop) != DDI_SUCCESS) {
641 kmem_free(xnbop, sizeof (*xnbop));
652 xnbo_t *xnbop = xnbp->xnb_flavour_data;
678 kmem_free(xnbop, sizeof (*xnbop));