version 1.23, 2014/06/05 23:48:16 |
version 1.23.4.3, 2016/10/05 20:55:56 |
Line 313 dmcinit(struct ifnet *ifp) |
|
Line 313 dmcinit(struct ifnet *ifp) |
|
* Check to see that an address has been set |
* Check to see that an address has been set |
* (both local and destination for an address family). |
* (both local and destination for an address family). |
*/ |
*/ |
IFADDR_FOREACH(ifa, ifp) |
s = pserialize_read_enter(); |
|
IFADDR_READER_FOREACH(ifa, ifp) { |
if (ifa->ifa_addr->sa_family && ifa->ifa_dstaddr->sa_family) |
if (ifa->ifa_addr->sa_family && ifa->ifa_dstaddr->sa_family) |
break; |
break; |
if (ifa == (struct ifaddr *) 0) |
} |
|
pserialize_read_exit(s); |
|
if (ifa == NULL) |
return 0; |
return 0; |
|
|
if ((DMC_RBYTE(DMC_BSEL1) & DMC_RUN) == 0) { |
if ((DMC_RBYTE(DMC_BSEL1) & DMC_RUN) == 0) { |
Line 762 dmcoutput(struct ifnet *ifp, struct mbuf |
|
Line 765 dmcoutput(struct ifnet *ifp, struct mbuf |
|
int type, error, s; |
int type, error, s; |
struct mbuf *m = m0; |
struct mbuf *m = m0; |
struct dmc_header *dh; |
struct dmc_header *dh; |
ALTQ_DECL(struct altq_pktattr pktattr;) |
|
|
|
if ((ifp->if_flags & IFF_UP) == 0) { |
if ((ifp->if_flags & IFF_UP) == 0) { |
error = ENETDOWN; |
error = ENETDOWN; |
goto bad; |
goto bad; |
} |
} |
|
|
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr); |
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family); |
|
|
switch (dst->sa_family) { |
switch (dst->sa_family) { |
#ifdef INET |
#ifdef INET |
Line 807 dmcoutput(struct ifnet *ifp, struct mbuf |
|
Line 809 dmcoutput(struct ifnet *ifp, struct mbuf |
|
* not yet active. |
* not yet active. |
*/ |
*/ |
s = splnet(); |
s = splnet(); |
IFQ_ENQUEUE(&ifp->if_snd, m, &pktattr, error); |
IFQ_ENQUEUE(&ifp->if_snd, m, error); |
if (error) { |
if (error) { |
/* mbuf is already freed */ |
/* mbuf is already freed */ |
splx(s); |
splx(s); |