diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-05-14 13:21:47 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-05-14 13:21:47 +0000 |
commit | 02ebd73327358617d2bb8d902a3d756641c978df (patch) | |
tree | 1c349ca1052a5657b35b76a72b1b6fde8df15ef8 /lib/network | |
parent | 59b3c09f140c70004a6f76ee80b40faf1088a553 (diff) | |
download | drakx-net-02ebd73327358617d2bb8d902a3d756641c978df.tar drakx-net-02ebd73327358617d2bb8d902a3d756641c978df.tar.gz drakx-net-02ebd73327358617d2bb8d902a3d756641c978df.tar.bz2 drakx-net-02ebd73327358617d2bb8d902a3d756641c978df.tar.xz drakx-net-02ebd73327358617d2bb8d902a3d756641c978df.zip |
use signal level if all reported qualities are 100% and if signal level is different
Diffstat (limited to 'lib/network')
-rw-r--r-- | lib/network/monitor.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/network/monitor.pm b/lib/network/monitor.pm index 6350cab..31bc8cc 100644 --- a/lib/network/monitor.pm +++ b/lib/network/monitor.pm @@ -89,9 +89,13 @@ sub list_wireless { /Extra:wpa_ie=|IE:.*WPA/ and $has_wpa = 1; /Authentication Suites \(\d+\) :.*\b802\.1x\b/ and $has_eap = 1; } + my $incorrect_quality = + (every { $_->{signal_strength} == 100 } values %networks) && + (any { $_->{signal_strength} != $_->{signal_level} } values %networks); foreach (values %networks) { my $level = delete $_->{signal_level}; $_->{signal_strength} ||= $level; + $_->{signal_strength} = $level if $incorrect_quality; } if ($current_ap && exists $networks{$current_ap}) { foreach (`/sbin/iwconfig $o_intf 2>/dev/null`) { |