Skip to contentSkip to conversation

add mac80211 wireless infrastructure

PATCH In review John W. Linville 4 participants 11 messages May 5, 2007 6 messages not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover add mac80211 wireless infrastructure

This series adds the mac80211 component. This is the new wireless infrastructure for "softmac"-style wireless hardware. It originated as code contributed by Devicescape, and has been under development by the community for well over a year. Thanks are due especially to Jiri Benc and Michael Wu as well as Johannes Berg and a number of other contributors who have worked to hammer this into its current form.

This component was in -mm for most of the 2.6.21 cycle, with few reported bugs. The code is also currently available in Fedora rawhide where it has performed well.

The wireless developers would like this to be considered for merge in time for 2.6.22. Patches for at least one mac80211-based driver will follow shortly.

Thanks,

John
---

The following changes since commit dc87c3985e9b442c60994308a96f887579addc39:
Linus Torvalds (1):
libata: honour host controllers that want just one host

are found in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git mac80211

Jiri Benc (4):
mac80211: add generic include/linux/ieee80211.h
mac80211: add mac80211 wireless stack
mac80211: add debugfs attributes
mac80211: add maintainers entry for mac80211

 MAINTAINERS                     |   10 +
 include/linux/ieee80211.h       |  342 +++
 include/net/mac80211.h          | 1045 ++++++++
 net/Kconfig                     |    1 +
 net/Makefile                    |    4 +-
 net/mac80211/Kconfig            |   78 +
 net/mac80211/Makefile           |   20 +
 net/mac80211/aes_ccm.c          |  155 ++
 net/mac80211/aes_ccm.h          |   26 +
 net/mac80211/debugfs.c          |  433 ++++
 net/mac80211/debugfs.h          |   16 +
 net/mac80211/debugfs_key.c      |  252 ++
 net/mac80211/debugfs_key.h      |   34 +
 net/mac80211/debugfs_netdev.c   |  440 ++++
 net/mac80211/debugfs_netdev.h   |   30 +
 net/mac80211/debugfs_sta.c      |  246 ++
 net/mac80211/debugfs_sta.h      |   12 +
 net/mac80211/hostapd_ioctl.h    |  108 +
 net/mac80211/ieee80211.c        | 4984 +++++++++++++++++++++++++++++++++++++++
 net/mac80211/ieee80211_cfg.c    |   66 +
 net/mac80211/ieee80211_cfg.h    |    9 +
 net/mac80211/ieee80211_common.h |   98 +
 net/mac80211/ieee80211_i.h      |  798 +++++++
 net/mac80211/ieee80211_iface.c  |  352 +++
 net/mac80211/ieee80211_ioctl.c  | 1822 ++++++++++++++
 net/mac80211/ieee80211_key.h    |  106 +
 net/mac80211/ieee80211_led.c    |   91 +
 net/mac80211/ieee80211_led.h    |   32 +
 net/mac80211/ieee80211_rate.c   |  140 ++
 net/mac80211/ieee80211_rate.h   |  144 ++
 net/mac80211/ieee80211_sta.c    | 3060 ++++++++++++++++++++++++
 net/mac80211/michael.c          |  104 +
 net/mac80211/michael.h          |   20 +
 net/mac80211/rc80211_simple.c   |  432 ++++
 net/mac80211/sta_info.c         |  470 ++++
 net/mac80211/sta_info.h         |  164 ++
 net/mac80211/tkip.c             |  341 +++
 net/mac80211/tkip.h             |   36 +
 net/mac80211/wep.c              |  328 +++
 net/mac80211/wep.h              |   40 +
 net/mac80211/wme.c              |  678 ++++++
 net/mac80211/wme.h              |   57 +
 net/mac80211/wpa.c              |  660 ++++++
 net/mac80211/wpa.h              |   31 +
 44 files changed, 18313 insertions(+), 2 deletions(-)
 create mode 100644 include/linux/ieee80211.h
 create mode 100644 include/net/mac80211.h
 create mode 100644 net/mac80211/Kconfig
 create mode 100644 net/mac80211/Makefile
 create mode 100644 net/mac80211/aes_ccm.c
 create mode 100644 net/mac80211/aes_ccm.h
 create mode 100644 net/mac80211/debugfs.c
 create mode 100644 net/mac80211/debugfs.h
 create mode 100644 net/mac80211/debugfs_key.c
 create mode 100644 net/mac80211/debugfs_key.h
 create mode 100644 net/mac80211/debugfs_netdev.c
 create mode 100644 net/mac80211/debugfs_netdev.h
 create mode 100644 net/mac80211/debugfs_sta.c
 create mode 100644 net/mac80211/debugfs_sta.h
 create mode 100644 net/mac80211/hostapd_ioctl.h
 create mode 100644 net/mac80211/ieee80211.c
 create mode 100644 net/mac80211/ieee80211_cfg.c
 create mode 100644 net/mac80211/ieee80211_cfg.h
 create mode 100644 net/mac80211/ieee80211_common.h
 create mode 100644 net/mac80211/ieee80211_i.h
 create mode 100644 net/mac80211/ieee80211_iface.c
 create mode 100644 net/mac80211/ieee80211_ioctl.c
 create mode 100644 net/mac80211/ieee80211_key.h
 create mode 100644 net/mac80211/ieee80211_led.c
 create mode 100644 net/mac80211/ieee80211_led.h
 create mode 100644 net/mac80211/ieee80211_rate.c
 create mode 100644 net/mac80211/ieee80211_rate.h
 create mode 100644 net/mac80211/ieee80211_sta.c
 create mode 100644 net/mac80211/michael.c
 create mode 100644 net/mac80211/michael.h
 create mode 100644 net/mac80211/rc80211_simple.c
 create mode 100644 net/mac80211/sta_info.c
 create mode 100644 net/mac80211/sta_info.h
 create mode 100644 net/mac80211/tkip.c
 create mode 100644 net/mac80211/tkip.h
 create mode 100644 net/mac80211/wep.c
 create mode 100644 net/mac80211/wep.h
 create mode 100644 net/mac80211/wme.c
 create mode 100644 net/mac80211/wme.h
 create mode 100644 net/mac80211/wpa.c
 create mode 100644 net/mac80211/wpa.h

Individual patches can be found here:

	http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/mac80211/
Signature · 2 lines
John W. Linville
[email protected]
#1 lore raw
Quoted 3 lines · John W. Linville

The wireless developers would like this to be considered for merge in time for 2.6.22. Patches for at least one mac80211-based driver will follow shortly.

Ooops! I forgot to add a "From: Jiri Benc..." line to the top of the mailed patches.

Dave, can you add that before applying them? Or shall I resend?

Also, if you apply the copies on my kernel.org page or if you pull from git then the Author information should already be correct:

	git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git mac80211

Sorry for the confusion!

John

P.S. Hmmm...I would have thought that I would have seen the patches I sent by now...? Did the list eat them? I don't think they were that big...? Let me know if I need to re-send.

Signature · 2 lines
John W. Linville
[email protected]
maintainer
#2 lore raw

From: "John W. Linville" <[email protected]>
Date: Sat, 5 May 2007 01:26:35 -0400

Quoted 10 lines · John W. Linville
Quoted 4 lines

The wireless developers would like this to be considered for merge in time for 2.6.22. Patches for at least one mac80211-based driver will follow shortly.

Ooops! I forgot to add a "From: Jiri Benc..." line to the top of the mailed patches.

Dave, can you add that before applying them? Or shall I resend?

That's not a problem.

Usually I just assume that the first Signed-off-by is the author if I don't get a "From: " else i figure it out by context.

Quoted 3 lines

P.S. Hmmm...I would have thought that I would have seen the patches I sent by now...? Did the list eat them? I don't think they were that big...? Let me know if I need to re-send.

Something caused them to be filtered. Let's see what vger had to say:

--
Subject: TABOO [email protected]: global taboo header: m/^Status:/
...
Status: RO
X-Spam-Status: No, score=-4.3 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00,
SPF_HELO_PASS,SPF_PASS autolearn=unavailable version=3.1.8-gr1
X-Spam-Checker-Version: SpamAssassin 3.1.8-gr1 (2007-02-13) on ra.tuxdriver.com
--

Dammit John, get that tuxdriver.com spam filter fixed! :-)

A message that is not in the archive (sent off-list or not yet received): 20070504.225721.42774143.davem-fT/PcQaiUtIeIZ0/[email protected]

#4 lore raw
Quoted 2 lines · David Miller

Dammit John, get that tuxdriver.com spam filter fixed! :-)

:-) Nah, I think it was my clumsy hand-editing of some mail headers. I must remember to let the machine do the work...

John

Signature · 2 lines
John W. Linville
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 7 lines · John W. Linville

This series adds the mac80211 component. This is the new wireless infrastructure for "softmac"-style wireless hardware. It originated as code contributed by Devicescape, and has been under development by the community for well over a year. Thanks are due especially to Jiri Benc and Michael Wu as well as Johannes Berg and a number of other contributors who have worked to hammer this into its current form.

Quoted 7 lines

This component was in -mm for most of the 2.6.21 cycle, with few reported bugs. The code is also currently available in Fedora rawhide where it has performed well.

The wireless developers would like this to be considered for merge in time for 2.6.22. Patches for at least one mac80211-based driver will follow shortly.

Please send out patches for review first. Last time I looked through the stuff in -mm there were a lot of things that were in pretty bad shape still.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 4 lines · John W. Linville

This component was in -mm for most of the 2.6.21 cycle, with few reported bugs. The code is also currently available in Fedora rawhide where it has performed well.

Quoted 7 lines
Quoted 3 lines

The wireless developers would like this to be considered for merge in time for 2.6.22. Patches for at least one mac80211-based driver will follow shortly.

Please send out patches for review first. Last time I looked through the stuff in -mm there were a lot of things that were in pretty bad shape still.

I had a little email trouble w/ the orignal patch post. I hand edited some headers and I must have screwed them up.

Anyway, the patches have been reposted and they seem to have made it through to the list. Please do look at them -- I'm sure they can benefit from your loving eye. :-)

The patches are also available here:

	http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/mac80211/

I realize this is a bit late in the merge cycle -- this timing is the best we could manage. If the patches are fatally flawed then we can try for 2.6.23. But if possible, we would like to get them into the current cycle.

FWIW, the patches have been paired-down a bit from what is in -mm, including the removal of AP and WDS mode support and related ioctls.

John

Signature · 2 lines
John W. Linville
[email protected]
#9 lore raw

PATCH 1/4 mac80211: add generic include/linux/ieee80211.h

In reply to John W. Linville

From: Jiri Benc <[email protected]>

Add generic IEEE 802.11 definitions.

---
 include/linux/ieee80211.h |  342 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 342 insertions(+), 0 deletions(-)
 create mode 100644 include/linux/ieee80211.h
include/linux/ieee80211.h new file +342 -0
new file mode 100644
index 0000000..ecd61e8
@@ -0,0 +1,342 @@
+/*
+ * IEEE 802.11 defines
+ *
+ * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
+ * <[email protected]>
+ * Copyright (c) 2002-2003, Jouni Malinen <[email protected]>
+ * Copyright (c) 2005, Devicescape Software, Inc.
+ * Copyright (c) 2006, Michael Wu <[email protected]>
+ *
+ * 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 IEEE80211_H
+#define IEEE80211_H
+
+#include <linux/types.h>
+
+#define FCS_LEN 4
+
+#define IEEE80211_FCTL_VERS		0x0003
+#define IEEE80211_FCTL_FTYPE		0x000c
+#define IEEE80211_FCTL_STYPE		0x00f0
+#define IEEE80211_FCTL_TODS		0x0100
+#define IEEE80211_FCTL_FROMDS		0x0200
+#define IEEE80211_FCTL_MOREFRAGS	0x0400
+#define IEEE80211_FCTL_RETRY		0x0800
+#define IEEE80211_FCTL_PM		0x1000
+#define IEEE80211_FCTL_MOREDATA		0x2000
+#define IEEE80211_FCTL_PROTECTED	0x4000
+#define IEEE80211_FCTL_ORDER		0x8000
+
+#define IEEE80211_SCTL_FRAG		0x000F
+#define IEEE80211_SCTL_SEQ		0xFFF0
+
+#define IEEE80211_FTYPE_MGMT		0x0000
+#define IEEE80211_FTYPE_CTL		0x0004
+#define IEEE80211_FTYPE_DATA		0x0008
+
+/* management */
+#define IEEE80211_STYPE_ASSOC_REQ	0x0000
+#define IEEE80211_STYPE_ASSOC_RESP	0x0010
+#define IEEE80211_STYPE_REASSOC_REQ	0x0020
+#define IEEE80211_STYPE_REASSOC_RESP	0x0030
+#define IEEE80211_STYPE_PROBE_REQ	0x0040
+#define IEEE80211_STYPE_PROBE_RESP	0x0050
+#define IEEE80211_STYPE_BEACON		0x0080
+#define IEEE80211_STYPE_ATIM		0x0090
+#define IEEE80211_STYPE_DISASSOC	0x00A0
+#define IEEE80211_STYPE_AUTH		0x00B0
+#define IEEE80211_STYPE_DEAUTH		0x00C0
+#define IEEE80211_STYPE_ACTION		0x00D0
+
+/* control */
+#define IEEE80211_STYPE_PSPOLL		0x00A0
+#define IEEE80211_STYPE_RTS		0x00B0
+#define IEEE80211_STYPE_CTS		0x00C0
+#define IEEE80211_STYPE_ACK		0x00D0
+#define IEEE80211_STYPE_CFEND		0x00E0
+#define IEEE80211_STYPE_CFENDACK	0x00F0
+
+/* data */
+#define IEEE80211_STYPE_DATA			0x0000
+#define IEEE80211_STYPE_DATA_CFACK		0x0010
+#define IEEE80211_STYPE_DATA_CFPOLL		0x0020
+#define IEEE80211_STYPE_DATA_CFACKPOLL		0x0030
+#define IEEE80211_STYPE_NULLFUNC		0x0040
+#define IEEE80211_STYPE_CFACK			0x0050
+#define IEEE80211_STYPE_CFPOLL			0x0060
+#define IEEE80211_STYPE_CFACKPOLL		0x0070
+#define IEEE80211_STYPE_QOS_DATA		0x0080
+#define IEEE80211_STYPE_QOS_DATA_CFACK		0x0090
+#define IEEE80211_STYPE_QOS_DATA_CFPOLL		0x00A0
+#define IEEE80211_STYPE_QOS_DATA_CFACKPOLL	0x00B0
+#define IEEE80211_STYPE_QOS_NULLFUNC		0x00C0
+#define IEEE80211_STYPE_QOS_CFACK		0x00D0
+#define IEEE80211_STYPE_QOS_CFPOLL		0x00E0
+#define IEEE80211_STYPE_QOS_CFACKPOLL		0x00F0
+
+
+/* miscellaneous IEEE 802.11 constants */
+#define IEEE80211_MAX_FRAG_THRESHOLD	2346
+#define IEEE80211_MAX_RTS_THRESHOLD	2347
+#define IEEE80211_MAX_AID		2007
+#define IEEE80211_MAX_TIM_LEN		251
+#define IEEE80211_MAX_DATA_LEN		2304
+/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
+   6.2.1.1.2.
+
+   The figure in section 7.1.2 suggests a body size of up to 2312
+   bytes is allowed, which is a bit confusing, I suspect this
+   represents the 2304 bytes of real data, plus a possible 8 bytes of
+   WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */
+
+#define IEEE80211_MAX_SSID_LEN		32
+
+struct ieee80211_hdr {
+	__le16 frame_control;
+	__le16 duration_id;
+	u8 addr1[6];
+	u8 addr2[6];
+	u8 addr3[6];
+	__le16 seq_ctrl;
+	u8 addr4[6];
+} __attribute__ ((packed));
+
+
+struct ieee80211_mgmt {
+	__le16 frame_control;
+	__le16 duration;
+	u8 da[6];
+	u8 sa[6];
+	u8 bssid[6];
+	__le16 seq_ctrl;
+	union {
+		struct {
+			__le16 auth_alg;
+			__le16 auth_transaction;
+			__le16 status_code;
+			/* possibly followed by Challenge text */
+			u8 variable[0];
+		} __attribute__ ((packed)) auth;
+		struct {
+			__le16 reason_code;
+		} __attribute__ ((packed)) deauth;
+		struct {
+			__le16 capab_info;
+			__le16 listen_interval;
+			/* followed by SSID and Supported rates */
+			u8 variable[0];
+		} __attribute__ ((packed)) assoc_req;
+		struct {
+			__le16 capab_info;
+			__le16 status_code;
+			__le16 aid;
+			/* followed by Supported rates */
+			u8 variable[0];
+		} __attribute__ ((packed)) assoc_resp, reassoc_resp;
+		struct {
+			__le16 capab_info;
+			__le16 listen_interval;
+			u8 current_ap[6];
+			/* followed by SSID and Supported rates */
+			u8 variable[0];
+		} __attribute__ ((packed)) reassoc_req;
+		struct {
+			__le16 reason_code;
+		} __attribute__ ((packed)) disassoc;
+		struct {
+			__le64 timestamp;
+			__le16 beacon_int;
+			__le16 capab_info;
+			/* followed by some of SSID, Supported rates,
+			 * FH Params, DS Params, CF Params, IBSS Params, TIM */
+			u8 variable[0];
+		} __attribute__ ((packed)) beacon;
+		struct {
+			/* only variable items: SSID, Supported rates */
+			u8 variable[0];
+		} __attribute__ ((packed)) probe_req;
+		struct {
+			__le64 timestamp;
+			__le16 beacon_int;
+			__le16 capab_info;
+			/* followed by some of SSID, Supported rates,
+			 * FH Params, DS Params, CF Params, IBSS Params */
+			u8 variable[0];
+		} __attribute__ ((packed)) probe_resp;
+		struct {
+			u8 category;
+			union {
+				struct {
+					u8 action_code;
+					u8 dialog_token;
+					u8 status_code;
+					u8 variable[0];
+				} __attribute__ ((packed)) wme_action;
+				struct{
+					u8 action_code;
+					u8 element_id;
+					u8 length;
+					u8 switch_mode;
+					u8 new_chan;
+					u8 switch_count;
+				} __attribute__((packed)) chan_switch;
+			} u;
+		} __attribute__ ((packed)) action;
+	} u;
+} __attribute__ ((packed));
+
+
+/* Control frames */
+struct ieee80211_rts {
+	__le16 frame_control;
+	__le16 duration;
+	u8 ra[6];
+	u8 ta[6];
+} __attribute__ ((packed));
+
+struct ieee80211_cts {
+	__le16 frame_control;
+	__le16 duration;
+	u8 ra[6];
+} __attribute__ ((packed));
+
+
+/* Authentication algorithms */
+#define WLAN_AUTH_OPEN 0
+#define WLAN_AUTH_SHARED_KEY 1
+#define WLAN_AUTH_FAST_BSS_TRANSITION 2
+#define WLAN_AUTH_LEAP 128
+
+#define WLAN_AUTH_CHALLENGE_LEN 128
+
+#define WLAN_CAPABILITY_ESS		(1<<0)
+#define WLAN_CAPABILITY_IBSS		(1<<1)
+#define WLAN_CAPABILITY_CF_POLLABLE	(1<<2)
+#define WLAN_CAPABILITY_CF_POLL_REQUEST	(1<<3)
+#define WLAN_CAPABILITY_PRIVACY		(1<<4)
+#define WLAN_CAPABILITY_SHORT_PREAMBLE	(1<<5)
+#define WLAN_CAPABILITY_PBCC		(1<<6)
+#define WLAN_CAPABILITY_CHANNEL_AGILITY	(1<<7)
+/* 802.11h */
+#define WLAN_CAPABILITY_SPECTRUM_MGMT	(1<<8)
+#define WLAN_CAPABILITY_QOS		(1<<9)
+#define WLAN_CAPABILITY_SHORT_SLOT_TIME	(1<<10)
+#define WLAN_CAPABILITY_DSSS_OFDM	(1<<13)
+
+/* Status codes */
+enum ieee80211_statuscode {
+	WLAN_STATUS_SUCCESS = 0,
+	WLAN_STATUS_UNSPECIFIED_FAILURE = 1,
+	WLAN_STATUS_CAPS_UNSUPPORTED = 10,
+	WLAN_STATUS_REASSOC_NO_ASSOC = 11,
+	WLAN_STATUS_ASSOC_DENIED_UNSPEC = 12,
+	WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG = 13,
+	WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION = 14,
+	WLAN_STATUS_CHALLENGE_FAIL = 15,
+	WLAN_STATUS_AUTH_TIMEOUT = 16,
+	WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17,
+	WLAN_STATUS_ASSOC_DENIED_RATES = 18,
+	/* 802.11b */
+	WLAN_STATUS_ASSOC_DENIED_NOSHORTPREAMBLE = 19,
+	WLAN_STATUS_ASSOC_DENIED_NOPBCC = 20,
+	WLAN_STATUS_ASSOC_DENIED_NOAGILITY = 21,
+	/* 802.11h */
+	WLAN_STATUS_ASSOC_DENIED_NOSPECTRUM = 22,
+	WLAN_STATUS_ASSOC_REJECTED_BAD_POWER = 23,
+	WLAN_STATUS_ASSOC_REJECTED_BAD_SUPP_CHAN = 24,
+	/* 802.11g */
+	WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25,
+	WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26,
+	/* 802.11i */
+	WLAN_STATUS_INVALID_IE = 40,
+	WLAN_STATUS_INVALID_GROUP_CIPHER = 41,
+	WLAN_STATUS_INVALID_PAIRWISE_CIPHER = 42,
+	WLAN_STATUS_INVALID_AKMP = 43,
+	WLAN_STATUS_UNSUPP_RSN_VERSION = 44,
+	WLAN_STATUS_INVALID_RSN_IE_CAP = 45,
+	WLAN_STATUS_CIPHER_SUITE_REJECTED = 46,
+};
+
+
+/* Reason codes */
+enum ieee80211_reasoncode {
+	WLAN_REASON_UNSPECIFIED = 1,
+	WLAN_REASON_PREV_AUTH_NOT_VALID = 2,
+	WLAN_REASON_DEAUTH_LEAVING = 3,
+	WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY = 4,
+	WLAN_REASON_DISASSOC_AP_BUSY = 5,
+	WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA = 6,
+	WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA = 7,
+	WLAN_REASON_DISASSOC_STA_HAS_LEFT = 8,
+	WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH = 9,
+	/* 802.11h */
+	WLAN_REASON_DISASSOC_BAD_POWER = 10,
+	WLAN_REASON_DISASSOC_BAD_SUPP_CHAN = 11,
+	/* 802.11i */
+	WLAN_REASON_INVALID_IE = 13,
+	WLAN_REASON_MIC_FAILURE = 14,
+	WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT = 15,
+	WLAN_REASON_GROUP_KEY_HANDSHAKE_TIMEOUT = 16,
+	WLAN_REASON_IE_DIFFERENT = 17,
+	WLAN_REASON_INVALID_GROUP_CIPHER = 18,
+	WLAN_REASON_INVALID_PAIRWISE_CIPHER = 19,
+	WLAN_REASON_INVALID_AKMP = 20,
+	WLAN_REASON_UNSUPP_RSN_VERSION = 21,
+	WLAN_REASON_INVALID_RSN_IE_CAP = 22,
+	WLAN_REASON_IEEE8021X_FAILED = 23,
+	WLAN_REASON_CIPHER_SUITE_REJECTED = 24,
+};
+
+
+/* Information Element IDs */
+enum ieee80211_eid {
+	WLAN_EID_SSID = 0,
+	WLAN_EID_SUPP_RATES = 1,
+	WLAN_EID_FH_PARAMS = 2,
+	WLAN_EID_DS_PARAMS = 3,
+	WLAN_EID_CF_PARAMS = 4,
+	WLAN_EID_TIM = 5,
+	WLAN_EID_IBSS_PARAMS = 6,
+	WLAN_EID_CHALLENGE = 16,
+	/* 802.11d */
+	WLAN_EID_COUNTRY = 7,
+	WLAN_EID_HP_PARAMS = 8,
+	WLAN_EID_HP_TABLE = 9,
+	WLAN_EID_REQUEST = 10,
+	/* 802.11h */
+	WLAN_EID_PWR_CONSTRAINT = 32,
+	WLAN_EID_PWR_CAPABILITY = 33,
+	WLAN_EID_TPC_REQUEST = 34,
+	WLAN_EID_TPC_REPORT = 35,
+	WLAN_EID_SUPPORTED_CHANNELS = 36,
+	WLAN_EID_CHANNEL_SWITCH = 37,
+	WLAN_EID_MEASURE_REQUEST = 38,
+	WLAN_EID_MEASURE_REPORT = 39,
+	WLAN_EID_QUIET = 40,
+	WLAN_EID_IBSS_DFS = 41,
+	/* 802.11g */
+	WLAN_EID_ERP_INFO = 42,
+	WLAN_EID_EXT_SUPP_RATES = 50,
+	/* 802.11i */
+	WLAN_EID_RSN = 48,
+	WLAN_EID_WPA = 221,
+	WLAN_EID_GENERIC = 221,
+	WLAN_EID_VENDOR_SPECIFIC = 221,
+	WLAN_EID_QOS_PARAMETER = 222
+};
+
+/* cipher suite selectors */
+#define WLAN_CIPHER_SUITE_USE_GROUP	0x000FAC00
+#define WLAN_CIPHER_SUITE_WEP40		0x000FAC01
+#define WLAN_CIPHER_SUITE_TKIP		0x000FAC02
+/* reserved: 				0x000FAC03 */
+#define WLAN_CIPHER_SUITE_CCMP		0x000FAC04
+#define WLAN_CIPHER_SUITE_WEP104	0x000FAC05
+
+#define WLAN_MAX_KEY_LEN		32
+
+#endif /* IEEE80211_H */
Signature · 5 lines
1.5.0.6

-- 
John W. Linville
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw

PATCH 2/4 mac80211: add mac80211 wireless stack

From: Jiri Benc <[email protected]>

Add mac80211, the IEEE 802.11 software MAC layer.

---
 include/net/mac80211.h          | 1045 ++++++++
 net/Kconfig                     |    1 +
 net/Makefile                    |    4 +-
 net/mac80211/Kconfig            |   69 +
 net/mac80211/Makefile           |   19 +
 net/mac80211/aes_ccm.c          |  155 ++
 net/mac80211/aes_ccm.h          |   26 +
 net/mac80211/hostapd_ioctl.h    |  108 +
 net/mac80211/ieee80211.c        | 4970 +++++++++++++++++++++++++++++++++++++++
 net/mac80211/ieee80211_cfg.c    |   66 +
 net/mac80211/ieee80211_cfg.h    |    9 +
 net/mac80211/ieee80211_common.h |   98 +
 net/mac80211/ieee80211_i.h      |  671 ++++++
 net/mac80211/ieee80211_iface.c  |  344 +++
 net/mac80211/ieee80211_ioctl.c  | 1806 ++++++++++++++
 net/mac80211/ieee80211_key.h    |   89 +
 net/mac80211/ieee80211_led.c    |   91 +
 net/mac80211/ieee80211_led.h    |   32 +
 net/mac80211/ieee80211_rate.c   |  140 ++
 net/mac80211/ieee80211_rate.h   |  122 +
 net/mac80211/ieee80211_sta.c    | 3060 ++++++++++++++++++++++++
 net/mac80211/michael.c          |  104 +
 net/mac80211/michael.h          |   20 +
 net/mac80211/rc80211_simple.c   |  361 +++
 net/mac80211/sta_info.c         |  386 +++
 net/mac80211/sta_info.h         |  145 ++
 net/mac80211/tkip.c             |  341 +++
 net/mac80211/tkip.h             |   36 +
 net/mac80211/wep.c              |  328 +++
 net/mac80211/wep.h              |   40 +
 net/mac80211/wme.c              |  678 ++++++
 net/mac80211/wme.h              |   57 +
 net/mac80211/wpa.c              |  660 ++++++
 net/mac80211/wpa.h              |   31 +
 34 files changed, 16110 insertions(+), 2 deletions(-)
 create mode 100644 include/net/mac80211.h
 create mode 100644 net/mac80211/Kconfig
 create mode 100644 net/mac80211/Makefile
 create mode 100644 net/mac80211/aes_ccm.c
 create mode 100644 net/mac80211/aes_ccm.h
 create mode 100644 net/mac80211/hostapd_ioctl.h
 create mode 100644 net/mac80211/ieee80211.c
 create mode 100644 net/mac80211/ieee80211_cfg.c
 create mode 100644 net/mac80211/ieee80211_cfg.h
 create mode 100644 net/mac80211/ieee80211_common.h
 create mode 100644 net/mac80211/ieee80211_i.h
 create mode 100644 net/mac80211/ieee80211_iface.c
 create mode 100644 net/mac80211/ieee80211_ioctl.c
 create mode 100644 net/mac80211/ieee80211_key.h
 create mode 100644 net/mac80211/ieee80211_led.c
 create mode 100644 net/mac80211/ieee80211_led.h
 create mode 100644 net/mac80211/ieee80211_rate.c
 create mode 100644 net/mac80211/ieee80211_rate.h
 create mode 100644 net/mac80211/ieee80211_sta.c
 create mode 100644 net/mac80211/michael.c
 create mode 100644 net/mac80211/michael.h
 create mode 100644 net/mac80211/rc80211_simple.c
 create mode 100644 net/mac80211/sta_info.c
 create mode 100644 net/mac80211/sta_info.h
 create mode 100644 net/mac80211/tkip.c
 create mode 100644 net/mac80211/tkip.h
 create mode 100644 net/mac80211/wep.c
 create mode 100644 net/mac80211/wep.h
 create mode 100644 net/mac80211/wme.c
 create mode 100644 net/mac80211/wme.h
 create mode 100644 net/mac80211/wpa.c
 create mode 100644 net/mac80211/wpa.h

Patch is huge, so it is available here:

	http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/mac80211/0002-mac80211-add-mac80211-wireless-stack.patch
Signature · 2 lines
John W. Linville
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#13 lore raw

PATCH 3/4 mac80211: add debugfs attributes

From: Jiri Benc <[email protected]>

Export various mac80211 internal variables through debugfs.

---
 net/mac80211/Kconfig           |    9 +
 net/mac80211/Makefile          |    1 +
 net/mac80211/debugfs.c         |  433 +++++++++++++++++++++++++++++++++++++++
 net/mac80211/debugfs.h         |   16 ++
 net/mac80211/debugfs_key.c     |  252 +++++++++++++++++++++++
 net/mac80211/debugfs_key.h     |   34 +++
 net/mac80211/debugfs_netdev.c  |  440 ++++++++++++++++++++++++++++++++++++++++
 net/mac80211/debugfs_netdev.h  |   30 +++
 net/mac80211/debugfs_sta.c     |  246 ++++++++++++++++++++++
 net/mac80211/debugfs_sta.h     |   12 +
 net/mac80211/ieee80211.c       |   14 ++
 net/mac80211/ieee80211_i.h     |  127 ++++++++++++
 net/mac80211/ieee80211_iface.c |    8 +
 net/mac80211/ieee80211_ioctl.c |   22 ++-
 net/mac80211/ieee80211_key.h   |   17 ++
 net/mac80211/ieee80211_rate.h  |   22 ++
 net/mac80211/rc80211_simple.c  |   71 +++++++
 net/mac80211/sta_info.c        |  108 +++++++++-
 net/mac80211/sta_info.h        |   19 ++
 19 files changed, 1866 insertions(+), 15 deletions(-)
 create mode 100644 net/mac80211/debugfs.c
 create mode 100644 net/mac80211/debugfs.h
 create mode 100644 net/mac80211/debugfs_key.c
 create mode 100644 net/mac80211/debugfs_key.h
 create mode 100644 net/mac80211/debugfs_netdev.c
 create mode 100644 net/mac80211/debugfs_netdev.h
 create mode 100644 net/mac80211/debugfs_sta.c
 create mode 100644 net/mac80211/debugfs_sta.h
net/mac80211/Kconfig +9 -0
index d761b53..6fffb38 100644
@@ -20,6 +20,15 @@ config MAC80211_LEDS
 	This option enables a few LED triggers for different
 	packet receive/transmit events.
 
+config MAC80211_DEBUGFS
+	bool "Export mac80211 internals in DebugFS"
+	depends on MAC80211 && DEBUG_FS
+	---help---
+	  Select this to see extensive information about
+	  the internal state of mac80211 in debugfs.
+
+	  Say N unless you know you need this.
+
 config MAC80211_DEBUG
 	bool "Enable debugging output"
 	depends on MAC80211
net/mac80211/Makefile +1 -0
index 79dea99..e9738da 100644
@@ -1,6 +1,7 @@
 obj-$(CONFIG_MAC80211) += mac80211.o rc80211_simple.o
 
 mac80211-objs-$(CONFIG_MAC80211_LEDS) += ieee80211_led.o
+mac80211-objs-$(CONFIG_MAC80211_DEBUGFS) += debugfs.o debugfs_sta.o debugfs_netdev.o debugfs_key.o
 
 mac80211-objs := \
 	ieee80211.o \
net/mac80211/debugfs.c new file +433 -0

433 lines not on this page · raw message

net/mac80211/debugfs.h new file +16 -0
new file mode 100644
index 0000000..dd25419
@@ -0,0 +1,16 @@
+#ifndef __MAC80211_DEBUGFS_H
+#define __MAC80211_DEBUGFS_H
+
+#ifdef CONFIG_MAC80211_DEBUGFS
+extern void debugfs_hw_add(struct ieee80211_local *local);
+extern void debugfs_hw_del(struct ieee80211_local *local);
+extern int mac80211_open_file_generic(struct inode *inode, struct file *file);
+#else
+static inline void debugfs_hw_add(struct ieee80211_local *local)
+{
+	return;
+}
+static inline void debugfs_hw_del(struct ieee80211_local *local) {}
+#endif
+
+#endif /* __MAC80211_DEBUGFS_H */
net/mac80211/debugfs_key.c new file +252 -0

252 lines not on this page · raw message

net/mac80211/debugfs_key.h new file +34 -0
new file mode 100644
index 0000000..aecfce3
@@ -0,0 +1,34 @@
+#ifndef __MAC80211_DEBUGFS_KEY_H
+#define __MAC80211_DEBUGFS_KEY_H
+
+#ifdef CONFIG_MAC80211_DEBUGFS
+void ieee80211_debugfs_key_add(struct ieee80211_local *local,
+			       struct ieee80211_key *key);
+void ieee80211_debugfs_key_remove(struct ieee80211_key *key);
+void ieee80211_debugfs_key_add_default(struct ieee80211_sub_if_data *sdata);
+void ieee80211_debugfs_key_remove_default(struct ieee80211_sub_if_data *sdata);
+void ieee80211_debugfs_key_sta_link(struct ieee80211_key *key,
+				    struct sta_info *sta);
+void ieee80211_debugfs_key_sta_del(struct ieee80211_key *key,
+				   struct sta_info *sta);
+#else
+static inline void ieee80211_debugfs_key_add(struct ieee80211_local *local,
+					     struct ieee80211_key *key)
+{}
+static inline void ieee80211_debugfs_key_remove(struct ieee80211_key *key)
+{}
+static inline void ieee80211_debugfs_key_add_default(
+	struct ieee80211_sub_if_data *sdata)
+{}
+static inline void ieee80211_debugfs_key_remove_default(
+	struct ieee80211_sub_if_data *sdata)
+{}
+static inline void ieee80211_debugfs_key_sta_link(
+	struct ieee80211_key *key, struct sta_info *sta)
+{}
+static inline void ieee80211_debugfs_key_sta_del(struct ieee80211_key *key,
+						 struct sta_info *sta)
+{}
+#endif
+
+#endif /* __MAC80211_DEBUGFS_KEY_H */
net/mac80211/debugfs_netdev.c new file +440 -0

440 lines not on this page · raw message

net/mac80211/debugfs_netdev.h new file +30 -0
new file mode 100644
index 0000000..a690071
@@ -0,0 +1,30 @@
+/* routines exported for debugfs handling */
+
+#ifndef __IEEE80211_DEBUGFS_NETDEV_H
+#define __IEEE80211_DEBUGFS_NETDEV_H
+
+#ifdef CONFIG_MAC80211_DEBUGFS
+void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata);
+void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata);
+void ieee80211_debugfs_change_if_type(struct ieee80211_sub_if_data *sdata,
+				     int oldtype);
+void ieee80211_debugfs_netdev_init(void);
+void ieee80211_debugfs_netdev_exit(void);
+#else
+static inline void ieee80211_debugfs_add_netdev(
+	struct ieee80211_sub_if_data *sdata)
+{}
+static inline void ieee80211_debugfs_remove_netdev(
+	struct ieee80211_sub_if_data *sdata)
+{}
+static inline void ieee80211_debugfs_change_if_type(
+	struct ieee80211_sub_if_data *sdata, int oldtype)
+{}
+static inline void ieee80211_debugfs_netdev_init(void)
+{}
+
+static inline void ieee80211_debugfs_netdev_exit(void)
+{}
+#endif
+
+#endif /* __IEEE80211_DEBUGFS_NETDEV_H */
net/mac80211/debugfs_sta.c new file +246 -0

246 lines not on this page · raw message

net/mac80211/debugfs_sta.h new file +12 -0
new file mode 100644
index 0000000..574a1cd
@@ -0,0 +1,12 @@
+#ifndef __MAC80211_DEBUGFS_STA_H
+#define __MAC80211_DEBUGFS_STA_H
+
+#ifdef CONFIG_MAC80211_DEBUGFS
+void ieee80211_sta_debugfs_add(struct sta_info *sta);
+void ieee80211_sta_debugfs_remove(struct sta_info *sta);
+#else
+static inline void ieee80211_sta_debugfs_add(struct sta_info *sta) {}
+static inline void ieee80211_sta_debugfs_remove(struct sta_info *sta) {}
+#endif
+
+#endif /* __MAC80211_DEBUGFS_STA_H */
net/mac80211/ieee80211.c +14 -0
index 48a832d..6e36df6 100644
@@ -35,6 +35,9 @@
 #include "aes_ccm.h"
 #include "ieee80211_led.h"
 #include "ieee80211_cfg.h"
+#include "debugfs.h"
+#include "debugfs_netdev.h"
+#include "debugfs_key.h"
 
 /* privid for wiphys to determine whether they belong to us or not */
 void *mac80211_wiphy_privid = &mac80211_wiphy_privid;
@@ -108,6 +111,7 @@ static void ieee80211_key_release(struct kref *kref)
 	key = container_of(kref, struct ieee80211_key, kref);
 	if (key->alg == ALG_CCMP)
 		ieee80211_aes_key_free(key->u.ccmp.tfm);
+	ieee80211_debugfs_key_remove(key);
 	kfree(key);
 }
 
@@ -4704,6 +4708,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 		goto fail_workqueue;
 	}
 
+	debugfs_hw_add(local);
+
 	local->hw.conf.beacon_int = 1000;
 
 	local->wstats_flags |= local->hw.max_rssi ?
@@ -4731,6 +4737,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 	if (result < 0)
 		goto fail_dev;
 
+	ieee80211_debugfs_add_netdev(IEEE80211_DEV_TO_SUB_IF(local->mdev));
+
 	result = ieee80211_init_rate_ctrl_alg(local, NULL);
 	if (result < 0) {
 		printk(KERN_DEBUG "%s: Failed to initialize rate control "
@@ -4765,11 +4773,13 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 fail_wep:
 	rate_control_deinitialize(local);
 fail_rate:
+	ieee80211_debugfs_remove_netdev(IEEE80211_DEV_TO_SUB_IF(local->mdev));
 	unregister_netdevice(local->mdev);
 fail_dev:
 	rtnl_unlock();
 	sta_info_stop(local);
 fail_sta_info:
+	debugfs_hw_del(local);
 	destroy_workqueue(local->hw.workqueue);
 fail_workqueue:
 	wiphy_unregister(local->hw.wiphy);
@@ -4844,6 +4854,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
 	ieee80211_clear_tx_pending(local);
 	sta_info_stop(local);
 	rate_control_deinitialize(local);
+	debugfs_hw_del(local);
 
 	for (i = 0; i < NUM_IEEE80211_MODES; i++) {
 		kfree(local->supp_rates[i]);
@@ -4953,6 +4964,8 @@ static int __init ieee80211_init(void)
 		return ret;
 	}
 
+	ieee80211_debugfs_netdev_init();
+
 	return 0;
 }
 
@@ -4960,6 +4973,7 @@ static int __init ieee80211_init(void)
 static void __exit ieee80211_exit(void)
 {
 	ieee80211_wme_unregister();
+	ieee80211_debugfs_netdev_exit();
 }
 
 
net/mac80211/ieee80211_i.h +127 -0

145 lines not on this page · raw message

net/mac80211/ieee80211_iface.c +8 -0
index 64267d4..cf0f32e 100644
@@ -14,6 +14,7 @@
 #include <net/mac80211.h>
 #include "ieee80211_i.h"
 #include "sta_info.h"
+#include "debugfs_netdev.h"
 
 void ieee80211_if_sdata_init(struct ieee80211_sub_if_data *sdata)
 {
@@ -73,6 +74,7 @@ int ieee80211_if_add(struct net_device *dev, const char *name,
 	if (ret)
 		goto fail;
 
+	ieee80211_debugfs_add_netdev(sdata);
 	ieee80211_if_set_type(ndev, type);
 
 	write_lock_bh(&local->sub_if_lock);
@@ -126,6 +128,8 @@ int ieee80211_if_add_mgmt(struct ieee80211_local *local)
 	if (ret)
 		goto fail;
 
+	ieee80211_debugfs_add_netdev(nsdata);
+
 	if (local->open_count > 0)
 		dev_open(ndev);
 	local->apdev = ndev;
@@ -142,6 +146,7 @@ void ieee80211_if_del_mgmt(struct ieee80211_local *local)
 
 	ASSERT_RTNL();
 	apdev = local->apdev;
+	ieee80211_debugfs_remove_netdev(IEEE80211_DEV_TO_SUB_IF(apdev));
 	local->apdev = NULL;
 	unregister_netdevice(apdev);
 }
@@ -150,6 +155,7 @@ void ieee80211_if_set_type(struct net_device *dev, int type)
 {
 	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+	int oldtype = sdata->type;
 
 	sdata->type = type;
 	switch (type) {
@@ -195,6 +201,7 @@ void ieee80211_if_set_type(struct net_device *dev, int type)
 		printk(KERN_WARNING "%s: %s: Unknown interface type 0x%x",
 		       dev->name, __FUNCTION__, type);
 	}
+	ieee80211_debugfs_change_if_type(sdata, oldtype);
 	ieee80211_update_default_wep_only(local);
 }
 
@@ -303,6 +310,7 @@ void __ieee80211_if_del(struct ieee80211_local *local,
 {
 	struct net_device *dev = sdata->dev;
 
+	ieee80211_debugfs_remove_netdev(sdata);
 	unregister_netdevice(dev);
 	/* Except master interface, the net_device will be freed by
 	 * net_device->destructor (i. e. ieee80211_if_free). */
net/mac80211/ieee80211_ioctl.c +19 -3
index 73909ec..352f03b 100644
@@ -25,6 +25,7 @@
 #include "ieee80211_rate.h"
 #include "wpa.h"
 #include "aes_ccm.h"
+#include "debugfs_key.h"
 
 static int ieee80211_regdom = 0x10; /* FCC */
 module_param(ieee80211_regdom, int, 0444);
@@ -180,8 +181,11 @@ static int ieee80211_set_encryption(struct net_device *dev, u8 *sta_addr,
 		}
 		kfree(keyconf);
 
-		if (set_tx_key || sdata->default_key == key)
+		if (set_tx_key || sdata->default_key == key) {
+			ieee80211_debugfs_key_remove_default(sdata);
 			sdata->default_key = NULL;
+		}
+		ieee80211_debugfs_key_remove(key);
 		if (sta)
 			sta->key = NULL;
 		else
@@ -221,13 +225,19 @@ static int ieee80211_set_encryption(struct net_device *dev, u8 *sta_addr,
 			}
 		}
 
-		if (set_tx_key || sdata->default_key == old_key)
+		if (set_tx_key || sdata->default_key == old_key) {
+			ieee80211_debugfs_key_remove_default(sdata);
 			sdata->default_key = NULL;
+		}
+		ieee80211_debugfs_key_remove(old_key);
 		if (sta)
 			sta->key = key;
 		else
 			sdata->keys[idx] = key;
 		ieee80211_key_free(old_key);
+		ieee80211_debugfs_key_add(local, key);
+		if (sta)
+			ieee80211_debugfs_key_sta_link(key, sta);
 
 		if (try_hwaccel &&
 		    (alg == ALG_WEP || alg == ALG_TKIP || alg == ALG_CCMP))
@@ -236,6 +246,8 @@ static int ieee80211_set_encryption(struct net_device *dev, u8 *sta_addr,
 
 	if (set_tx_key || (!sta && !sdata->default_key && key)) {
 		sdata->default_key = key;
+		if (key)
+			ieee80211_debugfs_key_add_default(sdata);
 
 		if (local->ops->set_key_idx &&
 		    local->ops->set_key_idx(local_to_hw(local), idx))
@@ -1505,8 +1517,12 @@ static int ieee80211_ioctl_siwencode(struct net_device *dev,
 		alg = ALG_NONE;
 	else if (erq->length == 0) {
 		/* No key data - just set the default TX key index */
-		if (sdata->default_key != sdata->keys[idx])
+		if (sdata->default_key != sdata->keys[idx]) {
+			ieee80211_debugfs_key_remove_default(sdata);
 			sdata->default_key = sdata->keys[idx];
+			if (sdata->default_key)
+				ieee80211_debugfs_key_add_default(sdata);
+		}
 		return 0;
 	}
 
net/mac80211/ieee80211_key.h +17 -0
index da67d87..c333849 100644
@@ -83,6 +83,23 @@ struct ieee80211_key {
 					* (used only for broadcast keys). */
 	s8 keyidx; /* WEP key index */
 
+#ifdef CONFIG_MAC80211_DEBUGFS
+	struct {
+		struct dentry *stalink;
+		struct dentry *dir;
+		struct dentry *keylen;
+		struct dentry *force_sw_encrypt;
+		struct dentry *keyidx;
+		struct dentry *hw_key_idx;
+		struct dentry *tx_rx_count;
+		struct dentry *algorithm;
+		struct dentry *tx_spec;
+		struct dentry *rx_spec;
+		struct dentry *replays;
+		struct dentry *key;
+	} debugfs;
+#endif
+
 	u8 key[0];
 };
 
net/mac80211/ieee80211_rate.h +22 -0
index 710f568..f021a02 100644
@@ -56,6 +56,9 @@ struct rate_control_ops {
 
 	int (*add_attrs)(void *priv, struct kobject *kobj);
 	void (*remove_attrs)(void *priv, struct kobject *kobj);
+	void (*add_sta_debugfs)(void *priv, void *priv_sta,
+				struct dentry *dir);
+	void (*remove_sta_debugfs)(void *priv, void *priv_sta);
 };
 
 struct rate_control_ref {
@@ -119,4 +122,23 @@ static inline void rate_control_free_sta(struct rate_control_ref *ref,
 	ref->ops->free_sta(ref->priv, priv);
 }
 
+static inline void rate_control_add_sta_debugfs(struct sta_info *sta)
+{
+#ifdef CONFIG_MAC80211_DEBUGFS
+	struct rate_control_ref *ref = sta->rate_ctrl;
+	if (sta->debugfs.dir && ref->ops->add_sta_debugfs)
+		ref->ops->add_sta_debugfs(ref->priv, sta->rate_ctrl_priv,
+					  sta->debugfs.dir);
+#endif
+}
+
+static inline void rate_control_remove_sta_debugfs(struct sta_info *sta)
+{
+#ifdef CONFIG_MAC80211_DEBUGFS
+	struct rate_control_ref *ref = sta->rate_ctrl;
+	if (ref->ops->remove_sta_debugfs)
+		ref->ops->remove_sta_debugfs(ref->priv, sta->rate_ctrl_priv);
+#endif
+}
+
 #endif /* IEEE80211_RATE_H */
net/mac80211/rc80211_simple.c +71 -0

95 lines not on this page · raw message

net/mac80211/sta_info.c +96 -12

153 lines not on this page · raw message

net/mac80211/sta_info.h +19 -0
index f26e1c2..b5591d2 100644
@@ -98,6 +98,9 @@ struct sta_info {
 				  * filtering; used only if sta->key is not
 				  * set */
 
+#ifdef CONFIG_MAC80211_DEBUGFS
+	int debugfs_registered;
+#endif
 	int assoc_ap; /* whether this is an AP that we are
 		       * associated with as a client */
 
@@ -109,6 +112,22 @@ struct sta_info {
 	int vlan_id;
 
 	u16 listen_interval;
+
+#ifdef CONFIG_MAC80211_DEBUGFS
+	struct sta_info_debugfsdentries {
+		struct dentry *dir;
+		struct dentry *flags;
+		struct dentry *num_ps_buf_frames;
+		struct dentry *last_ack_rssi;
+		struct dentry *last_ack_ms;
+		struct dentry *inactive_ms;
+		struct dentry *last_seq_ctrl;
+#ifdef CONFIG_MAC80211_DEBUG_COUNTERS
+		struct dentry *wme_rx_queue;
+		struct dentry *wme_tx_queue;
+#endif
+	} debugfs;
+#endif
 };
 
 
Signature · 5 lines
1.5.0.6

-- 
John W. Linville
[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw

PATCH 4/4 mac80211: add maintainers entry for mac80211

From: Jiri Benc <[email protected]>

Add MAINTAINERS entry for mac80211.

---
 MAINTAINERS |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
MAINTAINERS +10 -0
index af1c792..5ba3d1d 100644
@@ -2209,6 +2209,16 @@ M:	philb-mXXj517/[email protected]
 W:	http://www.tazenda.demon.co.uk/phil/linux-hp
 S:	Maintained
 
+MAC80211
+P:	Jiri Benc
+M:	[email protected]
+P:	Michael Wu
+M:	flamingice-R9e9/[email protected]
+L:	[email protected]
+W:	http://linuxwireless.org/
+T:	git kernel.org:/pub/scm/linux/kernel/git/jbenc/mac80211.git
+S:	Maintained
+
 MARVELL YUKON / SYSKONNECT DRIVER
 P:	Mirko Lindner
 M: 	[email protected]
Signature · 5 lines
1.5.0.6

-- 
John W. Linville
[email protected]
maintainer
#16 lore raw
In reply to John W. Linville

From: "John W. Linville" <[email protected]>
Date: Fri, 4 May 2007 23:17:49 -0400

Quoted 7 lines

This series adds the mac80211 component. This is the new wireless infrastructure for "softmac"-style wireless hardware. It originated as code contributed by Devicescape, and has been under development by the community for well over a year. Thanks are due especially to Jiri Benc and Michael Wu as well as Johannes Berg and a number of other contributors who have worked to hammer this into its current form.

Quoted 7 lines

This component was in -mm for most of the 2.6.21 cycle, with few reported bugs. The code is also currently available in Fedora rawhide where it has performed well.

The wireless developers would like this to be considered for merge in time for 2.6.22. Patches for at least one mac80211-based driver will follow shortly.

Applied and pushed out to net-2.6, I'll push this stuff to Linus, thanks a lot!