wifi: fix scanned signal strength calculation for WEXT-based drivers

The new wpa_supplicant D-Bus interface only passes back the 'level'
of the scanned BSS, which with nl80211 drivers is almost always dBm,
which NM handled fine.  But WEXT-based drivers (ipw2x00, other older
ones, and some vendor drivers) use a mix of values for the 'level'
parameter, including the old WEXT 8-bit signed-value-in-unsigned-int
scheme.  Handle that.

Alternatively, we could have the supplicant expose the 'flags' value
from its internal BSS list over the bus.
This commit is contained in:
Dan Williams
2011-03-13 12:50:40 -05:00
parent 0e348bad2a
commit 32dedf4b83
4 changed files with 83 additions and 10 deletions

View File

@@ -39,5 +39,7 @@ gboolean nm_ap_utils_complete_connection (const GByteArray *ssid,
gboolean lock_bssid,
GError **error);
guint32 nm_ap_utils_level_to_quality (gint val);
#endif /* NM_WIFI_AP_UTILS_H */