c0506b7
Path: news.gmane.org!not-for-mail
c0506b7
From: Stanislav Yakovlev <stas.yakovlev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
c0506b7
Newsgroups: gmane.linux.kernel.wireless.general
c0506b7
Subject: [PATCH] net/wireless: ipw2x00: add supported cipher suites to wiphy initialization
c0506b7
Date: Tue, 10 Apr 2012 21:44:47 -0400
c0506b7
Lines: 97
c0506b7
Approved: news@gmane.org
c0506b7
Message-ID: <1334108687-12954-1-git-send-email-stas.yakovlev@gmail.com>
c0506b7
NNTP-Posting-Host: plane.gmane.org
c0506b7
X-Trace: dough.gmane.org 1334108469 22291 80.91.229.3 (11 Apr 2012 01:41:09 GMT)
c0506b7
X-Complaints-To: usenet@dough.gmane.org
c0506b7
NNTP-Posting-Date: Wed, 11 Apr 2012 01:41:09 +0000 (UTC)
c0506b7
Cc: simar-hi6Y0CQ0nG0@public.gmane.org, linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
c0506b7
	Stanislav Yakovlev <stas.yakovlev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
c0506b7
To: linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org
c0506b7
Original-X-From: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Apr 11 03:41:07 2012
c0506b7
Return-path: <linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
c0506b7
Envelope-to: glkwg-linux-wireless-wOFGN7rlS/M9smdsby/KFg@public.gmane.org
c0506b7
Original-Received: from vger.kernel.org ([209.132.180.67])
c0506b7
	by plane.gmane.org with esmtp (Exim 4.69)
c0506b7
	(envelope-from <linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
c0506b7
	id 1SHmYV-0004IK-CT
c0506b7
	for glkwg-linux-wireless-wOFGN7rlS/M9smdsby/KFg@public.gmane.org; Wed, 11 Apr 2012 03:41:07 +0200
c0506b7
Original-Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
c0506b7
	id S1759898Ab2DKBlF (ORCPT
c0506b7
	<rfc822;glkwg-linux-wireless@m.gmane.org>);
c0506b7
	Tue, 10 Apr 2012 21:41:05 -0400
c0506b7
Original-Received: from mail-ob0-f174.google.com ([209.85.214.174]:60108 "EHLO
c0506b7
	mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
c0506b7
	with ESMTP id S1753779Ab2DKBlE (ORCPT
c0506b7
	<rfc822;linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
c0506b7
	Tue, 10 Apr 2012 21:41:04 -0400
c0506b7
Original-Received: by obbtb18 with SMTP id tb18so567970obb.19
c0506b7
        for <linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; Tue, 10 Apr 2012 18:41:02 -0700 (PDT)
c0506b7
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
c0506b7
        d=gmail.com; s=20120113;
c0506b7
        h=from:to:cc:subject:date:message-id:x-mailer;
c0506b7
        bh=8+D+Uuo0bIOG6rz8vxd6TGAxmrbuAw2bjWhd058IjOQ=;
c0506b7
        b=beOgy1Y9ZAV1Xw5XqsnPDJ1Oc0qOpOo+gCWlwmWbLdVHxUVG+ZVuRW9eCRQkh+5bZm
c0506b7
         5Ic+xOISztYUJp144Fr4flnbGPRKKp7jP8qQ/HvCOo34J6MCgBlnuWNYKbn4/NUvOYAh
c0506b7
         SeHpk2D8yOHbiWAMV+JGTqGG+/N4jVvRL147Yg1IfNDAJd8Ahbl0wARLOVg8WGGTSPvn
c0506b7
         MU3HNbmKFFBDhnukYr4keCnjixuDkqPYGMYuDrsmKdiAFHBRDI6qudnvaqi8F8gbtaWg
c0506b7
         dfssdTbmNYM/R/PJenInoy7IbRps2iW9ZX+zFzydZWp2EyJ4EZkKrYKmnezQgNJzRVex
c0506b7
         KHfg==
c0506b7
Original-Received: by 10.60.24.9 with SMTP id q9mr19071024oef.4.1334108462648;
c0506b7
        Tue, 10 Apr 2012 18:41:02 -0700 (PDT)
c0506b7
Original-Received: from localhost.localdomain (50-0-191-227.dsl.static.sonic.net. [50.0.191.227])
c0506b7
        by mx.google.com with ESMTPS id tx2sm1309336obb.8.2012.04.10.18.40.54
c0506b7
        (version=TLSv1/SSLv3 cipher=OTHER);
c0506b7
        Tue, 10 Apr 2012 18:41:01 -0700 (PDT)
c0506b7
X-Mailer: git-send-email 1.7.2.5
c0506b7
Original-Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
c0506b7
Precedence: bulk
c0506b7
List-ID: <linux-wireless.vger.kernel.org>
c0506b7
X-Mailing-List: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
c0506b7
Xref: news.gmane.org gmane.linux.kernel.wireless.general:88613
c0506b7
Archived-At: <http://permalink.gmane.org/gmane.linux.kernel.wireless.general/88613>
c0506b7
c0506b7
Driver doesn't report its supported cipher suites through cfg80211
c0506b7
interface. It still uses wext interface and probably will not work
c0506b7
through nl80211, but will at least correctly advertise supported
c0506b7
features.
c0506b7
c0506b7
Bug was reported by Omar Siam.
c0506b7
https://bugzilla.kernel.org/show_bug.cgi?id=43049
c0506b7
c0506b7
Signed-off-by: Stanislav Yakovlev <stas.yakovlev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
c0506b7
---
c0506b7
 drivers/net/wireless/ipw2x00/ipw.h     |   23 +++++++++++++++++++++++
c0506b7
 drivers/net/wireless/ipw2x00/ipw2100.c |    4 ++++
c0506b7
 drivers/net/wireless/ipw2x00/ipw2200.c |    4 ++++
c0506b7
 3 files changed, 31 insertions(+), 0 deletions(-)
c0506b7
 create mode 100644 drivers/net/wireless/ipw2x00/ipw.h
c0506b7
c0506b7
diff --git a/drivers/net/wireless/ipw2x00/ipw.h b/drivers/net/wireless/ipw2x00/ipw.h
c0506b7
new file mode 100644
c0506b7
index 0000000..4007bf5
c0506b7
--- /dev/null
c0506b7
+++ b/drivers/net/wireless/ipw2x00/ipw.h
c0506b7
@@ -0,0 +1,23 @@
c0506b7
+/*
c0506b7
+ * Intel Pro/Wireless 2100, 2200BG, 2915ABG network connection driver
c0506b7
+ *
c0506b7
+ * Copyright 2012 Stanislav Yakovlev <stas.yakovlev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
c0506b7
+ *
c0506b7
+ * This program is free software; you can redistribute it and/or modify
c0506b7
+ * it under the terms of the GNU General Public License version 2 as
c0506b7
+ * published by the Free Software Foundation.
c0506b7
+ */
c0506b7
+
c0506b7
+#ifndef __IPW_H__
c0506b7
+#define __IPW_H__
c0506b7
+
c0506b7
+#include <linux/ieee80211.h>
c0506b7
+
c0506b7
+static const u32 ipw_cipher_suites[] = {
c0506b7
+	WLAN_CIPHER_SUITE_WEP40,
c0506b7
+	WLAN_CIPHER_SUITE_WEP104,
c0506b7
+	WLAN_CIPHER_SUITE_TKIP,
c0506b7
+	WLAN_CIPHER_SUITE_CCMP,
c0506b7
+};
c0506b7
+
c0506b7
+#endif
c0506b7
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
c0506b7
index f0551f8..7c8e8b1 100644
c0506b7
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
c0506b7
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
c0506b7
@@ -166,6 +166,7 @@ that only one external action is invoked at a time.
c0506b7
 #include <net/lib80211.h>
c0506b7
 
c0506b7
 #include "ipw2100.h"
c0506b7
+#include "ipw.h"
c0506b7
 
c0506b7
 #define IPW2100_VERSION "git-1.2.2"
c0506b7
 
c0506b7
@@ -1946,6 +1947,9 @@ static int ipw2100_wdev_init(struct net_device *dev)
c0506b7
 		wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = bg_band;
c0506b7
 	}
c0506b7
 
c0506b7
+	wdev->wiphy->cipher_suites = ipw_cipher_suites;
c0506b7
+	wdev->wiphy->n_cipher_suites = ARRAY_SIZE(ipw_cipher_suites);
c0506b7
+
c0506b7
 	set_wiphy_dev(wdev->wiphy, &priv->pci_dev->dev);
c0506b7
 	if (wiphy_register(wdev->wiphy)) {
c0506b7
 		ipw2100_down(priv);
c0506b7
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
c0506b7
index 2b02257..bb4f42a 100644
c0506b7
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
c0506b7
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
c0506b7
@@ -34,6 +34,7 @@
c0506b7
 #include <linux/slab.h>
c0506b7
 #include <net/cfg80211-wext.h>
c0506b7
 #include "ipw2200.h"
c0506b7
+#include "ipw.h"
c0506b7
 
c0506b7
 
c0506b7
 #ifndef KBUILD_EXTMOD
c0506b7
@@ -11533,6 +11534,9 @@ static int ipw_wdev_init(struct net_device *dev)
c0506b7
 		wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = a_band;
c0506b7
 	}
c0506b7
 
c0506b7
+	wdev->wiphy->cipher_suites = ipw_cipher_suites;
c0506b7
+	wdev->wiphy->n_cipher_suites = ARRAY_SIZE(ipw_cipher_suites);
c0506b7
+
c0506b7
 	set_wiphy_dev(wdev->wiphy, &priv->pci_dev->dev);
c0506b7
 
c0506b7
 	/* With that information in place, we can now register the wiphy... */
c0506b7
-- 
c0506b7
1.7.2.5
c0506b7
c0506b7
--
c0506b7
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
c0506b7
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
c0506b7
More majordomo info at  http://vger.kernel.org/majordomo-info.html
c0506b7