summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/wireless.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/vyos/ifconfig/wireless.py')
-rw-r--r--python/vyos/ifconfig/wireless.py31
1 files changed, 27 insertions, 4 deletions
diff --git a/python/vyos/ifconfig/wireless.py b/python/vyos/ifconfig/wireless.py
index 7f507ff6e..a1f50b71d 100644
--- a/python/vyos/ifconfig/wireless.py
+++ b/python/vyos/ifconfig/wireless.py
@@ -15,19 +15,30 @@
import os
-from vyos.ifconfig.vlan import VLANIf
+from vyos.ifconfig.interface import Interface
+from vyos.ifconfig.vlan import VLAN
-class WiFiIf(VLANIf):
+
+@Interface.register
+@VLAN.enable
+class WiFiIf(Interface):
"""
Handle WIFI/WLAN interfaces.
"""
- options = ['phy', 'op_mode']
-
default = {
'type': 'wifi',
'phy': 'phy0'
}
+ definition = {
+ **Interface.definition,
+ **{
+ 'section': 'wireless',
+ 'prefixes': ['wlan', ],
+ 'bridgeable': True,
+ }
+ }
+ options = ['phy', 'op_mode']
def _create(self):
# all interfaces will be added in monitor mode
@@ -54,3 +65,15 @@ class WiFiIf(VLANIf):
'phy': 'phy0'
}
return config
+
+
+
+@Interface.register
+class WiFiModemIf(WiFiIf):
+ definition = {
+ **WiFiIf.definition,
+ **{
+ 'section': 'wirelessmodem',
+ 'prefixes': ['wlm', ],
+ }
+ }