package wireless

config package
	option title 'Wireless LAN'

config section
	option name 'wifi-device'
	option package 'wireless'
	option title 'Devices'
	option named true

config variable
	option name 'disabled'
	option section 'wireless.wifi-device'
	option title 'disabled'
	option datatype boolean

config variable
	option name 'type'
	option section 'wireless.wifi-device'
	option title 'Type'
	option required true

config variable
	option name 'channel'
	option section 'wireless.wifi-device'
	option title 'Channel'

config variable
	option name 'hwmode'
	option section 'wireless.wifi-device'
	option title 'Mode (atheros)'
	option type enum
	list depends type=atheros

config enum
	option variable 'wireless.wifi-device.hwmode'
	option value ''
	option title 'auto'

config enum
	option variable 'wireless.wifi-device.hwmode'
	option value '11b'
	option title '802.11b'

config enum
	option variable 'wireless.wifi-device.hwmode'
	option value '11g'
	option title '802.11g'

config enum
	option variable 'wireless.wifi-device.hwmode'
	option value '11a'
	option title '802.11a'

config enum
	option variable 'wireless.wifi-device.hwmode'
	option value '11bg'
	option title '802.11b+g'

config enum
	option variable 'wireless.wifi-device.hwmode'
	option value '11gdt'
	option title '802.11adt'

config enum
	option variable 'wireless.wifi-device.hwmode'
	option value '11adt'
	option title '802.11adt'

config enum
	option variable 'wireless.wifi-device.hwmode'
	option value 'fh'
	option title 'Frequency Hopping'

config variable
	option name 'diversity'
	option section 'wireless.wifi-device'
	option title 'Diversity (atheros)'
	option datatype boolean
	list depends type=atheros

config variable
	option name 'txpower'
	option section 'wireless.wifi-device'
	option title 'Transmit Power'
	option description 'dbm'
	option datatype uint

config variable
	option name 'txantenna'
	option section 'wireless.wifi-device'
	option title 'Transmitter Antenna'
	option datatype uint
	list depends type=atheros
	list depends type=broadcom

config variable
	option name 'rxantenna'
	option section 'wireless.wifi-device'
	option title 'Receiver Antenna'
	option datatype uint
	list depends type=atheros
	list depends type=broadcom

config variable
	option name 'distance'
	option section 'wireless.wifi-device'
	option title 'Distance Optimization (atheros, broadcom)'
	option description 'Distance to farthest network member in meters.'
	option datatype uint
	list depends type=atheros
	list depends type=broadcom

config variable
	option name 'macfilter'
	option section 'wireless.wifi-device'
	option title 'MAC-Address Filter (broadcom)'
	option type enum
	list depends type=broadcom

config enum
	option variable 'wireless.wifi-device.macfilter'
	option value 'deny'
	option title 'Allow listed only'

config enum
	option variable 'wireless.wifi-device.macfilter'
	option value 'allow'
	option title 'Allow all except listed'

config variable
	option name 'maclist'
	option section 'wireless.wifi-device'
	option title 'MAC-List (broadcom)'
	list depends 'type=broadcom, macfilter=allow'
	list depends 'type=broadcom, macfilter=deny'
	option type lazylist
	option datatype macaddr

config variable
	option name 'frameburst'
	option section 'wireless.wifi-device'
	option title 'Frame Bursting (broadcom)'
	option datatype boolean
	list depends 'type=broadcom'

config variable
	option name 'country'
	option section 'wireless.wifi-device'
	option title 'Country Code (broadcom)'
	list depends 'type=broadcom'

config variable
	option name 'maxassoc'
	option section 'wireless.wifi-device'
	option title 'Connection Limit (broadcom)'
	option datatype uint
	list depends 'type=broadcom'


config section
	option name 'wifi-iface'
	option package 'wireless'
	option title 'Interfaces'

config variable
	option name 'device'
	option section 'wireless.wifi-iface'
	option title 'Wifi Device'
	option valueof 'wireless.wifi-device'

config variable
	option name 'ssid'
	option section 'wireless.wifi-iface'
	option title 'ESSID'

config variable
	option name 'network'
	option section 'wireless.wifi-iface'
	option title 'Network'
	option description 'Add the Wifi network to physical network'
	option type reference
	list valueof network.interface

config variable
	option name 'mode'
	option section 'wireless.wifi-iface'
	option title 'Mode'
	option required true
	option type enum

config enum
	option variable 'wireless.wifi-iface.mode'
	option value 'ap'
	option title 'Access Point'

config enum
	option variable 'wireless.wifi-iface.mode'
	option value 'adhoc'
	option title 'Ad-Hoc'

config enum
	option variable 'wireless.wifi-iface.mode'
	option value 'sta'
	option title 'Client'

config enum
	option variable 'wireless.wifi-iface.mode'
	option value 'monitor'
	option title 'Monitor'

config enum
	option variable 'wireless.wifi-iface.mode'
	option value 'ahdemo'
	option title 'Pseudo Ad-Hoc (ahdemo)'

config enum
	option variable 'wireless.wifi-iface.mode'
	option value 'wds'
	option title 'WDS'

config variable
	option name 'bssid'
	option section 'wireless.wifi-iface'
	option title 'BSSID'

config variable
	option name 'txpower'
	option section 'wireless.wifi-iface'
	option title 'Transmit Power'
	option description 'dbm'
	option datatype uint

config variable
	option name 'frag'
	option section 'wireless.wifi-iface'
	option title 'Fragmentation Threshold (mac80211, atheros)'
	option datatype uint

config variable
	option name 'rts'
	option section 'wireless.wifi-iface'
	option title 'RTS/CTS Threshold (mac80211, atheros)'
	option datatype uint

config variable
	option name 'wds'
	option section 'wireless.wifi-iface'
	option title 'WDS (atheros)'
	option datatype boolean
	list depends 'mode=ap'
	list depends 'mode=sta'

config variable
	option name 'wdssep'
	option section 'wireless.wifi-iface'
	option title 'Separate WDS (atheros)'
	option datatype boolean
	list depends 'wds=1,mode=ap'

config variable
	option name 'doth'
	option section 'wireless.wifi-iface'
	option title '802.11h (atheros)'
	option datatype boolean

config variable
	option name 'hidden'
	option section 'wireless.wifi-iface'
	option title 'Hide ESSID (atheros, broadcom)'
	option datatype boolean
	list depends 'mode=ap'
	list depends 'mode=adhoc'
	list depends 'mode=wds'

config variable
	option name 'isolate'
	option section 'wireless.wifi-iface'
	option title 'isolate (atheros, broadcom)'
	option datatype boolean
	list depends 'mode=ap'

config variable
	option name 'bgscan'
	option section 'wireless.wifi-iface'
	option title 'Background Scan (atheros)'
	option datatype boolean

config variable
	option name 'sw_merge'
	option section 'wireless.wifi-iface'
	option title 'Disable Ad-Hoc HW beacon timer (atheros)'
	option datatype boolean

config variable
	option name 'nosbeacon'
	option section 'wireless.wifi-iface'
	option title 'Disable station HW beacon timer (atheros)'
	option datatype boolean

config variable
	option name 'probereq'
	option section 'wireless.wifi-iface'
	option title 'Disable probe responses (atheros)'
	option datatype boolean

config variable
	option name 'macpolicy'
	option section 'wireless.wifi-iface'
	option title 'MAC-Address Filter (atheros)'
	option type enum

config enum
	option variable 'wireless.wifi-iface.macpolicy'
	option value 'deny'
	option title 'Allow listed only'

config enum
	option variable 'wireless.wifi-iface.macpolicy'
	option value 'allow'
	option title 'Allow all except listed'

config variable
	option name 'maclist'
	option section 'wireless.wifi-iface'
	option title 'MAC-List (atheros)'
	list depends 'macpolicy=allow'
	list depends 'macpolicy=deny'
	option type lazylist
	option datatype macaddr

config variable
	option name 'rate'
	option section 'wireless.wifi-iface'
	option title 'Transmission Rate (atheros)'

config variable
	option name 'mcast_rate'
	option section 'wireless.wifi-iface'
	option title 'Multicast Rate (atheros)'

config variable
	option name 'minrate'
	option section 'wireless.wifi-iface'
	option title 'Minimum Rate (atheros)'

config variable
	option name 'maxrate'
	option section 'wireless.wifi-iface'
	option title 'Maximum Rate (atheros)'

config variable
	option name 'compression'
	option section 'wireless.wifi-iface'
	option title 'Compression (atheros)'
	option datatype boolean

config variable
	option name 'bursting'
	option section 'wireless.wifi-iface'
	option title 'Frame Bursting (atheros)'
	option datatype boolean

config variable
	option name 'turbo'
	option section 'wireless.wifi-iface'
	option title 'Turbo Mode (atheros)'
	option datatype boolean

config variable
	option name 'ff'
	option section 'wireless.wifi-iface'
	option title 'Fast Frames (atheros)'

config variable
	option name 'wmm'
	option section 'wireless.wifi-iface'
	option title 'WMM Mode (atheros)'
	option datatype boolean

config variable
	option name 'xr'
	option section 'wireless.wifi-iface'
	option title 'XR Support (atheros)'
	option datatype boolean

config variable
	option name 'ar'
	option section 'wireless.wifi-iface'
	option title 'AR Support (atheros)'
	option datatype boolean

config variable
	option name 'encryption'
	option section 'wireless.wifi-iface'
	option title 'Encryption'
	option description 'WPA-Encryption requires wpa_supplicant (for client mode) or hostapd (for AP and ad-hoc mode) to be installed.'
	option type enum

config enum
	option variable 'wireless.wifi-iface.encryption'
	option value 'none'
	option title 'No Encryption'

config enum
	option variable 'wireless.wifi-iface.encryption'
	option value 'wep'
	option title 'WEP'

config enum
	option variable 'wireless.wifi-iface.encryption'
	option value 'psk'
	option title 'WPA-PSK'

config enum
	option variable 'wireless.wifi-iface.encryption'
	option value 'psk2'
	option title 'WPA2-PSK'

config enum
	option variable 'wireless.wifi-iface.encryption'
	option value 'wpa'
	option title 'WPA-EAP'

config enum
	option variable 'wireless.wifi-iface.encryption'
	option value 'wpa2i'
	option title 'WPA2-EAP'

config variable
	option name 'server'
	option section 'wireless.wifi-iface'
	option title 'RadiusServer'
	list depends 'encryption=wpa,mode=ap'
	list depends 'encryption=wpa2i,mode=ap'
	option datatype host

config variable
	option name 'port'
	option section 'wireless.wifi-iface'
	option title 'Radius-Port'
	list depends 'encryption=wpa,mode=ap'
	list depends 'encryption=wpa2i,mode=ap'
	option datatype port

config variable
	option name 'key'
	option section 'wireless.wifi-iface'
	option title 'Key'
	list depends 'encryption=wep'
	list depends 'encryption=psk'
	list depends 'encryption=wpa,mode=ap'
	list depends 'encryption=psk2'
	list depends 'encryption=wpa2i,mode=ap'

config variable
	option name 'nasid'
	option section 'wireless.wifi-iface'
	option title 'NAS ID'
	list depends 'encryption=wpa,mode=ap'
	list depends 'encryption=wpa2i,mode=ap'

config variable
	option name 'eap_type'
	option section 'wireless.wifi-iface'
	option title 'EAP-Method'
	option type enum
	list depends 'encryption=wpa,mode=sta'
	list depends 'encryption=wpa2i,mode=sta'

config enum
	option variable 'wireless.wifi-iface.eap_type'
	option value 'TLS'

config enum
	option variable 'wireless.wifi-iface.eap_type'
	option value 'PEAP'

config variable
	option name 'ca_cert'
	option section 'wireless.wifi-iface'
	option title 'Path to CA-Certificate'
	list depends 'encryption=wpa,mode=sta'
	list depends 'encryption=wpa2i,mode=sta'
	option datatype file

config variable
	option name 'priv_key'
	option section 'wireless.wifi-iface'
	option title 'Path to Private Key'
	list depends 'mode=sta,encryption=wpa2i,eap_type=TLS'
	list depends 'mode=sta,encryption=wpa,eap_type=TLS'
	option datatype file


config variable
	option name 'priv_key_pwd'
	option section 'wireless.wifi-iface'
	option title 'Password of Private Key'
	list depends 'mode=sta,encryption=wpa2i,eap_type=TLS'
	list depends 'mode=sta,encryption=wpa,eap_type=TLS'

config variable
	option name 'auth'
	option section 'wireless.wifi-iface'
	option title 'PEAP-Authentication'
	list depends 'mode=sta,encryption=wpa2i,eap_type=PEAP'
	list depends 'mode=sta,encryption=wpa,eap_type=PEAP'

config variable
	option name 'identity'
	option section 'wireless.wifi-iface'
	option title 'PEAP-Identity'
	list depends 'mode=sta,encryption=wpa2i,eap_type=PEAP'
	list depends 'mode=sta,encryption=wpa,eap_type=PEAP'

config variable
	option name 'password'
	option section 'wireless.wifi-iface'
	option title 'PEAP-Password'
	list depends 'mode=sta,encryption=wpa2i,eap_type=PEAP'
	list depends 'mode=sta,encryption=wpa,eap_type=PEAP'