1
0
mirror of https://github.com/gryf/wicd.git synced 2026-01-05 21:34:16 +01:00

Support passing no driver to wpa_supplicant

This commit is contained in:
David Paleino
2012-02-12 10:41:27 +01:00
parent 7f2df5b423
commit b161427e4d
5 changed files with 13 additions and 3 deletions

View File

@@ -72,6 +72,7 @@ python-wpactrl (http://projects.otaku42.de/wiki/PythonWpaCtrl)
python-iwscan (http://projects.otaku42.de/browser/python-iwscan/)"""
RALINK_DRIVER = 'ralink legacy'
NONE_DRIVER = 'none'
# Got these from /usr/include/linux/wireless.h
SIOCGIWESSID = 0x8B1B

View File

@@ -70,6 +70,7 @@ authmethods_pattern = re.compile('.*Authentication capabilities :\n(.*?)Current'
auth_pattern = re.compile('.*wpa_state=(.*?)\n', _re_mode)
RALINK_DRIVER = 'ralink legacy'
NONE_DRIVER = 'none'
blacklist_strict = '!"#$%&\'()*+,./:;<=>?@[\\]^`{|}~ '
blacklist_norm = ";`$!*|><&\\"
@@ -1160,10 +1161,14 @@ class BaseWirelessInterface(BaseInterface):
if self.wpa_driver == RALINK_DRIVER:
self._AuthenticateRalinkLegacy(network)
else:
if self.wpa_driver == NONE_DRIVER:
driver = ''
else:
driver = '-D' + self.wpa_driver
cmd = ['wpa_supplicant', '-B', '-i', self.iface, '-c',
os.path.join(wpath.networks,
network['bssid'].replace(':', '').lower()),
'-D', self.wpa_driver]
driver]
if self.verbose: print cmd
misc.Run(cmd)