diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless b/package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless index 487a7460..0832b90f 100755 --- a/package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless +++ b/package/gluon-core/luasrc/lib/gluon/upgrade/200-wireless @@ -209,6 +209,9 @@ local function configure_p2p(config, radio, index, suffix, disabled) local macfilter = uci:get('wireless', name, 'macfilter') 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) if not config then @@ -220,9 +223,6 @@ local function configure_p2p(config, radio, index, suffix, disabled) return 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 uci:section('network', 'interface', name, { @@ -238,6 +238,7 @@ local function configure_p2p(config, radio, index, suffix, disabled) macaddr = macaddr, mcast_rate = config.mcast_rate, ifname = suffix and 'p2p' .. suffix, + encryption = 'none', disabled = disabled, macfilter = macfilter, maclist = maclist, diff --git a/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua b/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua index bac6ca2a..0e89ab2b 100644 --- a/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua +++ b/package/gluon-web-wifi-config/luasrc/lib/gluon/config-mode/model/admin/wifi-config.lua @@ -125,13 +125,13 @@ uci:foreach('wireless', 'wifi-device', function(config) uci:set('wireless', name6, 'ssid', data) 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:value('ap', translate('Master')) mode:value('station', translate('Slave')) mode:depends(vif, true) function mode:write(data) - uci:set('wireless', radio, '_p2pmode', data) + uci:set('wireless', name6, 'mode', data) end end