rpms/kernel/FC-6 jwltest-git-iwlwifi-fixes.patch, NONE, 1.1.2.1 jwltest-iwlwifi-fixes.patch, NONE, 1.1.2.1 jwltest-iwlwifi.patch, NONE, 1.1.14.1 jwltest-mac80211-backport-2_6_20-fixup.patch, NONE, 1.1.4.1 jwltest-mac80211-backport.patch, NONE, 1.1.14.1 jwltest-softmac_wx_get_rate-running-check.patch, NONE, 1.1.30.1 kernel-2.6.spec, 1.2925, 1.2925.6.1

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Mar 22 20:42:56 UTC 2007


Author: linville

Update of /cvs/dist/rpms/kernel/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv9102

Modified Files:
      Tag: private-linville-jwltest-fc6-29-branch
	kernel-2.6.spec 
Added Files:
      Tag: private-linville-jwltest-fc6-29-branch
	jwltest-git-iwlwifi-fixes.patch jwltest-iwlwifi-fixes.patch 
	jwltest-iwlwifi.patch 
	jwltest-mac80211-backport-2_6_20-fixup.patch 
	jwltest-mac80211-backport.patch 
	jwltest-softmac_wx_get_rate-running-check.patch 
Log Message:


jwltest-git-iwlwifi-fixes.patch:
 base.c |    1 +
 1 files changed, 1 insertion(+)

--- NEW FILE jwltest-git-iwlwifi-fixes.patch ---
--- linux-2.6.20.noarch/drivers/net/wireless/mac80211/iwlwifi/base.c.orig	2007-03-22 14:13:12.000000000 -0400
+++ linux-2.6.20.noarch/drivers/net/wireless/mac80211/iwlwifi/base.c	2007-03-22 14:13:23.000000000 -0400
@@ -12377,6 +12377,7 @@ static int ipw_pci_probe(struct pci_dev 
 	err = ipw_read_ucode(priv);
 	if (err) {
 		IPW_ERROR("Could not read microcode from disk: %d\n", err);
+		mutex_unlock(&priv->mutex);
 		goto out_remove_sysfs;
 	}
 

jwltest-iwlwifi-fixes.patch:
 base.c |    1 +
 1 files changed, 1 insertion(+)

--- NEW FILE jwltest-iwlwifi-fixes.patch ---
--- linux-2.6.20.noarch/drivers/net/wireless/mac80211/iwlwifi/base.c.orig	2007-03-22 14:13:12.000000000 -0400
+++ linux-2.6.20.noarch/drivers/net/wireless/mac80211/iwlwifi/base.c	2007-03-22 14:13:23.000000000 -0400
@@ -12377,6 +12377,7 @@ static int ipw_pci_probe(struct pci_dev 
 	err = ipw_read_ucode(priv);
 	if (err) {
 		IPW_ERROR("Could not read microcode from disk: %d\n", err);
+		mutex_unlock(&priv->mutex);
 		goto out_remove_sysfs;
 	}
 

jwltest-iwlwifi.patch:
 Kconfig              |    1 
 Makefile             |    1 
 iwlwifi/Kconfig      |   52 
 iwlwifi/Makefile     |    2 
 iwlwifi/base.c       |13753 +++++++++++++++++++++++++++++++++++++++++++++++++++
 iwlwifi/iwlwifi.h    | 1297 ++++
 iwlwifi/iwlwifi_hw.h | 1877 ++++++
 7 files changed, 16983 insertions(+)

--- NEW FILE jwltest-iwlwifi.patch ---
--- /dev/null	2007-03-09 11:47:32.684268720 -0500
+++ linux-2.6.20.noarch/drivers/net/wireless/mac80211/iwlwifi/base.c	2007-03-22 16:08:07.000000000 -0400
@@ -0,0 +1,13753 @@
+/******************************************************************************
+
+  Copyright(c) 2003 - 2006 Intel Corporation. All rights reserved.
+
+  Portions of this file are derived from the ipw3945 project, as well
+  as portions of the ieee80211 subsystem header files.
+
+  802.11 status code portion of this file from ethereal-0.10.6:
+    Copyright 2000, Axis Communications AB
+    Ethereal - Network traffic analyzer
+    By Gerald Combs <gerald at ethereal.com>
+    Copyright 1998 Gerald Combs
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms of version 2 of the GNU General Public License as
+  published by the Free Software Foundation.
+
+  This program is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+  more details.
+
+  You should have received a copy of the GNU General Public License along with
+  this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
+
+  The full GNU General Public License is included in this distribution in the
+  file called LICENSE.
+
+  Contact Information:
+  James P. Ketrenos <ipw2100-admin at linux.intel.com>
+  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+******************************************************************************/
+
+/*
+ * Theory of operation:
+ *
+ * The primary NIC mode of operation is configured within the RXON command.
+ * As such, there are two instances of RXON data -- staging_rxon and
+ * active_rxon.  The former is used to configure the device, the later to
+ * reflect the actual currently active configuration.
+ *
+ * After configuring staging_rxon, it is activated by calling
+ * ipw_commit_rxon(). The ipw_commit_rxon() will ensure the correct sequence
+ * of commands are invoked on the hardware to result in Tx being possible
+ * (if the channel is appropriate for Tx)
+ *
+ * About the threading and lock model of the driver...
+ *
+ * There are three paths of execution through the driver.
+ *
+ * 1.  ioctl based (wireless extensions, netdev, etc.)
+ * 2.  interrupt based
+ * 3.  scheduled work queue items
+ *
+ * As soon as an interrupt comes in, it schedules a tasklet.  That tasklet,
+ * when run, does any HW checks, pulls any data from the read queue,
+ * and schedules other layers to do the actual work.
+ *
+ * NOTE: This driver is a work in progress.  It is currently structured
+ * in a way that we can add support for the next wireless adapter
+ * available from Intel.
+ *
+ * Our current focus is as follows:
+ * 1.  Get the driver working w/ mac80211 in STA(client) mode.
+ * 2.  Clean up the dual-driver code from function redirection to
+ *     if/else switches where the code detlas are minimal.
+ * 3.  Evaluate the amount of delta between the hardware versions and
+ *     possibly split iwlwifi into multiple drivers for each piece of
+ *     HW, sharing as much base code as possible (would result in
+ *     multiple driver files on disk vs. a single module that works
+ *     with multiple hardware types)
+ * 4.  Document the uCode regulatory enforcement
+ * 5.  Document the rate scaling capabilities of the 3945
+ * 6.  Provide an initial rate scaling algorithm tailored for the
+ *     statistic data exposed by the 3945.
+ */
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/dma-mapping.h>
+#include <linux/delay.h>
+#include <linux/skbuff.h>
+#include <linux/netdevice.h>
+#include <linux/wireless.h>
+#include <linux/firmware.h>
+#include <net/iw_handler.h>
+
+//#define BIT(x) (1 << (x))
+#include <net/mac80211.h>
+#include <net/ieee80211.h>
+
+#include <../net/mac80211/ieee80211_rate.h>
+
+#include <net/ieee80211_radiotap.h>
+	
+#ifndef ETH_P_80211_RAW
+#define ETH_P_80211_RAW (ETH_P_ECONET + 1)
+#endif
+
+#include <linux/if_arp.h>
+#include <asm/div64.h>
+
+#include "iwlwifi.h"
+
+#define IWLWIFI_VERSION "0.0.11k"
+
+#define DRV_DESCRIPTION	"Intel(R) Wireless Link driver for Linux"
+#define DRV_COPYRIGHT	"Copyright(c) 2003-2006 Intel Corporation"
+#define DRV_VERSION     IWLWIFI_VERSION
+
+MODULE_DESCRIPTION(DRV_DESCRIPTION);
+MODULE_VERSION(DRV_VERSION);
+MODULE_AUTHOR(DRV_COPYRIGHT);
+MODULE_LICENSE("GPL");
+
+/*MAC80211  move this to mac80211 files */
+#define IEEE80211_FC(type, stype) cpu_to_le16((type << 2) | (stype << 4))
+
+#define IEEE80211_CHAN_W_RADAR_DETECT 0x00000010
+
+#define IEEE80211_24GHZ_BAND     (1<<0)
+#define IEEE80211_52GHZ_BAND     (1<<1)
+
+#define IEEE80211_CCK_RATE_1MB                  0x02
+#define IEEE80211_CCK_RATE_2MB                  0x04
+#define IEEE80211_CCK_RATE_5MB                  0x0B
+#define IEEE80211_CCK_RATE_11MB                 0x16
+#define IEEE80211_OFDM_RATE_6MB                 0x0C
+#define IEEE80211_OFDM_RATE_9MB                 0x12
+#define IEEE80211_OFDM_RATE_12MB                0x18
+#define IEEE80211_OFDM_RATE_18MB                0x24
+#define IEEE80211_OFDM_RATE_24MB                0x30
+#define IEEE80211_OFDM_RATE_36MB                0x48
+#define IEEE80211_OFDM_RATE_48MB                0x60
+#define IEEE80211_OFDM_RATE_54MB                0x6C
+#define IEEE80211_BASIC_RATE_MASK               0x80
+
+#define IEEE80211_CCK_RATE_1MB_MASK             (1<<0)
+#define IEEE80211_CCK_RATE_2MB_MASK             (1<<1)
+#define IEEE80211_CCK_RATE_5MB_MASK             (1<<2)
+#define IEEE80211_CCK_RATE_11MB_MASK            (1<<3)
+#define IEEE80211_OFDM_RATE_6MB_MASK            (1<<4)
+#define IEEE80211_OFDM_RATE_9MB_MASK            (1<<5)
+#define IEEE80211_OFDM_RATE_12MB_MASK           (1<<6)
+#define IEEE80211_OFDM_RATE_18MB_MASK           (1<<7)
+#define IEEE80211_OFDM_RATE_24MB_MASK           (1<<8)
+#define IEEE80211_OFDM_RATE_36MB_MASK           (1<<9)
+#define IEEE80211_OFDM_RATE_48MB_MASK           (1<<10)
+#define IEEE80211_OFDM_RATE_54MB_MASK           (1<<11)
+
+#define IEEE80211_CCK_RATES_MASK                0x0000000F
+#define IEEE80211_CCK_BASIC_RATES_MASK  (IEEE80211_CCK_RATE_1MB_MASK | \
+        IEEE80211_CCK_RATE_2MB_MASK)
+#define IEEE80211_CCK_DEFAULT_RATES_MASK        (IEEE80211_CCK_BASIC_RATES_MASK | \
+        IEEE80211_CCK_RATE_5MB_MASK | \
+        IEEE80211_CCK_RATE_11MB_MASK)
+
+#define IEEE80211_OFDM_RATES_MASK               0x00000FF0
+#define IEEE80211_OFDM_BASIC_RATES_MASK (IEEE80211_OFDM_RATE_6MB_MASK | \
+        IEEE80211_OFDM_RATE_12MB_MASK | \
+        IEEE80211_OFDM_RATE_24MB_MASK)
+#define IEEE80211_OFDM_DEFAULT_RATES_MASK       (IEEE80211_OFDM_BASIC_RATES_MASK | \
+        IEEE80211_OFDM_RATE_9MB_MASK  | \
+        IEEE80211_OFDM_RATE_18MB_MASK | \
+        IEEE80211_OFDM_RATE_36MB_MASK | \
+        IEEE80211_OFDM_RATE_48MB_MASK | \
+        IEEE80211_OFDM_RATE_54MB_MASK)
+#define IEEE80211_DEFAULT_RATES_MASK (IEEE80211_OFDM_DEFAULT_RATES_MASK | \
+                                IEEE80211_CCK_DEFAULT_RATES_MASK)
+
+#define IEEE80211_NUM_OFDM_RATES            8
+#define IEEE80211_NUM_CCK_RATES             4
+#define IEEE80211_OFDM_SHIFT_MASK_A         4
+
+/*MAC80211 end */
+
+static u32 ipw_debug_level;
+
+static int param_debug = 0;
+static int param_channel = 0;
+static int param_mode = 0;
+static int param_auto_create = 1;	/* def: create new adhoc network if needed */
+static int param_led = 1;	/* def: use LEDs */
+static int param_disable = 0;	/* def: enable radio */
+static int param_antenna = 0;	/* def: 0 = both antennas (use diversity) */
+static int param_hwcrypto = 0;	/* def: using software encryption */
+static int param_qos_enable = 1;
+static int param_rtap_iface = 0;
+
+static const char ipw_modes[] = {
+	'a', 'b', 'g', '?'
+};
[...16611 lines suppressed...]
+	u8 flags;
+	/* We have 15 LSB to use as we please (MSB indicates
+	 * a frame Rx'd from the HW).  We encode the following
+	 * information into the sequence field:
+	 *
+	 *  0:7    index in fifo
+	 *  8:13   fifo selection
+	 * 14:14   bit indicating if this packet references the 'extra'
+	 *         storage at the end of the memory queue
+	 * 15:15   (Rx indication)
+	 *
+	 */
+	u16 sequence;
+
+	/* command data follows immediately */
+	u8 data[0];
+} __attribute__ ((packed));
+
+// Used for passing to driver number of successes and failures per rate
+struct rate_histogram {
+	union {
+		u32 a[SUP_RATE_11A_MAX_NUM_CHANNELS];
+		u32 b[SUP_RATE_11B_MAX_NUM_CHANNELS];
+		u32 g[SUP_RATE_11G_MAX_NUM_CHANNELS];
+	} success;
+	union {
+		u32 a[SUP_RATE_11A_MAX_NUM_CHANNELS];
+		u32 b[SUP_RATE_11B_MAX_NUM_CHANNELS];
+		u32 g[SUP_RATE_11G_MAX_NUM_CHANNELS];
+	} failed;
+} __attribute__ ((packed));
+
+/* statistics command response */
+
+struct statistics_rx_phy {
+	u32 ina_cnt;
+	u32 fina_cnt;
+	u32 plcp_err;
+	u32 crc32_err;
+	u32 overrun_err;
+	u32 early_overrun_err;
+	u32 crc32_good;
+	u32 false_alarm_cnt;
+	u32 fina_sync_err_cnt;
+	u32 sfd_timeout;
+	u32 fina_timeout;
+	u32 unresponded_rts;
+	u32 rxe_frame_limit_overrun;
+	u32 sent_ack_cnt;
+	u32 sent_cts_cnt;
+} __attribute__ ((packed));
+
+struct statistics_rx {
+	struct statistics_rx_phy ofdm;
+	struct statistics_rx_phy cck;
+	u32 bogus_cts;
+	u32 bogus_ack;
+	u32 non_bssid_frames;
+	u32 filtered_frames;
+	u32 non_channel_beacons;
+} __attribute__ ((packed));
+
+struct statistics_tx {
+	u32 preamble_cnt;
+	u32 rx_detected_cnt;
+	u32 bt_prio_defer_cnt;
+	u32 bt_prio_kill_cnt;
+	u32 few_bytes_cnt;
+	u32 cts_timeout;
+	u32 ack_timeout;
+	u32 expected_ack_cnt;
+	u32 actual_ack_cnt;
+} __attribute__ ((packed));
+
+struct statistics_dbg {
+	u32 burst_check;
+	u32 burst_count;
+	u32 reserved[4];
+} __attribute__ ((packed));
+
+struct statistics_div {
+	u32 tx_on_a;
+	u32 tx_on_b;
+	u32 exec_time;
+	u32 probe_time;
+} __attribute__ ((packed));
+
+struct statistics_general {
+	u32 temperature;
+	struct statistics_dbg dbg;
+	u32 sleep_time;
+	u32 slots_out;
+	u32 slots_idle;
+	u32 ttl_timestamp;
+	struct statistics_div div;
+} __attribute__ ((packed));
+
+struct ipw_notif_statistics {
+	u32 flag;
+	struct statistics_rx rx;
+	struct statistics_tx tx;
+	struct statistics_general general;
+} __attribute__ ((packed));
+
+struct ipw_rx_packet {
+	u32 len;
+	struct ipw_cmd_header hdr;
+	union {
+		struct ipw_alive_resp alive_frame;
+		struct ipw_rx_frame rx_frame;
+		struct ipw_tx_resp tx_resp;
+		struct ipw_spectrum_notification spectrum_notif;
+		struct ipw_csa_notification csa_notif;
+		struct ipw_error_resp err_resp;
+		struct ipw_card_state_notif card_state_notif;
+		struct ipw_notif_statistics stats;
+		struct BeaconNtfSpecifics beacon_status;
+		struct ipw_add_sta_resp add_sta;
+		struct ipw_sleep_notification sleep_notif;
+		u32 status;
+		u8 raw[0];
+	} u;
+} __attribute__ ((packed));
+
+#define IPW_RX_FRAME_SIZE        (4 + sizeof(struct ipw_rx_frame))
+
+struct ipw_multicast_addr {
+	u8 num_of_multicast_addresses;
+	u8 reserved[3];
+	u8 mac1[6];
+	u8 mac2[6];
+	u8 mac3[6];
+	u8 mac4[6];
+} __attribute__ ((packed));
+
+struct ipw_tgi_tx_key {
+	u8 key_id;
+	u8 security_type;
+	u8 station_index;
+	u8 flags;
+	u8 key[16];
+	u32 tx_counter[2];
+} __attribute__ ((packed));
+
+struct ipw_associate {
+	u8 channel;
+	u8 auth_type:4, auth_key:4;
+	u8 assoc_type;
+	u8 reserved;
+	u16 policy_support;
+	u8 preamble_length;
+	u8 ieee_mode;
+	u8 bssid[ETH_ALEN];
+	u32 assoc_tsf_msw;
+	u32 assoc_tsf_lsw;
+	u16 capability;
+	u16 listen_interval;
+	u16 beacon_interval;
+	u8 dest[ETH_ALEN];
+	u16 atim_window;
+	u8 smr;
+	u8 reserved1;
+	u16 reserved2;
+	u16 assoc_id;
+	u8 erp_value;
+} __attribute__ ((packed));
+
+#define IPW_SUPPORTED_RATES_IE_LEN         8
+
+struct ipw_supported_rates {
+	u8 ieee_mode;
+	u8 num_rates;
+	u8 purpose;
+	u8 reserved;
+	u8 supported_rates[IPW_MAX_RATES];
+} __attribute__ ((packed));
+
+struct ipw_channel_tx_power {
+	u8 channel_number;
+	s8 tx_power;
+} __attribute__ ((packed));
+
+
+#define IPW_RX_BUF_SIZE 3000
+
+#endif				/* __iwlwifi_hw_h__ */
--- linux-2.6.20.noarch/drivers/net/wireless/mac80211/Makefile.orig	2007-03-22 16:07:36.000000000 -0400
+++ linux-2.6.20.noarch/drivers/net/wireless/mac80211/Makefile	2007-03-22 16:08:07.000000000 -0400
@@ -4,3 +4,4 @@ obj-$(CONFIG_ADM8211)		+= adm8211/
 obj-$(CONFIG_P54_COMMON)	+= p54/
 obj-$(CONFIG_ZD1211RW_MAC80211)	+= zd1211rw/
 obj-$(CONFIG_RTL818X)		+= rtl818x/
+obj-$(CONFIG_IWLWIFI)		+= iwlwifi/
--- linux-2.6.20.noarch/drivers/net/wireless/mac80211/Kconfig.orig	2007-03-22 16:07:36.000000000 -0400
+++ linux-2.6.20.noarch/drivers/net/wireless/mac80211/Kconfig	2007-03-22 16:08:07.000000000 -0400
@@ -4,3 +4,4 @@ source "drivers/net/wireless/mac80211/ad
 source "drivers/net/wireless/mac80211/p54/Kconfig"
 source "drivers/net/wireless/mac80211/zd1211rw/Kconfig"
 source "drivers/net/wireless/mac80211/rtl818x/Kconfig"
+source "drivers/net/wireless/mac80211/iwlwifi/Kconfig"

jwltest-mac80211-backport-2_6_20-fixup.patch:
 mac80211/ieee80211_sysfs.c     |  105 ++++++++++++++++++++---------------------
 mac80211/ieee80211_sysfs_sta.c |    2 
 wireless/core.c                |    4 -
 3 files changed, 56 insertions(+), 55 deletions(-)

--- NEW FILE jwltest-mac80211-backport-2_6_20-fixup.patch ---
--- linux-2.6.20.noarch/net/wireless/core.c.orig	2007-03-20 14:38:10.000000000 -0400
+++ linux-2.6.20.noarch/net/wireless/core.c	2007-03-20 14:50:52.000000000 -0400
@@ -255,7 +255,7 @@ static int cfg80211_netdev_notifier_call
 	case NETDEV_REGISTER:
 		mutex_lock(&rdev->devlist_mtx);
 		list_add(&dev->ieee80211_ptr->list, &rdev->netdev_list);
-		if (sysfs_create_link(&dev->dev.kobj, &rdev->wiphy.dev.kobj,
+		if (sysfs_create_link(&dev->class_dev.kobj, &rdev->wiphy.dev.kobj,
 				      "phy80211")) {
 			printk(KERN_ERR "wireless: failed to add phy80211 symlink to netdev!\n");
 		}
@@ -265,7 +265,7 @@ static int cfg80211_netdev_notifier_call
 	case NETDEV_UNREGISTER:
 		mutex_lock(&rdev->devlist_mtx);
 		if (!list_empty(&dev->ieee80211_ptr->list)) {
-			sysfs_remove_link(&dev->dev.kobj, "phy80211");
+			sysfs_remove_link(&dev->class_dev.kobj, "phy80211");
 			list_del_init(&dev->ieee80211_ptr->list);
 		}
 		mutex_unlock(&rdev->devlist_mtx);
--- linux-2.6.20.noarch/net/mac80211/ieee80211_sysfs.c.orig	2007-03-20 14:38:10.000000000 -0400
+++ linux-2.6.20.noarch/net/mac80211/ieee80211_sysfs.c	2007-03-20 14:50:04.000000000 -0400
@@ -24,6 +24,9 @@ static inline struct ieee80211_local *to
 	return wiphy_priv(wiphy);
 }
 
+#define to_net_dev(class) \
+	container_of(class, struct net_device, class_dev)
+
 static inline int rtnl_lock_local(struct ieee80211_local *local)
 {
 	rtnl_lock();
@@ -364,12 +367,11 @@ static struct attribute_group ieee80211_
 
 /* attributes in /sys/class/net/X/ */
 
-static ssize_t ieee80211_if_show(struct device *d,
-			struct device_attribute *attr, char *buf,
+static ssize_t ieee80211_if_show(struct class_device *cd, char *buf,
 			ssize_t (*format)(const struct ieee80211_sub_if_data *,
 					  char *))
 {
-	struct net_device *dev = to_net_dev(d);
+	struct net_device *dev = to_net_dev(cd);
 	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	ssize_t ret = -EINVAL;
 
@@ -409,13 +411,12 @@ static ssize_t ieee80211_if_fmt_##name(c
 }
 
 #define __IEEE80211_IF_SHOW(name)					\
-static ssize_t ieee80211_if_show_##name(struct device *d,		\
-					struct device_attribute *attr,	\
+static ssize_t ieee80211_if_show_##name(struct class_device *cd,	\
 					char *buf)			\
 {									\
-	return ieee80211_if_show(d, attr, buf, ieee80211_if_fmt_##name);\
+	return ieee80211_if_show(cd, buf, ieee80211_if_fmt_##name);	\
 }									\
-static DEVICE_ATTR(name, S_IRUGO, ieee80211_if_show_##name, NULL);
+static CLASS_DEVICE_ATTR(name, S_IRUGO, ieee80211_if_show_##name, NULL);
 
 #define IEEE80211_IF_SHOW(name, field, format)				\
 		IEEE80211_IF_FMT_##format(name, field)			\
@@ -509,64 +510,64 @@ static ssize_t ieee80211_if_fmt_mode(con
 __IEEE80211_IF_SHOW(mode);
 
 static struct attribute *ieee80211_sta_attrs[] = {
-	&dev_attr_channel_use.attr,
-	&dev_attr_drop_unencrypted.attr,
-	&dev_attr_eapol.attr,
-	&dev_attr_ieee8021_x.attr,
-	&dev_attr_state.attr,
-	&dev_attr_bssid.attr,
-	&dev_attr_prev_bssid.attr,
-	&dev_attr_ssid_len.attr,
-	&dev_attr_aid.attr,
-	&dev_attr_ap_capab.attr,
-	&dev_attr_capab.attr,
-	&dev_attr_extra_ie_len.attr,
-	&dev_attr_auth_tries.attr,
-	&dev_attr_assoc_tries.attr,
-	&dev_attr_auth_algs.attr,
-	&dev_attr_auth_alg.attr,
-	&dev_attr_auth_transaction.attr,
-	&dev_attr_flags.attr,
+	&class_device_attr_channel_use.attr,
+	&class_device_attr_drop_unencrypted.attr,
+	&class_device_attr_eapol.attr,
+	&class_device_attr_ieee8021_x.attr,
+	&class_device_attr_state.attr,
+	&class_device_attr_bssid.attr,
+	&class_device_attr_prev_bssid.attr,
+	&class_device_attr_ssid_len.attr,
+	&class_device_attr_aid.attr,
+	&class_device_attr_ap_capab.attr,
+	&class_device_attr_capab.attr,
+	&class_device_attr_extra_ie_len.attr,
+	&class_device_attr_auth_tries.attr,
+	&class_device_attr_assoc_tries.attr,
+	&class_device_attr_auth_algs.attr,
+	&class_device_attr_auth_alg.attr,
+	&class_device_attr_auth_transaction.attr,
+	&class_device_attr_flags.attr,
 	NULL
 };
 
 static struct attribute *ieee80211_ap_attrs[] = {
-	&dev_attr_channel_use.attr,
-	&dev_attr_drop_unencrypted.attr,
-	&dev_attr_eapol.attr,
-	&dev_attr_ieee8021_x.attr,
-	&dev_attr_num_sta_ps.attr,
-	&dev_attr_dtim_period.attr,
-	&dev_attr_dtim_count.attr,
-	&dev_attr_num_beacons.attr,
-	&dev_attr_force_unicast_rateidx.attr,
-	&dev_attr_max_ratectrl_rateidx.attr,
-	&dev_attr_num_buffered_multicast.attr,
-	&dev_attr_beacon_head_len.attr,
-	&dev_attr_beacon_tail_len.attr,
+	&class_device_attr_channel_use.attr,
+	&class_device_attr_drop_unencrypted.attr,
+	&class_device_attr_eapol.attr,
+	&class_device_attr_ieee8021_x.attr,
+	&class_device_attr_num_sta_ps.attr,
+	&class_device_attr_dtim_period.attr,
+	&class_device_attr_dtim_count.attr,
+	&class_device_attr_num_beacons.attr,
+	&class_device_attr_force_unicast_rateidx.attr,
+	&class_device_attr_max_ratectrl_rateidx.attr,
+	&class_device_attr_num_buffered_multicast.attr,
+	&class_device_attr_beacon_head_len.attr,
+	&class_device_attr_beacon_tail_len.attr,
 	NULL
 };
 
 static struct attribute *ieee80211_wds_attrs[] = {
-	&dev_attr_channel_use.attr,
-	&dev_attr_drop_unencrypted.attr,
-	&dev_attr_eapol.attr,
-	&dev_attr_ieee8021_x.attr,
-	&dev_attr_peer.attr,
+	&class_device_attr_channel_use.attr,
+	&class_device_attr_drop_unencrypted.attr,
+	&class_device_attr_eapol.attr,
+	&class_device_attr_ieee8021_x.attr,
+	&class_device_attr_peer.attr,
 	NULL
 };
 
 static struct attribute *ieee80211_vlan_attrs[] = {
-	&dev_attr_channel_use.attr,
-	&dev_attr_drop_unencrypted.attr,
-	&dev_attr_eapol.attr,
-	&dev_attr_ieee8021_x.attr,
-	&dev_attr_vlan_id.attr,
+	&class_device_attr_channel_use.attr,
+	&class_device_attr_drop_unencrypted.attr,
+	&class_device_attr_eapol.attr,
+	&class_device_attr_ieee8021_x.attr,
+	&class_device_attr_vlan_id.attr,
 	NULL
 };
 
 static struct attribute *ieee80211_monitor_attrs[] = {
-	&dev_attr_mode.attr,
+	&class_device_attr_mode.attr,
 	NULL
 };
 
@@ -694,14 +695,14 @@ out:
 
 int ieee80211_sysfs_change_if_type(struct net_device *dev)
 {
-	return ieee80211_add_if_group(&dev->dev.kobj, dev);
+	return ieee80211_add_if_group(&dev->class_dev.kobj, dev);
 }
 
 int ieee80211_sysfs_add_netdevice(struct net_device *dev)
 {
 	int res;
 
-	res = ieee80211_add_if_group(&dev->dev.kobj, dev);
+	res = ieee80211_add_if_group(&dev->class_dev.kobj, dev);
 	if (res)
 		goto err_fail_if_group;
 	res = ieee80211_key_kset_sysfs_register(IEEE80211_DEV_TO_SUB_IF(dev));
@@ -714,5 +715,5 @@ err_fail_if_group:
 void ieee80211_sysfs_remove_netdevice(struct net_device *dev)
 {
 	ieee80211_key_kset_sysfs_unregister(IEEE80211_DEV_TO_SUB_IF(dev));
-	ieee80211_remove_if_group(&dev->dev.kobj, dev);
+	ieee80211_remove_if_group(&dev->class_dev.kobj, dev);
 }
--- linux-2.6.20.noarch/net/mac80211/ieee80211_sysfs_sta.c.orig	2007-03-20 14:38:10.000000000 -0400
+++ linux-2.6.20.noarch/net/mac80211/ieee80211_sysfs_sta.c	2007-03-20 14:50:04.000000000 -0400
@@ -387,7 +387,7 @@ int ieee80211_key_kset_sysfs_register(st
 	res = kobject_set_name(&sdata->key_kset.kobj, "keys");
 	if (res)
 		return res;
-	sdata->key_kset.kobj.parent = &sdata->dev->dev.kobj;
+	sdata->key_kset.kobj.parent = &sdata->dev->class_dev.kobj;
 	sdata->key_kset.ktype = &key_ktype;
 	return kset_register(&sdata->key_kset);
 }

jwltest-mac80211-backport.patch:
 CREDITS                                                 |   31 
 MAINTAINERS                                             |   56 
 drivers/Kconfig                                         |    2 
 drivers/Makefile                                        |    1 
 drivers/net/Makefile                                    |    2 
 drivers/net/wireless/Kconfig                            |  120 
 drivers/net/wireless/Makefile                           |    3 
 drivers/net/wireless/bcm43xx/Kconfig                    |    3 
 drivers/net/wireless/hostap/Kconfig                     |    3 
 drivers/net/wireless/mac80211/Kconfig                   |    6 
 drivers/net/wireless/mac80211/Makefile                  |    6 
 drivers/net/wireless/mac80211/README                    |    2 
 drivers/net/wireless/mac80211/adm8211/Kconfig           |   25 
 drivers/net/wireless/mac80211/adm8211/Makefile          |    1 
 drivers/net/wireless/mac80211/adm8211/adm8211.c         | 2188 +++++++
 drivers/net/wireless/mac80211/adm8211/adm8211.h         |  622 ++
 drivers/net/wireless/mac80211/bcm43xx/Kconfig           |  100 
 drivers/net/wireless/mac80211/bcm43xx/Makefile          |   16 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx.h         |  870 ++
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_debugfs.c |  433 +
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_debugfs.h |  110 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_dma.c     | 1297 ++++
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_dma.h     |  361 +
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_leds.c    |  300 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_leds.h    |   56 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_lo.c      | 1081 +++
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_lo.h      |   92 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.c    | 3988 ++++++++++++
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.h    |  156 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_pcmcia.c  |  163 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_pcmcia.h  |   22 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_phy.c     | 4235 +++++++++++++
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_phy.h     |  309 +
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_pio.c     |  671 ++
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_pio.h     |  170 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_power.c   |   82 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_power.h   |   41 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_sysfs.c   |  232 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_sysfs.h   |    9 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_tables.c  |  376 +
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_tables.h  |   28 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_vstack.c  |  202 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_vstack.h  |   83 
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_xmit.c    |  615 +
 drivers/net/wireless/mac80211/bcm43xx/bcm43xx_xmit.h    |  215 
 drivers/net/wireless/mac80211/p54/Kconfig               |   10 
 drivers/net/wireless/mac80211/p54/Makefile              |    4 
 drivers/net/wireless/mac80211/p54/net2280.h             |  452 +
 drivers/net/wireless/mac80211/p54/prism54.h             |   77 
 drivers/net/wireless/mac80211/p54/prism54common.c       |  807 ++
 drivers/net/wireless/mac80211/p54/prism54common.h       |  304 
 drivers/net/wireless/mac80211/p54/prism54magic.h        |   77 
 drivers/net/wireless/mac80211/p54/prism54pci.c          |  698 ++
 drivers/net/wireless/mac80211/p54/prism54pci.h          |  106 
 drivers/net/wireless/mac80211/p54/prism54usb.c          |  946 +++
 drivers/net/wireless/mac80211/p54/prism54usb.h          |  133 
 drivers/net/wireless/mac80211/rt2x00/Kconfig            |   86 
 drivers/net/wireless/mac80211/rt2x00/Makefile           |    9 
 drivers/net/wireless/mac80211/rt2x00/rt2400pci.c        | 2586 ++++++++
 drivers/net/wireless/mac80211/rt2x00/rt2400pci.h        |  931 +++
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.c        | 2883 +++++++++
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.h        | 1198 +++
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.c        | 2718 ++++++++
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.h        |  746 ++
 drivers/net/wireless/mac80211/rt2x00/rt2x00.h           | 1069 +++
 drivers/net/wireless/mac80211/rt2x00/rt2x00debug.c      |  380 +
 drivers/net/wireless/mac80211/rt2x00/rt2x00debug.h      |   70 
 drivers/net/wireless/mac80211/rt2x00/rt2x00dev.c        |  231 
 drivers/net/wireless/mac80211/rt2x00/rt2x00lib.h        |   74 
 drivers/net/wireless/mac80211/rt2x00/rt2x00mac.c        |  540 +
 drivers/net/wireless/mac80211/rt2x00/rt2x00pci.h        |   39 
 drivers/net/wireless/mac80211/rt2x00/rt2x00usb.h        |   82 
 drivers/net/wireless/mac80211/rt2x00/rt61pci.c          | 3364 ++++++++++
 drivers/net/wireless/mac80211/rt2x00/rt61pci.h          | 1361 ++++
 drivers/net/wireless/mac80211/rt2x00/rt73usb.c          | 3024 +++++++++
 drivers/net/wireless/mac80211/rt2x00/rt73usb.h          |  945 +++
 drivers/net/wireless/mac80211/rtl818x/Kconfig           |    9 
 drivers/net/wireless/mac80211/rtl818x/Makefile          |    2 
 drivers/net/wireless/mac80211/rtl818x/rtl8187.h         |  126 
 drivers/net/wireless/mac80211/rtl818x/rtl8187_dev.c     |  720 ++
 drivers/net/wireless/mac80211/rtl818x/rtl8187_rtl8225.c |  747 ++
 drivers/net/wireless/mac80211/rtl818x/rtl8187_rtl8225.h |   30 
 drivers/net/wireless/mac80211/rtl818x/rtl818x.h         |  177 
 drivers/net/wireless/mac80211/zd1211rw/Kconfig          |   19 
 drivers/net/wireless/mac80211/zd1211rw/Makefile         |   11 
 drivers/net/wireless/mac80211/zd1211rw/zd_chip.c        | 1676 +++++
 drivers/net/wireless/mac80211/zd1211rw/zd_chip.h        |  909 ++
 drivers/net/wireless/mac80211/zd1211rw/zd_def.h         |   57 
 drivers/net/wireless/mac80211/zd1211rw/zd_ieee80211.h   |   67 
 drivers/net/wireless/mac80211/zd1211rw/zd_mac.c         |  705 ++
 drivers/net/wireless/mac80211/zd1211rw/zd_mac.h         |  250 
 drivers/net/wireless/mac80211/zd1211rw/zd_rf.c          |  156 
 drivers/net/wireless/mac80211/zd1211rw/zd_rf.h          |   81 
 drivers/net/wireless/mac80211/zd1211rw/zd_rf_al2230.c   |  436 +
 drivers/net/wireless/mac80211/zd1211rw/zd_rf_al7230b.c  |  274 
 drivers/net/wireless/mac80211/zd1211rw/zd_rf_rf2959.c   |  279 
 drivers/net/wireless/mac80211/zd1211rw/zd_usb.c         | 1327 ++++
 drivers/net/wireless/mac80211/zd1211rw/zd_usb.h         |  241 
 drivers/net/wireless/mac80211/zd1211rw/zd_util.c        |   82 
 drivers/net/wireless/mac80211/zd1211rw/zd_util.h        |   29 
 drivers/net/wireless/zd1211rw/Kconfig                   |    3 
 drivers/ssb/Kconfig                                     |   93 
 drivers/ssb/Makefile                                    |   11 
 drivers/ssb/driver_chipcommon.c                         |  402 +
 drivers/ssb/driver_mipscore.c                           |  258 
 drivers/ssb/driver_pcicore.c                            |  556 +
 drivers/ssb/main.c                                      | 1042 +++
 drivers/ssb/pci.c                                       |  667 ++
 drivers/ssb/pcihost_wrapper.c                           |  104 
 drivers/ssb/pcmcia.c                                    |  256 
 drivers/ssb/scan.c                                      |  407 +
 drivers/ssb/ssb_private.h                               |  151 
 drivers/usb/host/Kconfig                                |   13 
 drivers/usb/host/ohci-hcd.c                             |    6 
 drivers/usb/host/ohci-ssb.c                             |  254 
 include/linux/Kbuild                                    |    2 
 include/linux/crc-itu-t.h                               |   27 
 include/linux/eeprom_93cx6.h                            |   77 
 include/linux/ieee80211.h                               |  330 +
 include/linux/netdevice.h                               |    7 
 include/linux/nl80211.h                                 |  275 
 include/linux/ssb/ssb.h                                 |  403 +
 include/linux/ssb/ssb_driver_chipcommon.h               |  387 +
 include/linux/ssb/ssb_driver_extif.h                    |  163 
 include/linux/ssb/ssb_driver_mips.h                     |   47 
 include/linux/ssb/ssb_driver_pci.h                      |  108 
 include/linux/ssb/ssb_regs.h                            |  294 
 include/net/cfg80211.h                                  |  169 
 include/net/iw_handler.h                                |    3 
 include/net/mac80211.h                                  | 1074 +++
 include/net/wireless.h                                  |  160 
 lib/Kconfig                                             |   16 
 lib/Makefile                                            |    3 
 lib/crc-itu-t.c                                         |   64 
 lib/eeprom_93cx6.c                                      |  344 +
 net/Kconfig                                             |   12 
 net/Makefile                                            |    2 
 net/core/Makefile                                       |    1 
 net/core/dev.c                                          |   33 
 net/core/wireless.c                                     | 2353 -------
 net/ieee80211/Kconfig                                   |    3 
 net/mac80211/Kconfig                                    |   71 
 net/mac80211/Makefile                                   |   26 
 net/mac80211/aes_ccm.c                                  |  155 
 net/mac80211/aes_ccm.h                                  |   26 
 net/mac80211/fifo_qdisc.c                               |  102 
 net/mac80211/hostapd_ioctl.h                            |  347 +
 net/mac80211/ieee80211.c                                | 4940 ++++++++++++++++
 net/mac80211/ieee80211_cfg.c                            |   90 
 net/mac80211/ieee80211_cfg.h                            |    9 
 net/mac80211/ieee80211_common.h                         |   98 
 net/mac80211/ieee80211_i.h                              |  720 ++
 net/mac80211/ieee80211_iface.c                          |  372 +
 net/mac80211/ieee80211_ioctl.c                          | 3304 ++++++++++
 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                           |  161 
 net/mac80211/ieee80211_scan.c                           |  344 +
 net/mac80211/ieee80211_sta.c                            | 3013 +++++++++
 net/mac80211/ieee80211_sysfs.c                          |  718 ++
 net/mac80211/ieee80211_sysfs.h                          |   12 
 net/mac80211/ieee80211_sysfs_sta.c                      |  438 +
 net/mac80211/michael.c                                  |  104 
 net/mac80211/michael.h                                  |   20 
 net/mac80211/rc80211_simple.c                           |  399 +
 net/mac80211/sta_info.c                                 |  461 +
 net/mac80211/sta_info.h                                 |  150 
 net/mac80211/tkip.c                                     |  341 +
 net/mac80211/tkip.h                                     |   36 
 net/mac80211/wep.c                                      |  328 +
 net/mac80211/wep.h                                      |   40 
 net/mac80211/wme.c                                      |  679 ++
 net/mac80211/wme.h                                      |   38 
 net/mac80211/wpa.c                                      |  846 ++
 net/mac80211/wpa.h                                      |   31 
 net/wireless/Kconfig                                    |   46 
 net/wireless/Makefile                                   |   17 
 net/wireless/core.c                                     |  323 +
 net/wireless/core.h                                     |   77 
 net/wireless/nl80211.c                                  | 1051 +++
 net/wireless/nl80211.h                                  |   17 
 net/wireless/sysfs.c                                    |  125 
 net/wireless/sysfs.h                                    |    9 
 net/wireless/wext-common.c                              |  663 ++
 net/wireless/wext-compat.c                              |  819 ++
 net/wireless/wext-export.c                              |   29 
 net/wireless/wext-mod.c                                 |   20 
 net/wireless/wext-old.c                                 | 1461 ++++
 net/wireless/wext.h                                     |   51 
 191 files changed, 85334 insertions(+), 2469 deletions(-)

--- NEW FILE jwltest-mac80211-backport.patch ---
--- /dev/null	2007-03-09 11:47:32.684268720 -0500
+++ linux-2.6.20.noarch/include/net/wireless.h	2007-03-20 14:31:14.000000000 -0400
@@ -0,0 +1,160 @@
+#ifndef __NET_WIRELESS_H
+#define __NET_WIRELESS_H
+
+/*
+ * 802.11 device management
+ *
+ * Copyright 2007	Johannes Berg <johannes at sipsolutions.net>
+ */
+
+#include <linux/netdevice.h>
+#include <linux/debugfs.h>
+#include <linux/list.h>
+#include <net/cfg80211.h>
+
+/**
+ * struct wiphy - wireless hardware description
+ * @idx: the wiphy index assigned to this item
+ * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name>
+ */
+struct wiphy {
+	/* assign these fields before you register the wiphy */
+
+	/* permanent MAC address */
+	u8 perm_addr[ETH_ALEN];
+
+	/* If multiple wiphys are registered and you're handed e.g.
+	 * a regular netdev with assigned ieee80211_ptr, you won't
+	 * know whether it points to a wiphy your driver has registered
+	 * or not. Assign this to something global to your driver to
+	 * help determine whether you own this wiphy or not. */
+	void *privid;
+
+	/* fields below are read-only, assigned by cfg80211 */
+
+	/* the item in /sys/class/ieee80211/ points to this,
+	 * you need use set_wiphy_dev() (see below) */
+	struct device dev;
+
+	/* dir in debugfs: ieee80211/<wiphyname> */
+	struct dentry *debugfsdir;
+
+	char priv[0] __attribute__((__aligned__(NETDEV_ALIGN)));
+};
+
+/** struct wireless_dev - wireless per-netdev state
+ *
+ * This structure must be allocated by the driver/stack
+ * that uses the ieee80211_ptr field in struct net_device
+ * (this is intentional so it can be allocated along with
+ * the netdev.)
+ *
+ * @wiphy: pointer to hardware description
+ */
+struct wireless_dev {
+	struct wiphy *wiphy;
+
+	/* private to the generic wireless code */
+	struct cfg80211_config pending_config;
+	struct list_head list;
+	struct net_device *netdev;
+};
+
+/**
+ * wiphy_priv - return priv from wiphy
+ */
+static inline void *wiphy_priv(struct wiphy *wiphy)
+{
+	BUG_ON(!wiphy);
+	return &wiphy->priv;
+}
+
+/**
+ * set_wiphy_dev - set device pointer for wiphy
+ */
+static inline void set_wiphy_dev(struct wiphy *wiphy, struct device *dev)
+{
+	wiphy->dev.parent = dev;
+}
+
+/**
+ * wiphy_dev - get wiphy dev pointer
+ */
+static inline struct device *wiphy_dev(struct wiphy *wiphy)
+{
+	return wiphy->dev.parent;
+}
+
+/**
+ * wiphy_name - get wiphy name
+ */
+static inline char *wiphy_name(struct wiphy *wiphy)
+{
+	return wiphy->dev.bus_id;
+}
+
+/**
+ * wdev_priv - return wiphy priv from wireless_dev
+ */
+static inline void *wdev_priv(struct wireless_dev *wdev)
+{
+	BUG_ON(!wdev);
+	return wiphy_priv(wdev->wiphy);
+}
+
+/**
+ * wiphy_new - create a new wiphy for use with cfg80211
+ *
+ * create a new wiphy and associate the given operations with it.
+ * @sizeof_priv bytes are allocated for private use.
+ *
+ * the returned pointer must be assigned to each netdev's
+ * ieee80211_ptr for proper operation.
+ */
+struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv);
+
+/**
+ * wiphy_register - register a wiphy with cfg80211
+ *
+ * register the given wiphy
+ *
+ * Returns a non-negative wiphy index or a negative error code.
+ */
+extern int wiphy_register(struct wiphy *wiphy);
+
+/**
+ * wiphy_unregister - deregister a wiphy from cfg80211
+ *
+ * unregister a device with the given priv pointer.
+ * After this call, no more requests can be made with this priv
+ * pointer, but the call may sleep to wait for an outstanding
+ * request that is being handled.
+ */
+extern void wiphy_unregister(struct wiphy *wiphy);
+
+/**
+ * wiphy_free - free wiphy
+ */
+extern void wiphy_free(struct wiphy *wiphy);
+
+
+/*
+ * internal definitions for wireless
+ */
+
+#if defined(CONFIG_CFG80211_WEXT_COMPAT) || defined(CONFIG_WIRELESS_EXT)
+int wext_ioctl(unsigned int cmd, struct ifreq *ifreq, void __user *arg);
+int wireless_proc_init(void);
+#else
+static inline
+int wext_ioctl(unsigned int cmd, struct ifreq *ifreq, void __user *arg)
+{
+	return -EINVAL;
+}
+static inline int wireless_proc_init(void)
+{
+	return 0;
+}
+#endif
+
+#endif /* __NET_WIRELESS_H */
--- /dev/null	2007-03-09 11:47:32.684268720 -0500
+++ linux-2.6.20.noarch/include/net/mac80211.h	2007-03-20 14:31:14.000000000 -0400
@@ -0,0 +1,1074 @@
+/*
+ * Low-level hardware driver -- IEEE 802.11 driver (80211.o) interface
+ * Copyright 2002-2005, Devicescape Software, Inc.
+ *
+ * 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 MAC80211_H
+#define MAC80211_H
+
+#include <linux/kernel.h>
+#include <linux/if_ether.h>
+#include <linux/skbuff.h>
+#include <linux/wireless.h>
+#include <linux/device.h>
+#include <linux/ieee80211.h>
+#include <net/wireless.h>
+#include <net/cfg80211.h>
+
+/* Note! Only ieee80211_tx_status_irqsafe() and ieee80211_rx_irqsafe() can be
+ * called in hardware interrupt context. The low-level driver must not call any
+ * other functions in hardware interrupt context. If there is a need for such
+ * call, the low-level driver should first ACK the interrupt and perform the
+ * IEEE 802.11 code call after this, e.g., from a scheduled tasklet (in
+ * software interrupt context).
+ */
+
+/*
+ * Frame format used when passing frame between low-level hardware drivers
+ * and IEEE 802.11 driver the same as used in the wireless media, i.e.,
+ * buffers start with IEEE 802.11 header and include the same octets that
[...88429 lines suppressed...]
+			break;
+
+		buf = kmalloc(100, GFP_ATOMIC);
+		if (!buf)
+			break;
+
+		memset(&iwe, 0, sizeof(iwe));
+		iwe.cmd = IWEVCUSTOM;
+		sprintf(buf, "bcn_int=%d", bss->beacon_int);
+		iwe.u.data.length = strlen(buf);
+		current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
+						  buf);
+
+		memset(&iwe, 0, sizeof(iwe));
+		iwe.cmd = IWEVCUSTOM;
+		sprintf(buf, "rssi=%d", bss->rssi);
+		iwe.u.data.length = strlen(buf);
+		current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
+						  buf);
+
+		memset(&iwe, 0, sizeof(iwe));
+		iwe.cmd = IWEVCUSTOM;
+		sprintf(buf, "capab=0x%04x", bss->capability);
+		iwe.u.data.length = strlen(buf);
+		current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
+						  buf);
+
+		/* dispaly all support rates in readable format */
+		p = current_ev + IW_EV_LCP_LEN;
+		iwe.cmd = SIOCGIWRATE;
+		/* Those two flags are ignored... */
+		iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
+
+		for (i = 0; i < bss->supp_rates_len; i++) {
+			iwe.u.bitrate.value = ((bss->supp_rates[i] &
+							0x7f) * 500000);
+			p = iwe_stream_add_value(current_ev, p,
+					end_buf, &iwe, IW_EV_PARAM_LEN);
+		}
+		/* Check if we added any rate */
+		if((p - current_ev) > IW_EV_LCP_LEN)
+			current_ev = p;
+
+		kfree(buf);
+		break;
+	} while (0);
+
+	return current_ev;
+}
+
+
+int ieee80211_sta_scan_results(struct net_device *dev, char *buf, size_t len)
+{
+	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+	char *current_ev = buf;
+	char *end_buf = buf + len;
+	struct ieee80211_sta_bss *bss;
+
+	spin_lock_bh(&local->sta_bss_lock);
+	list_for_each_entry(bss, &local->sta_bss_list, list) {
+		if (buf + len - current_ev <= IW_EV_ADDR_LEN) {
+			spin_unlock_bh(&local->sta_bss_lock);
+			return -E2BIG;
+		}
+		current_ev = ieee80211_sta_scan_result(dev, bss, current_ev,
+						       end_buf);
+	}
+	spin_unlock_bh(&local->sta_bss_lock);
+	return current_ev - buf;
+}
+
+
+int ieee80211_sta_set_extra_ie(struct net_device *dev, char *ie, size_t len)
+{
+	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+	struct ieee80211_if_sta *ifsta = &sdata->u.sta;
+	kfree(ifsta->extra_ie);
+	if (len == 0) {
+		ifsta->extra_ie = NULL;
+		ifsta->extra_ie_len = 0;
+		return 0;
+	}
+	ifsta->extra_ie = kmalloc(len, GFP_KERNEL);
+	if (!ifsta->extra_ie) {
+		ifsta->extra_ie_len = 0;
+		return -ENOMEM;
+	}
+	memcpy(ifsta->extra_ie, ie, len);
+	ifsta->extra_ie_len = len;
+	return 0;
+}
+
+
+struct sta_info * ieee80211_ibss_add_sta(struct net_device *dev,
+					 struct sk_buff *skb, u8 *bssid,
+					 u8 *addr)
+{
+	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+	struct sta_info *sta;
+	struct ieee80211_sub_if_data *sdata = NULL;
+	struct net_device *sta_dev = NULL;
+
+	/* TODO: Could consider removing the least recently used entry and
+	 * allow new one to be added. */
+	if (local->num_sta >= IEEE80211_IBSS_MAX_STA_ENTRIES) {
+		if (net_ratelimit()) {
+			printk(KERN_DEBUG "%s: No room for a new IBSS STA "
+			       "entry " MAC_FMT "\n", dev->name, MAC_ARG(addr));
+		}
+		return NULL;
+	}
+
+	spin_lock_bh(&local->sub_if_lock);
+	list_for_each_entry(sdata, &local->sub_if_list, list)
+		if (sdata->type == IEEE80211_IF_TYPE_IBSS &&
+		    memcmp(bssid, sdata->u.sta.bssid, ETH_ALEN) == 0) {
+			sta_dev = sdata->dev;
+			break;
+		}
+	spin_unlock_bh(&local->sub_if_lock);
+
+	if (!sta_dev)
+		return NULL;
+
+	printk(KERN_DEBUG "%s: Adding new IBSS station " MAC_FMT " (dev=%s)\n",
+	       dev->name, MAC_ARG(addr), sta_dev->name);
+
+	sta = sta_info_add(local, dev, addr, GFP_ATOMIC);
+	if (!sta)
+		return NULL;
+
+	sta->dev = sta_dev;
+	sta->supp_rates = sdata->u.sta.supp_rates_bits;
+
+	rate_control_rate_init(sta, local);
+
+	return sta; /* caller will call sta_info_put() */
+}
+
+
+int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason)
+{
+	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+	struct ieee80211_if_sta *ifsta = &sdata->u.sta;
+
+	printk(KERN_DEBUG "%s: deauthenticate(reason=%d)\n",
+	       dev->name, reason);
+
+	if (sdata->type != IEEE80211_IF_TYPE_STA &&
+	    sdata->type != IEEE80211_IF_TYPE_IBSS)
+		return -EINVAL;
+
+	ieee80211_send_deauth(dev, ifsta, reason);
+	ieee80211_set_disassoc(dev, ifsta, 1);
+	return 0;
+}
+
+
+int ieee80211_sta_disassociate(struct net_device *dev, u16 reason)
+{
+	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+	struct ieee80211_if_sta *ifsta = &sdata->u.sta;
+
+	printk(KERN_DEBUG "%s: disassociate(reason=%d)\n",
+	       dev->name, reason);
+
+	if (sdata->type != IEEE80211_IF_TYPE_STA)
+		return -EINVAL;
+
+	if (!ifsta->associated)
+		return -1;
+
+	ieee80211_send_disassoc(dev, ifsta, reason);
+	ieee80211_set_disassoc(dev, ifsta, 0);
+	return 0;
+}
--- /dev/null	2007-03-09 11:47:32.684268720 -0500
+++ linux-2.6.20.noarch/net/mac80211/ieee80211_cfg.h	2007-03-20 14:31:21.000000000 -0400
@@ -0,0 +1,9 @@
+/*
+ * mac80211 configuration hooks for cfg80211
+ */
+#ifndef __IEEE80211_CFG_H
+#define __IEEE80211_CFG_H
+
+extern struct cfg80211_ops mac80211_config_ops;
+
+#endif /* __IEEE80211_CFG_H */
--- linux-2.6.20.noarch/net/ieee80211/Kconfig.orig	2007-02-04 13:44:54.000000000 -0500
+++ linux-2.6.20.noarch/net/ieee80211/Kconfig	2007-03-20 14:31:21.000000000 -0400
@@ -56,7 +56,8 @@ config IEEE80211_CRYPT_CCMP
 
 config IEEE80211_CRYPT_TKIP
 	tristate "IEEE 802.11i TKIP encryption"
-	depends on IEEE80211 && NET_RADIO
+	depends on IEEE80211
+	select WIRELESS_EXT
 	select CRYPTO
 	select CRYPTO_MICHAEL_MIC
 	select CRYPTO_ECB

jwltest-softmac_wx_get_rate-running-check.patch:
 ieee80211softmac_wx.c |    6 ++++++
 1 files changed, 6 insertions(+)

--- NEW FILE jwltest-softmac_wx_get_rate-running-check.patch ---
--- linux-2.6.18.noarch/net/ieee80211/softmac/ieee80211softmac_wx.c.orig	2006-12-12 13:16:33.000000000 -0500
+++ linux-2.6.18.noarch/net/ieee80211/softmac/ieee80211softmac_wx.c	2006-12-12 13:22:05.000000000 -0500
@@ -265,6 +265,12 @@ ieee80211softmac_wx_get_rate(struct net_
 	int err = -EINVAL;
 
 	spin_lock_irqsave(&mac->lock, flags);
+
+	if (unlikely(!mac->running)) {
+		err = -ENODEV;
+		goto out_unlock;
+	}
+
 	switch (mac->txrates.default_rate) {
 	case IEEE80211_CCK_RATE_1MB:
 		data->bitrate.value = 1000000;


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-6/kernel-2.6.spec,v
retrieving revision 1.2925
retrieving revision 1.2925.6.1
diff -u -r1.2925 -r1.2925.6.1
--- kernel-2.6.spec	10 Mar 2007 23:08:52 -0000	1.2925
+++ kernel-2.6.spec	22 Mar 2007 20:42:54 -0000	1.2925.6.1
@@ -38,7 +38,7 @@
 %define sublevel 20
 %define kversion 2.6.%{sublevel}
 %define rpmversion 2.6.%{sublevel}
-%define release %(R="$Revision$"; RR="${R##: }"; echo ${RR%%?})%{?dist}
+%define release %(R="$Revision$"; RR="${R##: }"; echo ${RR%%?})%{?dist}.jwltest.29
 %define signmodules 0
 %define xen_hv_cset 11774
 %define make_target bzImage
@@ -419,6 +419,9 @@
 # core networking changes.
 
 # NIC driver fixes
+Patch1350: jwltest-softmac_wx_get_rate-running-check.patch
+
+# Sound driver fixes
 
 # Filesystem stuff.
 # Squashfs
@@ -499,6 +502,14 @@
 Patch5060: linux-2.6-olpc-battery.patch
 
 #
+# mac80211 backport
+#
+Patch6000: jwltest-mac80211-backport.patch
+Patch6001: jwltest-mac80211-backport-2_6_20-fixup.patch
+Patch6002: jwltest-iwlwifi.patch
+Patch6003: jwltest-iwlwifi-fixes.patch
+
+#
 # 10000 to 20000 is for stuff that has to come last due to the
 # amount of drivers they touch. But only these should go here.
 # Not patches you're too lazy for to put in the proper place.
@@ -1066,6 +1077,10 @@
 # core networking changes.
 
 # NIC driver fixes
+# check mac->running to avoid assert in ieee80211softmac_wx_get_rate
+%patch1350 -p1
+
+# sound driver fixes
 
 # Filesystem patches.
 # Squashfs
@@ -1186,6 +1201,12 @@
 # final stuff
 #
 
+# mac80211 stuff
+%patch6000 -p1
+%patch6001 -p1
+%patch6002 -p1
+%patch6003 -p1
+
 #
 # misc small stuff to make things compile or otherwise improve performance
 #




More information about the fedora-cvs-commits mailing list