NIU:
[project/luci.git] / modules / niu / luasrc / model / cbi / niu / wireless / apdevice.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2009 Steven Barth <steven@midlink.org>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14 local niulib = require "luci.niulib"
15
16 m = Map("wireless", "Configure Private Access Point")
17 s = m:section(NamedSection, "ap", "interface", "Wireless Radio Device",
18 "Select the wireless radio device that should be used to run the access"..
19 " point. Note that wireless radios will not show up here if you already use"..
20 " them for connecting to the Internet and are not capable of being used as"..
21 " an access point in parallel.")
22 s.anonymous = true
23 s.addremove = false
24
25 l = s:option(ListValue, "device", "Device providing Access Point")
26
27 for _, wifi in ipairs(niulib.wifi_get_available("ap")) do
28         l:value(wifi, "WLAN-Adapter (%s)" % wifi)
29 end
30 l:value("none", "Disable Private Access Point")
31
32 return m