Date: Mon, 25 Aug 1997 21:16:41 +0200 From: Thomas Berndes <thobe@cs.tu-berlin.de> To: questions FreeBSD Org <freebsd-questions@FreeBSD.org> Subject: Problems solved (was: Problems developing a network-driver as an kernel-module) Message-ID: <3401DA18.BC0FB06E@cs.tu-berlin.de>
next in thread | raw e-mail | index | archive | help
<HTML> Hello FreeBSD-Programmers, <P>I solved the problem which i had, while developing a network-driver for FreeBSD <BR>(2.2.1) as a kernel-module. <P>I have not initialized the "if_sn.ifq_maxlen" - item in the <BR>"ifnet-struct", before making "if_attach( ...)". <BR> <UL> <LI> But there still remains the question, why did the driver work fine without this initializiation when linked staticly, and failed, when using it as a kernel-module ?</LI> </UL> <P>regards, <P> Thomas Berndes <BR> <P>========================================================================== <P>The following lines are an extract from the source-code of the driver. <P>/* the real initialization of HW and driver */ <BR>uDDK_init_driver( ... ){ <P> ... <P> <B><U>uDDK_P_ifp.if_snd.ifq_maxlen = 3;</U></B> <P> if_attach( &uDDK_P_ifp ); <P> printf( "%s: Driver initialized\n", pdriver_info->name ); <BR> return uDDK_INIT_DRIVER_OK; <BR>} <BR> <P>========================================================================== <BR> <BR> </HTML>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3401DA18.BC0FB06E>