Home | History | Annotate | Download | only in usb

Lines Matching refs:ifp

162 uno_stop(struct usbnet *un, struct ifnet *ifp, int disable)
164 KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
166 (*un->un_ops->uno_stop)(ifp, disable);
170 uno_ioctl(struct usbnet *un, struct ifnet *ifp, u_long cmd, void *data)
173 KASSERTMSG(cmd != SIOCADDMULTI, "%s", ifp->if_xname);
174 KASSERTMSG(cmd != SIOCDELMULTI, "%s", ifp->if_xname);
175 KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
178 return (*un->un_ops->uno_ioctl)(ifp, cmd, data);
183 uno_override_ioctl(struct usbnet *un, struct ifnet *ifp, u_long cmd, void *data)
191 KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
194 return (*un->un_ops->uno_override_ioctl)(ifp, cmd, data);
198 uno_init(struct usbnet *un, struct ifnet *ifp)
200 KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
201 return un->un_ops->uno_init ? (*un->un_ops->uno_init)(ifp) : 0;
219 uno_mii_statchg(struct usbnet *un, struct ifnet *ifp)
222 (*un->un_ops->uno_statchg)(ifp);
293 struct ifnet * const ifp = usbnet_ifp(un);
305 if_statinc(ifp, if_ierrors);
310 m_set_rcvif(m, ifp);
317 if_percpuq_enqueue(ifp->if_percpuq, m);
324 struct ifnet * const ifp = usbnet_ifp(un);
335 if_statinc(ifp, if_ierrors);
340 m_set_rcvif(m, ifp);
344 if_input(ifp, m);
415 struct ifnet * const ifp = usbnet_ifp(un);
437 if_statinc(ifp, if_opackets);
442 if_statinc(ifp, if_oerrors);
453 if (status == USBD_NORMAL_COMPLETION && !IFQ_IS_EMPTY(&ifp->if_snd))
454 (*ifp->if_start)(ifp);
490 usbnet_start_locked(struct ifnet *ifp)
493 struct usbnet * const un = ifp->if_softc;
524 IFQ_POLL(&ifp->if_snd, m);
536 if_statinc(ifp, if_oerrors);
542 if_statinc(ifp, if_oerrors);
554 if_statinc(ifp, if_oerrors);
559 IFQ_DEQUEUE(&ifp->if_snd, m);
565 bpf_mtap(ifp, m, BPF_D_OUT);
588 usbnet_if_start(struct ifnet *ifp)
590 struct usbnet * const un = ifp->if_softc;
599 usbnet_start_locked(ifp);
829 struct ifnet * const ifp = usbnet_ifp(un);
833 KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
863 KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
864 ifp->if_flags |= IFF_RUNNING;
872 KASSERTMSG(!unp->unp_mcastactive, "%s", ifp->if_xname);
873 unp->unp_if_flags = ifp->if_flags;
874 (*un->un_ops->uno_mcast)(ifp);
965 usbnet_mii_statchg(struct ifnet *ifp)
968 struct usbnet * const un = ifp->if_softc;
973 uno_mii_statchg(un, ifp);
977 usbnet_media_upd(struct ifnet *ifp)
980 struct usbnet * const un = ifp->if_softc;
988 KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
1002 return ether_mediachange(ifp);
1018 struct ifnet *ifp = &ec->ec_if;
1019 struct usbnet *un = ifp->if_softc;
1022 KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
1024 const u_short changed = ifp->if_flags ^ unp->unp_if_flags;
1039 unp->unp_if_flags = ifp->if_flags;
1063 struct ifnet * const ifp = usbnet_ifp(un);
1066 KASSERTMSG(mutex_owned(&unp->unp_mcastlock) || IFNET_LOCKED(ifp),
1067 "%s", ifp->if_xname);
1073 usbnet_if_ioctl(struct ifnet *ifp, u_long cmd, void *data)
1076 struct usbnet * const un = ifp->if_softc;
1084 return uno_override_ioctl(un, ifp, cmd, data);
1086 error = ether_ioctl(ifp, cmd, data);
1102 (*un->un_ops->uno_mcast)(ifp);
1108 error = uno_ioctl(un, ifp, cmd, data);
1127 usbnet_stop(struct usbnet *un, struct ifnet *ifp, int disable)
1134 KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
1135 KASSERTMSG(ifp->if_flags & IFF_RUNNING, "%s", ifp->if_xname);
1144 KASSERTMSG(unp->unp_mcastactive, "%p", ifp->if_xname);
1201 uno_stop(un, ifp, disable);
1211 KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
1212 ifp->if_flags &= ~IFF_RUNNING;
1216 usbnet_if_stop(struct ifnet *ifp, int disable)
1218 struct usbnet * const un = ifp->if_softc;
1220 KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
1229 if ((ifp->if_flags & IFF_RUNNING) == 0)
1232 usbnet_stop(un, ifp, disable);
1255 usbnet_watchdog(struct ifnet *ifp)
1258 struct usbnet * const un = ifp->if_softc;
1262 if_statinc(ifp, if_oerrors);
1272 if (!IFQ_IS_EMPTY(&ifp->if_snd))
1273 (*ifp->if_start)(ifp);
1282 struct ifnet * const ifp = usbnet_ifp(un);
1291 usbnet_watchdog(ifp);
1297 DPRINTFN(8, "mii %#jx ifp %#jx", (uintptr_t)mii, (uintptr_t)ifp, 0, 0);
1301 (*mii->mii_statchg)(ifp);
1310 usbnet_if_init(struct ifnet *ifp)
1313 struct usbnet * const un = ifp->if_softc;
1316 KASSERTMSG(IFNET_LOCKED(ifp), "%s", ifp->if_xname);
1334 if (ifp
1335 usbnet_stop(un, ifp, /*disable*/1/*XXX???*/);
1336 KASSERTMSG((ifp->if_flags & IFF_RUNNING) == 0, "%s", ifp->if_xname);
1338 error = uno_init(un, ifp);
1487 struct ifnet * const ifp = usbnet_ifp(un);
1493 mii->mii_ifp = ifp;
1520 struct ifnet * const ifp = usbnet_ifp(un);
1525 ifp->if_softc = un;
1526 strlcpy(ifp->if_xname, device_xname(un->un_dev), IFNAMSIZ);
1527 ifp->if_flags = if_flags;
1528 ifp->if_extflags = IFEF_MPSAFE | if_extflags;
1529 ifp->if_ioctl = usbnet_if_ioctl;
1530 ifp->if_start = usbnet_if_start;
1531 ifp->if_init = usbnet_if_init;
1532 ifp->if_stop = usbnet_if_stop;
1540 if_initialize(ifp);
1541 if (ifp->_if_input == NULL)
1542 ifp->if_percpuq = if_percpuq_create(ifp);
1543 if_register(ifp);
1554 ether_ifattach(ifp, un->un_eaddr);
1556 if_alloc_sadl(ifp);
1557 bpf_attach(ifp, DLT_RAW, 0);
1561 IFQ_SET_READY(&ifp->if_snd);
1580 struct ifnet * const ifp = usbnet_ifp(un);
1597 IFNET_LOCK(ifp);
1598 if (ifp->if_flags & IFF_RUNNING) {
1599 usbnet_if_stop(ifp, 1);
1601 IFNET_UNLOCK(ifp);
1617 ether_ifdetach(ifp);
1619 bpf_detach(ifp);
1620 if_detach(ifp);
1659 struct ifnet * const ifp = usbnet_ifp(un);
1663 if_deactivate(ifp);