1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Added selectable channels for wireless mode AC

This commit is contained in:
billz 2019-12-26 06:18:22 +00:00
parent 597f2ebdb9
commit 05772a5ff2

View File

@ -55,8 +55,13 @@
$selectedHwMode = 'n'; $selectedHwMode = 'n';
} }
} }
if (isset($arrConfig['ieee80211ac'])) {
if (strval($arrConfig['ieee80211ac']) === '1') {
$selectedHwMode = 'ac';
}
}
SelectorOptions('hw_mode', $arr80211Standard, $selectedHwMode, 'cbxhwmode'); ?> SelectorOptions('hw_mode', $arr80211Standard, $selectedHwMode, 'cbxhwmode', 'loadChannelSelect'); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -68,18 +73,23 @@
'HT', 'HN', 'JM', 'MX', 'NI', 'PA', 'KN', 'LC', 'VC', 'TT', 'HT', 'HN', 'JM', 'MX', 'NI', 'PA', 'KN', 'LC', 'VC', 'TT',
'US', 'CA', 'UZ', 'CO'); 'US', 'CA', 'UZ', 'CO');
$countries_2_4Ghz_max14ch = array('JP'); $countries_2_4Ghz_max14ch = array('JP');
$countries_5Ghz_max48ch = array('US');
if (in_array($arrConfig['country_code'], $countries_max11channels)) { if (in_array($arrConfig['country_code'], $countries_max11channels)) {
// In North America till channel 11 is the maximum allowed wi-fi 2.4Ghz channel. // In North America up to channel 11 is the maximum allowed wi-fi 2.4Ghz channel.
// Except for the US that allows channel 12 & 13 in low power mode with additional restrictions. // Except for the US that allows channel 12 & 13 in low power mode with additional restrictions.
// Canada that allows channel 12 in low power mode. Because it's unsure if low powered mode // Canada that allows channel 12 in low power mode. Because it's unsure if low powered mode
// can be supported the channels are not selectable for those countries. // can be supported the channels are not selectable for those countries.
// source: https://en.wikipedia.org/wiki/List_of_WLAN_channels#Interference_concerns // source: https://en.wikipedia.org/wiki/List_of_WLAN_channels#Interference_concerns
// Also Uzbekistan and Colombia allow to select till channel 11 as maximum channel on the 2.4Ghz wi-fi band. // Also Uzbekistan and Colombia allow up to channel 11 as maximum channel on the 2.4Ghz wi-fi band.
$selectablechannels = range(1, 11); $selectablechannels = range(1, 11);
} elseif (in_array($arrConfig['country_code'], $countries_2_4Ghz_max14ch)) { } elseif (in_array($arrConfig['country_code'], $countries_2_4Ghz_max14ch)) {
if ($arrConfig['hw_mode'] === 'b') { if ($arrConfig['hw_mode'] === 'b') {
$selectablechannels = range(1, 14); $selectablechannels = range(1, 14);
} }
} elseif (in_array($arrConfig['country_code'], $countries_5Ghz_max48ch)) {
if ($selectedHwMode === 'ac') {
$selectablechannels = array(36, 40, 44, 48);
}
} }
SelectorOptions('channel', $selectablechannels, intval($arrConfig['channel']), 'cbxchannel'); ?> SelectorOptions('channel', $selectablechannels, intval($arrConfig['channel']), 'cbxchannel'); ?>
</div> </div>