60ghz cleanup
This commit is contained in:
parent
6f60e4c20f
commit
6362e9cf94
@ -209,6 +209,9 @@ local function configure_p2p(config, radio, index, suffix, disabled)
|
|||||||
local macfilter = uci:get('wireless', name, 'macfilter')
|
local macfilter = uci:get('wireless', name, 'macfilter')
|
||||||
local maclist = uci:get('wireless', name, 'maclist')
|
local maclist = uci:get('wireless', name, 'maclist')
|
||||||
|
|
||||||
|
local ssid = uci:get('wireless', name, 'ssid') or string.sub(string.gsub(sysconfig.primary_mac, ':', ''), 8)
|
||||||
|
local mode = uci:get('wireless', name, 'mode') or 'ap'
|
||||||
|
|
||||||
uci:delete('wireless', name)
|
uci:delete('wireless', name)
|
||||||
|
|
||||||
if not config then
|
if not config then
|
||||||
@ -220,9 +223,6 @@ local function configure_p2p(config, radio, index, suffix, disabled)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local ssid = uci:get('wireless', name, 'ssid') or string.sub(string.gsub(sysconfig.primary_mac, ':', ''), 8)
|
|
||||||
local mode = uci:get('wireless', name, 'mode') or 'ap'
|
|
||||||
|
|
||||||
-- FIXME: static ip stuffs
|
-- FIXME: static ip stuffs
|
||||||
|
|
||||||
uci:section('network', 'interface', name, {
|
uci:section('network', 'interface', name, {
|
||||||
@ -238,6 +238,7 @@ local function configure_p2p(config, radio, index, suffix, disabled)
|
|||||||
macaddr = macaddr,
|
macaddr = macaddr,
|
||||||
mcast_rate = config.mcast_rate,
|
mcast_rate = config.mcast_rate,
|
||||||
ifname = suffix and 'p2p' .. suffix,
|
ifname = suffix and 'p2p' .. suffix,
|
||||||
|
encryption = 'none',
|
||||||
disabled = disabled,
|
disabled = disabled,
|
||||||
macfilter = macfilter,
|
macfilter = macfilter,
|
||||||
maclist = maclist,
|
maclist = maclist,
|
||||||
|
@ -125,13 +125,13 @@ uci:foreach('wireless', 'wifi-device', function(config)
|
|||||||
uci:set('wireless', name6, 'ssid', data)
|
uci:set('wireless', name6, 'ssid', data)
|
||||||
end
|
end
|
||||||
|
|
||||||
local mode = p:option(ListValue, radio .. '_p2pmode', translate("P2P Mode (master/ap - slave/station)"))
|
local mode = p:option(ListValue, radio .. '_p2pmode', translate("P2P Mode"), translate("Master=AP Slave=Station"))
|
||||||
mode.default = uci:get('wireless', name6, 'mode') or 'ap'
|
mode.default = uci:get('wireless', name6, 'mode') or 'ap'
|
||||||
mode:value('ap', translate('Master'))
|
mode:value('ap', translate('Master'))
|
||||||
mode:value('station', translate('Slave'))
|
mode:value('station', translate('Slave'))
|
||||||
mode:depends(vif, true)
|
mode:depends(vif, true)
|
||||||
function mode:write(data)
|
function mode:write(data)
|
||||||
uci:set('wireless', radio, '_p2pmode', data)
|
uci:set('wireless', name6, 'mode', data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user