cvs commit: src/sys/compat/ndis kern_ndis.c subr_ndis.c
Bill Paul
wpaul at FreeBSD.org
Fri Dec 12 00:54:49 PST 2003
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
More information about the cvs-src
mailing list