bugfix: snr setting was setting SignalLevel instead of NoiseLevel

ref AREDN->ticket:129
This commit is contained in:
Conrad Lara - KG6JEI 2015-07-02 22:43:01 -07:00
parent 8975c46c67
commit 8eabf6ad00
1 changed files with 5 additions and 5 deletions

View File

@ -615,14 +615,14 @@ sub get_wifi_signal
$NoiseFloor=$1;
}
if ( $SignalLevel == "N/A" )
if ( $NoiseFloor == "N/A" )
{
open( my $SignalFH , "<" , "/sys/kernel/debug/ieee80211/phy0/ath9k/dump_nfcal") or return ("N/A","N/A");
while (<$SignalFH>) {
open( my $NoiseFH , "<" , "/sys/kernel/debug/ieee80211/phy0/ath9k/dump_nfcal") or return ("N/A","N/A");
while (<$NoiseFH>) {
next unless /Channel Noise Floor : ([-]?[0-9]+)/;
$SignalLevel=$1;
$NoiseFloor=$1;
}
close($SignalFH);
close($NoiseFH);
}
if ( $SignalLevel == "N/A" || $NoiseFloor == "N/A" )