Fix 5GHz AP bad channel dropdown

This commit is contained in:
Tim Wilkinson 2022-06-07 21:31:51 -07:00 committed by Joe AE6XE
parent 6aff2636c0
commit 40fb320290
1 changed files with 5 additions and 7 deletions

View File

@ -1196,14 +1196,13 @@ end
html.print("<tr><td colspan=2><hr></hr></td></tr>") html.print("<tr><td colspan=2><hr></hr></td></tr>")
-- $M39model = `/usr/local/bin/get_model | grep -e "M[39]"`; local M39model = aredn.hardware.get_board_id():match("M[39]")
local M39model
if (phycount > 1 and (wifi_enable ~= "1" or wifi3_enable ~= "1")) or (phycount == 1 and wifi_enable ~= "1" and wifi3_enable ~= "1") and not M39model then if (phycount > 1 and (wifi_enable ~= "1" or wifi3_enable ~= "1")) or (phycount == 1 and wifi_enable ~= "1" and wifi3_enable ~= "1") and not M39model then
-- lan ap shows as an option -- lan ap shows as an option
-- determine hardware options and set band ahd channels accordingly -- determine hardware options and set band ahd channels accordingly
if phycount == 1 then if phycount == 1 then
-- rc3 = -- system("iw phy phy0 info | grep -q '5180 MHz' > /dev/null"); local rc3 = os.execute("iw phy phy0 info | grep -q '5180 MHz' > /dev/null")
if rc3 ~= "" then if rc3 ~= 0 then
wifi2_hwmode = "11g" wifi2_hwmode = "11g"
if wifi2_channel > 14 then if wifi2_channel > 14 then
wifi2_channel = 1 wifi2_channel = 1
@ -1313,9 +1312,8 @@ if (phycount > 1 and (wifi_enable ~= "1" or wifi2_enable ~= "1")) or (phycount =
-- determine hardware options and set band accordingly -- determine hardware options and set band accordingly
if phycount == 1 then if phycount == 1 then
-- $rc3 = system("iw phy phy0 info | grep -q '5180 MHz' > /dev/null"); local rc3 = os.execute("iw phy phy0 info | grep -q '5180 MHz' > /dev/null")
local rc3 if rc3 ~= 0 then
if rc3 ~= "" then
wifi3_hwmode = "11g" wifi3_hwmode = "11g"
else else
wifi3_hwmode = "11a" wifi3_hwmode = "11a"