[PATCH] Add 'signal_poll' command interface
Dmitry Shmidt
dimitrysh
Mon Apr 11 14:42:01 PDT 2011
On Mon, Apr 11, 2011 at 12:46 PM, Jouni Malinen <j at w1.fi> wrote:
> On Fri, Apr 08, 2011 at 10:36:39AM -0700, Dmitry Shmidt wrote:
>> +static int wpa_supplicant_signal_poll(struct wpa_supplicant *wpa_s, char *buf,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? size_t buflen)
>
>> + ? ? ret = wpa_drv_signal_poll(wpa_s, &si);
>> + ? ? if (!ret)
>> + ? ? ? ? ? ? ret = os_snprintf(buf, buflen, "RSSI=%d\nLINKSPEED=%d\n"
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "NOISE=%d\nFREQUENCY=%u\nTHRESHOLD=%d\n",
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? si.current_signal, si.current_txrate / 1000,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? si.current_noise, si.frequency,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? si.above_threshold);
>
> Is the above_threshold value going to be filled by some drivers?
> driver_nl80211.c (the only one implementing signal_poll currently) fills
> it only for events. I guess it would be possible to store the value from
> the last event internally in driver_nl80211.c and then fill it in here
> if that piece of information is considered useful.
>
> As far as the field names are concerned, RSSI may be somewhat confusing
> since this is a signed 8-bit value in dBm at least as far as nl80211 is
> concerned. The THRESHOLD name is even more confusing ;-).
>
This field is returned from the call, so I printed it as well. It it
is not supported, let's remove it.
> --
> Jouni Malinen ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
More information about the Hostap
mailing list