Bap0 and bap1 offsets

Lucas Cornelisse lcornelisse at simmic.com
Thu May 29 12:54:07 EDT 2003


>On 28 May 2003 22:00, Lucas Cornelisse wrote:
>> Hi,
>>
>> I have a question regarding the buffer allocation/ bap0/1
>> technique..
>>
>> So to transmit, one would write a fid to the bap select0 register,
>> and an offset to the offset0 register.
>>
>> I'm not sure what the offset is for. What do i put here?
>>
>> The prism documentation seems a little vague on this..

> Dunno. Can you mail docs to me? ;)
>Any mail volume is ok, or maybe just URLs.
>Thanks.
>--
>vda

Hi,

I can't send you the docs, i only have a paper copy, and there are nda
issues too..

what I can tell you is that i figured it out..
(and i can tell you this because i figured it out reading the bsd hostap
code, not the intersil document)

You write the fid to the bap0 select0 register, and the offset is simply how
far into the allocated memory you'd like to write...

it seems they do this because they represent the allocated memory as chunks
of 128byte blocks in a linked list.. so you can't just have a pointer to
it..

so they have these baps that you tell "where" you want to write, then you
write all your data to a data register..


i.e.

if i wanted to write 50 ones, 200 zeros and 250 more ones, i could do this:

allocate 500 bytes, and get back a fid.

put the fid in bap0-select0

put a 0 in bap0 offset

write 500 ones to bap0's data register (i'm not sure how it knows when a
write is done, but you do it a word at a time)

then write a 51 to the offset register, which makes the data register go
back to byte 51,

then write 200 zeros to the data register...

obviously this would never be done, but it may help illustrate the use..


../lucas

--
Lucas Cornelisse

Software Developer
Simmic.Net Inc.
lcornelisse at simmic.com
(613) 599-9108 x232



More information about the HostAP mailing list