luci-mod-admin-full: Add option to set wireless interface name
[project/luci.git] / modules / luci-mod-admin-full / luasrc / model / cbi / admin_network / wifi.lua
index 6f52293..945512e 100644 (file)
@@ -156,11 +156,12 @@ end
 
 if found_sta then
        ch = s:taboption("general", DummyValue, "choice", translate("Channel"))
-       ch.value = translatef("Locked to channel %d used by: %s",
-               found_sta.channel, table.concat(found_sta.names, ", "))
+       ch.value = translatef("Locked to channel %s used by: %s",
+               found_sta.channel or "(auto)", table.concat(found_sta.names, ", "))
 else
        ch = s:taboption("general", Value, "_mode_freq", '<br />'..translate("Operating frequency"))
        ch.hwmodes = hw_modes
+       ch.htmodes = iw.htmodelist
        ch.freqlist = iw.freqlist
        ch.template = "cbi/wireless_modefreq"
 
@@ -474,6 +475,9 @@ if hwtype == "mac80211" then
        wmm:depends({mode="ap"})
        wmm:depends({mode="ap-wds"})
        wmm.default = wmm.enabled
+       
+       ifname = s:taboption("advanced", Value, "ifname", translate("Interface name"), translate("Override default interface name"))
+       ifname.optional = true
 end
 
 
@@ -958,6 +962,10 @@ if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then
        identity:depends({mode="sta-wds", eap_type="peap", encryption="wpa"})
        identity:depends({mode="sta-wds", eap_type="ttls", encryption="wpa2"})
        identity:depends({mode="sta-wds", eap_type="ttls", encryption="wpa"})
+       identity:depends({mode="sta", eap_type="tls", encryption="wpa2"})
+       identity:depends({mode="sta", eap_type="tls", encryption="wpa"})
+       identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa2"})
+       identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa"})
 
        password = s:taboption("encryption", Value, "password", translate("Password"))
        password:depends({mode="sta", eap_type="fast", encryption="wpa2"})