diff --git a/files/www/cgi-bin/setup b/files/www/cgi-bin/setup index 115b22ff..4d844ef0 100755 --- a/files/www/cgi-bin/setup +++ b/files/www/cgi-bin/setup @@ -175,7 +175,6 @@ wan_gw = "" passwd1 = "" passwd2 = "" -local haswifi = aredn.hardware.has_wifi() local wifiintf = aredn.hardware.get_iface_name("wifi") local phy = iwinfo.nl80211.phyname(wifiintf) local phycount = tonumber(capture("ls -1d /sys/class/ieee80211/* | wc -l"):chomp()) @@ -523,7 +522,8 @@ if parms.button_save then end if wifiintf:match("^br") then - wifiintf = "wlan0" + wifiintf = aredn.hardware.get_board_network_ifname("wifi") + phy = iwinfo.nl80211.phyname(wifiintf) end local valid = false for _, c in ipairs(aredn.hardware.get_rfchannels(wifiintf)) @@ -1036,7 +1036,7 @@ html.print([[ ]]) -- reset wifi channel/bandwidth to default -if haswifi and (nixio.fs.stat("/etc/config/unconfigured") or parms.button_reset) then +if phycount > 0 and (nixio.fs.stat("/etc/config/unconfigured") or parms.button_reset) then local defaultwifi = aredn.hardware.get_default_channel(wifiintf) wifi_channel = defaultwifi.channel wifi_chanbw = tostring(defaultwifi.bandwidth) @@ -1044,7 +1044,7 @@ end -- mesh rf settings html.print("") -if haswifi then +if phycount > 0 then html.print("") else html.print("") @@ -1053,7 +1053,7 @@ hidden[#hidden + 1] = "" -- add enable/disable -if haswifi then +if phycount > 0 then html.print("
Mesh RF (" .. (M3model and "3GHz" or M9model and "900MHz" or wifi_channel < 36 and "2GHz" or "5GHz") .. ")
Mesh
Enable