aboutsummaryrefslogtreecommitdiff
path: root/include/stdbool.h
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>2003-12-23 04:08:22 +0000
committerBill Paul <wpaul@FreeBSD.org>2003-12-23 04:08:22 +0000
commitee422a28d6f75d00cea42b32337df4b6e706c1ea (patch)
treebf9f1f3a9199c4028ebe0d1efac3fa602c1a337f /include/stdbool.h
parentd1d7ef3e2393989d7c8615f9b455d1ad95cd49c6 (diff)
downloadsrc-ee422a28d6f75d00cea42b32337df4b6e706c1ea.tar.gz
src-ee422a28d6f75d00cea42b32337df4b6e706c1ea.zip
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.
Notes
Notes: svn path=/head/; revision=123757
Diffstat (limited to 'include/stdbool.h')
0 files changed, 0 insertions, 0 deletions