modules/admin-full: replace another instance of legacy wifi calls with network reloads
[project/luci.git] / modules / admin-full / luasrc / model / cbi / admin_network / wifi.lua
index f645493..67ccdb4 100644 (file)
@@ -61,7 +61,7 @@ function m.parse(map)
                wdev:set("disabled", nil)
 
                nw:commit("wireless")
-               luci.sys.call("(env -i /sbin/wifi down; env -i /sbin/wifi up) >/dev/null 2>/dev/null")
+               luci.sys.call("(env -i /bin/ubus call network reload) >/dev/null 2>/dev/null")
 
                luci.http.redirect(luci.dispatcher.build_url("admin/network/wireless", arg[1]))
                return
@@ -208,6 +208,12 @@ if hwtype == "mac80211" then
                htmode:value("HT40-", translate("40MHz 2nd channel below"))
                htmode:value("HT40+", translate("40MHz 2nd channel above"))
 
+               noscan = s:taboption("advanced", Flag, "noscan", translate("Force 40MHz mode"),
+                       translate("Always use 40MHz channels even if the secondary channel overlaps. Using this option does not comply with IEEE 802.11n-2009!"))
+               noscan:depends("htmode", "HT40+")
+               noscan:depends("htmode", "HT40-")
+               noscan.default = noscan.disabled
+
                --htcapab = s:taboption("advanced", DynamicList, "ht_capab", translate("HT capabilities"))
                --htcapab:depends("hwmode", "11na")
                --htcapab:depends("hwmode", "11ng")