svn commit: r269127 - head/sys/dev/usb/wlan

Adrian Chadd adrian at freebsd.org
Mon Jul 28 21:18:27 UTC 2014


On 28 July 2014 14:05, Hans Petter Selasky <hps at selasky.org> wrote:
> On 07/28/14 22:52, Adrian Chadd wrote:
>>
>> The whole rate control thing from net80211 has to be upgraded. Drivers
>> shouldn't be using ni->ni_txrate for anything other than informational
>> purposes, yet .. well, that's not the case.
>
>
> Hi,
>
> Should the rate be extracted from the NET80211 header instead, and if yes,
> how?

It's a little more complicated than that.

The problem is that in an SMP world, ni_txrate can change at any point
due to decisions made in other threads.

So for control lookups, it can't just be some thing in the struct, it
has to be something serialised behind locks. Ideally the ratectl API
stuff will be extended to return a list of rates to use and _that_
function can do the sanity checking and locking and such.

It's just unfortunate that the ni_txrate stuff was used in a lot of
wifi drivers. :(



-a


More information about the svn-src-head mailing list