diff options
author | Gatis Paeglis <gatis.paeglis@theqtcompany.com> | 2015-02-24 14:31:36 +0100 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@theqtcompany.com> | 2015-04-16 10:36:23 +0300 |
commit | 615a3cbe7ac97c73556fd5194c06e901eccd16de (patch) | |
tree | 9e9918c3007ac1c2374505f51f78ab6e3a328ab4 /src/wifi/qwifimanager.cpp | |
parent | d598f850f9fad6a33dae622ce11a01b8585fe790 (diff) |
Fix signal calculation for WEXT-based drivers
This patch introduces a behavior change. Previously the
'SignalStrength' role was interpreted as dBm. This was working
fine for nl80211 based drivers, for WEXT-based drivers it
contained garbage values. Now the 'SignalStrength' role will
always be interpreted as percentage.
The wpa_supplicant passes back only the 'level' of the scanned
BSS, which with nl80211-based driver is almost always dBm (val < 0).
WEXT-based driver has its own interpretation of 'level' - it
can contain dBm, percentage [0-100] (and some other values for
historical reasons, but these are converted by the wpa_supplicant
to dBm). This is what I have concluded from looking at NetworkManager
and wpa_supplicant sources and git history. Even the official GUI tool
wpa_gui for the wpa_supplicant is out-of-date and can not be used as
a referance.
Change-Id: I70d15e26e0a1700ad0f7d19d23cbade2d3d46054
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
Diffstat (limited to 'src/wifi/qwifimanager.cpp')
-rw-r--r-- | src/wifi/qwifimanager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wifi/qwifimanager.cpp b/src/wifi/qwifimanager.cpp index 7585cf2..2a5cfff 100644 --- a/src/wifi/qwifimanager.cpp +++ b/src/wifi/qwifimanager.cpp @@ -212,11 +212,11 @@ void QWifiManagerPrivate::updateLastError(const QString &error) \value SSID informal (human) name of a Wifi network (QString) \value BSSID basic service set identification of a network, used to uniquely identify BSS (QString) - \value SignalStrength strength of a Wifi signal, measured in dBm (int) - \value WPASupported holds whether network access point supports WPA security protocol (QString) - \value WPA2Supported holds whether network access point supports WPA2 security protocol (QString) - \value WEPSupported holds whether network access point supports WEP security protocol (QString) - \value WPSSupported holds whether network access point supports WPS security protocol (QString) + \value SignalStrength strength of a Wifi signal represented as percentage (0-100) (int) + \value WPASupported holds whether network access point supports WPA security protocol (bool) + \value WPA2Supported holds whether network access point supports WPA2 security protocol (bool) + \value WEPSupported holds whether network access point supports WEP security protocol (bool) + \value WPSSupported holds whether network access point supports WPS security protocol (bool) */ QWifiManager* QWifiManager::m_instance = 0; |