Lines Matching defs:ifp
82 /* static void edsc_input(struct ifnet *ifp, struct mbuf *m); would be here */
83 static int edsc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
84 static void edsc_start(struct ifnet *ifp);
98 struct ifnet *ifp;
105 ifp = sc->sc_ifp = if_alloc(IFT_ETHER);
106 if (ifp == NULL) {
111 ifp->if_softc = sc;
116 if_initname(ifp, edscname, unit);
122 ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX;
130 ifp->if_capabilities =
134 ifp->if_capenable = 0;
139 ifp->if_init = edsc_init;
140 /* ifp->if_input = edsc_input; */
141 ifp->if_ioctl = edsc_ioctl;
142 ifp->if_start = edsc_start;
147 ifp->if_snd.ifq_maxlen = ifqmaxlen;
154 ether_ifattach(ifp, eaddr);
160 ifp->if_drv_flags |= IFF_DRV_RUNNING;
169 edsc_clone_destroy(struct ifnet *ifp)
171 struct edsc_softc *sc = ifp->if_softc;
176 ether_ifdetach(ifp);
181 if_free(ifp);
194 struct ifnet *ifp = sc->sc_ifp;
204 edsc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
216 ifp->if_capenable = ifr->ifr_reqcap;
222 mask = ifp->if_capenable ^ ifr->ifr_reqcap;
225 ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
227 if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING)
239 return (ether_ioctl(ifp, cmd, data));
249 edsc_start(struct ifnet *ifp)
255 * in ifp->if_drv_flags:
257 * ifp->if_drv_flags |= IFF_DRV_OACTIVE;
284 IFQ_DEQUEUE(&ifp->if_snd, m);
291 BPF_MTAP(ifp, m);
296 if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len);
297 if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
307 * ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;