From 85556cd8d4ff888d7c9e3b4bf340e7b6c4da6658 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Fri, 11 Jul 2008 14:05:59 +0000 Subject: [PATCH] add missing imports, add madwifi support --- lib/python/Components/Network.py | 15 ++++++++++----- 1 file 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' -- 2.30.2