Tolerate missing frequency list (#907)

This commit is contained in:
Tim Wilkinson 2023-07-21 13:59:15 -07:00 committed by GitHub
parent ef17d9bcd1
commit f3af8eee30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1266,7 +1266,7 @@ if APokay and ((phycount > 1 and (wifi_enable ~= "1" or wifi3_enable ~= "1")) or
local chan0 = aredn.hardware.get_rfchannels("wlan0")
local chan1 = aredn.hardware.get_rfchannels("wlan1")
if wifi2_hwmode == "11a" then
if chan0[1].frequency > 3000 then
if #chan0 >= 1 and chan0[1].frequency > 3000 then
chan = chan0
else
chan = chan1
@ -1275,7 +1275,7 @@ if APokay and ((phycount > 1 and (wifi_enable ~= "1" or wifi3_enable ~= "1")) or
wifi2_channel = 36
end
else
if chan0[1].frequency < 3000 then
if #chan0 >= 1 and chan0[1].frequency < 3000 then
chan = chan0
else
chan = chan1