From 0541234e1eff7141cd5611ca1ebdf40124fa5348 Mon Sep 17 00:00:00 2001 From: Conrad Lara - KG6JEI Date: Sat, 19 Apr 2014 23:51:55 -0700 Subject: [PATCH] Assign 2.4ghz devices to 2400 band. Fixup bug in channel mapping (leading 0 in channel number doesn't work) ref BBHN->ticket:29 --- files/www/cgi-bin/channelmaps.pm | 5 ++++- files/www/cgi-bin/perlfunc.pm | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/files/www/cgi-bin/channelmaps.pm b/files/www/cgi-bin/channelmaps.pm index 697c5410..ae55646b 100644 --- a/files/www/cgi-bin/channelmaps.pm +++ b/files/www/cgi-bin/channelmaps.pm @@ -128,7 +128,10 @@ sub rf_channels_list foreach (`iwlist wlan0 channel` ) { next unless /([0-9]+) : ([0-9]+.[0-9]+)/; - $channels->{$1} = "$2 GHZ" ; + my $channelnum = $1; + my $channelfreq = $2; + $channelnum =~s/^0+//g; + $channels->{$channelnum} = "$channelfreq GHZ" ; } return $channels; } diff --git a/files/www/cgi-bin/perlfunc.pm b/files/www/cgi-bin/perlfunc.pm index 26d64326..4f91ee02 100644 --- a/files/www/cgi-bin/perlfunc.pm +++ b/files/www/cgi-bin/perlfunc.pm @@ -898,6 +898,7 @@ sub hardware_info 'antennas' => { 1 => 'Antenna' }, 'defaultant' => 1, 'usechains' => 0, + 'rfband' => '2400', }, '0xc3a2' => { 'name' => 'PicoStation2 HP', @@ -908,6 +909,7 @@ sub hardware_info 'antennas' => { 1 => 'Antenna' }, 'defaultant' => 1, 'usechains' => 0, + 'rfband' => '2400', }, '0xe012' => { 'name' => 'NanoStation M2', @@ -918,6 +920,7 @@ sub hardware_info 'antennas' => { 1 => "Horizontal", 2 => "Vertical", 3 => "Diversity" }, 'defaultant' => 3, 'usechains' => 1, + 'rfband' => '2400', }, '0xe0a2' => { 'name' => 'NanoStation Loco M2', @@ -928,6 +931,7 @@ sub hardware_info 'antennas' => { 1 => "Horizontal", 2 => "Vertical", 3 => "Diversity" }, 'defaultant' => 3, 'usechains' => 1, + 'rfband' => '2400', }, '0xe1b2' => { 'name' => 'Rocket M2', @@ -938,6 +942,7 @@ sub hardware_info 'antennas' => { 1 => "Chain0", 2 => "Chain1", 3 => "Diversity"}, 'defaultant' => 3, 'usechains' => 1, + 'rfband' => '2400', }, '0xe1b5' => { 'name' => 'Rocket M5', @@ -959,6 +964,7 @@ sub hardware_info 'antennas' => { 1 => 'N Connector' }, 'defaultant' => 1, 'usechains' => 0, + 'rfband' => '2400', }, '0xe205' => { 'name' => 'Bullet M5', @@ -991,6 +997,7 @@ sub hardware_info 'antennas' => { 1 => "Horizontal", 2 => "Vertical", 3 => "Diversity"}, 'defaultant' => 3, 'usechains' => 1, + 'rfband' => '2400', }, '0xe242' => { 'name' => 'airGrid M2 HP', @@ -1001,6 +1008,7 @@ sub hardware_info 'antennas' => { 1 => 'airGrid' }, 'defaultant' => 1, 'usechains' => 0, + 'rfband' => '2400', }, '0xe243' => { 'name' => 'NannoBridge M3', @@ -1011,6 +1019,7 @@ sub hardware_info 'antennas' => { 1 => "Chain0", 2 => "Chain1", 3 => "Diversity"}, 'defaultant' => 3, 'usechains' => 1, + 'rfband' => '2400', }, '0xe252' => { 'name' => 'airGrid M2 HP', @@ -1021,6 +1030,7 @@ sub hardware_info 'antennas' => { 1 => 'airGrid' }, 'defaultant' => 1, 'usechains' => 0, + 'rfband' => '2400', }, '0xe255' => { 'name' => 'airGrid M5 HP', @@ -1053,6 +1063,7 @@ sub hardware_info 'antennas' => { 1 => "Horizontal", 2 => "Vertical", 3 => "Diversity"}, 'defaultant' => 3, 'usechains' => 1, + 'rfband' => '2400', }, '0xe2d2' => { 'name' => 'Bullet M2 Titanium HP', @@ -1063,6 +1074,7 @@ sub hardware_info 'antennas' => { 1 => 'N Connector' }, 'defaultant' => 1, 'usechains' => 0, + 'rfband' => '2400', }, '0xe2d5' => { 'name' => 'Bullet M5 Titanium', @@ -1084,6 +1096,7 @@ sub hardware_info 'antennas' => { 1 => 'Antenna' }, 'defaultant' => 1, 'usechains' => 0, + 'rfband' => '2400', }, '0xe4e5' => { 'name' => 'NannoBeam M5 International',