wpa_supplicant signal levels

David A Benjamin davidben
Tue Jul 6 20:29:47 PDT 2010


Hi,

So, I was looking through my wireless logs to try to diagnose 
wpa_supplicant's excessive roaming in some areas, and I noticed that it 
seems to think that my signal level is something in the 200s range. 
Specifically, my daemon.log has lines like

Jun  6 16:29:36 rupert wpa_supplicant[18945]: Current BSS: 00:0d:97:11:40:d6 level=190
Jun  6 16:29:36 rupert wpa_supplicant[18945]: Selected BSS: 00:0d:97:11:50:09 level=192

Judging from output from other tools (iwlist) and the min_diff block at 
the end of wpa_supplicant_need_to_roam, it seems these values should 
actually be negative. Specifically, if one treats that number as a signed 
char instead of unsigned, everything matches up.

To be honest, I've little to no understanding of wireless, but looking at 
the source code for wireless-tools (iw_print_stats in iwlib.c), it seems 
that the fields of the iw_quality struct need to be decoded differently 
depending on various flags. I guess src/drivers/driver_wext.c should have 
similar logic in wext_get_scan_qual.

I wrote a patch that attempts to replicate some of that logic, although it 
may be more complicated than is necessary; I think some of the complexity 
is for backwards-compatibility, which might not be necessary depending on 
wpa_supplicant's dependencies? In any case, it is attached. Again, I don't 
know how any of this works, so it's likely the patch is a bit off. But I 
think at least the logic to determine min_diff in 
wpa_supplicant_need_to_roam would be more accurate if level were 
determined correctly.

David Benjamin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adjust-levels.diff
Type: text/x-diff
Size: 1885 bytes
Desc: 
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20100706/70fff1e4/attachment.diff 



More information about the Hostap mailing list