netgraph7/fec: Don't use IF_ macros on ifnet.if_snd
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 3 Jan 2013 01:46:50 +0000 (09:46 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 3 Jan 2013 01:46:50 +0000 (09:46 +0800)
sys/netgraph7/ng_fec.c

index 108df0a..d54a331 100644 (file)
@@ -1123,7 +1123,7 @@ ng_fec_start(struct ifnet *ifp)
        priv = ifp->if_softc;
        b = &priv->fec_bundle;
 
-       IF_DEQUEUE(&ifp->if_snd, m0);
+       m0 = ifq_dequeue(&ifp->if_snd, NULL);
        if (m0 == NULL)
                return;
 
@@ -1139,9 +1139,11 @@ ng_fec_start(struct ifnet *ifp)
        }
        ifp->if_opackets++;
 
-       priv->if_error = IF_HANDOFF(&oifp->if_snd, m0, oifp) ? 0 : ENOBUFS;
+       ifnet_deserialize_tx(ifp);
+       error = ifq_dispatch(oifp, m0, NULL);
+       ifnet_serialize_tx(ifp);
 
-       return;
+       priv->if_error = error;
 }
 
 #ifdef DEBUG