Skip site navigation (1)Skip section navigation (2)
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>&nbsp;
<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>&nbsp; Thomas Berndes
<BR>&nbsp;

<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>&nbsp; ...

<P>&nbsp; <B><U>uDDK_P_ifp.if_snd.ifq_maxlen = 3;</U></B>

<P>&nbsp; if_attach( &amp;uDDK_P_ifp );

<P>&nbsp; printf( "%s: Driver initialized\n", pdriver_info->name );
<BR>&nbsp; return uDDK_INIT_DRIVER_OK;
<BR>}
<BR>&nbsp;

<P>==========================================================================
<BR>&nbsp;
<BR>&nbsp;</HTML>





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3401DA18.BC0FB06E>