Lines Matching refs:ifp

456 	struct ifnet *ifp;
464 ifp = &sc->vr_ec.ec_if;
468 if (ifp->if_flags & IFF_PROMISC) {
470 ifp->if_flags |= IFF_ALLMULTI;
499 ifp->if_flags &= ~IFF_ALLMULTI;
593 struct ifnet *ifp;
599 ifp = &sc->vr_ec.ec_if;
625 ifp->if_ierrors++;
665 ifp->if_ierrors++;
689 ifp->if_ierrors++;
733 ifp->if_ierrors++;
752 ifp->if_ierrors++;
780 ifp->if_ipackets++;
781 m->m_pkthdr.rcvif = ifp;
789 bpf_mtap(ifp, m);
791 (*ifp->if_input)(ifp, m);
801 struct ifnet *ifp;
804 ifp = &sc->vr_ec.ec_if;
806 ifp->if_ierrors++;
834 struct ifnet *ifp = &sc->vr_ec.ec_if;
840 ifp->if_flags &= ~IFF_OACTIVE;
883 ifp->if_oerrors++;
885 ifp->if_collisions++;
887 ifp->if_collisions++;
890 ifp->if_collisions += (txstat & VR_TXSTAT_COLLCNT) >> 3;
891 ifp->if_opackets++;
902 ifp->if_timer = 0;
909 struct ifnet *ifp;
914 ifp = &sc->vr_ec.ec_if;
917 if ((ifp->if_flags & IFF_UP) == 0) {
918 vr_stop(ifp, 1);
942 ifp->if_ierrors++;
959 (void)vr_init(ifp);
976 ifp->if_oerrors++;
990 vr_start(ifp);
1002 vr_start(struct ifnet *ifp)
1004 struct vr_softc *sc = ifp->if_softc;
1010 if ((ifp->if_flags & (IFF_RUNNING|IFF_OACTIVE)) != IFF_RUNNING)
1031 IFQ_POLL(&ifp->if_snd, m0);
1090 IFQ_DEQUEUE(&ifp->if_snd, m0);
1109 bpf_mtap(ifp, m0);
1138 ifp->if_flags |= IFF_OACTIVE;
1169 ifp->if_timer = 5;
1177 vr_init(struct ifnet *ifp)
1179 struct vr_softc *sc = ifp->if_softc;
1185 vr_stop(ifp, 0);
1245 if (ifp->if_flags & IFF_PROMISC)
1251 if (ifp->if_flags & IFF_BROADCAST)
1265 if ((error = ether_mediachange(ifp)) != 0)
1277 ifp->if_flags |= IFF_RUNNING;
1278 ifp->if_flags &= ~IFF_OACTIVE;
1284 vr_start(ifp);
1293 vr_ioctl(struct ifnet *ifp, u_long command, void *data)
1295 struct vr_softc *sc = ifp->if_softc;
1302 if ((error = ifioctl_common(ifp, command, data)) != 0)
1305 switch (ifp->if_flags & (IFF_UP | IFF_RUNNING)) {
1307 vr_stop(ifp, 1);
1310 vr_init(ifp);
1313 if ((ifp->if_flags ^ sc->vr_if_flags) == IFF_PROMISC)
1316 vr_init(ifp);
1319 sc->vr_if_flags = ifp->if_flags;
1322 if ((error = ether_ioctl(ifp, command, data)) != ENETRESET)
1334 vr_watchdog(struct ifnet *ifp)
1336 struct vr_softc *sc = ifp->if_softc;
1339 ifp->if_oerrors++;
1341 (void) vr_init(ifp);
1389 vr_stop(struct ifnet *ifp, int disable)
1391 struct vr_softc *sc = ifp->if_softc;
1401 ifp = &sc->vr_ec.ec_if;
1402 ifp->if_timer = 0;
1425 ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
1426 ifp->if_timer = 0;
1490 struct ifnet *ifp;
1703 ifp = &sc->vr_ec.ec_if;
1704 ifp->if_softc = sc;
1705 ifp->if_mtu = ETHERMTU;
1706 ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
1707 ifp->if_ioctl = vr_ioctl;
1708 ifp->if_start = vr_start;
1709 ifp->if_watchdog = vr_watchdog;
1710 ifp->if_init = vr_init;
1711 ifp->if_stop = vr_stop;
1712 IFQ_SET_READY(&ifp->if_snd);
1714 strlcpy(ifp->if_xname, device_xname(self), IFNAMSIZ);
1719 sc->vr_mii.mii_ifp = ifp;
1740 if_attach(ifp);
1741 ether_ifattach(ifp, sc->vr_enaddr);
1747 pmf_class_network_register(self, ifp);