From 8237685662973e006bf3fefaceaf577b995c4ca0 Mon Sep 17 00:00:00 2001 From: wpaul Date: Tue, 23 Mar 2004 19:51:17 +0000 Subject: Recently I realized that the ADMtek 8211 driver wasn't working correctly (NIC would claim to establish a link with an ad-hoc net but it couldn't send/receive packets). It turns out that every time the checkforhang handler was called by ndis_ticktask(), the driver would generate a new media connect event. The NDIS spec says the checkforhang handler is called "approximately every 2 seconds" but using exactly 2 seconds seems too fast. Using 3 seconds makes it happy again, so we'll go with that for now. --- sys/dev/if_ndis/if_ndis.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index f89d766..2952405 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -1428,12 +1428,13 @@ ndis_init(xsc) /* * Some drivers don't set this value. The NDIS spec says - * the default checkforhang timeout is approximately 2 - * seconds. + * the default checkforhang timeout is "approximately 2 + * seconds." We use 3 seconds, because it seems for some + * drivers, exactly 2 seconds is too fast. */ if (sc->ndis_block.nmb_checkforhangsecs == 0) - sc->ndis_block.nmb_checkforhangsecs = 2; + sc->ndis_block.nmb_checkforhangsecs = 3; sc->ndis_stat_ch = timeout(ndis_tick, sc, hz * sc->ndis_block.nmb_checkforhangsecs); -- cgit v1.1