2014-07-05 00:48:56 +00:00
|
|
|
for _, config in ipairs({'wifi24', 'wifi5'}) do
|
2016-11-30 14:02:00 +00:00
|
|
|
local rates = {1000, 2000, 5500, 6000, 9000, 11000, 12000, 18000, 24000, 36000, 48000, 54000}
|
|
|
|
rates = need_array_of(config .. '.supported_rates', rates, false) or rates
|
2016-08-03 09:03:44 +00:00
|
|
|
|
2016-11-30 14:02:00 +00:00
|
|
|
if need_table(config .. '.ibss', nil, false) then
|
|
|
|
need_string(config .. '.ibss.ssid')
|
|
|
|
need_string_match(config .. '.ibss.bssid', '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$')
|
|
|
|
need_one_of(config .. '.ibss.mcast_rate', rates, false)
|
|
|
|
need_number(config .. '.ibss.vlan', false)
|
|
|
|
need_boolean(config .. '.ibss.disabled', false)
|
|
|
|
end
|
mesh-batadv-core: introduce 11s mesh, refactor wireless config
This is a site.conf-breaking change in regard to the wireless config.
Make sure to read http://gluon.readthedocs.org/en/latest/user/site.html
and update your site.conf accordingly!
Support for 802.11s mesh interfaces has been added. Gluon now supports
three interface types: ap, ibss and mesh. All of them are now optional
and may be configured independently in site.conf.
A sample site.conf may look like this:
wifi24 = {
channel = 1,
htmode = 'HT40+',
ap = {
ssid = 'luebeck.freifunk.net',
},
ibss = {
ssid = '02:d1:11:37:fc:38',
bssid = '02:d1:11:37:fc:38',
mcast_rate = 12000,
},
mesh = {
id = 'ffhl-mesh',
mcast_rate = 12000,
},
},
2015-07-25 18:41:03 +00:00
|
|
|
|
2016-11-30 14:02:00 +00:00
|
|
|
if need_table(config .. '.mesh', nil, false) then
|
|
|
|
need_string(config .. '.mesh.id')
|
|
|
|
need_one_of(config .. '.mesh.mcast_rate', rates, false)
|
|
|
|
need_boolean(config .. '.mesh.disabled', false)
|
|
|
|
end
|
2014-07-05 00:48:56 +00:00
|
|
|
end
|
2014-07-16 14:44:33 +00:00
|
|
|
|
|
|
|
need_boolean('mesh_on_wan', false)
|
2015-05-04 19:18:58 +00:00
|
|
|
need_boolean('mesh_on_lan', false)
|
2015-10-12 18:56:26 +00:00
|
|
|
|
|
|
|
if need_table('mesh', nil, false) and need_table('mesh.batman_adv', nil, false) then
|
2016-11-30 14:02:00 +00:00
|
|
|
need_number('mesh.batman_adv.gw_sel_class', false)
|
2015-10-12 18:56:26 +00:00
|
|
|
end
|