mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
support for 5GHz channels
This commit is contained in:
parent
75f6d53555
commit
ff36dbb3b4
@ -138,8 +138,16 @@ function ParseConfig( $arrConfig ) {
|
|||||||
* @return $channel
|
* @return $channel
|
||||||
*/
|
*/
|
||||||
function ConvertToChannel( $freq ) {
|
function ConvertToChannel( $freq ) {
|
||||||
$channel = ($freq - 2407)/5;
|
if ($freq >= 2412 && $freq <= 2484) {
|
||||||
if ($channel > 0 && $channel < 14) {
|
$channel = ($freq - 2407)/5;
|
||||||
|
} elseif ($freq >= 4915 && $freq <= 4980) {
|
||||||
|
$channel = ($freq - 4910)/5 + 182;
|
||||||
|
} elseif ($freq >= 5035 && $freq <= 5865) {
|
||||||
|
$channel = ($freq - 5030)/5 + 6;
|
||||||
|
} else {
|
||||||
|
$channel = -1;
|
||||||
|
}
|
||||||
|
if ($channel >= 1 && $channel <= 196) {
|
||||||
return $channel;
|
return $channel;
|
||||||
} else {
|
} else {
|
||||||
return 'Invalid Channel';
|
return 'Invalid Channel';
|
||||||
|
Loading…
Reference in New Issue
Block a user