CVS-2-2 ipw2200 NMApplet bar empty patch
- From: Bill Moss <bmoss clemson edu>
- To: networkmanager list <networkmanager-list gnome org>
- Subject: CVS-2-2 ipw2200 NMApplet bar empty patch
- Date: Fri, 04 Feb 2005 10:13:09 -0500
The function nm_wireless_qual_to_percent has a pointer to the max_qual
structure as its second argument. In the ipw2200 driver
max_qual->qual = 100;
max_qual->level = 0;
max_qual->noise=0;
I changed this to
max_qual->qual = 100;
max_qual->level = PERFECT_RSSI + 0x100;
max_qual->noise = WORST_RSSI + 0x100;
The second two values are biased dBm values. Each driver has its own way
to compute percentage from RSSI values. Formulas vary based on the units
RSSI is measure in. In some cases a lookup table is used. To get a rough
indicator of percentage signal level for use in the NMApplet bar, I
modified the
nm_wireless_qual_to_percent function as indicated below. Now the
NMApplet hover gives percentage values consistent with what I get from
iwconfig for the associated AP and the NMApplet bars show for each
scanned AP an approximate signal level. My percentage signal level
formula is a linear model which underestimates the signal level say in
comparison to the values that Windows XP reports. If a driver does not
set max_qual->level and max_qual->noise, the nm_wireless_qual_to_percent
function could make some guesses.
RSSI in dBm is measuring a real physical quantity power. Percentage
signal level is a man made device. I wonder what value it really has. If
you are doing a building site map say for 80211B, what you really want
to do is to find the 11Mbps areas, the 5.5Mpbs areas, the 2Mbps areas,
and the 1 Mbps areas. This type of information gives the user an
indication of throughput which is more useful than a percent. What the
heck does 80% mean in the wireless world across drivers -- next to nothing.
/* Try using the card's idea of the signal quality first as long as it
tells us what the max quality is */
if ((qual->qual != 0) && (max_qual->qual != 0) && !(max_qual->updated &
IW_QUAL_QUAL_INVALID) && !(qual->up
dated & IW_QUAL_QUAL_INVALID))
{
percent = (int)(100 * ((double)qual->qual /
(double)max_qual->qual));
}
else
{
if ((qual->level !=0) && (max_qual->level !=0) &&
(max_qual->noise !=0))
{
percent = (int)(100 - 70*(
((double)max_qual->level -
(double)qual->level) /
((double)max_qual->level -
(double)max_qual->noise)));
}
else if ((qual->level > max_qual->level) && (qual->noise
!= 0))
--
Bill Moss
Professor, Mathematical Sciences
Clemson University
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]