if_ural.c in FreeBSD 7-current

Sepherosa Ziehau sepherosa at gmail.com
Mon Jul 16 02:12:39 UTC 2007


On 7/16/07, Hans Petter Selasky <hselasky at c2i.net> wrote:
> Hi,
>
> Can someone answer me quick on this one:
>
> In FreeBSD 7-current, I think I see some mistakes in "if_ural.c".
>
> For example:
>
> > #define URAL_RSSI(rssi)                                       \
> >       ((rssi) > (RAL_NOISE_FLOOR + RAL_RSSI_CORR) ?   \
> >        ((rssi) - RAL_NOISE_FLOOR + RAL_RSSI_CORR) : 0)
>
>
> Should there be a parenthesis here ??

Ah, yes, you are correct.  My fault.

>
> > #define URAL_RSSI(rssi)                                       \
> >       ((rssi) > (RAL_NOISE_FLOOR + RAL_RSSI_CORR) ?   \
> >        ((rssi) - (RAL_NOISE_FLOOR + RAL_RSSI_CORR)) : 0)
>
> Also I see that the basic rate set is set multiple times:
>
> By "set_chan" and when the RUN state is entered! This does not make sense!

This does make sense:
1) It is actually "ack rate set", as according to Ralink's sample driver.
2) Even if it is "basic rate set", the value is not necessarily the
same when probing BSS or when joining a BSS.  The BSS that the STA has
joined (before ->RUN) may have different basic rate set than STA used
to do BSS probing.

Best Regards,
sephe

-- 
Live Free or Die


More information about the freebsd-usb mailing list