X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fwlanap.cgi;h=72c9a129828fb845ddc654313854b57d85b3489c;hp=5b2490da06c036ee7e430538e09dd11c38e43fc4;hb=d823d5f07211e984489027d57c49ae16db66c7f2;hpb=296a73a5326636a53c642dcd046b03fcff221835 diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi index 5b2490da06..72c9a12982 100644 --- a/html/cgi-bin/wlanap.cgi +++ b/html/cgi-bin/wlanap.cgi @@ -65,14 +65,16 @@ $wlanapsettings{'SSID'} = 'IPFire'; $wlanapsettings{'HIDESSID'} = 'off'; $wlanapsettings{'ENC'} = 'wpa2'; # none / wpa1 /wpa2 $wlanapsettings{'TXPOWER'} = 'auto'; -$wlanapsettings{'CHANNEL'} = '05'; +$wlanapsettings{'CHANNEL'} = '6'; $wlanapsettings{'COUNTRY'} = '00'; $wlanapsettings{'HW_MODE'} = 'g'; $wlanapsettings{'PWD'} = 'IPFire-2.x'; $wlanapsettings{'SYSLOGLEVEL'} = '0'; $wlanapsettings{'DEBUG'} = '4'; -$wlanapsettings{'DRIVER'} = 'MADWIFI'; +$wlanapsettings{'DRIVER'} = 'NL80211'; $wlanapsettings{'HTCAPS'} = ''; +$wlanapsettings{'VHTCAPS'} = ''; +$wlanapsettings{'NOSCAN'} = 'off'; &General::readhash("/var/ipfire/wlanap/settings", \%wlanapsettings); &Header::getcgihash(\%wlanapsettings); @@ -154,7 +156,7 @@ if ( $wlanapsettings{'ACTION'} eq "$Lang::tr{'save'}" ){ $memory=0; } -&Header::openpage('', 1, '', ''); +&Header::openpage($Lang::tr{'wlanap configuration'}, 1, '', ''); &Header::openbigbox('100%', 'left', '', $errormessage); if ( $errormessage ){ @@ -246,6 +248,10 @@ $checked{'HIDESSID'}{'off'} = ''; $checked{'HIDESSID'}{'on'} = ''; $checked{'HIDESSID'}{$wlanapsettings{'HIDESSID'}} = "checked='checked'"; +$checked{'NOSCAN'}{'off'} = ''; +$checked{'NOSCAN'}{'on'} = ''; +$checked{'NOSCAN'}{$wlanapsettings{'NOSCAN'}} = "checked='checked'"; + $selected{'ENC'}{$wlanapsettings{'ENC'}} = "selected='selected'"; $selected{'CHANNEL'}{$wlanapsettings{'CHANNEL'}} = "selected='selected'"; $selected{'COUNTRY'}{$wlanapsettings{'COUNTRY'}} = "selected='selected'"; @@ -265,14 +271,14 @@ if ( $wlanapsettings{'DRIVER'} eq 'NL80211' ){ my $wiphy = `iw dev $wlanapsettings{'INTERFACE'} info | grep wiphy | cut -d" " -f2`; chomp $wiphy; -@channellist_cmd = `iw phy phy$wiphy info | grep " MHz \\\[" | grep -v "(disabled)" | grep -v "no IBSS)" 2>/dev/null`; +@channellist_cmd = `iw phy phy$wiphy info | grep " MHz \\\[" | grep -v "(disabled)" | grep -v "no IBSS" | grep -v "no IR" | grep -v "passive scanning" 2>/dev/null`; # get available channels my @temp; foreach (@channellist_cmd){ $_ =~ /(.*) \[(\d+)(.*)\]/; $channel = $2;chomp $channel; -if ( $channel =~ /\d+/ ){push(@temp,$channel);} +if ( $channel =~ /\d+/ ){push(@temp,$channel + 0);} } @channellist = @temp; } else { @@ -283,7 +289,7 @@ my @temp; foreach (@channellist_cmd){ $_ =~ /(.*)Channel (\d+)(.*):/; $channel = $2;chomp $channel; -if ( $channel =~ /\d+/ ){push(@temp,$channel);} +if ( $channel =~ /\d+/ ){push(@temp,$channel + 0);} } @channellist = @temp; } @@ -291,7 +297,7 @@ if ( $channel =~ /\d+/ ){push(@temp,$channel);} my @countrylist_cmd = `regdbdump /usr/lib/crda/regulatory.bin 2>/dev/null`; # get available country codes -my @temp; +my @temp = "00"; foreach (@countrylist_cmd){ $_ =~ /country (.*):/; $country = $1;chomp $country; @@ -306,15 +312,6 @@ if ( $wlanapsettings{'DRIVER'} eq 'NL80211' ){ } # get available power -my @temp; -foreach (@txpower_cmd){ -$_ =~ /(\s)(\d+)(\s)dBm(\s)(.*)(\W)(\d+)(.*)/; -$txpower = $7;chomp $txpower; -if ( $txpower =~ /\d+/ ){push(@temp,$txpower."mW");} -} -my @txpower = @temp; -push(@txpower,"auto"); - $selected{'SYSLOGLEVEL'}{$wlanapsettings{'SYSLOGLEVEL'}} = "selected='selected'"; $selected{'DEBUG'}{$wlanapsettings{'DEBUG'}} = "selected='selected'"; @@ -332,7 +329,7 @@ if ( $wlan_card_status ne '' ){ print "$Lang::tr{'wlanap wlan card'} ($wlanapsettings{'DRIVER'})"; print $wlan_card_status eq 'up' ? $status_started : $status_stopped; print""; - print "$Lang::tr{'wlanap access point'}"; + print "$Lang::tr{'wlanap'}"; print $wlan_ap_status eq 'up' ? $status_started : $status_stopped; if ( ($memory != 0) && (@pid[0] ne "///") ){ print "@pid[0]"; @@ -398,6 +395,7 @@ print<802.11g + END @@ -422,6 +420,7 @@ END ; } print<$Lang::tr{'wlanap neighbor scan'}: on | off$Lang::tr{'wlanap neighbor scan warning'}
$Lang::tr{'wlanap encryption'}:  -Tx Power:  -END -; - -if ( $wlanapsettings{'DRIVER'} eq 'MADWIFI' ){ - print ""; -} else { - print "" -} -print <VHT Caps:  +Tx Power:  Loglevel (hostapd):