Developing lightweight computation at the DSG edge

Commit 536dd68f authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

Add preliminary support for 802.11s

parent c1f9ce0b
......@@ -34,7 +34,7 @@ qmp_prepare_wireless_iface() {
###################################
# First parameter: device
# Second parameter: channel
# Third parameter: mode (adhoc, ap, adhoc_ap, aplan, client, clientwan, none)
# Third parameter: mode (adhoc, ap, adhoc_ap, aplan, client, clientwan, 80211s, 80211s_aplan none)
# It returns the same channel if it is right, and the new one fixet if not
qmp_check_channel() {
......@@ -49,7 +49,7 @@ qmp_check_channel() {
# Checking if some thing related with channel is wrong
local wrong=0
[ -z "$channel" ] || [ -z "$chaninfo" ] && wrong=1
[ "$mode" == "adhoc" -o "$mode" == "adhoc_ap" ] && [ -z "$(echo $chaninfo | grep adhoc)" ] && wrong=1
[ "$mode" == "adhoc" -o "$mode" == "adhoc_ap" ] -o "$mode" == "80211s" ] -o "$mode" == "80211s_aplan" ] && [ -z "$(echo $chaninfo | grep adhoc)" ] && wrong=1
[ "$ht40" == "+" ] && [ -z "$(echo $chaninfo | grep +)" ] && wrong=1
[ "$ht40" == "-" ] && [ -z "$(echo $chaninfo | grep -)" ] && wrong=1
[ "$m11b" == "b" ] && [ $channel -gt 14 ] && wrong=1
......@@ -128,6 +128,8 @@ qmp_configure_wifi_device() {
# aplan =====> Access point (LAN)
# client ====> Client (mesh)
# clientwan => Client (WAN)
# 80211s ====> 802.11s (mesh)
# 80211s_aplan ====> 802.11s (mesh) + access poin (LAN)
local mode="$(qmp_uci_get @wireless[$id].mode)"
......@@ -150,6 +152,16 @@ qmp_configure_wifi_device() {
qmp_uci_set interfaces.lan_devices "$landevs"
qmp_uci_set interfaces.wan_devices "$wandevs"
;;
80211s)
qmp_uci_set interfaces.mesh_devices "$meshdevs $device"
qmp_uci_set interfaces.lan_devices "$landevs"
qmp_uci_set interfaces.wan_devices "$wandevs"
;;
80211s_aplan)
qmp_uci_set interfaces.mesh_devices "$meshdevs $device"
qmp_uci_set interfaces.lan_devices "$landevs $device"
qmp_uci_set interfaces.wan_devices "$wandevs"
;;
ap)
qmp_uci_set interfaces.mesh_devices "$meshdevs $device"
qmp_uci_set interfaces.lan_devices "$landevs"
......@@ -259,6 +271,11 @@ qmp_configure_wifi_device() {
mode="adhoc"
vap=1
}
[ $mode == "80211s_aplan" ] && {
mode="80211s"
vap=1
}
device_template="$TEMPLATE_BASE/device.$driver-$mode11"
iface_template="$TEMPLATE_BASE/iface.$mode"
......
wireless.#QMP_DEVICE.device=#QMP_RADIO
wireless.#QMP_DEVICE.mode=mesh
wireless.#QMP_DEVICE.mesh_id=#QMP_SSID
wireless.#QMP_DEVICE.network=#QMP_NETWORK
wireless.#QMP_DEVICE.ifname=#QMP_IFNAME
wireless.#QMP_DEVICE.mesh_fwding=0
......@@ -96,15 +96,40 @@ for _,wdev in ipairs(wdevs) do
mode:value("aplan","Access point (LAN)")
mode:value("client","Client (mesh)")
mode:value("clientwan","Client (WAN)")
mode:value("80211s","[EXPERIMENTAL] 802.11s (mesh)")
mode:value("80211s_aplan","[EXPERIMENTAL] 802.11s (mesh) + access point (LAN)")
mode:value("none","Disabled")
-- Name
-- Network name
local essid = s_wireless:option(Value,"name","ESSID", translate("Name of the WiFi network"))
-- maxlength is documented but not implemented
-- http://luci.subsignal.org/trac/wiki/Documentation/CBI#a.maxlengthnil
-- http://luci.subsignal.org/trac/browser/luci/trunk/libs/web/luasrc/cbi.lua?rev=9834#L1463
essid.maxlength = 32
--[[
essid.default = "qMp"
essid.depends = "adhoc_ap"
essid.depends = "adhoc"
essid.depends = "ap"
essid.depends = "aplan"
essid.depends = "client"
essid.depends = "clientwan"
-- Mesh network name
local 80211smesh = s_wireless:option(Value,"name","ESSID", translate("Name of the WiFi network"))
-- maxlength is documented but not implemented
-- http://luci.subsignal.org/trac/wiki/Documentation/CBI#a.maxlengthnil
-- http://luci.subsignal.org/trac/browser/luci/trunk/libs/web/luasrc/cbi.lua?rev=9834#L1463
essid.maxlength = 32
essid.default = "qMp"
essid.depends = "adhoc_ap"
essid.depends = "adhoc"
essid.depends = "ap"
essid.depends = "aplan"
essid.depends = "client"
essid.depends = "clientwan"
]]--
-- Channel
channel = s_wireless:option(ListValue,"channel","Channel",translate("WiFi channel to be used in this device.<br/>Selecting channels with + or - enables 40MHz bandwidth."))
mymode = m.uci:get("qmp",wdev,"mode")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment