vrp - 'unknown (huawei)' state and change hwWlanRadioFreqType to hwWlanRadioType (#15564)

This commit is contained in:
PipoCanaja
2023-11-11 20:19:42 +01:00
committed by GitHub
parent 678213fa15
commit f59388d7f9

View File

@@ -133,7 +133,7 @@ class Vrp extends OS implements
'hwWlanRadioChUtilizationRate', 'hwWlanRadioChUtilizationRate',
'hwWlanRadioChInterferenceRate', 'hwWlanRadioChInterferenceRate',
'hwWlanRadioActualEIRP', 'hwWlanRadioActualEIRP',
'hwWlanRadioFreqType', 'hwWlanRadioType',
'hwWlanRadioWorkingChannel', 'hwWlanRadioWorkingChannel',
]; ];
@@ -182,16 +182,32 @@ class Vrp extends OS implements
$interference = $radio['hwWlanRadioChInterferenceRate'] ?? 0; $interference = $radio['hwWlanRadioChInterferenceRate'] ?? 0;
$radioutil = $radio['hwWlanRadioChUtilizationRate'] ?? 0; $radioutil = $radio['hwWlanRadioChUtilizationRate'] ?? 0;
$numasoclients = $clientPerRadio[$ap_id][$r_id] ?? 0; $numasoclients = $clientPerRadio[$ap_id][$r_id] ?? 0;
$radio['hwWlanRadioType'] = $radio['hwWlanRadioType'] ?? 0;
switch ($radio['hwWlanRadioFreqType'] ?? null) { $type = 'dot11';
case 1:
$type = '2.4Ghz'; if ($radio['hwWlanRadioType'] & 2) {
break; $type .= 'a';
case 2: }
$type = '5Ghz';
break; if ($radio['hwWlanRadioType'] & 1) {
default: $type .= 'b';
$type = 'unknown (huawei ' . ($radio['hwWlanRadioFreqType'] ?? null) . ')'; }
if ($radio['hwWlanRadioType'] & 4) {
$type .= 'g';
}
if ($radio['hwWlanRadioType'] & 8) {
$type .= 'n';
}
if ($radio['hwWlanRadioType'] & 16) {
$type .= '_ac';
}
if ($radio['hwWlanRadioType'] & 32) {
$type .= '_ax';
} }
// TODO // TODO