summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-09-05 17:48:26 +0200
committerMarcel Holtmann <marcel@holtmann.org>2009-09-05 17:48:26 +0200
commit0903668d08045489c2a8fe9422c5a00379481023 (patch)
treed1d742ff0bf5aed8ed43b4654d38a9fb10149475 /plugins
parent54ae4802821159d072cf5134da2f2c832c42c954 (diff)
downloadconnman-0903668d08045489c2a8fe9422c5a00379481023.tar.gz
connman-0903668d08045489c2a8fe9422c5a00379481023.tar.bz2
connman-0903668d08045489c2a8fe9422c5a00379481023.zip
Add quirks for non-mac80211 compliant drivers
Diffstat (limited to 'plugins')
-rw-r--r--plugins/supplicant.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/supplicant.c b/plugins/supplicant.c
index e7356ab1..405aac69 100644
--- a/plugins/supplicant.c
+++ b/plugins/supplicant.c
@@ -175,6 +175,7 @@ struct supplicant_result {
struct supplicant_task {
int ifindex;
char *ifname;
+ gboolean mac80211;
struct connman_device *device;
struct connman_network *network;
struct connman_network *pending_network;
@@ -798,9 +799,12 @@ static int set_network(struct supplicant_task *task,
DBUS_TYPE_STRING, &passphrase);
} else if (g_ascii_strcasecmp(security, "wep") == 0) {
const char *key_mgmt = "NONE";
- const char *auth_alg = "OPEN SHARED";
+ const char *auth_alg = "OPEN";
const char *key_index = "0";
+ if (task->mac80211 == TRUE)
+ auth_alg = "OPEN SHARED";
+
connman_dbus_dict_append_variant(&dict, "auth_alg",
DBUS_TYPE_STRING, &auth_alg);
@@ -1702,6 +1706,10 @@ int supplicant_start(struct connman_device *device)
goto failed;
}
+ task->mac80211 = connman_inet_is_mac80211(task->ifindex);
+ if (task->mac80211 == FALSE)
+ connman_warn("Enabling quirks for unsupported driver");
+
task->range = g_try_malloc0(sizeof(struct iw_range));
if (task->range == NULL) {
err = -ENOMEM;