I hoped to split my work in smaller chunks, but
new pf tarballs are appearing infrequently lately.
I guess you are on vacation. I think that I have to
submit my work now, or else patch would grow
to unmaintainable size.
This is a large patch on top on my previous trivial one.
It mostly finalizes tx rate code.
Theory of operation:
Every tx packet is sent according to peer capabilities.
Probes, auth/assoc requests etc are send to 'default peer',
whose capabilities are simply those we set with
iwconfig rate/iwpriv SetRates, iwpriv SetSPreamble, etc.
When we know that we send packets to specific peer,
say, to our AP, we use it's 'struct peer' to determine
allowed tx rates (which can be a *subset* of rates
allowed for 'default peer'), shortpre, etc.
Currently code knows only defpeer and ap_peer, but this
will be changed when hostap mode will be implemented.
We will need one peer struct per peer.
Within each peer struct, basic rates are used for
mgmt packets and oper rates for data.
Patch will now make driver emit assoc requests with
rate information consistent with one set by iwpriv SetRates.
As a result, I was able to associate with prism54 AP
in pure 11g mode (using only OFDM rates).
Patch also contains better auto tx rate support
which keeps track which peer struct, basic or oper rates
were used, and updates corresponding txrate_info struct.
Debug printks were updated to have rx: and tx: prefixes
for rx-related and tx-related messages.
Minor cleanups elsewhere.
Unfortunately, short preamble seem to not work, reasons
aren't known at the moment.
Due to patch size, I'd say that it's breakage potential
is medium-high. Please test and report problems.