[PATCH] Add 'signal_poll' command interface
Mon Apr 11 12:46:56 PDT 2011
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 ;-).
Jouni Malinen PGP id EFC895FA
More information about the Hostap