net/wireless: ipw2x00: add supported cipher suites to wiphy initialization
authorStanislav Yakovlev <stas.yakovlev@gmail.com>
Wed, 11 Apr 2012 01:44:47 +0000 (21:44 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 12 Apr 2012 19:10:48 +0000 (15:10 -0400)
Driver doesn't report its supported cipher suites through cfg80211
interface. It still uses wext interface and probably will not work
through nl80211, but will at least correctly advertise supported
features.

Bug was reported by Omar Siam.
https://bugzilla.kernel.org/show_bug.cgi?id=43049

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ipw2x00/ipw.h [new file with mode: 0644]
drivers/net/wireless/ipw2x00/ipw2100.c
drivers/net/wireless/ipw2x00/ipw2200.c

diff --git a/drivers/net/wireless/ipw2x00/ipw.h b/drivers/net/wireless/ipw2x00/ipw.h
new file mode 100644 (file)
index 0000000..4007bf5
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Intel Pro/Wireless 2100, 2200BG, 2915ABG network connection driver
+ *
+ * Copyright 2012 Stanislav Yakovlev <stas.yakovlev@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __IPW_H__
+#define __IPW_H__
+
+#include <linux/ieee80211.h>
+
+static const u32 ipw_cipher_suites[] = {
+       WLAN_CIPHER_SUITE_WEP40,
+       WLAN_CIPHER_SUITE_WEP104,
+       WLAN_CIPHER_SUITE_TKIP,
+       WLAN_CIPHER_SUITE_CCMP,
+};
+
+#endif
index d8d804e3a4b4cb2de5e00fdfaa90fc5b1a6db055..8193687883193a5f5776b308d12e1c12add8f8c3 100644 (file)
@@ -166,6 +166,7 @@ that only one external action is invoked at a time.
 #include <net/lib80211.h>
 
 #include "ipw2100.h"
+#include "ipw.h"
 
 #define IPW2100_VERSION "git-1.2.2"
 
@@ -1946,6 +1947,9 @@ static int ipw2100_wdev_init(struct net_device *dev)
                wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = bg_band;
        }
 
+       wdev->wiphy->cipher_suites = ipw_cipher_suites;
+       wdev->wiphy->n_cipher_suites = ARRAY_SIZE(ipw_cipher_suites);
+
        set_wiphy_dev(wdev->wiphy, &priv->pci_dev->dev);
        if (wiphy_register(wdev->wiphy)) {
                ipw2100_down(priv);
index 77c5d2f5115a7373d76eb6a190faeaa4c0465749..f37d315f942f7a9e93a099678f6bfeb5fb325f3a 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/slab.h>
 #include <net/cfg80211-wext.h>
 #include "ipw2200.h"
+#include "ipw.h"
 
 
 #ifndef KBUILD_EXTMOD
@@ -11532,6 +11533,9 @@ static int ipw_wdev_init(struct net_device *dev)
                wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = a_band;
        }
 
+       wdev->wiphy->cipher_suites = ipw_cipher_suites;
+       wdev->wiphy->n_cipher_suites = ARRAY_SIZE(ipw_cipher_suites);
+
        set_wiphy_dev(wdev->wiphy, &priv->pci_dev->dev);
 
        /* With that information in place, we can now register the wiphy... */