CVS-2-2 NMWirelessApplet.c patch



If nm_wireless_qual_to_percent returns 0 for scanned signal strength percentage, the NMApplet progress bar is empty and NMApplet icon/hover shows the link quality same as displayed by iwconfig as desired.

I modified the ipw2200 driver so that it returns positive values for max_qual->level and max_qual->noise. It was already set up to return a positive value for qual->level for each AP that is in range. I also modified nm_wireless_qual_to_percent so that it returns a positive percentage for scanned signal strength for AP's in range (discussed in an earlier message).

What I expected to see was the NMApplet progress bar showing me the scanned signal strength for all AP's in range and the NMApplet icon/hover showing me the link quality for the associated AP. Instead what I saw was both NMApplet progress bar and NMApplet hover frozen at the same initial scanned value.

I was able to obtained the desired behaviour by deleting one line in NMWirelessApplet.c.

I changed

/* Fall back to old strength if current strength is invalid */
           if (strength <= 0)
                       strength = applet->active_device->strength;
to

/* Display link quality for the active wireless device, not scanned signal strength */
           strength = applet->active_device->strength;

This is not really falling back to an old strength as the comment suggests. It is falling back to the link quality of the associated AP instead of the scanned signal strength for the associated AP. The function which this line is in is being used to update the NMApplet icon/hover.

--
Bill Moss
Professor, Mathematical Sciences
Clemson University




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]