$Id$
]]--
m = Map("wireless", translate("wifi"), translate("a_w_devices1"))
+m:chain("network")
s = m:section(TypedSection, "wifi-device", translate("devices"))
if value == "sta" then
-- ToDo: Move this away
if not luci.model.uci.get("network", "wan") then
- luci.model.uci.set("network", "wan", "interface")
luci.model.uci.set("network", "wan", "proto", "none")
+ luci.model.uci.set("network", "wan", "ifname", " ")
end
- luci.model.uci.set("network", "wan", "type", "bridge")
- luci.model.uci.save("network")
+ local oldif = luci.model.uci.get("network", "wan", "ifname")
+ if oldif and oldif ~= " " then
+ luci.model.uci.set("network", "wan", "_ifname", oldif)
+ end
+ luci.model.uci.set("network", "wan", "ifname", " ")
self.map:set(section, "network", "wan")
else
+ if luci.model.uci.get("network", "wan", "_ifname") then
+ luci.model.uci.set("network", "wan", "ifname", luci.model.uci.get("network", "wan", "_ifname"))
+ end
self.map:set(section, "network", "lan")
end