mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
vrp - 'unknown (huawei)' state and change hwWlanRadioFreqType to hwWlanRadioType (#15564)
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user