From: Dan Lanciani <ddl-bawug@da...> - 2003-01-21 20:39:13
Daniel Kalchev <daniel@...> wrote:
|I have been toying with the BSD/OS Aironet driver. It has some quirks, that
|lead to the driver mangling it's data structures. Apparently, it doesn't
|properly control the transfer of records from/to the card - interrupts coming
|at the wrong time, are not blocked. :)
|Anyway, I came to wonder, why the 'convention' BAP usage:
|- in all *BSD drivers, BAP0 is used for writing transmit frames only, while
|BAP1 is used for reading received frames and reading/writing LTV records.
|- in the Linux driver, BAP0 is used for reading received frames, while BAP1 is
|used for writing transmit frames and reading/writing LTV records,
|Why not use the same BAP for reading/writing the same kind of data? For example BAP0 for reading/writing frames and BAP1 for reading/writing LTV records.
Usage of the BAPs is allocated not so much on the kind of data but on the
context of use. Since there is no way to save and restore the state of a
BAP during an interrupt (or during an ordinary subroutine call for that
matter) interleaved access to the card has to use different BAPs. One
typical strategy is to use one BAP from the mainline and a second from a
non-reentrant interrupt. I don't know whether interleaved access really
buys you much these days, but if you didn't do things this way you would
have to disable interrupts to make any given BAP usage (from address setting
through the full data transfer stage) atomic.
There is actually a third BAP available, but it has slightly different
semantics and is intended to allow an access point to fiddle with the
PSP bit masks and such. It is also used for flashing and otherwise
talking to the boot block monitor.
Get latest updates about Open Source Projects, Conferences and News.