bugfix: Channel detection for untested devices.

This commit is contained in:
Conrad Lara - KG6JEI 2014-05-09 22:40:11 -07:00
parent b72ffed3cc
commit 62721ea9fa
1 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ sub is_channel_valid
# We don't have the device band in the data file so lets fall back to checking manually
else {
my $channelok=0;
foreach (`iwinfo wlan0 channels`)
foreach (`iwinfo wlan0 freqlist`)
{
next unless /Channel $channel/;
next if /\[restricted\]/;
@ -128,7 +128,7 @@ sub rf_channels_list
my %channels = ();
foreach (`iwinfo wlan0 freqlist` )
{
next unless /([0-9]+.[0-9]+) Ghz \(Channel ([0-9]+)\)/;
next unless /([0-9]+.[0-9]+) GHz \(Channel ([0-9]+)\)/;
next if /\[restricted\]/;
my $channelnum = $2;
my $channelfreq = $1;