mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 21:08:06 +01:00
Support passing no driver to wpa_supplicant
This commit is contained in:
@@ -298,6 +298,7 @@ class PrefsDialog(urwid.WidgetWrap):
|
|||||||
# wpa_supplicant janx
|
# wpa_supplicant janx
|
||||||
self.wpadrivers = wireless.GetWpaSupplicantDrivers()
|
self.wpadrivers = wireless.GetWpaSupplicantDrivers()
|
||||||
self.wpadrivers.append("ralink_legacy")
|
self.wpadrivers.append("ralink_legacy")
|
||||||
|
self.wpadrivers.append('none')
|
||||||
# Same as above with the dbus.String
|
# Same as above with the dbus.String
|
||||||
self.thedrivers = [unicode(w) for w in self.wpadrivers]
|
self.thedrivers = [unicode(w) for w in self.wpadrivers]
|
||||||
self.wpa_cbox.set_list(self.thedrivers)
|
self.wpa_cbox.set_list(self.thedrivers)
|
||||||
|
|||||||
@@ -377,6 +377,7 @@ class PreferencesDialog(object):
|
|||||||
self.wpadrivercombo = build_combobox("pref_wpa_combobox")
|
self.wpadrivercombo = build_combobox("pref_wpa_combobox")
|
||||||
self.wpadrivers = wireless.GetWpaSupplicantDrivers()
|
self.wpadrivers = wireless.GetWpaSupplicantDrivers()
|
||||||
self.wpadrivers.append("ralink_legacy")
|
self.wpadrivers.append("ralink_legacy")
|
||||||
|
self.wpadrivers.append('none')
|
||||||
|
|
||||||
for x in self.wpadrivers:
|
for x in self.wpadrivers:
|
||||||
self.wpadrivercombo.append_text(x)
|
self.wpadrivercombo.append_text(x)
|
||||||
|
|||||||
@@ -68,8 +68,10 @@ False = Do not switch to wired interface automatically
|
|||||||
.TP
|
.TP
|
||||||
.BI "wireless_interface = " <name_of_wireless_interface>
|
.BI "wireless_interface = " <name_of_wireless_interface>
|
||||||
.TP
|
.TP
|
||||||
.BI "wpa_driver = " <wext|madwifi|ndiswrapper|hostap|hermes|atmel|broadcom|ipw|ralink legacy>
|
.BI "wpa_driver = " <wext|madwifi|ndiswrapper|hostap|hermes|atmel|broadcom|ipw|ralink legacy|none>
|
||||||
The default (and best supported) is wext. It should work properly in most cases.
|
The default (and best supported) is wext. It should work properly in most cases.
|
||||||
|
The \fBnone\fR special value makes WICD pass no \fI-D\fR parameter to
|
||||||
|
wpa_supplicant, which might be useful in some cases.
|
||||||
.TP
|
.TP
|
||||||
.BI "auto_reconnect = " <True|False>
|
.BI "auto_reconnect = " <True|False>
|
||||||
This settings determines whether Wicd will attempt to reconnect on connection loss.
|
This settings determines whether Wicd will attempt to reconnect on connection loss.
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ python-wpactrl (http://projects.otaku42.de/wiki/PythonWpaCtrl)
|
|||||||
python-iwscan (http://projects.otaku42.de/browser/python-iwscan/)"""
|
python-iwscan (http://projects.otaku42.de/browser/python-iwscan/)"""
|
||||||
|
|
||||||
RALINK_DRIVER = 'ralink legacy'
|
RALINK_DRIVER = 'ralink legacy'
|
||||||
|
NONE_DRIVER = 'none'
|
||||||
|
|
||||||
# Got these from /usr/include/linux/wireless.h
|
# Got these from /usr/include/linux/wireless.h
|
||||||
SIOCGIWESSID = 0x8B1B
|
SIOCGIWESSID = 0x8B1B
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ authmethods_pattern = re.compile('.*Authentication capabilities :\n(.*?)Current'
|
|||||||
auth_pattern = re.compile('.*wpa_state=(.*?)\n', _re_mode)
|
auth_pattern = re.compile('.*wpa_state=(.*?)\n', _re_mode)
|
||||||
|
|
||||||
RALINK_DRIVER = 'ralink legacy'
|
RALINK_DRIVER = 'ralink legacy'
|
||||||
|
NONE_DRIVER = 'none'
|
||||||
|
|
||||||
blacklist_strict = '!"#$%&\'()*+,./:;<=>?@[\\]^`{|}~ '
|
blacklist_strict = '!"#$%&\'()*+,./:;<=>?@[\\]^`{|}~ '
|
||||||
blacklist_norm = ";`$!*|><&\\"
|
blacklist_norm = ";`$!*|><&\\"
|
||||||
@@ -1160,10 +1161,14 @@ class BaseWirelessInterface(BaseInterface):
|
|||||||
if self.wpa_driver == RALINK_DRIVER:
|
if self.wpa_driver == RALINK_DRIVER:
|
||||||
self._AuthenticateRalinkLegacy(network)
|
self._AuthenticateRalinkLegacy(network)
|
||||||
else:
|
else:
|
||||||
|
if self.wpa_driver == NONE_DRIVER:
|
||||||
|
driver = ''
|
||||||
|
else:
|
||||||
|
driver = '-D' + self.wpa_driver
|
||||||
cmd = ['wpa_supplicant', '-B', '-i', self.iface, '-c',
|
cmd = ['wpa_supplicant', '-B', '-i', self.iface, '-c',
|
||||||
os.path.join(wpath.networks,
|
os.path.join(wpath.networks,
|
||||||
network['bssid'].replace(':', '').lower()),
|
network['bssid'].replace(':', '').lower()),
|
||||||
'-D', self.wpa_driver]
|
driver]
|
||||||
if self.verbose: print cmd
|
if self.verbose: print cmd
|
||||||
misc.Run(cmd)
|
misc.Run(cmd)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user