You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-misc/networkmanager/files/networkmanager-0.9.4.0-nl80...

44 lines
1.5 KiB

From de3353d58c22ba9882784e9cf0653c7ac427eb9b Mon Sep 17 00:00:00 2001
From: Mathieu Trudel-Lapierre <mathieu@canonical.com>
Date: Thu, 12 Apr 2012 12:01:28 +0200
Subject: [PATCH] wifi: check the driver reports any encryption caps with
nl80211 (bgo #673717)
Some drivers, such as ipw2200 doesn't report any encryption with newer kernels.
See also https://bugs.launchpad.net/ubuntu/+source/linux/+bug/973241
---
src/wifi/wifi-utils-nl80211.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/wifi/wifi-utils-nl80211.c b/src/wifi/wifi-utils-nl80211.c
index 4a4e661..048d9d2 100644
--- a/src/wifi/wifi-utils-nl80211.c
+++ b/src/wifi/wifi-utils-nl80211.c
@@ -650,6 +650,9 @@ static int nl80211_wiphy_info_handler (struct nl_msg *msg, void *arg)
info->caps |= NM_WIFI_DEVICE_CAP_CIPHER_CCMP |
NM_WIFI_DEVICE_CAP_RSN;
break;
+ default:
+ nm_log_err (LOGD_HW | LOGD_WIFI, "Don't know the meaning of NL80211_ATTR_CIPHER_SUITES %#8.8x.", ciphers[i]);
+ break;
}
}
}
@@ -735,6 +738,13 @@ wifi_nl80211_init (const char *iface, int ifindex)
goto error;
}
+ if (device_info.caps == 0) {
+ nm_log_err (LOGD_HW | LOGD_WIFI,
+ "(%s): driver doesn't report support of any encryption",
+ nl80211->parent.iface);
+ goto error;
+ }
+
nl80211->freqs = device_info.freqs;
nl80211->num_freqs = device_info.num_freqs;
nl80211->parent.can_scan_ssid = device_info.can_scan_ssid;
--
1.7.8.6