diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2009-08-26 08:53:02 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-28 14:40:48 -0400 |
commit | 4a7f13eef508012bd1b0ffbb24b807e3494f31cd (patch) | |
tree | db1e64077eedf0a0e4c1304e74d62b13102e3882 /drivers | |
parent | 7cf4a2e778ab18c66cd8dd4785aceb2800d49f79 (diff) |
rndis_wlan: set cipher suites for cfg80211
rndis_wlan does not set cipher suites list for cfg80211 which causes
wext-compat-range to report rndis_wlan not supporting WPA. Patch adds
cipher suites list and fixes NetworkManager not being able to connect to
WPA encrypted APs.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index c5b921bf5a96..f181b00f2534 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -413,6 +413,13 @@ static const struct ieee80211_rate rndis_rates[] = { | |||
413 | { .bitrate = 540 } | 413 | { .bitrate = 540 } |
414 | }; | 414 | }; |
415 | 415 | ||
416 | static const u32 rndis_cipher_suites[] = { | ||
417 | WLAN_CIPHER_SUITE_WEP40, | ||
418 | WLAN_CIPHER_SUITE_WEP104, | ||
419 | WLAN_CIPHER_SUITE_TKIP, | ||
420 | WLAN_CIPHER_SUITE_CCMP, | ||
421 | }; | ||
422 | |||
416 | struct rndis_wlan_encr_key { | 423 | struct rndis_wlan_encr_key { |
417 | int len; | 424 | int len; |
418 | int cipher; | 425 | int cipher; |
@@ -441,6 +448,7 @@ struct rndis_wlan_private { | |||
441 | struct ieee80211_supported_band band; | 448 | struct ieee80211_supported_band band; |
442 | struct ieee80211_channel channels[ARRAY_SIZE(rndis_channels)]; | 449 | struct ieee80211_channel channels[ARRAY_SIZE(rndis_channels)]; |
443 | struct ieee80211_rate rates[ARRAY_SIZE(rndis_rates)]; | 450 | struct ieee80211_rate rates[ARRAY_SIZE(rndis_rates)]; |
451 | u32 cipher_suites[ARRAY_SIZE(rndis_cipher_suites)]; | ||
444 | 452 | ||
445 | struct iw_statistics iwstats; | 453 | struct iw_statistics iwstats; |
446 | struct iw_statistics privstats; | 454 | struct iw_statistics privstats; |
@@ -2892,7 +2900,7 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf) | |||
2892 | | BIT(NL80211_IFTYPE_ADHOC); | 2900 | | BIT(NL80211_IFTYPE_ADHOC); |
2893 | wiphy->max_scan_ssids = 1; | 2901 | wiphy->max_scan_ssids = 1; |
2894 | 2902 | ||
2895 | /* TODO: fill-out band information based on priv->caps */ | 2903 | /* TODO: fill-out band/encr information based on priv->caps */ |
2896 | rndis_wlan_get_caps(usbdev); | 2904 | rndis_wlan_get_caps(usbdev); |
2897 | 2905 | ||
2898 | memcpy(priv->channels, rndis_channels, sizeof(rndis_channels)); | 2906 | memcpy(priv->channels, rndis_channels, sizeof(rndis_channels)); |
@@ -2904,6 +2912,11 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf) | |||
2904 | wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; | 2912 | wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; |
2905 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; | 2913 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; |
2906 | 2914 | ||
2915 | memcpy(priv->cipher_suites, rndis_cipher_suites, | ||
2916 | sizeof(rndis_cipher_suites)); | ||
2917 | wiphy->cipher_suites = priv->cipher_suites; | ||
2918 | wiphy->n_cipher_suites = ARRAY_SIZE(rndis_cipher_suites); | ||
2919 | |||
2907 | set_wiphy_dev(wiphy, &usbdev->udev->dev); | 2920 | set_wiphy_dev(wiphy, &usbdev->udev->dev); |
2908 | 2921 | ||
2909 | if (wiphy_register(wiphy)) { | 2922 | if (wiphy_register(wiphy)) { |