Changeset 5691

Show
Ignore:
Timestamp:
02/28/10 00:21:14 (3 years ago)
Author:
jow
Message:

modules/admin-full: add extended mac80211 wireless options for 11n, patch by Dennis Bartsch

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua

    r5649 r5691  
    2828 
    2929m:chain("network") 
     30 
     31m.breadcrumb = { 
     32    { luci.dispatcher.build_url("admin/network/wireless"), translate("Wireless Networks") } 
     33} 
    3034 
    3135local ifsection 
     
    112116        tp:value(p.dbm, "%i dBm (%i mW)" %{ p.dbm, p.mw }) 
    113117    end 
     118     
     119    mode = s:taboption("advanced", ListValue, "hwmode", translate("Mode")) 
     120    mode:value("", translate("auto")) 
     121    mode:value("11b", "802.11b") 
     122    mode:value("11g", "802.11g") 
     123    mode:value("11a", "802.11a") 
     124    mode:value("11ng", "802.11g+n") 
     125    mode:value("11na", "802.11a+n") 
     126 
     127    htmode = s:taboption("advanced", ListValue, "htmode", translate("HT mode")) 
     128    htmode:depends("hwmode", "11na") 
     129    htmode:depends("hwmode", "11ng") 
     130    htmode:value("HT20", "20MHz") 
     131    htmode:value("HT40-", translate("40MHz 2nd channel below")) 
     132    htmode:value("HT40+", translate("40MHz 2nd channel above")) 
     133     
     134    htcapab = s:taboption("advanced", DynamicList, "ht_capab", translate("HT capabilities")) 
     135    htcapab:depends("hwmode", "11na") 
     136    htcapab:depends("hwmode", "11ng") 
     137     
     138    s:taboption("advanced", Value, "country", translate("Country Code"), translate("Use ISO/IEC 3166 alpha2 country codes.")) 
     139    s:taboption("advanced", Value, "distance", translate("Distance Optimization"), 
     140        translate("Distance to farthest network member in meters."))     
    114141end 
    115142 
     
    301328        s:taboption("advanced", Value, "frag", translate("Fragmentation Threshold")) 
    302329        s:taboption("advanced", Value, "rts", translate("RTS/CTS Threshold")) 
     330         
     331        mode:value("ap-wds", "%s (%s)" % {translate("Access Point"), translate("WDS")}) 
     332        mode:value("sta-wds", "%s (%s)" % {translate("Client"), translate("WDS")})       
     333         
     334        function mode.write(self, section, value) 
     335            if value == "ap-wds" then 
     336                ListValue.write(self, section, "ap") 
     337                m.uci:set("wireless", section, "wds", 1) 
     338            elseif value == "sta-wds" then 
     339                ListValue.write(self, section, "sta") 
     340                m.uci:set("wireless", section, "wds", 1) 
     341            else 
     342                ListValue.write(self, section, value) 
     343                m.uci:delete("wireless", section, "wds") 
     344            end 
     345        end 
     346         
     347        hidden = s:taboption("general", Flag, "hidden", translate("Hide <abbr title=\"Extended Service Set Identifier\">ESSID</abbr>")) 
     348        hidden:depends({mode="ap"}) 
     349        hidden:depends({mode="ap-wds"})              
    303350    end 
    304351