mirror of https://github.com/aredn/aredn.git
Tolerate missing frequency list (#907)
This commit is contained in:
parent
ef17d9bcd1
commit
f3af8eee30
|
@ -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 chan0 = aredn.hardware.get_rfchannels("wlan0")
|
||||||
local chan1 = aredn.hardware.get_rfchannels("wlan1")
|
local chan1 = aredn.hardware.get_rfchannels("wlan1")
|
||||||
if wifi2_hwmode == "11a" then
|
if wifi2_hwmode == "11a" then
|
||||||
if chan0[1].frequency > 3000 then
|
if #chan0 >= 1 and chan0[1].frequency > 3000 then
|
||||||
chan = chan0
|
chan = chan0
|
||||||
else
|
else
|
||||||
chan = chan1
|
chan = chan1
|
||||||
|
@ -1275,7 +1275,7 @@ if APokay and ((phycount > 1 and (wifi_enable ~= "1" or wifi3_enable ~= "1")) or
|
||||||
wifi2_channel = 36
|
wifi2_channel = 36
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if chan0[1].frequency < 3000 then
|
if #chan0 >= 1 and chan0[1].frequency < 3000 then
|
||||||
chan = chan0
|
chan = chan0
|
||||||
else
|
else
|
||||||
chan = chan1
|
chan = chan1
|
||||||
|
|
Loading…
Reference in New Issue