Lines Matching refs:ifp

82 static int	edsc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
83 static void edsc_start(struct ifnet *ifp);
97 struct ifnet *ifp; in edsc_clone_create() local
104 ifp = sc->sc_ifp = if_alloc(IFT_ETHER); in edsc_clone_create()
105 ifp->if_softc = sc; in edsc_clone_create()
110 if_initname(ifp, edscname, unit); in edsc_clone_create()
116 ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX; in edsc_clone_create()
124 ifp->if_capabilities = in edsc_clone_create()
128 ifp->if_capenable = 0; in edsc_clone_create()
133 ifp->if_init = edsc_init; in edsc_clone_create()
135 ifp->if_ioctl = edsc_ioctl; in edsc_clone_create()
136 ifp->if_start = edsc_start; in edsc_clone_create()
141 ifp->if_snd.ifq_maxlen = ifqmaxlen; in edsc_clone_create()
146 ether_gen_addr(ifp, &eaddr); in edsc_clone_create()
152 ether_ifattach(ifp, eaddr.octet); in edsc_clone_create()
158 ifp->if_drv_flags |= IFF_DRV_RUNNING; in edsc_clone_create()
167 edsc_clone_destroy(struct ifnet *ifp) in edsc_clone_destroy() argument
169 struct edsc_softc *sc = ifp->if_softc; in edsc_clone_destroy()
174 ether_ifdetach(ifp); in edsc_clone_destroy()
179 if_free(ifp); in edsc_clone_destroy()
192 struct ifnet *ifp = sc->sc_ifp; in edsc_init()
202 edsc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) in edsc_ioctl() argument
214 ifp->if_capenable = ifr->ifr_reqcap; in edsc_ioctl()
220 mask = ifp->if_capenable ^ ifr->ifr_reqcap; in edsc_ioctl()
223 ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; in edsc_ioctl()
225 if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) in edsc_ioctl()
237 return (ether_ioctl(ifp, cmd, data)); in edsc_ioctl()
247 edsc_start(struct ifnet *ifp) in edsc_start() argument
282 IFQ_DEQUEUE(&ifp->if_snd, m); in edsc_start()
289 BPF_MTAP(ifp, m); in edsc_start()
294 if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len); in edsc_start()
295 if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); in edsc_start()