Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed uci get for 5ghz devices #110

Merged
merged 3 commits into from
Dec 2, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions luasrc/model/cbi/commotion/meshconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ local uci = require "luci.model.uci".cursor()
local sys = require "luci.sys"
local util = require "luci.util"


m = Map("wireless", translate("Configuration"), translate("This configuration wizard will assist you in setting up your router for a Commotion network."))

sctAP = m:section(NamedSection, "quickstartAP", "wifi-iface", translate("Access Point"))
Expand All @@ -34,9 +33,10 @@ sctMesh:option(Value, "bssid", translate("Device Designation (BSSID)"), translat
e = m:section(TypedSection, "wifi-device", translate("Network-wide Settings"))
e.anonymous = true

protocol = uci.get("wireless", "wifi-device", "hwmode")
local fiveghz = {'11a', '11adt', '11na'}
protocol = uci:get_first("wireless", "wifi-device", "hwmode")

if protocol == '11na' then
if util.contains(fiveghz, protocol) then
c = e:option(ListValue, "channel", translate("5GHz Channel"), translate("The 5GHz backhaul channel of the mesh network, if applicable."))
c:value(36, "Channel 36 (5.180 GHz)")
c:value(40, "Channel 40 (5.200 GHz)")
Expand Down