support extant Antenna configuration
authorDaniel Golle <daniel@makrotopia.org>
Wed, 15 Aug 2012 16:31:41 +0000 (16:31 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 15 Aug 2012 16:31:41 +0000 (16:31 +0000)
modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua

index b8e240e0dd24f1d5f6f20ee02a396b4759ca5542..bcc44162103430f7b9e98312d738c21285b6970c 100644 (file)
@@ -227,6 +227,18 @@ if hwtype == "mac80211" then
        s:taboption("advanced", Value, "distance", translate("Distance Optimization"),
                translate("Distance to farthest network member in meters."))
 
+       -- external antenna profiles
+       local eal = iw and iw.extant
+       if eal and #eal > 0 then
+               ea = s:taboption("advanced", ListValue, "extant", translate("Antenna Configuration"))
+               for _, eap in ipairs(eal) do
+                       ea:value(eap.id, "%s (%s)" %{ eap.name, eap.description })
+                       if eap.selected then
+                               ea.default = eap.id
+                       end
+               end
+       end
+
        s:taboption("advanced", Value, "frag", translate("Fragmentation Threshold"))
        s:taboption("advanced", Value, "rts", translate("RTS/CTS Threshold"))
 end