Date: Fri, 12 Dec 2003 00:54:48 -0800 (PST) From: Bill Paul <wpaul@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/compat/ndis kern_ndis.c subr_ndis.c Message-ID: <200312120854.hBC8smOY099292@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
wpaul 2003/12/12 00:54:48 PST
FreeBSD src repository
Modified files:
sys/compat/ndis kern_ndis.c subr_ndis.c
Log:
Correct the behavior of ndis_adjust_buflen(): the NDIS spec says
it's an error to set the buffer bytecount to anything larger than
the buffer's original allocation size, but anything less than that
is ok.
Also, in ndis_ptom(), use the same logic: if the bytecount is
larger than the allocation size, consider the bytecount invalid
and the allocation size as the packet fragment length (m_len)
instead of the bytecount.
This corrects a consistency problem between the Broadcom wireless
driver and some of the ethernet drivers I've tested: the ethernet
drivers all report the packet frag sizes in buf->nb_bytecount, but
the Broadcom wireless driver reports them in buf->nb_size. This
seems like a bug to me, but it clearly must work in Windows, so
we have to deal with it here too.
Revision Changes Path
1.3 +1 -1 src/sys/compat/ndis/kern_ndis.c
1.2 +10 -3 src/sys/compat/ndis/subr_ndis.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312120854.hBC8smOY099292>
