freebsd-dev/sys/compat
Bill Paul ee422a28d6 Re-do the handling of ndis_buffers. The NDIS_BUFFER structure is
supposed to be opaque to the driver, however it is exposed through
several macros which expect certain behavior. In my original
implementation, I used the mappedsystemva member of the structure
to hold a pointer to the buffer and bytecount to hold the length.
It turns out you must use the startva pointer to point to the
page containing the start of the buffer and set byteoffset to
the offset within the page where the buffer starts. So, for a buffer
with address 'baseva,' startva is baseva & ~(PAGE_SIZE -1) and
byteoffset is baseva & (PAGE_SIZE -1). We have to maintain this
convention everywhere that ndis_buffers are used.

Fortunately, Microsoft defines some macros for initializing and
manipulating NDIS_BUFFER structures in ntddk.h. I adapted some
of them for use here and used them where appropriate.

This fixes the discrepancy I observed between how RX'ed packet sizes
were being reported in the Broadcom wireless driver and the sample
ethernet drivers that I've tested. This should also help the
Intel Centrino wireless driver work.

Also try to properly initialize the 802.11 BSS and IBSS channels.
(Sadly, the channel value is meaningless since there's no way
in the existing NDIS API to get/set the channel, but this should
take care of any 'invalid channel (NULL)' messages printed on
the console.
2003-12-23 04:08:22 +00:00
..
freebsd32 Regen (should be a NOP except for rcsid) 2003-12-23 04:07:47 +00:00
ia32 Add an additional field to the elf brandinfo structure to support 2003-12-23 02:42:39 +00:00
linprocfs Use mp_ncpus instead of the hw.ncpu sysctl. 2003-12-07 17:38:20 +00:00
linux Do not call VOP_GETATTR in getdents function. It does not serve any 2003-11-19 04:12:32 +00:00
ndis Re-do the handling of ndis_buffers. The NDIS_BUFFER structure is 2003-12-23 04:08:22 +00:00
netbsd Don't include <sys/buf.h> needlessly. 2003-04-01 09:02:58 +00:00
pecoff Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bit 2003-09-25 01:10:26 +00:00
svr4 Add an additional field to the elf brandinfo structure to support 2003-12-23 02:42:39 +00:00