Mercurial > ecos
changeset 400:2057b81b96bb
Postpone check of ifq_maxlen until device comes online
| author | gthomas |
|---|---|
| date | Mon, 04 Nov 2002 20:23:24 +0000 |
| parents | e997e6708ee7 |
| children | 95bcba5bfb2d |
| files | packages/net/bsd_tcpip/current/ChangeLog packages/net/bsd_tcpip/current/src/sys/net/if.c |
| diffstat | 2 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/net/bsd_tcpip/current/ChangeLog +++ b/packages/net/bsd_tcpip/current/ChangeLog @@ -1,3 +1,9 @@ +2002-11-04 Gary Thomas <gthomas@ecoscentric.com> + + * src/sys/net/if.c (if_attach): Moved check for ifq_maxlen to + this function since it can't be checked until the device comes + online, which may not be a sysinit time for PCMCIA devices. + 2002-11-03 Gary Thomas <gthomas@ecoscentric.com> * src/sys/kern/sockio.c (bsd_getname): Fix error where getsockname()
--- a/packages/net/bsd_tcpip/current/src/sys/net/if.c +++ b/packages/net/bsd_tcpip/current/src/sys/net/if.c @@ -128,12 +128,6 @@ ifinit(dummy) for (ifp = ifnet.tqh_first; ifp; ifp = ifp->if_link.tqe_next) { printf("IFP: %p, next: %p\n", ifp, ifp->if_link.tqe_next); } - for (ifp = ifnet.tqh_first; ifp; ifp = ifp->if_link.tqe_next) - if (ifp->if_snd.ifq_maxlen == 0) { - printf("%s%d XXX: driver didn't set ifq_maxlen\n", - ifp->if_name, ifp->if_unit); - ifp->if_snd.ifq_maxlen = ifqmaxlen; - } splx(s); if_slowtimo(0); } @@ -199,6 +193,12 @@ if_attach(ifp) inited = 1; } + if (ifp->if_snd.ifq_maxlen == 0) { + printf("%s%d XXX: driver didn't set ifq_maxlen\n", + ifp->if_name, ifp->if_unit); + ifp->if_snd.ifq_maxlen = ifqmaxlen; + } + TAILQ_INSERT_TAIL(&ifnet, ifp, if_link); ifp->if_index = ++if_index; /*
