Lines Matching refs:ifp

113 	struct ifnet *ifp;
119 ifp = sc->sc_ifp = if_alloc(IFT_ETHER);
120 if (ifp == NULL)
126 ifp->if_softc = sc;
127 if_initname(ifp, name, unit);
128 ifp->if_start = lance_start;
129 ifp->if_ioctl = lance_ioctl;
130 ifp->if_init = lance_init;
131 ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
133 ifp->if_flags &= ~IFF_MULTICAST;
135 ifp->if_baudrate = IF_Mbps(10);
136 IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen);
137 ifp->if_snd.ifq_drv_maxlen = ifqmaxlen;
138 IFQ_SET_READY(&ifp->if_snd);
185 if_printf(ifp, "%d receive buffers, %d transmit buffers\n",
199 struct ifnet *ifp = sc->sc_ifp;
202 ether_ifattach(ifp, sc->sc_enaddr);
205 ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
206 ifp->if_capabilities |= IFCAP_VLAN_MTU;
207 ifp->if_capenable |= IFCAP_VLAN_MTU;
213 struct ifnet *ifp = sc->sc_ifp;
219 ether_ifdetach(ifp);
220 if_free(ifp);
243 lance_start(struct ifnet *ifp)
245 struct lance_softc *sc = ifp->if_softc;
255 struct ifnet *ifp = sc->sc_ifp;
262 ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
286 struct ifnet *ifp = sc->sc_ifp;
310 memcpy(sc->sc_enaddr, IF_LLADDR(ifp), ETHER_ADDR_LEN);
332 ifp->if_drv_flags |= IFF_DRV_RUNNING;
333 ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
338 if_printf(ifp, "controller failed to initialize\n");
385 struct ifnet *ifp = sc->sc_ifp;
392 if_printf(ifp, "invalid packet size %d; dropping\n", totlen);
400 m0->m_pkthdr.rcvif = ifp;
445 struct ifnet *ifp = sc->sc_ifp;
454 if_printf(ifp, "device timeout\n");
455 ++ifp->if_oerrors;
460 lance_mediachange(struct ifnet *ifp)
462 struct lance_softc *sc = ifp->if_softc;
475 if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
483 lance_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr)
485 struct lance_softc *sc = ifp->if_softc;
488 if (!(ifp->if_flags & IFF_UP)) {
506 lance_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
508 struct lance_softc *sc = ifp->if_softc;
515 if (ifp->if_flags & IFF_PROMISC) {
525 if ((ifp->if_flags & IFF_ALLMULTI) &&
529 } else if (!(ifp->if_flags & IFF_ALLMULTI) &&
535 if (!(ifp->if_flags & IFF_UP) &&
536 ifp->if_drv_flags & IFF_DRV_RUNNING) {
542 } else if (ifp->if_flags & IFF_UP &&
543 !(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
551 if (ifp->if_flags & IFF_DEBUG)
566 if (ifp->if_drv_flags & IFF_DRV_RUNNING)
573 error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
577 error = ether_ioctl(ifp, cmd, data);
590 struct ifnet *ifp = sc->sc_ifp;
602 if (ifp->if_flags & IFF_PROMISC || sc->sc_flags & LE_ALLMULTI) {
608 if_maddr_rlock(ifp);
609 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
622 if_maddr_runlock(ifp);