From 0751fc7ba4cc288bbc1c719317a34ce4a878ff7c Mon Sep 17 00:00:00 2001 From: billz Date: Sun, 5 Nov 2023 20:28:58 +0000 Subject: [PATCH] Amend allowed frequencies condition for < 5500 MHz --- src/RaspAP/Parsers/IwParser.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/RaspAP/Parsers/IwParser.php b/src/RaspAP/Parsers/IwParser.php index db99a182..a73a8f38 100644 --- a/src/RaspAP/Parsers/IwParser.php +++ b/src/RaspAP/Parsers/IwParser.php @@ -60,12 +60,13 @@ class IwParser $allowed = [100, 108, 116, 124, 132, 140, 149, 157, 184, 192]; foreach ($matches as $match) { - if ( (int)$match[1] >= 5500 && in_array((int)$match[2],$allowed) ) { - $frequency = [ - 'MHz' => (int)$match[1], - 'Channel' => (int)$match[2], - 'dBm' => (float)$match[3], - ]; + $frequency = [ + 'MHz' => (int)$match[1], + 'Channel' => (int)$match[2], + 'dBm' => (float)$match[3], + ]; + if ( ($frequency['MHz'] >= 5500 && in_array($frequency['Channel'], $allowed)) + || $frequency['MHz'] < 5500 ) { $supportedFrequencies[] = $frequency; } }