diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-07-11 14:05:59 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2008-07-11 14:05:59 +0000 |
| commit | 85556cd8d4ff888d7c9e3b4bf340e7b6c4da6658 (patch) | |
| tree | 14e3a64ae84fa99626f4f2a69f63ce22b2f7a678 /lib/python/Components | |
| parent | 9ace786618bc1628590b52da215efeae8329d7d9 (diff) | |
| download | enigma2-85556cd8d4ff888d7c9e3b4bf340e7b6c4da6658.tar.gz enigma2-85556cd8d4ff888d7c9e3b4bf340e7b6c4da6658.zip | |
add missing imports,
add madwifi support
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/Network.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/python/Components/Network.py b/lib/python/Components/Network.py index 3abfc34c..eff51aa0 100644 --- a/lib/python/Components/Network.py +++ b/lib/python/Components/Network.py @@ -1,4 +1,4 @@ -from os import system, popen +from os import system, popen, path as os_path, listdir from re import compile as re_compile from socket import * from enigma import eConsoleAppContainer @@ -21,6 +21,8 @@ class Network: for line in result: try: device = devicesPattern.search(line).group() + if device == 'wifi0': + continue self.ifaces[device] = self.getDataForInterface(device) # Show only UP Interfaces in E2 #if self.getAdapterAttribute(device, 'up') is False: @@ -356,13 +358,16 @@ class Network: self.wlanmodule = None rt73_dir = "/sys/bus/usb/drivers/rt73/" zd1211b_dir = "/sys/bus/usb/drivers/zd1211b/" - if os_path.exists(rt73_dir): - files = [] + madwifi_dir = "/sys/bus/pci/drivers/ath_pci/" + if os_path.exists(madwifi_dir): + files = listdir(madwifi_dir) + if len(files) >= 1: + self.wlanmodule = 'madwifi' + elif os_path.exists(rt73_dir): files = listdir(rt73_dir) if len(files) >= 1: self.wlanmodule = 'ralink' - if os_path.exists(zd1211b_dir): - files = [] + elif os_path.exists(zd1211b_dir): files = listdir(zd1211b_dir) if len(files) != 0: self.wlanmodule = 'zydas' |
