Lines Matching defs:ifp

416 	struct ifnet		*ifp;
423 ifp = sc->wb_ifp;
427 if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
440 if_maddr_rlock(ifp);
441 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
452 if_maddr_runlock(ifp);
546 struct ifnet *ifp;
550 ifp = sc->wb_ifp;
599 struct ifnet *ifp;
656 ifp = sc->wb_ifp = if_alloc(IFT_ETHER);
657 if (ifp == NULL) {
662 ifp->if_softc = sc;
663 if_initname(ifp, device_get_name(dev), device_get_unit(dev));
664 ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
665 ifp->if_ioctl = wb_ioctl;
666 ifp->if_start = wb_start;
667 ifp->if_init = wb_init;
668 ifp->if_snd.ifq_maxlen = WB_TX_LIST_CNT - 1;
673 error = mii_attach(dev, &sc->wb_miibus, ifp, wb_ifmedia_upd,
683 ether_ifattach(ifp, eaddr);
691 ether_ifdetach(ifp);
716 struct ifnet *ifp;
720 ifp = sc->wb_ifp;
727 ether_ifdetach(ifp);
744 if (ifp)
745 if_free(ifp);
877 struct ifnet *ifp;
884 ifp = sc->wb_ifp;
900 if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
912 if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
929 m0 = m_devget(mtod(m, char *), total_len, ETHER_ALIGN, ifp,
933 if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
938 if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
940 (*ifp->if_input)(ifp, m);
967 struct ifnet *ifp;
969 ifp = sc->wb_ifp;
991 if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
993 if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1);
995 if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1);
998 if_inc_counter(ifp, IFCOUNTER_COLLISIONS, (txstat & WB_TXSTAT_COLLCNT) >> 3);
1000 if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
1021 struct ifnet *ifp;
1023 ifp = sc->wb_ifp;
1028 ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
1044 struct ifnet *ifp;
1049 ifp = sc->wb_ifp;
1051 if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
1069 if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
1098 if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
1118 if (ifp->if_snd.ifq_head != NULL) {
1119 wb_start_locked(ifp);
1242 wb_start(ifp)
1243 struct ifnet *ifp;
1247 sc = ifp->if_softc;
1249 wb_start_locked(ifp);
1254 wb_start_locked(ifp)
1255 struct ifnet *ifp;
1261 sc = ifp->if_softc;
1269 ifp->if_drv_flags |= IFF_DRV_OACTIVE;
1276 IF_DEQUEUE(&ifp->if_snd, m_head);
1294 BPF_MTAP(ifp, cur_tx->wb_mbuf);
1355 struct ifnet *ifp = sc->wb_ifp;
1417 if (ifp->if_flags & IFF_PROMISC) {
1426 if (ifp->if_flags & IFF_BROADCAST) {
1459 ifp->if_drv_flags |= IFF_DRV_RUNNING;
1460 ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
1469 wb_ifmedia_upd(ifp)
1470 struct ifnet *ifp;
1474 sc = ifp->if_softc;
1477 if (ifp->if_flags & IFF_UP)
1488 wb_ifmedia_sts(ifp, ifmr)
1489 struct ifnet *ifp;
1495 sc = ifp->if_softc;
1507 wb_ioctl(ifp, command, data)
1508 struct ifnet *ifp;
1512 struct wb_softc *sc = ifp->if_softc;
1520 if (ifp->if_flags & IFF_UP) {
1523 if (ifp->if_drv_flags & IFF_DRV_RUNNING)
1539 error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
1542 error = ether_ioctl(ifp, command, data);
1553 struct ifnet *ifp;
1556 ifp = sc->wb_ifp;
1557 if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
1558 if_printf(ifp, "watchdog timeout\n");
1561 if_printf(ifp, "no carrier - transceiver cable problem?\n");
1567 if (ifp->if_snd.ifq_head != NULL)
1568 wb_start_locked(ifp);
1580 struct ifnet *ifp;
1583 ifp = sc->wb_ifp;
1618 ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);