module/admin-full: add missing mode+wds -> ap/sta-wds reverse mapping for mac80211...
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 9 Mar 2010 01:19:28 +0000 (01:19 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 9 Mar 2010 01:19:28 +0000 (01:19 +0000)
modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua

index 098a3a26b4693af755ccf666aa95c3ffd0365517..8aaf591b779aff8e919de5289d448e54980a47f7 100644 (file)
@@ -343,6 +343,19 @@ if wnet then
                                m.uci:delete("wireless", section, "wds")
                        end
                end
+
+               function mode.cfgvalue(self, section)
+                       local mode = ListValue.cfgvalue(self, section)
+                       local wds  = m.uci:get("wireless", section, "wds") == "1"
+
+                       if mode == "ap" and wds then
+                               return "ap-wds"
+                       elseif mode == "sta" and wds then
+                               return "sta-wds"
+                       else
+                               return mode
+                       end
+               end
                
                hidden = s:taboption("general", Flag, "hidden", translate("Hide <abbr title=\"Extended Service Set Identifier\">ESSID</abbr>"))
                hidden:depends({mode="ap"})