# HG changeset patch # User gthomas # Date 1036441404 0 # Node ID 2057b81b96bb4ab1607863f723b02dd148d69321 # Parent e997e6708ee75a21c8b62b1f2d51c53997f604c8 Postpone check of ifq_maxlen until device comes online diff --git a/packages/net/bsd_tcpip/current/ChangeLog b/packages/net/bsd_tcpip/current/ChangeLog --- a/packages/net/bsd_tcpip/current/ChangeLog +++ b/packages/net/bsd_tcpip/current/ChangeLog @@ -1,3 +1,9 @@ +2002-11-04 Gary Thomas + + * 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 * src/sys/kern/sockio.c (bsd_getname): Fix error where getsockname() diff --git a/packages/net/bsd_tcpip/current/src/sys/net/if.c b/packages/net/bsd_tcpip/current/src/sys/net/if.c --- 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; /*