void smsc_start(struct ifnet *ifp) { struct smsc_softc *sc = ifp->if_softc; struct mbuf *m_head = NULL; /* Don't send anything if there is no link or controller is busy. */ if ((sc->sc_flags & SMSC_FLAG_LINK) == 0 || (ifp->if_flags & IFF_OACTIVE) != 0) { return; } IFQ_POLL(&ifp->if_snd, m_head); if (m_head == NULL) return; if (smsc_encap(sc, m_head, 0)) { ifp->if_flags |= IFF_OACTIVE; return; } IFQ_DEQUEUE(&ifp->if_snd, m_head); #if NBPFILTER > 0 if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m_head, BPF_DIRECTION_OUT); #endif ifp->if_flags |= IFF_OACTIVE; }
void smsc_start(struct ifnet *ifp) { struct smsc_softc *sc = ifp->if_softc; struct mbuf *m_head = NULL; /* Don't send anything if there is no link or controller is busy. */ if ((sc->sc_flags & SMSC_FLAG_LINK) == 0) { return; } if ((ifp->if_flags & (IFF_OACTIVE|IFF_RUNNING)) != IFF_RUNNING) return; IFQ_POLL(&ifp->if_snd, m_head); if (m_head == NULL) return; if (smsc_encap(sc, m_head, 0)) { ifp->if_flags |= IFF_OACTIVE; return; } IFQ_DEQUEUE(&ifp->if_snd, m_head); bpf_mtap(ifp, m_head); ifp->if_flags |= IFF_OACTIVE; /* * Set a timeout in case the chip goes out to lunch. */ ifp->if_timer = 5; }