rpms/kernel/FC-6 jwltest-bcm43xx-1gb-fix.patch, NONE, 1.1.12.1 jwltest-bcm43xx-add-PCI-E-code.patch, NONE, 1.1.10.1 jwltest-cfg80211-fixup.patch, NONE, 1.1.6.1 jwltest-d80211-backport-fixup.patch, NONE, 1.1.8.1 jwltest-d80211-backport.patch, NONE, 1.1.8.1 jwltest-e1000_set_ringparam-leak.patch, NONE, 1.1.18.1 jwltest-ipw2100-lockdep-fix.patch, NONE, 1.1.4.1 jwltest-ipw2200-1_2_0.patch, NONE, 1.1.18.1 jwltest-ipw3945-1_0_5.patch, NONE, 1.1.34.1 jwltest-ipw3945-1_1_0.patch, NONE, 1.1.26.1 jwltest-softmac_wx_get_rate-running-check.patch, NONE, 1.1.2.1 kernel-2.6.spec, 1.2861, 1.2861.2.1

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Dec 12 19:28:15 UTC 2006


Author: linville

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

Modified Files:
      Tag: private-linville-jwltest-fc6-16-branch
	kernel-2.6.spec 
Added Files:
      Tag: private-linville-jwltest-fc6-16-branch
	jwltest-bcm43xx-1gb-fix.patch 
	jwltest-bcm43xx-add-PCI-E-code.patch 
	jwltest-cfg80211-fixup.patch 
	jwltest-d80211-backport-fixup.patch 
	jwltest-d80211-backport.patch 
	jwltest-e1000_set_ringparam-leak.patch 
	jwltest-ipw2100-lockdep-fix.patch jwltest-ipw2200-1_2_0.patch 
	jwltest-ipw3945-1_0_5.patch jwltest-ipw3945-1_1_0.patch 
	jwltest-softmac_wx_get_rate-running-check.patch 
Log Message:


jwltest-bcm43xx-1gb-fix.patch:
 bcm43xx_dma.c  |   28 +++++++++++++++++++++++-----
 bcm43xx_dma.h  |   17 +++++++++++++++++
 bcm43xx_main.c |   25 ++++++-------------------
 3 files changed, 46 insertions(+), 24 deletions(-)

--- NEW FILE jwltest-bcm43xx-1gb-fix.patch ---
--- linux-2.6.18.noarch/drivers/net/wireless/bcm43xx/bcm43xx_dma.c.orig	2006-10-20 15:52:09.000000000 -0400
+++ linux-2.6.18.noarch/drivers/net/wireless/bcm43xx/bcm43xx_dma.c	2006-10-20 15:53:18.000000000 -0400
@@ -705,11 +705,30 @@ int bcm43xx_dma_init(struct bcm43xx_priv
 	struct bcm43xx_dmaring *ring;
 	int err = -ENOMEM;
 	int dma64 = 0;
-	u32 sbtmstatehi;
+	u64 mask = bcm43xx_get_supported_dma_mask(bcm);
+	int nobits;
 
-	sbtmstatehi = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATEHIGH);
-	if (sbtmstatehi & BCM43xx_SBTMSTATEHIGH_DMA64BIT)
+	if (mask == DMA_64BIT_MASK) {
 		dma64 = 1;
+		nobits = 64;
+	} else if (mask == DMA_32BIT_MASK)
+		nobits = 32;
+	else
+		nobits = 30;
+	err = pci_set_dma_mask(bcm->pci_dev, mask);
+	err |= pci_set_consistent_dma_mask(bcm->pci_dev, mask);
+	if (err) {
+#ifdef CONFIG_BCM43XX_PIO
+		printk(KERN_WARNING PFX "DMA not supported on this device."
+					" Falling back to PIO.\n");
+		bcm->__using_pio = 1;
+		return -ENOSYS;
+#else
+		printk(KERN_ERR PFX "FATAL: DMA not supported and PIO not configured. "
+				    "Please recompile the driver with PIO support.\n");
+		return -ENODEV;
+#endif /* CONFIG_BCM43XX_PIO */
+	}
 
 	/* setup TX DMA channels. */
 	ring = bcm43xx_setup_dmaring(bcm, 0, 1, dma64);
@@ -755,8 +774,7 @@ int bcm43xx_dma_init(struct bcm43xx_priv
 		dma->rx_ring3 = ring;
 	}
 
-	dprintk(KERN_INFO PFX "%s DMA initialized\n",
-			dma64 ? "64-bit" : "32-bit");
+	dprintk(KERN_INFO PFX "%d-bit DMA initialized\n", nobits);
 	err = 0;
 out:
 	return err;
--- linux-2.6.18.noarch/drivers/net/wireless/bcm43xx/bcm43xx_main.c.orig	2006-10-20 15:52:09.000000000 -0400
+++ linux-2.6.18.noarch/drivers/net/wireless/bcm43xx/bcm43xx_main.c	2006-10-20 15:53:18.000000000 -0400
@@ -2924,10 +2924,13 @@ static int bcm43xx_wireless_core_init(st
 		bcm43xx_write16(bcm, 0x043C, 0x000C);
 
 	if (active_wlcore) {
-		if (bcm43xx_using_pio(bcm))
+		if (bcm43xx_using_pio(bcm)) {
 			err = bcm43xx_pio_init(bcm);
-		else
+		} else {
 			err = bcm43xx_dma_init(bcm);
+			if (err == -ENOSYS)
+				err = bcm43xx_pio_init(bcm);
+		}
 		if (err)
 			goto err_chip_cleanup;
 	}
@@ -3986,8 +3989,6 @@ static int bcm43xx_init_private(struct b
 				struct net_device *net_dev,
 				struct pci_dev *pci_dev)
 {
-	int err;
-
 	bcm43xx_set_status(bcm, BCM43xx_STAT_UNINIT);
 	bcm->ieee = netdev_priv(net_dev);
 	bcm->softmac = ieee80211_priv(net_dev);
@@ -4005,22 +4006,8 @@ static int bcm43xx_init_private(struct b
 		     (void (*)(unsigned long))bcm43xx_interrupt_tasklet,
 		     (unsigned long)bcm);
 	tasklet_disable_nosync(&bcm->isr_tasklet);
-	if (modparam_pio) {
+	if (modparam_pio)
 		bcm->__using_pio = 1;
-	} else {
-		err = pci_set_dma_mask(pci_dev, DMA_30BIT_MASK);
-		err |= pci_set_consistent_dma_mask(pci_dev, DMA_30BIT_MASK);
-		if (err) {
-#ifdef CONFIG_BCM43XX_PIO
-			printk(KERN_WARNING PFX "DMA not supported. Falling back to PIO.\n");
-			bcm->__using_pio = 1;
-#else
-			printk(KERN_ERR PFX "FATAL: DMA not supported and PIO not configured. "
-					    "Recompile the driver with PIO support, please.\n");
-			return -ENODEV;
-#endif /* CONFIG_BCM43XX_PIO */
-		}
-	}
 	bcm->rts_threshold = BCM43xx_DEFAULT_RTS_THRESHOLD;
 
 	/* default to sw encryption for now */
--- linux-2.6.18.noarch/drivers/net/wireless/bcm43xx/bcm43xx_dma.h.orig	2006-10-20 15:52:09.000000000 -0400
+++ linux-2.6.18.noarch/drivers/net/wireless/bcm43xx/bcm43xx_dma.h	2006-10-20 15:53:18.000000000 -0400
@@ -314,6 +314,23 @@ int bcm43xx_dma_tx(struct bcm43xx_privat
 		   struct ieee80211_txb *txb);
 void bcm43xx_dma_rx(struct bcm43xx_dmaring *ring);
 
+/* Helper function that returns the dma mask for this device. */
+static inline
+u64 bcm43xx_get_supported_dma_mask(struct bcm43xx_private *bcm)
+{
+	int dma64 = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATEHIGH) &
+				   BCM43xx_SBTMSTATEHIGH_DMA64BIT;
+	u16 mmio_base = bcm43xx_dmacontroller_base(dma64, 0);
+	u32 mask = BCM43xx_DMA32_TXADDREXT_MASK;
+
+	if (dma64)
+		return DMA_64BIT_MASK;
+	bcm43xx_write32(bcm, mmio_base + BCM43xx_DMA32_TXCTL, mask);
+	if (bcm43xx_read32(bcm, mmio_base + BCM43xx_DMA32_TXCTL) & mask)
+		return DMA_32BIT_MASK;
+	return DMA_30BIT_MASK;
+}
+
 #else /* CONFIG_BCM43XX_DMA */
 
 

jwltest-bcm43xx-add-PCI-E-code.patch:
 bcm43xx.h       |   29 +++++++++++
 bcm43xx_main.c  |  143 +++++++++++++++++++++++++++++++++++++++++---------------
 bcm43xx_power.c |   28 ++++++++--
 3 files changed, 156 insertions(+), 44 deletions(-)

--- NEW FILE jwltest-bcm43xx-add-PCI-E-code.patch ---
>From 76f5837d3f87211855f2f08a1821e888fd371225 Mon Sep 17 00:00:00 2001
From: Stefano Brivio <stefano.brivio at polimi.it>
Date: Sun, 15 Oct 2006 23:18:11 -0500
Subject: [PATCH] [PATCH] bcm43xx: add PCI-E code

The current bcm43xx driver does not contain code to handle PCI-E interfaces
such as the BCM4311 and BCM4312. This patch, originally written by Stefano
Brivio adds the necessary code to enable these interfaces.

Signed-off-by: Stefano Brivio <stefano.brivio at polimi.it>
Signed-off-by: Larry Finger <Larry.Finger at lwfinger.net>
Signed-off-by: John W. Linville <linville at tuxdriver.com>
---
 drivers/net/wireless/bcm43xx/bcm43xx.h       |   29 +++++
 drivers/net/wireless/bcm43xx/bcm43xx_main.c  |  143 +++++++++++++++++++-------
 drivers/net/wireless/bcm43xx/bcm43xx_power.c |   28 ++++-
 3 files changed, 156 insertions(+), 44 deletions(-)

diff --git a/drivers/net/wireless/bcm43xx/bcm43xx.h b/drivers/net/wireless/bcm43xx/bcm43xx.h
index 5f43d7f..94dfb92 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx.h
+++ b/drivers/net/wireless/bcm43xx/bcm43xx.h
@@ -159,6 +159,7 @@ #define BCM43xx_MACFILTER_ASSOC		0x0003
 
 /* Chipcommon registers. */
 #define BCM43xx_CHIPCOMMON_CAPABILITIES 	0x04
+#define BCM43xx_CHIPCOMMON_CTL			0x28
 #define BCM43xx_CHIPCOMMON_PLLONDELAY		0xB0
 #define BCM43xx_CHIPCOMMON_FREFSELDELAY		0xB4
 #define BCM43xx_CHIPCOMMON_SLOWCLKCTL		0xB8
@@ -172,6 +173,33 @@ #define BCM43xx_PCICORE_SBTOPCI2	0x108
 /* SBTOPCI2 values. */
 #define BCM43xx_SBTOPCI2_PREFETCH	0x4
 #define BCM43xx_SBTOPCI2_BURST		0x8
+#define BCM43xx_SBTOPCI2_MEMREAD_MULTI	0x20
+
+/* PCI-E core registers. */
+#define BCM43xx_PCIECORE_REG_ADDR      0x0130
+#define BCM43xx_PCIECORE_REG_DATA      0x0134
+#define BCM43xx_PCIECORE_MDIO_CTL      0x0128
+#define BCM43xx_PCIECORE_MDIO_DATA     0x012C
+
+/* PCI-E registers. */
+#define BCM43xx_PCIE_TLP_WORKAROUND    0x0004
+#define BCM43xx_PCIE_DLLP_LINKCTL      0x0100
+
+/* PCI-E MDIO bits. */
+#define BCM43xx_PCIE_MDIO_ST   0x40000000
+#define BCM43xx_PCIE_MDIO_WT   0x10000000
+#define BCM43xx_PCIE_MDIO_DEV  22
+#define BCM43xx_PCIE_MDIO_REG  18
+#define BCM43xx_PCIE_MDIO_TA   0x00020000
+#define BCM43xx_PCIE_MDIO_TC   0x0100
+
+/* MDIO devices. */
+#define BCM43xx_MDIO_SERDES_RX	0x1F
+
+/* SERDES RX registers. */
+#define BCM43xx_SERDES_RXTIMER	0x2
+#define BCM43xx_SERDES_CDR	0x6
+#define BCM43xx_SERDES_CDR_BW	0x7
 
 /* Chipcommon capabilities. */
 #define BCM43xx_CAPABILITIES_PCTL		0x00040000
@@ -221,6 +249,7 @@ #define BCM43xx_COREID_USB11_DEV        
 #define BCM43xx_COREID_USB20_HOST       0x819
 #define BCM43xx_COREID_USB20_DEV        0x81a
 #define BCM43xx_COREID_SDIO_HOST        0x81b
+#define BCM43xx_COREID_PCIE		0x820
 
 /* Core Information Registers */
 #define BCM43xx_CIR_BASE		0xf00
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
index 199d48b..78db999 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -130,6 +130,10 @@ #endif /* CONFIG_BCM43XX_DEBUG*/
 	{ PCI_VENDOR_ID_BROADCOM, 0x4301, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	/* Broadcom 4307 802.11b */
 	{ PCI_VENDOR_ID_BROADCOM, 0x4307, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	/* Broadcom 4311 802.11(a)/b/g */
+	{ PCI_VENDOR_ID_BROADCOM, 0x4311, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	/* Broadcom 4312 802.11a/b/g */
+	{ PCI_VENDOR_ID_BROADCOM, 0x4312, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	/* Broadcom 4318 802.11b/g */
 	{ PCI_VENDOR_ID_BROADCOM, 0x4318, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	/* Broadcom 4319 802.11a/b/g */
@@ -2583,8 +2587,9 @@ static int bcm43xx_probe_cores(struct bc
 	/* fetch sb_id_hi from core information registers */
 	sb_id_hi = bcm43xx_read32(bcm, BCM43xx_CIR_SB_ID_HI);
 
-	core_id = (sb_id_hi & 0xFFF0) >> 4;
-	core_rev = (sb_id_hi & 0xF);
+	core_id = (sb_id_hi & 0x8FF0) >> 4;
+	core_rev = (sb_id_hi & 0x7000) >> 8;
+	core_rev |= (sb_id_hi & 0xF);
 	core_vendor = (sb_id_hi & 0xFFFF0000) >> 16;
 
 	/* if present, chipcommon is always core 0; read the chipid from it */
@@ -2694,6 +2699,7 @@ #endif
 		core = NULL;
 		switch (core_id) {
 		case BCM43xx_COREID_PCI:
+		case BCM43xx_COREID_PCIE:
 			core = &bcm->core_pci;
 			if (core->available) {
 				printk(KERN_WARNING PFX "Multiple PCI cores found.\n");
@@ -2732,12 +2738,12 @@ #endif
 			case 6:
 			case 7:
 			case 9:
+			case 10:
 				break;
 			default:
-				printk(KERN_ERR PFX "Error: Unsupported 80211 core revision %u\n",
+				printk(KERN_WARNING PFX
+				       "Unsupported 80211 core revision %u\n",
 				       core_rev);
-				err = -ENODEV;
-				goto out;
 			}
 			bcm->nr_80211_available++;
 			core->priv = ext_80211;
@@ -2851,16 +2857,11 @@ static int bcm43xx_wireless_core_init(st
 	u32 sbimconfiglow;
 	u8 limit;
 
-	if (bcm->chip_rev < 5) {
+	if (bcm->core_pci.rev <= 5 && bcm->core_pci.id != BCM43xx_COREID_PCIE) {
 		sbimconfiglow = bcm43xx_read32(bcm, BCM43xx_CIR_SBIMCONFIGLOW);
 		sbimconfiglow &= ~ BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_MASK;
 		sbimconfiglow &= ~ BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_MASK;
-		if (bcm->bustype == BCM43xx_BUSTYPE_PCI)
-			sbimconfiglow |= 0x32;
-		else if (bcm->bustype == BCM43xx_BUSTYPE_SB)
-			sbimconfiglow |= 0x53;
-		else
-			assert(0);
+		sbimconfiglow |= 0x32;
 		bcm43xx_write32(bcm, BCM43xx_CIR_SBIMCONFIGLOW, sbimconfiglow);
 	}
 
@@ -2987,22 +2988,64 @@ static void bcm43xx_pcicore_broadcast_va
 
 static int bcm43xx_pcicore_commit_settings(struct bcm43xx_private *bcm)
 {
-	int err;
-	struct bcm43xx_coreinfo *old_core;
+	int err = 0;
 
-	old_core = bcm->current_core;
-	err = bcm43xx_switch_core(bcm, &bcm->core_pci);
-	if (err)
-		goto out;
+	bcm->irq_savedstate = bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL);
 
-	bcm43xx_pcicore_broadcast_value(bcm, 0xfd8, 0x00000000);
+	if (bcm->core_chipcommon.available) {
+		err = bcm43xx_switch_core(bcm, &bcm->core_chipcommon);
+		if (err)
+			goto out;
+
+		bcm43xx_pcicore_broadcast_value(bcm, 0xfd8, 0x00000000);
+
+		/* this function is always called when a PCI core is mapped */
+		err = bcm43xx_switch_core(bcm, &bcm->core_pci);
+		if (err)
+			goto out;
+	} else
+		bcm43xx_pcicore_broadcast_value(bcm, 0xfd8, 0x00000000);
+
+	bcm43xx_interrupt_enable(bcm, bcm->irq_savedstate);
 
-	bcm43xx_switch_core(bcm, old_core);
-	assert(err == 0);
 out:
 	return err;
 }
 
+static u32 bcm43xx_pcie_reg_read(struct bcm43xx_private *bcm, u32 address)
+{
+	bcm43xx_write32(bcm, BCM43xx_PCIECORE_REG_ADDR, address);
+	return bcm43xx_read32(bcm, BCM43xx_PCIECORE_REG_DATA);
+}
+
+static void bcm43xx_pcie_reg_write(struct bcm43xx_private *bcm, u32 address,
+				    u32 data)
+{
+	bcm43xx_write32(bcm, BCM43xx_PCIECORE_REG_ADDR, address);
+	bcm43xx_write32(bcm, BCM43xx_PCIECORE_REG_DATA, data);
+}
+
+static void bcm43xx_pcie_mdio_write(struct bcm43xx_private *bcm, u8 dev, u8 reg,
+				    u16 data)
+{
+	int i;
+
+	bcm43xx_write32(bcm, BCM43xx_PCIECORE_MDIO_CTL, 0x0082);
+	bcm43xx_write32(bcm, BCM43xx_PCIECORE_MDIO_DATA, BCM43xx_PCIE_MDIO_ST |
+			BCM43xx_PCIE_MDIO_WT | (dev << BCM43xx_PCIE_MDIO_DEV) |
+			(reg << BCM43xx_PCIE_MDIO_REG) | BCM43xx_PCIE_MDIO_TA |
+			data);
+	udelay(10);
+
+	for (i = 0; i < 10; i++) {
+		if (bcm43xx_read32(bcm, BCM43xx_PCIECORE_MDIO_CTL) &
+		    BCM43xx_PCIE_MDIO_TC)
+			break;
+		msleep(1);
+	}
+	bcm43xx_write32(bcm, BCM43xx_PCIECORE_MDIO_CTL, 0);
+}
+
 /* Make an I/O Core usable. "core_mask" is the bitmask of the cores to enable.
  * To enable core 0, pass a core_mask of 1<<0
  */
@@ -3022,7 +3065,8 @@ static int bcm43xx_setup_backplane_pci_c
 	if (err)
 		goto out;
 
-	if (bcm->core_pci.rev < 6) {
+	if (bcm->current_core->rev < 6 ||
+		bcm->current_core->id == BCM43xx_COREID_PCI) {
 		value = bcm43xx_read32(bcm, BCM43xx_CIR_SBINTVEC);
 		value |= (1 << backplane_flag_nr);
 		bcm43xx_write32(bcm, BCM43xx_CIR_SBINTVEC, value);
@@ -3040,21 +3084,46 @@ static int bcm43xx_setup_backplane_pci_c
 		}
 	}
 
-	value = bcm43xx_read32(bcm, BCM43xx_PCICORE_SBTOPCI2);
-	value |= BCM43xx_SBTOPCI2_PREFETCH | BCM43xx_SBTOPCI2_BURST;
-	bcm43xx_write32(bcm, BCM43xx_PCICORE_SBTOPCI2, value);
-
-	if (bcm->core_pci.rev < 5) {
-		value = bcm43xx_read32(bcm, BCM43xx_CIR_SBIMCONFIGLOW);
-		value |= (2 << BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_SHIFT)
-			 & BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_MASK;
-		value |= (3 << BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_SHIFT)
-			 & BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_MASK;
-		bcm43xx_write32(bcm, BCM43xx_CIR_SBIMCONFIGLOW, value);
-		err = bcm43xx_pcicore_commit_settings(bcm);
-		assert(err == 0);
+	if (bcm->current_core->id == BCM43xx_COREID_PCI) {
+		value = bcm43xx_read32(bcm, BCM43xx_PCICORE_SBTOPCI2);
+		value |= BCM43xx_SBTOPCI2_PREFETCH | BCM43xx_SBTOPCI2_BURST;
+		bcm43xx_write32(bcm, BCM43xx_PCICORE_SBTOPCI2, value);
+
+		if (bcm->current_core->rev < 5) {
+			value = bcm43xx_read32(bcm, BCM43xx_CIR_SBIMCONFIGLOW);
+			value |= (2 << BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_SHIFT)
+				 & BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_MASK;
+			value |= (3 << BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_SHIFT)
+				 & BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_MASK;
+			bcm43xx_write32(bcm, BCM43xx_CIR_SBIMCONFIGLOW, value);
+			err = bcm43xx_pcicore_commit_settings(bcm);
+			assert(err == 0);
+		} else if (bcm->current_core->rev >= 11) {
+			value = bcm43xx_read32(bcm, BCM43xx_PCICORE_SBTOPCI2);
+			value |= BCM43xx_SBTOPCI2_MEMREAD_MULTI;
+			bcm43xx_write32(bcm, BCM43xx_PCICORE_SBTOPCI2, value);
+		}
+	} else {
+		if (bcm->current_core->rev == 0 || bcm->current_core->rev == 1) {
+			value = bcm43xx_pcie_reg_read(bcm, BCM43xx_PCIE_TLP_WORKAROUND);
+			value |= 0x8;
+			bcm43xx_pcie_reg_write(bcm, BCM43xx_PCIE_TLP_WORKAROUND,
+					       value);
+		}
+		if (bcm->current_core->rev == 0) {
+			bcm43xx_pcie_mdio_write(bcm, BCM43xx_MDIO_SERDES_RX,
+						BCM43xx_SERDES_RXTIMER, 0x8128);
+			bcm43xx_pcie_mdio_write(bcm, BCM43xx_MDIO_SERDES_RX,
+						BCM43xx_SERDES_CDR, 0x0100);
+			bcm43xx_pcie_mdio_write(bcm, BCM43xx_MDIO_SERDES_RX,
+						BCM43xx_SERDES_CDR_BW, 0x1466);
+		} else if (bcm->current_core->rev == 1) {
+			value = bcm43xx_pcie_reg_read(bcm, BCM43xx_PCIE_DLLP_LINKCTL);
+			value |= 0x40;
+			bcm43xx_pcie_reg_write(bcm, BCM43xx_PCIE_DLLP_LINKCTL,
+					       value);
+		}
 	}
-
 out_switch_back:
 	err = bcm43xx_switch_core(bcm, old_core);
 out:
@@ -3644,7 +3713,7 @@ static int bcm43xx_read_phyinfo(struct b
 		bcm->ieee->freq_band = IEEE80211_24GHZ_BAND;
 		break;
 	case BCM43xx_PHYTYPE_G:
-		if (phy_rev > 7)
+		if (phy_rev > 8)
 			phy_rev_ok = 0;
 		bcm->ieee->modulation = IEEE80211_OFDM_MODULATION |
 					IEEE80211_CCK_MODULATION;
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_power.c b/drivers/net/wireless/bcm43xx/bcm43xx_power.c
index 6569da3..7e774f4 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_power.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_power.c
@@ -153,8 +153,6 @@ int bcm43xx_pctl_init(struct bcm43xx_pri
 	int err, maxfreq;
 	struct bcm43xx_coreinfo *old_core;
 
-	if (!(bcm->chipcommon_capabilities & BCM43xx_CAPABILITIES_PCTL))
-		return 0;
 	old_core = bcm->current_core;
 	err = bcm43xx_switch_core(bcm, &bcm->core_chipcommon);
 	if (err == -ENODEV)
@@ -162,11 +160,27 @@ int bcm43xx_pctl_init(struct bcm43xx_pri
 	if (err)
 		goto out;
 
-	maxfreq = bcm43xx_pctl_clockfreqlimit(bcm, 1);
-	bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_PLLONDELAY,
-			(maxfreq * 150 + 999999) / 1000000);
-	bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_FREFSELDELAY,
-			(maxfreq * 15 + 999999) / 1000000);
+	if (bcm->chip_id == 0x4321) {
+		if (bcm->chip_rev == 0)
+			bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_CTL, 0x03A4);
+		if (bcm->chip_rev == 1)
+			bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_CTL, 0x00A4);
+	}
+
+	if (bcm->chipcommon_capabilities & BCM43xx_CAPABILITIES_PCTL) {
+		if (bcm->current_core->rev >= 10) {
+			/* Set Idle Power clock rate to 1Mhz */
+			bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_SYSCLKCTL,
+				       (bcm43xx_read32(bcm, BCM43xx_CHIPCOMMON_SYSCLKCTL)
+				       & 0x0000FFFF) | 0x40000);
+		} else {
+			maxfreq = bcm43xx_pctl_clockfreqlimit(bcm, 1);
+			bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_PLLONDELAY,
+				       (maxfreq * 150 + 999999) / 1000000);
+			bcm43xx_write32(bcm, BCM43xx_CHIPCOMMON_FREFSELDELAY,
+				       (maxfreq * 15 + 999999) / 1000000);
+		}
+	}
 
 	err = bcm43xx_switch_core(bcm, old_core);
 	assert(err == 0);
-- 
1.4.2.GIT


jwltest-cfg80211-fixup.patch:
 include/net/netlink.h   |   17 +++++++++++-----
 net/netlink/attr.c      |   49 ++++++++++++++++++++++++++++++++++++++----------
 net/netlink/genetlink.c |   10 +++------
 net/wireless/nl80211.c  |    2 -
 4 files changed, 56 insertions(+), 22 deletions(-)

--- NEW FILE jwltest-cfg80211-fixup.patch ---
--- linux-2.6.18.noarch/include/net/netlink.h.orig	2006-09-19 23:42:06.000000000 -0400
+++ linux-2.6.18.noarch/include/net/netlink.h	2006-11-21 13:59:18.000000000 -0500
@@ -158,6 +158,7 @@ enum {
 	NLA_FLAG,
 	NLA_MSECS,
 	NLA_NESTED,
+	NLA_NUL_STRING,
 	__NLA_TYPE_MAX,
 };
 
@@ -166,21 +167,27 @@ enum {
 /**
  * struct nla_policy - attribute validation policy
  * @type: Type of attribute or NLA_UNSPEC
- * @minlen: Minimal length of payload required to be available
+ * @len: Type specific length of payload
  *
  * Policies are defined as arrays of this struct, the array must be
  * accessible by attribute type up to the highest identifier to be expected.
  *
+ * Meaning of `len' field:
+ *    NLA_STRING           Maximum length of string
+ *    NLA_NUL_STRING       Maximum length of string (excluding NUL)
+ *    NLA_FLAG             Unused
+ *    All other            Exact length of attribute payload
+ *
  * Example:
  * static struct nla_policy my_policy[ATTR_MAX+1] __read_mostly = {
  * 	[ATTR_FOO] = { .type = NLA_U16 },
- *	[ATTR_BAR] = { .type = NLA_STRING },
- *	[ATTR_BAZ] = { .minlen = sizeof(struct mystruct) },
+ *	[ATTR_BAR] = { .type = NLA_STRING, len = BARSIZ },
+ *	[ATTR_BAZ] = { .len = sizeof(struct mystruct) },
  * };
  */
 struct nla_policy {
 	u16		type;
-	u16		minlen;
+	u16		len;
 };
 
 extern void		netlink_run_queue(struct sock *sk, unsigned int *qlen,
@@ -751,7 +758,7 @@ static inline int nla_put_msecs(struct s
 #define NLA_PUT_STRING(skb, attrtype, value) \
 	NLA_PUT(skb, attrtype, strlen(value) + 1, value)
 
-#define NLA_PUT_FLAG(skb, attrtype, value) \
+#define NLA_PUT_FLAG(skb, attrtype) \
 	NLA_PUT(skb, attrtype, 0, NULL)
 
 #define NLA_PUT_MSECS(skb, attrtype, jiffies) \
--- linux-2.6.18.noarch/net/wireless/nl80211.c.orig	2006-11-21 14:09:47.000000000 -0500
+++ linux-2.6.18.noarch/net/wireless/nl80211.c	2006-11-21 14:11:31.000000000 -0500
@@ -1009,7 +1009,7 @@ void *nl80211msg_new(struct sk_buff **sk
 {
 	void *hdr;
 
-	*skb = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
+	*skb = nlmsg_new(NLMSG_GOODSIZE);
 	if (!*skb)
 		return ERR_PTR(-ENOBUFS);
 
--- linux-2.6.18.noarch/net/netlink/genetlink.c.orig	2006-09-19 23:42:06.000000000 -0400
+++ linux-2.6.18.noarch/net/netlink/genetlink.c	2006-11-21 13:59:07.000000000 -0500
@@ -455,7 +455,8 @@ static struct sk_buff *ctrl_build_msg(st
 
 static struct nla_policy ctrl_policy[CTRL_ATTR_MAX+1] __read_mostly = {
 	[CTRL_ATTR_FAMILY_ID]	= { .type = NLA_U16 },
-	[CTRL_ATTR_FAMILY_NAME]	= { .type = NLA_STRING },
+	[CTRL_ATTR_FAMILY_NAME]	= { .type = NLA_NUL_STRING,
+				    .len = GENL_NAMSIZ - 1 },
 };
 
 static int ctrl_getfamily(struct sk_buff *skb, struct genl_info *info)
@@ -470,12 +471,9 @@ static int ctrl_getfamily(struct sk_buff
 	}
 
 	if (info->attrs[CTRL_ATTR_FAMILY_NAME]) {
-		char name[GENL_NAMSIZ];
-
-		if (nla_strlcpy(name, info->attrs[CTRL_ATTR_FAMILY_NAME],
-				GENL_NAMSIZ) >= GENL_NAMSIZ)
-			goto errout;
+		char *name;
 
+		name = nla_data(info->attrs[CTRL_ATTR_FAMILY_NAME]);
 		res = genl_family_find_byname(name);
 	}
 
--- linux-2.6.18.noarch/net/netlink/attr.c.orig	2006-09-19 23:42:06.000000000 -0400
+++ linux-2.6.18.noarch/net/netlink/attr.c	2006-11-21 13:58:53.000000000 -0500
@@ -20,7 +20,6 @@ static u16 nla_attr_minlen[NLA_TYPE_MAX+
 	[NLA_U16]	= sizeof(u16),
 	[NLA_U32]	= sizeof(u32),
 	[NLA_U64]	= sizeof(u64),
-	[NLA_STRING]	= 1,
 	[NLA_NESTED]	= NLA_HDRLEN,
 };
 
@@ -28,7 +27,7 @@ static int validate_nla(struct nlattr *n
 			struct nla_policy *policy)
 {
 	struct nla_policy *pt;
-	int minlen = 0;
+	int minlen = 0, attrlen = nla_len(nla);
 
 	if (nla->nla_type <= 0 || nla->nla_type > maxtype)
 		return 0;
@@ -37,16 +36,46 @@ static int validate_nla(struct nlattr *n
 
 	BUG_ON(pt->type > NLA_TYPE_MAX);
 
-	if (pt->minlen)
-		minlen = pt->minlen;
-	else if (pt->type != NLA_UNSPEC)
-		minlen = nla_attr_minlen[pt->type];
+	switch (pt->type) {
+	case NLA_FLAG:
+		if (attrlen > 0)
+			return -ERANGE;
+		break;
+
+	case NLA_NUL_STRING:
+		if (pt->len)
+			minlen = min_t(int, attrlen, pt->len + 1);
+		else
+			minlen = attrlen;
+
+		if (!minlen || memchr(nla_data(nla), '\0', minlen) == NULL)
+			return -EINVAL;
+		/* fall through */
+
+	case NLA_STRING:
+		if (attrlen < 1)
+			return -ERANGE;
 
-	if (pt->type == NLA_FLAG && nla_len(nla) > 0)
-		return -ERANGE;
+		if (pt->len) {
+			char *buf = nla_data(nla);
 
-	if (nla_len(nla) < minlen)
-		return -ERANGE;
+			if (buf[attrlen - 1] == '\0')
+				attrlen--;
+
+			if (attrlen > pt->len)
+				return -ERANGE;
+		}
+		break;
+
+	default:
+		if (pt->len)
+			minlen = pt->len;
+		else if (pt->type != NLA_UNSPEC)
+			minlen = nla_attr_minlen[pt->type];
+
+		if (attrlen < minlen)
+			return -ERANGE;
+	}
 
 	return 0;
 }

jwltest-d80211-backport-fixup.patch:
 net-sysfs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE jwltest-d80211-backport-fixup.patch ---
--- linux-2.6.18.noarch/net/core/net-sysfs.c.orig	2006-11-20 20:12:26.000000000 -0500
+++ linux-2.6.18.noarch/net/core/net-sysfs.c	2006-11-20 20:12:39.000000000 -0500
@@ -329,7 +329,7 @@ static struct attribute_group netstat_gr
 	.attrs  = netstat_attrs,
 };
 
-#ifdef WIRELESS_EXT
+#ifdef CONFIG_WIRELESS_EXT
 /* helper function that does all the locking etc for wireless stats */
 static ssize_t wireless_show(struct class_device *cd, char *buf,
 			     ssize_t (*format)(const struct iw_statistics *,
@@ -464,7 +464,7 @@ int netdev_register_sysfs(struct net_dev
 	if (net->get_stats)
 		*groups++ = &netstat_group;
 
-#ifdef WIRELESS_EXT
+#ifdef CONFIG_WIRELESS_EXT
 	if (net->get_wireless_stats
 	    || (net->wireless_handlers && net->wireless_handlers->get_wireless_stats))
 		*groups++ = &wireless_group;

jwltest-d80211-backport.patch:
 CREDITS                                               |   33 
 MAINTAINERS                                           |   30 
 drivers/misc/Kconfig                                  |    4 
 drivers/misc/Makefile                                 |    1 
 drivers/misc/ssb.c                                    | 1074 ++++
 drivers/net/wireless/Kconfig                          |    2 
 drivers/net/wireless/Makefile                         |    3 
 drivers/net/wireless/d80211/Kconfig                   |    4 
 drivers/net/wireless/d80211/Makefile                  |    4 
 drivers/net/wireless/d80211/README                    |    2 
 drivers/net/wireless/d80211/adm8211/Kconfig           |   24 
 drivers/net/wireless/d80211/adm8211/Makefile          |    1 
 drivers/net/wireless/d80211/adm8211/adm8211.c         | 2210 ++++++++
 drivers/net/wireless/d80211/adm8211/adm8211.h         |  622 ++
 drivers/net/wireless/d80211/bcm43xx/Kconfig           |   63 
 drivers/net/wireless/d80211/bcm43xx/Makefile          |   12 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx.h         |  940 +++
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_debugfs.c |  433 +
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_debugfs.h |  110 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_dma.c     | 1308 ++++
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_dma.h     |  375 +
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_ethtool.c |   51 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_ethtool.h |    8 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_ilt.c     |  337 +
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_ilt.h     |   32 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_leds.c    |  299 +
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_leds.h    |   56 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c    | 4175 +++++++++++++++
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.h    |  144 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_phy.c     | 2338 ++++++++
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_phy.h     |   74 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_pio.c     |  684 ++
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_pio.h     |  170 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_power.c   |  377 +
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_power.h   |   56 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_radio.c   | 2033 +++++++
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_radio.h   |  100 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_sysfs.c   |  232 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_sysfs.h   |    9 
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_xmit.c    |  763 ++
 drivers/net/wireless/d80211/bcm43xx/bcm43xx_xmit.h    |  290 +
 drivers/net/wireless/d80211/p54/Kconfig               |    6 
 drivers/net/wireless/d80211/p54/Makefile              |    3 
 drivers/net/wireless/d80211/p54/prism54.h             |   63 
 drivers/net/wireless/d80211/p54/prism54common.c       |  677 ++
 drivers/net/wireless/d80211/p54/prism54common.h       |  278 +
 drivers/net/wireless/d80211/p54/prism54magic.h        |   24 
 drivers/net/wireless/d80211/p54/prism54usb.c          |  553 ++
 drivers/net/wireless/d80211/p54/prism54usb.h          |   45 
 drivers/net/wireless/d80211/rt2x00/Kconfig            |   78 
 drivers/net/wireless/d80211/rt2x00/Makefile           |    5 
 drivers/net/wireless/d80211/rt2x00/rt2400pci.c        | 3045 +++++++++++
 drivers/net/wireless/d80211/rt2x00/rt2400pci.h        |  948 +++
 drivers/net/wireless/d80211/rt2x00/rt2500pci.c        | 3330 ++++++++++++
 drivers/net/wireless/d80211/rt2x00/rt2500pci.h        | 1209 ++++
 drivers/net/wireless/d80211/rt2x00/rt2500usb.c        | 3015 +++++++++++
 drivers/net/wireless/d80211/rt2x00/rt2500usb.h        |  730 ++
 drivers/net/wireless/d80211/rt2x00/rt2x00.h           | 1124 ++++
 drivers/net/wireless/d80211/rt2x00/rt2x00crc.h        |   82 
 drivers/net/wireless/d80211/rt2x00/rt2x00pci.h        |   47 
 drivers/net/wireless/d80211/rt2x00/rt2x00usb.h        |  104 
 drivers/net/wireless/d80211/rt2x00/rt61pci.c          | 3853 ++++++++++++++
 drivers/net/wireless/d80211/rt2x00/rt61pci.h          | 1415 +++++
 drivers/net/wireless/d80211/rt2x00/rt73usb.c          | 3360 ++++++++++++
 drivers/net/wireless/d80211/rt2x00/rt73usb.h          |  994 +++
 include/linux/Kbuild                                  |    1 
 include/linux/netdevice.h                             |    7 
 include/linux/nl80211.h                               |  276 +
 include/linux/ssb.h                                   |  617 ++
 include/net/cfg80211.h                                |  205 
 include/net/d80211.h                                  | 1065 +++
 include/net/d80211_common.h                           |   98 
 include/net/d80211_mgmt.h                             |  223 
 include/net/d80211_shared.h                           |   46 
 net/Kconfig                                           |   32 
 net/Makefile                                          |    2 
 net/core/Makefile                                     |    1 
 net/core/dev.c                                        |   40 
 net/core/rtnetlink.c                                  |   36 
 net/core/wireless.c                                   | 2306 --------
 net/d80211/Kconfig                                    |   69 
 net/d80211/Makefile                                   |   26 
 net/d80211/aes_ccm.c                                  |  164 
 net/d80211/aes_ccm.h                                  |   26 
 net/d80211/fifo_qdisc.c                               |  102 
 net/d80211/hostapd_ioctl.h                            |  434 +
 net/d80211/ieee80211.c                                | 4823 ++++++++++++++++++
 net/d80211/ieee80211_dev.c                            |  117 
 net/d80211/ieee80211_i.h                              |  692 ++
 net/d80211/ieee80211_iface.c                          |  384 +
 net/d80211/ieee80211_ioctl.c                          | 3239 ++++++++++++
 net/d80211/ieee80211_key.h                            |   88 
 net/d80211/ieee80211_led.c                            |   91 
 net/d80211/ieee80211_led.h                            |   32 
 net/d80211/ieee80211_rate.c                           |  140 
 net/d80211/ieee80211_rate.h                           |  161 
 net/d80211/ieee80211_scan.c                           |  350 +
 net/d80211/ieee80211_sta.c                            | 2882 ++++++++++
 net/d80211/ieee80211_sysfs.c                          |  787 ++
 net/d80211/ieee80211_sysfs_sta.c                      |  437 +
 net/d80211/michael.c                                  |  104 
 net/d80211/michael.h                                  |   20 
 net/d80211/rc80211_simple.c                           |  398 +
 net/d80211/sta_info.c                                 |  462 +
 net/d80211/sta_info.h                                 |  149 
 net/d80211/tkip.c                                     |  339 +
 net/d80211/tkip.h                                     |   35 
 net/d80211/wep.c                                      |  322 +
 net/d80211/wep.h                                      |   40 
 net/d80211/wme.c                                      |  694 ++
 net/d80211/wme.h                                      |   38 
 net/d80211/wpa.c                                      |  856 +++
 net/d80211/wpa.h                                      |   34 
 net/wireless/Makefile                                 |   16 
 net/wireless/core.c                                   |  245 
 net/wireless/core.h                                   |   78 
 net/wireless/nl80211.c                                | 1050 +++
 net/wireless/nl80211.h                                |    7 
 net/wireless/wext-common.c                            |  609 ++
 net/wireless/wext-compat.c                            | 1633 ++++++
 net/wireless/wext-old.c                               | 1730 ++++++
 net/wireless/wext.h                                   |   13 
 122 files changed, 71031 insertions(+), 2311 deletions(-)

--- NEW FILE jwltest-d80211-backport.patch ---
--- /dev/null	2006-11-15 09:57:50.578980680 -0500
+++ linux-2.6.18.noarch/include/net/d80211.h	2006-11-20 14:11:17.000000000 -0500
@@ -0,0 +1,1065 @@
+/*
+ * 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 D80211_H
+#define D80211_H
+
+#include <linux/kernel.h>
+#include <linux/if_ether.h>
+#include <linux/netdevice.h>
+#include <linux/skbuff.h>
+#include <linux/wireless.h>
+#include "d80211_shared.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
+ * are sent over air.
+ *
+ * If hardware uses IEEE 802.3 headers (and perform 802.3 <-> 802.11
+ * conversion in firmware), upper layer 802.11 code needs to be changed to
+ * support this.
+ *
+ * If the receive frame format is not the same as the real frame sent
+ * on the wireless media (e.g., due to padding etc.), upper layer 802.11 code
+ * could be updated to provide support for such format assuming this would
+ * optimize the performance, e.g., by removing need to re-allocation and
+ * copying of the data.
+ */
+
+/* Interface version (used for compatibility verification) */
+#define IEEE80211_VERSION 2
+
+
+/* Channel information structure. Low-level driver is expected to fill in chan,
+ * freq, and val fields. Other fields will be filled in by 80211.o based on
+ * hostapd information and low-level driver does not need to use them. The
+ * limits for each channel will be provided in 'struct ieee80211_conf' when
+ * configuring the low-level driver with hw->config callback. */
+struct ieee80211_channel {
+	short chan; /* channel number (IEEE 802.11) */
+	short freq; /* frequency in MHz */
+	int val; /* hw specific value for the channel */
+	int flag; /* flag for hostapd use (IEEE80211_CHAN_*) */
+        unsigned char power_level;
+        unsigned char antenna_max;
+};
+
+struct ieee80211_rate {
+	int rate; /* rate in 100 kbps */
+	int val; /* hw specific value for the rate */
+	int flags; /* IEEE80211_RATE_ flags */
+	int val2; /* hw specific value for the rate when using short preamble
+		   * (only when IEEE80211_RATE_PREAMBLE2 flag is set, i.e., for
+		   * 2, 5.5, and 11 Mbps) */
+	signed char min_rssi_ack;
+	unsigned char min_rssi_ack_delta;
+
+	/* following fields are set by 80211.o and need not be filled by the
+	 * low-level driver */
+	int rate_inv; /* inverse of the rate (LCM(all rates) / rate) for
+		       * optimizing channel utilization estimates */
+};
+
+struct ieee80211_hw_modes {
+	int mode;
+	int num_channels;
+	struct ieee80211_channel *channels;
+	int num_rates;
+        struct ieee80211_rate *rates;
+};
+
+struct ieee80211_tx_queue_params {
+	int aifs; /* 0 .. 255; -1 = use default */
+	int cw_min; /* 2^n-1: 1, 3, 7, .. , 1023; 0 = use default */
+	int cw_max; /* 2^n-1: 1, 3, 7, .. , 1023; 0 = use default */
+	int burst_time; /* maximum burst time in 0.1 ms (i.e., 10 = 1 ms);
+			 * 0 = disabled */
+};
+
+#define NUM_TX_DATA_QUEUES 6
+
+struct ieee80211_tx_queue_stats_data {
+	unsigned int len; /* num packets in queue */
+	unsigned int limit; /* queue len (soft) limit */
+	unsigned int count; /* total num frames sent */
+};
+
+struct ieee80211_tx_queue_stats {
+	struct ieee80211_tx_queue_stats_data data[NUM_TX_DATA_QUEUES];
+};
+
+#ifndef IEEE80211_TX_QUEUE_NUMS
+#define IEEE80211_TX_QUEUE_NUMS
+/* TODO: these need to be synchronized with hostapd_ioctl.h; make a shared
+ * header file that can be included into low-level drivers, 80211.o, and
+ * hostapd */
+enum {
+	IEEE80211_TX_QUEUE_DATA0 = 0,
+	IEEE80211_TX_QUEUE_DATA1 = 1,
+	IEEE80211_TX_QUEUE_DATA2 = 2,
+	IEEE80211_TX_QUEUE_DATA3 = 3,
+	IEEE80211_TX_QUEUE_DATA4 = 4,
+	IEEE80211_TX_QUEUE_SVP = 5,
+	IEEE80211_TX_QUEUE_AFTER_BEACON = 6,
+	IEEE80211_TX_QUEUE_BEACON = 7
+};
+#endif /* IEEE80211_TX_QUEUE_NUMS */
+
+
+struct ieee80211_low_level_stats {
+	unsigned int dot11ACKFailureCount;
+	unsigned int dot11RTSFailureCount;
+        unsigned int dot11FCSErrorCount;
+	unsigned int dot11RTSSuccessCount;
+};
+
+/* Transmit control fields. This data structure is passed to low-level driver
+ * with each TX frame. The low-level driver is responsible for configuring
+ * the hardware to use given values (depending on what is supported). */
+#define HW_KEY_IDX_INVALID -1
+
+struct ieee80211_tx_control {
+	enum { PKT_NORMAL = 0, PKT_PROBE_RESP } pkt_type;
+	int tx_rate; /* Transmit rate, given as the hw specific value for the
+		      * rate (from struct ieee80211_rate) */
+	int rts_cts_rate; /* Transmit rate for RTS/CTS frame, given as the hw
+			   * specific value for the rate (from
+			   * struct ieee80211_rate) */
+
+#define IEEE80211_TXCTL_REQ_TX_STATUS	(1<<0)/* request TX status callback for
+						* this frame */
+#define IEEE80211_TXCTL_DO_NOT_ENCRYPT	(1<<1) /* send this frame without
+						* encryption; e.g., for EAPOL
+						* frames */
+#define IEEE80211_TXCTL_USE_RTS_CTS	(1<<2) /* use RTS-CTS before sending
+						* frame */
+#define IEEE80211_TXCTL_USE_CTS_PROTECT	(1<<3) /* use CTS protection for the
+						* frame (e.g., for combined
+						* 802.11g / 802.11b networks) */
+#define IEEE80211_TXCTL_NO_ACK		(1<<4) /* tell the low level not to
+						* wait for an ack */
+#define IEEE80211_TXCTL_RATE_CTRL_PROBE	(1<<5)
+#define IEEE80211_TXCTL_CLEAR_DST_MASK	(1<<6)
+#define IEEE80211_TXCTL_REQUEUE		(1<<7)
+#define IEEE80211_TXCTL_FIRST_FRAGMENT	(1<<8) /* this is a first fragment of
+						* the frame */
+#define IEEE80211_TXCTL_TKIP_NEW_PHASE1_KEY (1<<9)
+	u32 flags;			       /* tx control flags defined
+						* above */
+	u16 rts_cts_duration;	/* duration field for RTS/CTS frame */
+	u8 retry_limit;		/* 1 = only first attempt, 2 = one retry, .. */
+	u8 power_level;		/* per-packet transmit power level, in dBm */
+	u8 antenna_sel; 	/* 0 = default/diversity, 1 = Ant0, 2 = Ant1 */
+	s8 key_idx;		/* -1 = do not encrypt, >= 0 keyidx from
+				 * hw->set_key() */
+	u8 icv_len;		/* length of the ICV/MIC field in octets */
+	u8 iv_len;		/* length of the IV field in octets */
+	u8 tkip_key[16];	/* generated phase2/phase1 key for hw TKIP */
+	u8 queue;		/* hardware queue to use for this frame;
+				 * 0 = highest, hw->queues-1 = lowest */
+	u8 sw_retry_attempt;	/* number of times hw has tried to
+				 * transmit frame (not incl. hw retries) */
+
+	int rateidx; /* internal 80211.o rateidx */
+	int alt_retry_rate; /* retry rate for the last retries, given as the
+			     * hw specific value for the rate (from
+			     * struct ieee80211_rate). To be used to limit
+			     * packet dropping when probing higher rates, if hw
+			     * supports multiple retry rates. -1 = not used */
+	int type;	/* internal */
+	int ifindex;	/* internal */
+};
+
+#define RX_FLAG_MMIC_ERROR       0x1
+#define RX_FLAG_DECRYPTED        0x2
+
+/* Receive status. The low-level driver should provide this information
+ * (the subset supported by hardware) to the 802.11 code with each received
+ * frame. */
+struct ieee80211_rx_status {
+        u64 hosttime;
[...73507 lines suppressed...]
+		/* 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 = 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;
+	if (ifsta->bssid_set && ifsta->ssid_set &&
+	    ifsta->state != IEEE80211_AUTHENTICATE)
+		ieee80211_sta_new_auth(dev, ifsta);
+	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 = 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_associated(dev, ifsta, 0);
+	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_associated(dev, ifsta, 0);
+	return 0;
+}
--- linux-2.6.18.noarch/net/Kconfig.orig	2006-11-20 14:10:06.000000000 -0500
+++ linux-2.6.18.noarch/net/Kconfig	2006-11-20 14:11:17.000000000 -0500
@@ -244,6 +244,7 @@ endmenu
 source "net/ax25/Kconfig"
 source "net/irda/Kconfig"
 source "net/bluetooth/Kconfig"
+source "net/d80211/Kconfig"
 source "net/ieee80211/Kconfig"
 source "net/tux/Kconfig"
 
@@ -252,6 +253,37 @@ config WIRELESS_EXT
 
 source "net/netlabel/Kconfig"
 
+config CFG80211
+	tristate "Improved wireless configuration API"
+
+config CFG80211_WEXT_COMPAT
+	bool "cfg80211 Wireless Extensions compatibility"
+	depends CFG80211
+	default y
+	---help---
+	This option allows using devices whose drivers have been
+	converted to use the new cfg80211 with wireless extensions,
+	providing WE-20 compatibility. Note that cfg80211's "native"
+	interface is nl80211 using generic netlink. The wireless
+	extensions are being deprecated, but userspace tools may still
+	be using them.
+
+	If unsure, say Y.
+
+config CFG80211_WEXTNL_COMPAT
+	bool "cfg80211 WE-netlink compatibility"
+	depends CFG80211 && CFG80211_WEXT_COMPAT
+	---help---
+	This option allows using devices whose drivers have been
+	converted to use the new cfg80211 with wireless extensions
+	over rtnetlink, providing WE-20 compatibility. Note that
+	cfg80211's "native" interface is nl80211 using generic netlink.
+	The wireless extensions are being deprecated and the netlink
+	based API for WE was never configured by default, nor do any
+	userspace tools use this feature.
+
+	This option exists only to make Jean happy. Say N.
+
 endif   # if NET
 endmenu # Networking
 

jwltest-e1000_set_ringparam-leak.patch:
 e1000_ethtool.c |   41 ++++++++++++++++++-----------------------
 1 files changed, 18 insertions(+), 23 deletions(-)

--- NEW FILE jwltest-e1000_set_ringparam-leak.patch ---
>From linville at tuxdriver.com Tue Sep 26 08:06:53 2006
Return-Path: <linville at tuxdriver.com>
Received: from pobox.devel.redhat.com ([unix socket])
	 by pobox.devel.redhat.com (Cyrus v2.2.12-Invoca-RPM-2.2.12-3.RHEL4.1) with LMTPA;
	 Tue, 26 Sep 2006 08:06:53 -0400
X-Sieve: CMU Sieve 2.2
Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254])
	by pobox.devel.redhat.com (8.13.1/8.13.1) with ESMTP id k8QC6owA013593
	for <linville at pobox.devel.redhat.com>; Tue, 26 Sep 2006 08:06:50 -0400
Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32])
	by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k8QC6jHU011997
	for <linville at redhat.com>; Tue, 26 Sep 2006 08:06:45 -0400
Received: from ra.tuxdriver.com (ra.tuxdriver.com [70.61.120.52])
	by mx3.redhat.com (8.13.1/8.13.1) with ESMTP id k8QC6cBT021510
	for <linville at redhat.com>; Tue, 26 Sep 2006 08:06:38 -0400
Received: from bilbo.hq.tuxdriver.com ([70.61.120.53])
	by ra.tuxdriver.com (8.13.7/8.13.7) with ESMTP id k8QC5QnO001371
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <linville at redhat.com>; Tue, 26 Sep 2006 08:05:32 -0400
Received: from bilbo.hq.tuxdriver.com (localhost.localdomain [127.0.0.1])
	by bilbo.hq.tuxdriver.com (8.13.1/8.13.1) with ESMTP id k8QC6GKP010507
	for <linville at redhat.com>; Tue, 26 Sep 2006 08:06:16 -0400
Received: (from linville at localhost)
	by bilbo.hq.tuxdriver.com (8.13.1/8.13.1/Submit) id k8QC6Gbd010506
	for linville at redhat.com; Tue, 26 Sep 2006 08:06:16 -0400
Resent-Message-Id: <200609261206.k8QC6Gbd010506 at bilbo.hq.tuxdriver.com>
Received: from vger.kernel.org (vger.kernel.org [209.132.176.167])
	by ra.tuxdriver.com (8.13.7/8.13.7) with ESMTP id k8PNfaQA030911;
	Mon, 25 Sep 2006 19:45:46 -0400
Received: (majordomo at vger.kernel.org) by vger.kernel.org via listexpand
	id S1751716AbWIYXjj (ORCPT <rfc822;nhorman at tuxdriver.com> + 1 other);
	Mon, 25 Sep 2006 19:39:39 -0400
Received: (majordomo at vger.kernel.org) by vger.kernel.org id S1751715AbWIYXji
	(ORCPT <rfc822;netdev-outgoing>); Mon, 25 Sep 2006 19:39:38 -0400
Received: from smtp.osdl.org ([65.172.181.4]:16564 "EHLO smtp.osdl.org")
	by vger.kernel.org with ESMTP id S1751716AbWIYXjc (ORCPT
	<rfc822;netdev at vger.kernel.org>); Mon, 25 Sep 2006 19:39:32 -0400
Received: from shell0.pdx.osdl.net (fw.osdl.org [65.172.181.6])
	by smtp.osdl.org (8.12.8/8.12.8) with ESMTP id k8PNdGnW022671
	(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO);
	Mon, 25 Sep 2006 16:39:16 -0700
Received: from localhost.localdomain (shell0.pdx.osdl.net [10.9.0.31])
	by shell0.pdx.osdl.net (8.13.1/8.11.6) with ESMTP id k8PNdFO1002622;
	Mon, 25 Sep 2006 16:39:15 -0700
Message-Id: <200609252339.k8PNdFO1002622 at shell0.pdx.osdl.net>
Subject: [patch 01/11] e1000: memory leak in e1000_set_ringparam()
To: jeff at garzik.org
Cc: netdev at vger.kernel.org, akpm at osdl.org, vvs at sw.ru, auke-jan.h.kok at intel.com,
        cramerj at intel.com, jeffrey.t.kirsher at intel.com,
        jesse.brandeburg at intel.com, john.ronciak at intel.com
From: akpm at osdl.org
Date: 	Mon, 25 Sep 2006 16:39:15 -0700
X-Spam-Status: No, score=-0.8 required=3.0 tests=AWL,BAYES_00,
	FORGED_RCVD_HELO,NO_REAL_NAME,SPF_SOFTFAIL autolearn=no 
	version=3.1.3-gr0
X-Spam-Checker-Version: SpamAssassin 3.1.3-gr0 (2006-06-01) on 
	ra.tuxdriver.com
X-MIMEDefang-Filter: osdl$Revision: 1.152 $
X-Scanned-By: MIMEDefang 2.36
Sender: netdev-owner at vger.kernel.org
Precedence: bulk
X-Mailing-List: 	netdev at vger.kernel.org
Resent-From: linville at tuxdriver.com
Resent-Date: Tue, 26 Sep 2006 08:06:16 -0400
Resent-To: linville at redhat.com
X-RedHat-Spam-Score: 0.157 
Status: RO
Content-Length: 3381
Lines: 103

From: Vasily Averin <vvs at sw.ru>

Memory leak was found in 2.6.18-rc4 and e1000 7.2.7 from sourceforge:
Memory allocated for new tx_ring and rx_ring leaks if
e1000_setup_XX_resources() fails.c Also this patch reduces stack usage
(removed tx_new and rx_new) and uses kzalloc instead kmalloc+memset(0)

Signed-off-by: Vasily Averin <vvs at sw.ru>
Cc: Jeb Cramer <cramerj at intel.com>
Cc: John Ronciak <john.ronciak at intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg at intel.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
Cc: Auke Kok <auke-jan.h.kok at intel.com>
Cc: Jeff Garzik <jeff at garzik.org>
Signed-off-by: Andrew Morton <akpm at osdl.org>
---

 drivers/net/e1000/e1000_ethtool.c |   40 ++++++++++++----------------
 1 file changed, 18 insertions(+), 22 deletions(-)

diff -puN drivers/net/e1000/e1000_ethtool.c~e1000-memory-leak-in-e1000_set_ringparam drivers/net/e1000/e1000_ethtool.c
--- a/drivers/net/e1000/e1000_ethtool.c~e1000-memory-leak-in-e1000_set_ringparam
+++ a/drivers/net/e1000/e1000_ethtool.c
@@ -632,8 +632,8 @@ e1000_set_ringparam(struct net_device *n
 {
 	struct e1000_adapter *adapter = netdev_priv(netdev);
 	e1000_mac_type mac_type = adapter->hw.mac_type;
-	struct e1000_tx_ring *txdr, *tx_old, *tx_new;
-	struct e1000_rx_ring *rxdr, *rx_old, *rx_new;
+	struct e1000_tx_ring *txdr, *tx_old;
+	struct e1000_rx_ring *rxdr, *rx_old;
 	int i, err, tx_ring_size, rx_ring_size;
 
 	if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
@@ -651,23 +651,17 @@ e1000_set_ringparam(struct net_device *n
 	tx_old = adapter->tx_ring;
 	rx_old = adapter->rx_ring;
 
-	adapter->tx_ring = kmalloc(tx_ring_size, GFP_KERNEL);
-	if (!adapter->tx_ring) {
-		err = -ENOMEM;
-		goto err_setup_rx;
-	}
-	memset(adapter->tx_ring, 0, tx_ring_size);
-
-	adapter->rx_ring = kmalloc(rx_ring_size, GFP_KERNEL);
-	if (!adapter->rx_ring) {
-		kfree(adapter->tx_ring);
-		err = -ENOMEM;
-		goto err_setup_rx;
-	}
-	memset(adapter->rx_ring, 0, rx_ring_size);
+	err = -ENOMEM;
+	txdr = kzalloc(tx_ring_size, GFP_KERNEL);
+	if (!txdr)
+		goto err_alloc_tx;
+
+	rxdr = kzalloc(rx_ring_size, GFP_KERNEL);
+	if (!rxdr)
+		goto err_alloc_rx;
 
-	txdr = adapter->tx_ring;
-	rxdr = adapter->rx_ring;
+	adapter->tx_ring = txdr;
+	adapter->rx_ring = rxdr;
 
 	rxdr->count = max(ring->rx_pending,(uint32_t)E1000_MIN_RXD);
 	rxdr->count = min(rxdr->count,(uint32_t)(mac_type < e1000_82544 ?
@@ -694,16 +688,14 @@ e1000_set_ringparam(struct net_device *n
 		/* save the new, restore the old in order to free it,
 		 * then restore the new back again */
 
-		rx_new = adapter->rx_ring;
-		tx_new = adapter->tx_ring;
 		adapter->rx_ring = rx_old;
 		adapter->tx_ring = tx_old;
 		e1000_free_all_rx_resources(adapter);
 		e1000_free_all_tx_resources(adapter);
 		kfree(tx_old);
 		kfree(rx_old);
-		adapter->rx_ring = rx_new;
-		adapter->tx_ring = tx_new;
+		adapter->rx_ring = rxdr;
+		adapter->tx_ring = txdr;
 		if ((err = e1000_up(adapter)))
 			goto err_setup;
 	}
@@ -715,6 +707,10 @@ err_setup_tx:
 err_setup_rx:
 	adapter->rx_ring = rx_old;
 	adapter->tx_ring = tx_old;
+	kfree(rxdr);
+err_alloc_rx:
+	kfree(txdr);
+err_alloc_tx:
 	e1000_up(adapter);
 err_setup:
 	clear_bit(__E1000_RESETTING, &adapter->flags);
_
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


jwltest-ipw2100-lockdep-fix.patch:
 ipw2100.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

--- NEW FILE jwltest-ipw2100-lockdep-fix.patch ---
--- linux-2.6.18.noarch/drivers/net/wireless/ipw2100.c.orig	2006-11-29 16:20:44.000000000 -0500
+++ linux-2.6.18.noarch/drivers/net/wireless/ipw2100.c	2006-11-29 16:34:33.000000000 -0500
@@ -1804,7 +1804,15 @@ static int ipw2100_up(struct ipw2100_pri
 static int ipw2100_net_init(struct net_device *dev)
 {
 	struct ipw2100_priv *priv = ieee80211_priv(dev);
-	return ipw2100_up(priv, 1);
+	int rc;
+
+	mutex_lock(&priv->action_mutex);
+
+	rc = ipw2100_up(priv, 1);
+
+	mutex_unlock(&priv->action_mutex);
+
+	return rc;
 }
 
 static void ipw2100_down(struct ipw2100_priv *priv)
@@ -4262,6 +4270,7 @@ static struct attribute *ipw2100_sysfs_e
 };
 
 static struct attribute_group ipw2100_attribute_group = {
+	.name = NULL,           /* put in device directory */
 	.attrs = ipw2100_sysfs_entries,
 };
 
@@ -6254,17 +6263,18 @@ static int ipw2100_pci_init_one(struct p
 	 * member to call a function that then just turns and calls ipw2100_up.
 	 * net_dev->init is called after name allocation but before the
 	 * notifier chain is called */
-	mutex_lock(&priv->action_mutex);
 	err = register_netdev(dev);
 	if (err) {
 		printk(KERN_WARNING DRV_NAME
 		       "Error calling register_netdev.\n");
-		goto fail_unlock;
+		goto fail;
 	}
 	registered = 1;
 
 	IPW_DEBUG_INFO("%s: Bound to %s\n", dev->name, pci_name(pci_dev));
 
+	mutex_lock(&priv->action_mutex);
+
 	/* perform this after register_netdev so that dev->name is set */
 	sysfs_create_group(&pci_dev->dev.kobj, &ipw2100_attribute_group);
 

jwltest-ipw2200-1_2_0.patch:
 README.ipw2200 |  451 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 ipw2200.c      |  485 ++++++++++++++++++++++++++++++---------------------------
 ipw2200.h      |   64 ++++---
 3 files changed, 751 insertions(+), 249 deletions(-)

--- NEW FILE jwltest-ipw2200-1_2_0.patch ---
--- linux-2.6.18.noarch/drivers/net/wireless/README.ipw2200.orig	2006-09-26 14:20:47.000000000 -0400
+++ linux-2.6.18.noarch/drivers/net/wireless/README.ipw2200	2006-09-26 14:21:06.000000000 -0400
@@ -0,0 +1,463 @@
+
+Intel(R) PRO/Wireless 2915ABG Network Connection driver for Linux
+in support of:
+
+Intel(R) PRO/Wireless 2200BG Network Connection
+Intel(R) PRO/Wireless 2915ABG Network Connection
+
+Note: The Intel(R) PRO/Wireless 2915ABG driver for Linux and Intel(R)
+PRO/Wireless 2200BG driver for Linux is a unified driver that works on
+both hardware adapters listed above. In this document the Intel(R)
+PRO/Wireless 2915ABG driver for Linux will be used to refer to the
+unified driver.
+
+Copyright (C) 2004-2006, Intel Corporation
+
+INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS.
+EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH
+PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS
+ANY EXPRESS OR IMPLIED WARRANTY RELATING TO SALE AND/OR USE OF INTEL
+PRODUCTS, INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A
+PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT,
+COPYRIGHT, OR OTHER INTELLECTUAL PROPERTY RIGHT.
+This document is subject to change without notice.
+* Other names and brands may be claimed as the property of others.
+
+
+README.ipw2200
+
+Version: 1.2.0
+Date   : September 12, 2006
+
+
+Index
+-----------------------------------------------
+0.   IMPORTANT INFORMATION BEFORE USING THIS DRIVER
+1.   Introduction
+1.1. Overview of features
+1.2. Module parameters
+1.3. Wireless Extension Private Methods
+1.4. Sysfs Helper Files
+2.   Ad-Hoc Networking
+3.   Interacting with Wireless Tools
+3.1. iwconfig mode
+4.   About the Version Numbers
+5.   Firmware installation
+6.   Support
+7.   License
+
+
+0.   IMPORTANT INFORMATION BEFORE USING THIS DRIVER
+-----------------------------------------------
+
+Important Notice FOR ALL USERS OR DISTRIBUTORS!!!! 
+
+Intel wireless LAN adapters are engineered, manufactured, tested, and
+quality checked to ensure that they meet all necessary local and
+governmental regulatory agency requirements for the regions that they
+are designated and/or marked to ship into. Since wireless LANs are
+generally unlicensed devices that share spectrum with radars,
+satellites, and other licensed and unlicensed devices, it is sometimes
+necessary to dynamically detect, avoid, and limit usage to avoid
+interference with these devices. In many instances Intel is required to
+provide test data to prove regional and local compliance to regional and
+governmental regulations before certification or approval to use the
+product is granted. Intel's wireless LAN's EEPROM, firmware, and
+software driver are designed to carefully control parameters that affect
+radio operation and to ensure electromagnetic compliance (EMC). These
+parameters include, without limitation, RF power, spectrum usage,
+channel scanning, and human exposure. 
+
+For these reasons Intel cannot permit any manipulation by third parties
+of the software provided in binary format with the wireless WLAN
+adapters (e.g., the EEPROM and firmware). Furthermore, if you use any
+patches, utilities, or code with the Intel wireless LAN adapters that
+have been manipulated by an unauthorized party (i.e., patches,
+utilities, or code (including open source code modifications) which have
+not been validated by Intel), (i) you will be solely responsible for
+ensuring the regulatory compliance of the products, (ii) Intel will bear
+no liability, under any theory of liability for any issues associated
+with the modified products, including without limitation, claims under
+the warranty and/or issues arising from regulatory non-compliance, and
+(iii) Intel will not provide or be required to assist in providing
+support to any third parties for such modified products.  
+
+Note: Many regulatory agencies consider Wireless LAN adapters to be
+modules, and accordingly, condition system-level regulatory approval
+upon receipt and review of test data documenting that the antennas and
+system configuration do not cause the EMC and radio operation to be
+non-compliant.
+
+The drivers available for download from SourceForge are provided as a 
+part of a development project.  Conformance to local regulatory 
+requirements is the responsibility of the individual developer.  As 
+such, if you are interested in deploying or shipping a driver as part of 
+solution intended to be used for purposes other than development, please 
+obtain a tested driver from Intel Customer Support at:
+
+http://support.intel.com/support/notebook/sb/CS-006408.htm
+
+
+1.   Introduction
+-----------------------------------------------
+The following sections attempt to provide a brief introduction to use
+the Intel(R) PRO/Wireless 2915ABG Driver for Linux.
+
+This document is not meant to be a comprehensive manual on 
+understanding or using wireless technologies, but should be sufficient 
+to get you moving without wires on Linux.
+
+For information on building and installing the Intel PRO/Wireless
+2915ABG Network Connection driver, see the INSTALL file.
+
+
+1.1. Overview of Features
+-----------------------------------------------
+The current release (1.2.0) supports the following features:
+
++ BSS mode (Infrastructure, Managed)
++ IBSS mode (Ad-Hoc)
++ WEP (OPEN and SHARED KEY mode)
++ 802.1x EAP via wpa_supplicant and xsupplicant
++ Wireless Extension support 
++ Full B and G rate support (2200 and 2915)
++ Full A rate support (2915 only)
++ Transmit power control
++ S state support (ACPI suspend/resume)
+
+The following features are currently enabled, but not officially
+supported:
+
++ WPA
++ long/short preamble support
++ Monitor mode (aka RFMon)
+
+The distinction between officially supported and enabled is a reflection 
+of the amount of validation and interoperability testing that has been
+performed on a given feature. 
+
+
+
+1.2. Command Line Parameters
+-----------------------------------------------
+
+Like many modules used in the Linux kernel, the Intel(R) PRO/Wireless
+2915ABG Driver for Linux allows configuration options to be provided 
+as module parameters.  The most common way to specify a module parameter 
+is command line.  
+
+The general form is:
+
+% modprobe ipw2200 [parameter]=[value]
+
+Where the supported parameter are:
+
+  associate
+	Setting to 0 to disable the auto scan-and-associate functionality of the
+	driver.  If disabled, the driver will not attempt to scan 
+	for and associate to a network until it has been configured with 
+	one or more properties to the target network, such as configuring 
+	the network SSID.  Default is 1 (auto-associate)
+	
+	Example: % modprobe ipw2200 associate=0
+
+  auto_create
+	Setting to 0 to disable the auto creation of an Ad-Hoc network 
+	matching the channel and network name parameters provided.  
+	Default is 1.
+
+  channel
+	channel number for association.  The general method for setting
+        the channel is to use the standard wireless tools
+        (i.e. `iwconfig eth1 channel 10`), but it is useful sometimes
+	to set this while debugging.  Channel 0 means 'ANY'
+
+  debug
+	If using a debug build, this is used to control the amount of debug
+	info to be logged.  See the 'dvals' and 'load' script for more info on
+	how to use this (the dvals and load scripts are provided as part 
+	of the Intel PRO/Wireless 2915ABG Network Connection driver
+        development snapshot releases available from the SourceForge project
+        at http://ipw2200.sf.net)
+  
+  led
+	Can be used to turn on experimental LED code.
+	0 = Off, 1 = On.  Default is 0.
+
+  mode
+	Can be used to set the default mode of the adapter.  
+	0 = Managed, 1 = Ad-Hoc, 2 = Monitor
+
+  ifname
+	Rename the wireless network interface. It is not supported now.
+	This parameter was a hack pre-dating the ifrename utility and
+	has now been superseded by it. The ifrename utility can be found
+	in the wireless-tool package. Following is an example to change
+	the default name of wireless interface eth%d to wlan%d.
[...1631 lines suppressed...]
-			    IEEE80211_FCTL_PROTECTED;
+			    cpu_to_le16(IEEE80211_FCTL_PROTECTED);
 			tfd->u.data.key_index = priv->ieee->tx_keyidx;
 			if (priv->ieee->sec.key_sizes[priv->ieee->tx_keyidx] <=
 			    40)
@@ -10267,24 +10390,24 @@
 
 	/* Filtering of fragment chains is done agains the first fragment */
 	hdr = (void *)txb->fragments[0]->data;
-	if (ieee80211_is_management(hdr->frame_ctl)) {
+	if (ieee80211_is_management(le16_to_cpu(hdr->frame_ctl))) {
 		if (filter & IPW_PROM_NO_MGMT)
 			return;
 		if (filter & IPW_PROM_MGMT_HEADER_ONLY)
 			hdr_only = 1;
-	} else if (ieee80211_is_control(hdr->frame_ctl)) {
+	} else if (ieee80211_is_control(le16_to_cpu(hdr->frame_ctl))) {
 		if (filter & IPW_PROM_NO_CTL)
 			return;
 		if (filter & IPW_PROM_CTL_HEADER_ONLY)
 			hdr_only = 1;
-	} else if (ieee80211_is_data(hdr->frame_ctl)) {
+	} else if (ieee80211_is_data(le16_to_cpu(hdr->frame_ctl))) {
 		if (filter & IPW_PROM_NO_DATA)
 			return;
 		if (filter & IPW_PROM_DATA_HEADER_ONLY)
 			hdr_only = 1;
 	}
 
-	for(n=0; n<txb->nr_frags; ++n) {
+	for (n = 0; n < txb->nr_frags; ++n) {
 		struct sk_buff *src = txb->fragments[n];
 		struct sk_buff *dst;
 		struct ieee80211_radiotap_header *rt_hdr;
@@ -10292,35 +10415,35 @@
 
 		if (hdr_only) {
 			hdr = (void *)src->data;
-			len = ieee80211_get_hdrlen(hdr->frame_ctl);
+			len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
 		} else
 			len = src->len;
 
-		dst = alloc_skb(
-			len + IEEE80211_RADIOTAP_HDRLEN, GFP_ATOMIC);
-		if (!dst) continue;
+		dst = alloc_skb(len + IEEE80211_RADIOTAP_HDRLEN, GFP_ATOMIC);
+		if (!dst)
+			continue;
 
 		rt_hdr = (void *)skb_put(dst, sizeof(*rt_hdr));
 
 		rt_hdr->it_version = PKTHDR_RADIOTAP_VERSION;
 		rt_hdr->it_pad = 0;
-		rt_hdr->it_present = 0; /* after all, it's just an idea */
-		rt_hdr->it_present |=  (1 << IEEE80211_RADIOTAP_CHANNEL);
+		rt_hdr->it_present = 0;	/* after all, it's just an idea */
+		rt_hdr->it_present |= (1 << IEEE80211_RADIOTAP_CHANNEL);
 
-		*(u16*)skb_put(dst, sizeof(u16)) = cpu_to_le16(
-			ieee80211chan2mhz(priv->channel));
-		if (priv->channel > 14) 	/* 802.11a */
-			*(u16*)skb_put(dst, sizeof(u16)) =
-				cpu_to_le16(IEEE80211_CHAN_OFDM |
-					     IEEE80211_CHAN_5GHZ);
-		else if (priv->ieee->mode == IEEE_B) /* 802.11b */
-			*(u16*)skb_put(dst, sizeof(u16)) =
-				cpu_to_le16(IEEE80211_CHAN_CCK |
-					     IEEE80211_CHAN_2GHZ);
-		else 		/* 802.11g */
-			*(u16*)skb_put(dst, sizeof(u16)) =
-				cpu_to_le16(IEEE80211_CHAN_OFDM |
-				 IEEE80211_CHAN_2GHZ);
+		*(u16 *) skb_put(dst, sizeof(u16)) =
+		    cpu_to_le16(ieee80211chan2mhz(priv->channel));
+		if (priv->channel > 14)	/* 802.11a */
+			*(u16 *) skb_put(dst, sizeof(u16)) =
+			    cpu_to_le16(IEEE80211_CHAN_OFDM |
+					IEEE80211_CHAN_5GHZ);
+		else if (priv->ieee->mode == IEEE_B)	/* 802.11b */
+			*(u16 *) skb_put(dst, sizeof(u16)) =
+			    cpu_to_le16(IEEE80211_CHAN_CCK |
+					IEEE80211_CHAN_2GHZ);
+		else		/* 802.11g */
+			*(u16 *) skb_put(dst, sizeof(u16)) =
+			    cpu_to_le16(IEEE80211_CHAN_OFDM |
+					IEEE80211_CHAN_2GHZ);
 
 		rt_hdr->it_len = dst->len;
 
@@ -10348,7 +10471,6 @@
 		netif_stop_queue(dev);
 		goto fail_unlock;
 	}
-
 #ifdef CONFIG_IPW2200_PROMISCUOUS
 	if (rtap_iface && netif_running(priv->prom_net_dev))
 		ipw_handle_promiscuous_tx(priv, txb);
@@ -10636,6 +10762,8 @@
 	INIT_WORK(&priv->down, (void (*)(void *))ipw_bg_down, priv);
 	INIT_WORK(&priv->request_scan,
 		  (void (*)(void *))ipw_request_scan, priv);
+	INIT_WORK(&priv->request_passive_scan,
+		  (void (*)(void *))ipw_request_passive_scan, priv);
 	INIT_WORK(&priv->gather_stats,
 		  (void (*)(void *))ipw_bg_gather_stats, priv);
 	INIT_WORK(&priv->abort_scan, (void (*)(void *))ipw_bg_abort_scan, priv);
@@ -10800,7 +10928,6 @@
 			priv->sys_config.bt_coexistence
 			    |= CFG_BT_COEXISTENCE_OOB;
 	}
-
 #ifdef CONFIG_IPW2200_PROMISCUOUS
 	if (priv->prom_net_dev && netif_running(priv->prom_net_dev)) {
 		priv->sys_config.accept_all_data_frames = 1;
@@ -11467,7 +11594,6 @@
 
 #endif
 
-
 static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	int err = 0;
@@ -11488,9 +11614,7 @@
 
 	priv->net_dev = net_dev;
 	priv->pci_dev = pdev;
-#ifdef CONFIG_IPW2200_DEBUG
 	ipw_debug_level = debug;
-#endif
 	spin_lock_init(&priv->irq_lock);
 	spin_lock_init(&priv->lock);
 	for (i = 0; i < IPW_IBSS_MAC_HASH_SIZE; i++)
@@ -11598,10 +11733,9 @@
 		IPW_ERROR("failed to register network device\n");
 		goto out_remove_sysfs;
 	}
-
 #ifdef CONFIG_IPW2200_PROMISCUOUS
 	if (rtap_iface) {
-	        err = ipw_prom_alloc(priv);
+		err = ipw_prom_alloc(priv);
 		if (err) {
 			IPW_ERROR("Failed to register promiscuous network "
 				  "device (error %d).\n", err);
@@ -11755,6 +11910,16 @@
 }
 #endif
 
+static void ipw_pci_shutdown(struct pci_dev *pdev)
+{
+	struct ipw_priv *priv = pci_get_drvdata(pdev);
+
+	/* Take down the device; powers it off, etc. */
+	ipw_down(priv);
+
+	pci_disable_device(pdev);
+}
+
 /* driver initialization stuff */
 static struct pci_driver ipw_driver = {
 	.name = DRV_NAME,
@@ -11765,6 +11932,7 @@
 	.suspend = ipw_pci_suspend,
 	.resume = ipw_pci_resume,
 #endif
+	.shutdown = ipw_pci_shutdown,
 };
 
 static int __init ipw_init(void)
@@ -11808,17 +11978,16 @@
 module_param(led, int, 0444);
 MODULE_PARM_DESC(led, "enable led control on some systems (default 0 off)\n");
 
-#ifdef CONFIG_IPW2200_DEBUG
 module_param(debug, int, 0444);
 MODULE_PARM_DESC(debug, "debug output mask");
-#endif
 
 module_param(channel, int, 0444);
 MODULE_PARM_DESC(channel, "channel to limit associate to (default 0 [ANY])");
 
 #ifdef CONFIG_IPW2200_PROMISCUOUS
 module_param(rtap_iface, int, 0444);
-MODULE_PARM_DESC(rtap_iface, "create the rtap interface (1 - create, default 0)");
+MODULE_PARM_DESC(rtap_iface,
+		 "create the rtap interface (1 - create, default 0)");
 #endif
 
 #ifdef CONFIG_IPW2200_QOS
@@ -11860,7 +12029,8 @@
 MODULE_PARM_DESC(roaming, "enable roaming support (default on)");
 
 module_param(antenna, int, 0444);
-MODULE_PARM_DESC(antenna, "select antenna 1=Main, 3=Aux, default 0 [both], 2=slow_diversity (choose the one with lower background noise)");
+MODULE_PARM_DESC(antenna,
+		 "select antenna 1=Main, 3=Aux, default 0 [both], 2=slow_diversity (choose the one with lower background noise)");
 
 module_exit(ipw_exit);
 module_init(ipw_init);

jwltest-ipw3945-1_0_5.patch:
 Documentation/networking/README.ipw3945 |  984 +
 drivers/net/wireless/Kconfig            |  104 
 drivers/net/wireless/Makefile           |    2 
 drivers/net/wireless/ipw3945.c          |16651 ++++++++++++++++++++++++++++++++
 drivers/net/wireless/ipw3945.h          | 2555 ++++
 drivers/net/wireless/ipw3945_daemon.h   |  403 
 6 files changed, 20699 insertions(+)

--- NEW FILE jwltest-ipw3945-1_0_5.patch ---
--- linux-2.6.17.noarch/Documentation/networking/README.ipw3945.orig	2006-06-26 12:09:00.000000000 -0400
+++ linux-2.6.17.noarch/Documentation/networking/README.ipw3945	2006-06-26 12:09:05.000000000 -0400
@@ -0,0 +1,998 @@
+
+Intel(R) PRO/Wireless 3945ABG Network Connection driver for Linux* in 
+support of:
+
+Intel(R) PRO/Wireless 3945ABG Network Connection Adapter
+Intel(R) PRO/Wireless 3945BG Network Connection Adapter
+
+Note: The Intel(R) PRO/Wireless 3945ABG Network Connection driver for 
+Linux is a unified driver that works on both hardware adapters listed 
+above. In this document the Intel(R) PRO/Wireless 3945ABG Network Connection 
+driver for Linux will be used to reference the unified driver.
+
+Copyright (C) 2005 - 2006, Intel Corporation
+
+README.ipw3945
+
+Version: 1.0.5
+Date   : May 22, 2006
+
+
+Index
+-----------------------------------------------
+0.   IMPORTANT INFORMATION BEFORE USING THIS DRIVER
+1.   Introduction
+1.1. Overview of Features
+2.   Loading the Driver
+3.   Feature Details
+3.1. LEDs
+3.2. Association Details
+3.3. Roaming Details
+3.4. Scanning Details
+3.5. Antenna Selection and "Diversity"
+3.6. IEEE 802.11h Details 
+3.7. Tx Power 
+3.8. Security Details
+3.9. Power Management
+4.   Configuring the driver
+4.1. Command Line Parameters
+4.3. Sysfs Helper Files:
+5.   Wireless Tools Details
+5.1. iwlist
+5.2. iwpriv
+5.3. iwconfig
+6.   Support
+7.   License
+
+
+===============================================
+0.   IMPORTANT INFORMATION BEFORE USING THIS DRIVER
+===============================================
+
+Important Notice FOR ALL USERS OR DISTRIBUTORS!!!! 
+
+Intel wireless LAN adapters are engineered, manufactured, tested, and
+quality checked to ensure that they meet all necessary local and
+governmental regulatory agency requirements for the regions that they
+are designated and/or marked to ship into. Since wireless LANs are
+generally unlicensed devices that share spectrum with radars,
+satellites, and other licensed and unlicensed devices, it is sometimes
+necessary to dynamically detect, avoid, and limit usage to avoid
+interference with these devices. In many instances Intel is required to
+provide test data to prove regional and local compliance to regional and
+governmental regulations before certification or approval to use the
+product is granted. Intel's wireless LAN's EEPROM, firmware, and
+software driver are designed to carefully control parameters that affect
+radio operation and to ensure electromagnetic compliance (EMC). These
+parameters include, without limitation, RF power, spectrum usage,
+channel scanning, and human exposure. 
+
+For these reasons Intel cannot permit any manipulation by third parties
+of the software provided in binary format with the wireless WLAN
+adapters (e.g., the EEPROM and firmware). Furthermore, if you use any
+patches, utilities, or code with the Intel wireless LAN adapters that
+have been manipulated by an unauthorized party (i.e., patches,
+utilities, or code (including open source code modifications) which have
+not been validated by Intel), (i) you will be solely responsible for
+ensuring the regulatory compliance of the products, (ii) Intel will bear
+no liability, under any theory of liability for any issues associated
+with the modified products, including without limitation, claims under
+the warranty and/or issues arising from regulatory non-compliance, and
+(iii) Intel will not provide or be required to assist in providing
+support to any third parties for such modified products.  
+
+Note: Many regulatory agencies consider Wireless LAN adapters to be
+modules, and accordingly, condition system-level regulatory approval
+upon receipt and review of test data documenting that the antennas and
+system configuration do not cause the EMC and radio operation to be
+non-compliant.
+
+The drivers available for download from SourceForge are provided as a 
+part of a development project.  Conformance to local regulatory 
+requirements is the responsibility of the individual developer.  As 
+such, if you are interested in deploying or shipping a driver as part of 
+solution intended to be used for purposes other than development, please 
+obtain a tested driver from Intel Customer Support at:
+
+http://support.intel.com/support/notebook/sb/CS-006408.htm
+
+
+===============================================
+1.   Introduction
+===============================================
+The following sections attempt to provide a brief introduction to using 
+the Intel(R) PRO/Wireless 3945ABG driver for Linux.
+
+This document is not meant to be a comprehensive manual on 
+understanding or using wireless technologies, but should be sufficient 
+to get you moving without wires on Linux.
+
+For information on building and installing the driver, see the INSTALL
+file.
+
+
+1.1. Overview of Features
+-----------------------------------------------
+The current release (1.0.5) supports the following features:
+
++ BSS mode (Infrastructure, Managed)
++ IBSS mode (Ad-Hoc)
++ WEP (OPEN and SHARED KEY mode)
++ 802.1x EAP via wpa_supplicant and xsupplicant
++ 802.11i (WPA/WPA2)
++ Wireless Extension support 
++ Full B and G rate support
++ Full A rate support (ABG only)
++ Transmit power control
++ S state support (ACPI suspend/resume)
+
+The following features are currently enabled, but not officially
+supported:
+
++ QoS
++ Monitor mode (aka RFMon)
++ Associated RF promiscuous mode
++ Frame Rx simulation
+
+The distinction between officially supported and enabled is a reflection 
+of the amount of validation and interoperability testing that has been
+performed on a given feature. Note: in addition, the features may not have 
+all of the code in the driver to fully enable the feature.
+
+
+===============================================
+2. Loading the Driver
+===============================================
+
+See the INSTALL document for information on installing the driver.
+
+Once installed, a typical method for launching the driver and the 
+regulatory daemon is via the load script provided in the source package:
+
+	# ./load debug=0x43fff   <--- You need to be root for this
+
+NOTE:  You will not be able to rmmod the driver so long as the 
+ipw3945d daemon is running.  
+
+If you followed the steps of the INSTALL document to set up your
+modprobe.conf, you can load the module by simply running:
+
+	# modprobe ipw3945       <--- You need to be root for this
+
+If you did not configure your modprobe.conf to automatically launch the 
+regulatory daemon (see INSTALL), you must do so manually after loading 
+the module:
+
+	# /sbin/ipw3945d	<--- You need to be root for this
+
+If you want to unload the module (and kill the deamon as well), you can 
+simply use the unload script:
+
+	# ./unload               <--- You need to be root for this
+
+or likewise if you configured modprobe.conf:
+
+	# modprobe -r ipw3945       <--- You need to be root for this
+
+If you did not configure modprobe.conf to unload the regulatory daemon 
+and are not using the unload script, you need to kill the regulatory 
+daemon before you will be able to unload the module:
+
+	# /sbin/ipw3945d --kill	<--- You need to be root for this
+	# modprobe -r ipw3945
+
+
+===============================================
+3. Feature Details
+===============================================
+
+3.1. LEDs
+-----------------------------------------------
+
+The driver will attempt to control the wireless LED, if one is 
+configured in hardware.  There are typically two LEDs:
+
+	Activity -- used to indicate wireless activity
+	Link     -- used to indicate wireless link
[...20344 lines suppressed...]
+ * a command to appear. Currently set to 60s. */
+#define DAEMON_POLL_INTERVAL 60000
+
+#define DAEMON_BUF_SIZE 3000
+
+struct daemon_cmd_hdr {
+	u8 cmd;
+	u8 flags;
+	u8 token;
+	u8 reserved1;
+	u16 version;
+	u16 data_len;
+	u8 data[0];
+} __attribute__ ((packed));
+
+struct daemon_cmd {
+	struct daemon_cmd_hdr hdr;
+	u8 data[DAEMON_BUF_SIZE];
+} __attribute__ ((packed));
+
+/*  driver <- daemon error response */
+struct daemon_error {
+	u8 cmd_requested;
+	u8 reserved1;
+	u16 reserved2;
+	s32 return_code;
+} __attribute__ ((packed));
+
+/*  driver <- daemon synchronous command done */
+struct daemon_cmd_done {
+	u8 cmd_requested;
+	u8 reserved1;
+	u16 reserved2;
+	s32 return_code;
+} __attribute__ ((packed));
+
+/*  driver <- daemon regulatory information
+ *
+ * The following is sent from the daemon to the driver
+ * to inform the driver of current channel capabilities and
+ * restrictions.
+ *
+ * Immediately after INIT is provided from the driver the
+ * daemon will send the full channel map.
+ *
+ * After a channel has been selected via rx_config, the
+ * daemon will send periodic updates when the channel limits
+ * change for a specific channel.
+ *
+ * NOTE:  The txpower field represents the current configured
+ * power as directed by either the user (sent to the daemon
+ * through the DAEMON_SYNC::DAEMON_SYNC_TXPOWER_LIMIT command)
+ * or as specified through the currently associated access
+ * point.  The max_txpower is the highest the channel is
+ * allowed to transmit.
+ *
+ */
+enum {
+	DAEMON_A_BAND = (1 << 0),	/* 0 - 2.4Ghz, 1 - 5.2Ghz */
+	DAEMON_IBSS_ALLOWED = (1 << 1),
+	DAEMON_ACTIVE_ALLOWED = (1 << 2),
+	DAEMON_RADAR_DETECT = (1 << 3),
+};
+struct daemon_channel_info {
+	u8 channel;
+	u8 flags;
+	s8 txpower;
+	s8 max_txpower;
+};
+struct daemon_regulatory_info {
+	u16 count;		/* Number of channels provided */
+	struct daemon_channel_info channel_info[0];
+} __attribute__ ((packed));
+
+/* driver <- daemon information request */
+struct daemon_request_info {
+	u8 request;
+} __attribute__ ((packed));
+
+/* driver <- daemon set state */
+struct daemon_set_state {
+	u8 state;
+} __attribute__ ((packed));
+
+/* driver -> daemon scan request */
+#define DAEMON_MIN_24GHZ_CHANNEL 1
+#define DAEMON_MAX_24GHZ_CHANNEL 14
+#define DAEMON_MIN_52GHZ_CHANNEL 34
+#define DAEMON_MAX_52GHZ_CHANNEL 165
+
+#define DAEMON_SCAN_FLAG_24GHZ  (1<<0)
+#define DAEMON_SCAN_FLAG_52GHZ  (1<<1)
+#define DAEMON_SCAN_FLAG_ACTIVE (1<<2)
+#define DAEMON_SCAN_FLAG_DIRECT (1<<3)
+
+#define DAEMON_MAX_CMD_SIZE 1024
+
+enum {
+	DAEMON_TXRATE_1 = 0xa,
+	DAEMON_TXRATE_2 = 0x14,
+	DAEMON_TXRATE_5_5 = 0x37,
+	DAEMON_TXRATE_6 = 0xd,
+	DAEMON_TXRATE_9 = 0xf,
+	DAEMON_TXRATE_11 = 0x6e,
+	DAEMON_TXRATE_12 = 0x5,
+	DAEMON_TXRATE_18 = 0x7,
+	DAEMON_TXRATE_24 = 0x9,
+	DAEMON_TXRATE_36 = 0xb,
+	DAEMON_TXRATE_48 = 0x1,
+	DAEMON_TXRATE_54 = 0x3,
+};
+
+struct daemon_scan_channel {
+	u8 channel;
+	u8 request_active;
+	u16 active_dwell;
+	u16 passive_dwell;
+} __attribute__ ((packed));
+
+struct daemon_ssid_ie {
+	u8 id;
+	u8 len;
+	u8 ssid[32];
+} __attribute__ ((packed));
+
+struct daemon_rx_config {
+	u8 dev_type;
+	u16 channel;
+	u32 flags;
+	u32 filter_flags;
+	u8 ofdm_basic_rates;
+	u8 cck_basic_rates;
+	u8 node_addr[6];
+	u8 bssid_addr[6];
+	u16 assoc_id;
+	u16 beacon_interval;
+} __attribute__ ((packed));
+
+#define DAEMON_MAX_SCAN_SIZE 1024
+struct daemon_scan_request {
+	u8 flags;		/* 0 - 2.4Ghz, 1 - 5.2Ghz */
+	u8 channel_count;
+	u16 probe_request_len;
+	u16 quiet_time;		/* dwell only this long on quiet chnl (active scan) */
+	u16 quiet_plcp_th;	/* quiet chnl is < this # pkts (typ. 1) */
+	u32 suspend_time;	/* pause scan this long when returning to svc chnl */
+	u32 max_out_time;	/* max msec to be out of associated (service) chnl */
+	u8 probe_request_rate;	/* rate to send probe request */
+	u32 filter_flags;
+	u32 rxon_flags;
+	struct daemon_ssid_ie direct_scan;
+	u8 data[0];
+	/*
+	   The channels start after the probe request payload and are of type:
+
+	   struct daemon_scan_channel channels[0];
+
+	   NOTE:  Only one band of channels can be scanned per pass.  You
+	   can not mix 2.4Ghz channels and 5.2Ghz channels and must
+	   request a scan multiple times (not concurrently)
+
+	 */
+} __attribute__ ((packed));
+
+/* driver -> daemon 11h frame */
+struct daemon_80211_frame {
+	u8 channel;
+	u8 reserved1;
+	u16 rssi;
+	u16 reserved2;
+	u64 tsf;
+	u32 beacon_time;
+	u16 frame_len;
+	u8 frame[0];
+} __attribute__ ((packed));
+
+struct daemon_sync_txpower_limit {
+	u8 channel;
+	s8 power;
+} __attribute__ ((packed));
+
+enum {
+	DAEMON_SYNC_UNINIT = 0,
+	DAEMON_SYNC_INIT,
+	DAEMON_SYNC_SCAN_COMPLETE,
+	DAEMON_SYNC_TXPOWER_LIMIT,
+	DAEMON_SYNC_MEASURE_REPORT,
+	DAEMON_SYNC_TX_STATUS,
+	DAEMON_SYNC_SUSPEND,
+	DAEMON_SYNC_RESUME,
+};
+
+/* driver  -> daemon */
+struct daemon_sync_cmd {
+	u16 state;
+	u16 len;
+	u8 data[0];
+} __attribute__ ((packed));
+
+#endif

jwltest-ipw3945-1_1_0.patch:
 Documentation/networking/README.ipw3945 |   40 -
 drivers/net/wireless/ipw3945.c          |  809 +++++++++++++++++---------------
 drivers/net/wireless/ipw3945.h          |   17 
 3 files changed, 472 insertions(+), 394 deletions(-)

--- NEW FILE jwltest-ipw3945-1_1_0.patch ---
--- linux-2.6.18.noarch/Documentation/networking/README.ipw3945.orig	2006-09-20 15:30:01.000000000 -0400
+++ linux-2.6.18.noarch/Documentation/networking/README.ipw3945	2006-09-20 15:30:07.000000000 -0400
@@ -14,8 +14,8 @@
 
 README.ipw3945
 
-Version: 1.0.5
-Date   : May 22, 2006
+Version: 1.1.0
+Date   : July 14, 2006
 
 
 Index
@@ -113,7 +113,7 @@
 
 1.1. Overview of Features
 -----------------------------------------------
-The current release (1.0.5) supports the following features:
+The current release (1.1.0) supports the following features:
 
 + BSS mode (Infrastructure, Managed)
 + IBSS mode (Ad-Hoc)
@@ -163,7 +163,11 @@
 regulatory daemon (see INSTALL), you must do so manually after loading 
 the module:
 
-	# /sbin/ipw3945d	<--- You need to be root for this
+	# /sbin/ipw3945d	<--- You need to be root for this*
+
+* See README.ipw3945d (provided in the regulatory daemon package) for 
+  information on how to configure the system to run the regulatory 
+  daemon as a non-root user.
 
 If you want to unload the module (and kill the deamon as well), you can 
 simply use the unload script:
@@ -272,20 +276,15 @@
 
   The STA will not perform measurements requested by other STAs.
 
-IBSS is not supported on channels marked as DFS or passive-only.  As 
-such, supporting IBSS DFS is not required.  The use of IBSS networks 
-(starting or joining) on channels marked as spectrum managed is not 
-supported (since we do not support the full IBSS DFS owner mode)
+IBSS is not supported on channels marked passive-only. 
+
+The use of IBSS networks (starting or joining) on channels marked as 
+radar spectrum is also not supported.
 
 The user can manually control the transmit power control via the 
 iwconfig txpower command (see below for details on behavior of the
 txpower command with this driver).
 
-Channels indicated to require radar detection are only allowed to be 
-used in association with access points that advertise support for IEEE 
-802.11h.  To determine which channels require this, see the 'channels' 
-entry in the section 'Device Level Sysfs Helper Files.'
-
 
 3.7. Tx Power 
 -----------------------------------------------
@@ -455,7 +454,7 @@
 	info is logged.  See the 'dvals' and 'load' script for more info on
 	how to use this. 
 
-	The dvals and load scripts are provided in the ipw3945-1.0.5.tgz
+	The dvals and load scripts are provided in the ipw3945-1.1.0.tgz
 	development snapshot releases available from the SourceForge 
 	project at http://ipw3945.sf.net)
 
@@ -642,13 +641,10 @@
 	  36: 17dBm: BSS, IBSS, active/passive.
 	...
 	  48: 17dBm: BSS, IBSS, active/passive.
-	  52: 17dBm: BSS (IEEE 802.11h required), passive only.
+	  52: 17dBm: BSS (radar spectrum), passive only.
 	...
-	  136: 17dBm: BSS (IEEE 802.11h required), passive only.
-	  140: 17dBm: BSS (IEEE 802.11h required), passive only.
-
-	Channels where IEEE 802.11h is required will only associate with 
-	APs that have the Spectrum Management bit enabled.  
+	  136: 17dBm: BSS (radar spectrum), passive only.
+	  140: 17dBm: BSS (radar spectrum), passive only.
 
 	For channels marked where ad-hoc is not supported (IBSS is not 
 	listed), you can neither join or create an IBSS (ad-hoc) network 
@@ -686,6 +682,10 @@
 5. Wireless Tools Details
 ===============================================
 
+Due to an issue in handling 64-bit integers in the v28 based versions of 
+the wireless tools, we recommend that only wireless tools based on v29 be 
+used on 64-bit platforms.
+
 5.1. iwlist
 -----------------------------------------------
 
--- linux-2.6.18.noarch/drivers/net/wireless/ipw3945.c.orig	2006-09-20 15:30:01.000000000 -0400
+++ linux-2.6.18.noarch/drivers/net/wireless/ipw3945.c	2006-09-20 15:30:07.000000000 -0400
@@ -65,8 +65,16 @@
 #include <net/ieee80211_radiotap.h>
 #include <asm/div64.h>
 
+/* This matches the current version in FC6/RHEL5... */
+#define IEEE80211_API_VERSION	2
+
 #include "ipw3945.h"
 
+#if IEEE80211_API_VERSION != 1 && \
+    IEEE80211_API_VERSION != 2
+#error Incompatible ieee80211 subsystem version.  Please upgrade ipw3945 driver sources.
+#endif
+
 #ifdef CONFIG_IPW3945_DEBUG
 #define VD "d"
 #else
@@ -97,7 +105,7 @@
 #define VQ
 #endif
 
-#define IPW3945_VERSION "1.0.5" VD VM VP VR VQ
+#define IPW3945_VERSION "1.1.0" VD VM VP VR VQ
 
 #define DRV_DESCRIPTION	"Intel(R) PRO/Wireless 3945 Network Connection driver for Linux"
 #define DRV_COPYRIGHT	"Copyright(c) 2003-2006 Intel Corporation"
@@ -210,8 +218,6 @@
 static void ipw_down(struct ipw_priv *);
 static void ipw_bg_down(void *);
 
-static int init_supported_rates(struct ipw_priv *priv,
-				struct ipw_supported_rates *prates);
 static int ipw_card_show_info(struct ipw_priv *priv);
 static int ipw_query_eeprom(struct ipw_priv *priv, u32 offset,
 			    u32 len, u8 * buf);
@@ -2085,7 +2091,7 @@
 			       geo->bg[i].max_power,
 			       geo->bg[i].
 			       flags & IEEE80211_CH_RADAR_DETECT ?
-			       " (IEEE 802.11h requried)" : "",
+			       " (radar spectrum)" : "",
 			       ((geo->bg[i].flags & IEEE80211_CH_NO_IBSS)
 				|| (geo->bg[i].
 				    flags &
@@ -2877,7 +2883,27 @@
 	return rc;
 }
 
-static int ipw_send_rxon_assoc(struct ipw_priv *priv)
+static int ipw_rxon_assoc_callback(struct ipw_priv *priv,
+				   struct ipw_cmd *cmd, struct sk_buff *skb)
+{
+	struct ipw_rx_packet *res = NULL;
+
+	if (!skb) {
+		IPW_ERROR("error: response NULL in REPLY_RX_ON_ASSOC.\n");
+		return 1;
+	}
+
+	res = (struct ipw_rx_packet *)skb->data;
+	if (res->hdr.flags & 0x40) {
+		IPW_ERROR("bad return from REPLY_RX_ON_ASSOC.\n");
+		return 1;
+	}
+
+	dev_kfree_skb_any(skb);
+	return 0;
+}
+
+static int ipw_send_rxon_assoc(struct ipw_priv *priv, u8 flags)
 {
 	int rc = 0;
 	struct ipw_rx_packet *res = NULL;
@@ -2885,10 +2911,13 @@
 	struct ipw_host_cmd cmd = {
 		.id = REPLY_RX_ON_ASSOC,
 		.len = sizeof(struct ipw_rxon_assoc_cmd),
-		.meta.flags = CMD_WANT_SKB,
+		.meta.flags = flags,
 		.data = &rxon_assoc,
 	};
 
+	if (flags & CMD_ASYNC)
+		cmd.meta.u.callback = ipw_rxon_assoc_callback;
+
 	rxon_assoc.flags = priv->rxon.flags;
 	rxon_assoc.filter_flags = priv->rxon.filter_flags;
 	rxon_assoc.ofdm_basic_rates = priv->rxon.ofdm_basic_rates;
@@ -2896,7 +2925,7 @@
 	rxon_assoc.reserved = 0;
 
 	rc = ipw_send_cmd(priv, &cmd);
-	if (rc)
+	if (rc || (flags & CMD_ASYNC))
 		return rc;
 
 	res = (struct ipw_rx_packet *)cmd.meta.u.skb->data;
@@ -2910,6 +2939,18 @@
 	return rc;
 }
 
+static int ipw_rxon_assoc_async(struct ipw_priv *priv)
+{
+	u8 flags = CMD_ASYNC | CMD_NO_LOCK;
+	return ipw_send_rxon_assoc(priv, flags);
+}
+
+static int ipw_rxon_assoc_sync(struct ipw_priv *priv)
+{
+	u8 flags = CMD_WANT_SKB;
+	return ipw_send_rxon_assoc(priv, flags);
+}
+
 static int ipw_add_sta_sync_callback(struct ipw_priv *priv,
 				     struct ipw_cmd *cmd, struct sk_buff *skb)
 {
@@ -3091,25 +3132,6 @@
 	return -1;
 }
 
-static int ipw_rate_ieee2index(u8 x)
-{
-	int i;
-	for (i = 0; i < ARRAY_SIZE(rate_table_info); i++) {
-		if (rate_table_info[i].rate_ieee == x)
-			return i;
-	}
-	return -1;
-}
-
-static u8 ipw_rate_index2ieee(int x)
-{
-
-	if (x < ARRAY_SIZE(rate_table_info))
-		return rate_table_info[x].rate_ieee;
-
-	return IPW_INVALID_RATE;
-}
-
 static int ipw_rate_index2rate_scale(int x)
 {
 
@@ -3307,7 +3329,7 @@
 	 * If we're not associated, we need to request the regulatory
 	 * daemon to tune and configure the radio via ipw_send_rxon. */
 	if (is_assoc)
-		rc = ipw_send_rxon_assoc(priv);
+		rc = ipw_rxon_assoc_sync(priv);
 	else
 		rc = ipw_send_rx_config(priv);
 
@@ -3553,28 +3575,110 @@
 	return rc;
 }
 
+#define IEEE80211_MAX_RATES (IEEE80211_NUM_OFDM_RATES + \
+                             IEEE80211_NUM_CCK_RATES)
+#define IEEE80211_CCK_RATE_1MB_INDEX		0
+#define IEEE80211_CCK_RATE_2MB_INDEX		1
+#define IEEE80211_CCK_RATE_5MB_INDEX		2
+#define IEEE80211_CCK_RATE_11MB_INDEX		3
+#define IEEE80211_OFDM_RATE_6MB_INDEX		4
+#define IEEE80211_OFDM_RATE_9MB_INDEX		5
+#define IEEE80211_OFDM_RATE_12MB_INDEX		6
+#define IEEE80211_OFDM_RATE_18MB_INDEX		7
+#define IEEE80211_OFDM_RATE_24MB_INDEX		8
+#define IEEE80211_OFDM_RATE_36MB_INDEX		9
+#define IEEE80211_OFDM_RATE_48MB_INDEX		10
+#define IEEE80211_OFDM_RATE_54MB_INDEX		11
+#define IEEE80211_RATE_ENTRY(mod, rate) \
+        [IEEE80211_## mod ##_RATE_## rate ##MB_INDEX] = \
+        IEEE80211_## mod ##_RATE_## rate ##MB
+
+static u8 ipw_index_to_rate(int i)
+{
+	u8 rates[IEEE80211_MAX_RATES] = {
+		IEEE80211_RATE_ENTRY(CCK, 1),
+		IEEE80211_RATE_ENTRY(CCK, 2),
+		IEEE80211_RATE_ENTRY(CCK, 5),
+		IEEE80211_RATE_ENTRY(CCK, 11),
+		IEEE80211_RATE_ENTRY(OFDM, 6),
+		IEEE80211_RATE_ENTRY(OFDM, 9),
+		IEEE80211_RATE_ENTRY(OFDM, 12),
+		IEEE80211_RATE_ENTRY(OFDM, 18),
+		IEEE80211_RATE_ENTRY(OFDM, 24),
+		IEEE80211_RATE_ENTRY(OFDM, 36),
+		IEEE80211_RATE_ENTRY(OFDM, 48),
+		IEEE80211_RATE_ENTRY(OFDM, 54),
+	};
+
+	if (i >= IPW_MAX_RATES)
+		return 0xff;
+
+	return rates[i];
+}
+
+static void ipw_fill_network_rates(struct ieee80211_network *network,
+				   u32 rates_mask)
+{
+	int i, in_ex = 0;
+
+	network->rates_len = 0;
+	network->rates_ex_len = 0;
+
+	for (i = 0; i < IPW_MAX_RATES; i++) {
+		if (!(rates_mask & (1 << i)))
+			continue;
+
+		if (!in_ex) {
+			network->rates[network->rates_len] =
+			    ipw_index_to_rate(i);
+
+			/* If the rates mask has this rate flagged
+			 * as a basic rate then set the basic rate
+			 * bit on the rate entry */
+			if (rates_mask & (1 << (i + 16)))
+				network->rates[network->rates_len] |=
+				    IEEE80211_BASIC_RATE_MASK;
+
+			network->rates_len++;
+
+			if (network->rates_len == MAX_RATES_LENGTH)
+				in_ex = 1;
+		} else {
+			network->rates_ex[network->rates_ex_len] =
+			    ipw_index_to_rate(i);
+			if (rates_mask & (1 << (i + 16)))
+				network->rates_ex[network->rates_ex_len] |=
+				    IEEE80211_BASIC_RATE_MASK;
+			network->rates_ex_len++;
+		}
+	}
+}
+
 /*
   fill in the supported rate in IE fiels
   return : set the bit for each supported rate insert in ie
 */
 static u16 ipw_supported_rate_to_ie(struct ieee80211_info_element *ie,
-				    u16 supported_rate,
-				    u16 basic_rate, int max_count)
+				    const u16 rates_mask,
+				    const u16 basic_rate, const int max_count)
 {
-	u16 ret_rates = 0, bit;
+	u16 ret_rates = 0, mask;
+	u8 *rates = ie->data;
 	int i;
-	u8 *rates;
 
-	rates = &ie->data[0];
+	ie->len = 0;
+
+	for (i = 0, mask = 1; i < IPW_MAX_RATES; i++, mask <<= 1) {
+		if (rates_mask & mask) {
+			ret_rates |= mask;
+			rates[ie->len++] = ipw_index_to_rate(i) |
+			    ((mask & basic_rate) ? 0x80 : 0x00);
 
-	for (bit = 1, i = 0; i < IPW_MAX_RATES; i++, bit <<= 1) {
-		if (bit & supported_rate) {
-			ret_rates |= bit;
-			rates[ie->len++] = ipw_rate_index2ieee(i) |
-			    ((bit & basic_rate) ? 0x80 : 0x00);
 			if (ie->len >= max_count)
 				break;
-			//todoG for IBSS return only cck rates only in the first ie
+
+			/* todoG for IBSS return only cck rates only in
+			 * the first ie */
 		}
 	}
 
@@ -3715,6 +3819,11 @@
 
 	frame->capability = priv->assoc_request.capability & capability;
 
+	if (priv->assoc_request.ieee_mode == IPW_G_MODE)
+		frame->capability |= WLAN_CAPABILITY_SHORT_SLOT_TIME;
+	if (priv->assoc_request.ieee_mode != IPW_A_MODE)
+		frame->capability |= WLAN_CAPABILITY_SHORT_PREAMBLE;
+
 	if (priv->config & CFG_PREAMBLE_LONG)
 		frame->capability &= ~WLAN_CAPABILITY_SHORT_PREAMBLE;
 
@@ -3733,12 +3842,17 @@
 	/* fill in supported rate */
 	info_element->id = MFIE_TYPE_RATES;
 	info_element->len = 0;
+	IPW_DEBUG_INFO("ASSOC REQ: Rates: %08X %08X\n", priv->active_rate,
+		       priv->active_rate_basic);
 	ret_rates =
-	    ipw_supported_rate_to_ie(info_element, priv->active_rate,
+	    ipw_supported_rate_to_ie(info_element,
+				     priv->active_rate & priv->rates_mask,
 				     priv->active_rate_basic,
 				     IPW_SUPPORTED_RATES_IE_LEN);
 
 	ret_rates = ~ret_rates & priv->active_rate;
+	IPW_DEBUG_INFO("ASSOC REQ: Rates: %08X %08X\n", priv->active_rate,
+		       priv->active_rate_basic);
 
 	/* Account for the size we know... */
 	len = sizeof(struct ieee80211_assoc_request) +
@@ -4114,6 +4228,14 @@
 	rxon->filter_flags |= RXON_FILTER_ASSOC_MSK;
 	rxon->assoc_id = assoc_id;
 	rxon->beacon_interval = priv->assoc_request.beacon_interval;
+
+	if (priv->assoc_request.capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
+		rxon->flags |= RXON_FLG_SHORT_PREAMBLE_MSK;
+
+	if ((priv->assoc_request.ieee_mode == IPW_G_MODE) &&
+	    (priv->assoc_request.capability & WLAN_CAPABILITY_SHORT_SLOT_TIME))
+		rxon->flags |= RXON_FLG_SHORT_SLOT_MSK;
+
 /*	switch (priv->ieee->sec.level) {
 	case SEC_LEVEL_1:
 	rxon->flags |= */
@@ -4186,17 +4308,9 @@
 	memcpy(priv->ieee->bssid, priv->bssid, ETH_ALEN);
 	memcpy(rxon->bssid_addr, associate->bssid, ETH_ALEN);
 	rxon->channel = associate->channel;
-	rxon->flags =
-	    (RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_A_MSK | RXON_FLG_ANT_B_MSK);
 
 	rxon->filter_flags = RXON_FILTER_ACCEPT_GRP_MSK;	// todoG is this needed
 
-	if (associate->ieee_mode == IPW_A_MODE)
-		rxon->flags |= RXON_FLG_SHORT_SLOT_MSK;
-	else
-		rxon->flags |=
-		    (RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK);
-
 	switch (priv->ieee->iw_mode) {
 	case IW_MODE_INFRA:
 		rxon->dev_type = RXON_DEV_TYPE_ESS;
@@ -4224,16 +4338,19 @@
 				       RXON_FILTER_CTL2HOST_MSK);
 #endif
 
+	rxon->flags =
+	    (RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_A_MSK | RXON_FLG_ANT_B_MSK);
+
 	if (associate->ieee_mode == IPW_A_MODE) {
-		priv->rxon.flags &=
+		rxon->flags &=
 		    ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK
 		      | RXON_FLG_CCK_MSK);
-		priv->rxon.flags |= RXON_FLG_SHORT_SLOT_MSK;
+		rxon->flags |= RXON_FLG_SHORT_SLOT_MSK;
 	} else {
-		priv->rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
-		priv->rxon.flags |= RXON_FLG_BAND_24G_MSK;
-		priv->rxon.flags |= RXON_FLG_AUTO_DETECT_MSK;
-		priv->rxon.flags &= ~RXON_FLG_CCK_MSK;
+		rxon->flags &= ~RXON_FLG_SHORT_SLOT_MSK;
+		rxon->flags |= RXON_FLG_BAND_24G_MSK;
+		rxon->flags |= RXON_FLG_AUTO_DETECT_MSK;
+		rxon->flags &= ~RXON_FLG_CCK_MSK;
 	}
 
 	if ((associate->capability & WLAN_CAPABILITY_SHORT_PREAMBLE))
@@ -4241,29 +4358,27 @@
 	else
 		priv->rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK;
 
-	if ((priv->rxon.flags & RXON_FLG_BAND_24G_MSK) &&
+	if ((rxon->flags & RXON_FLG_BAND_24G_MSK) &&
 	    (associate->ieee_mode == IPW_G_MODE)) {
 		if (associate->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)
-			priv->rxon.flags |= RXON_FLG_SHORT_SLOT_MSK;
+			rxon->flags |= RXON_FLG_SHORT_SLOT_MSK;
 		else
-			priv->rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
+			rxon->flags &= ~RXON_FLG_SHORT_SLOT_MSK;
 
 		if (associate->erp_value & IEEE80211_ERP_USE_PROTECTION)
-			priv->rxon.flags |= RXON_FLG_TGG_PROTECT_MSK;
+			rxon->flags |= RXON_FLG_TGG_PROTECT_MSK;
 		else
-			priv->rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
+			rxon->flags &= ~RXON_FLG_TGG_PROTECT_MSK;
 	}
 
-	priv->rxon.cck_basic_rates =
-	    ((priv->active_rate_basic & 0xF) | R_1M_MSK);
-	priv->rxon.ofdm_basic_rates =
-	    ((priv->active_rate_basic >> 4) | R_6M_MSK);
+	rxon->cck_basic_rates = ((priv->active_rate_basic & 0xF) | R_1M_MSK);
+	rxon->ofdm_basic_rates = ((priv->active_rate_basic >> 4) | R_6M_MSK);
 
 	if ((priv->active_rate_basic & 0xF) == 0)
-		priv->rxon.cck_basic_rates =
+		rxon->cck_basic_rates =
 		    R_1M_MSK | R_2M_MSK | R_5_5M_MSK | R_11M_MSK;
 	if (priv->active_rate_basic >> 4 == 0)
-		priv->rxon.ofdm_basic_rates = R_6M_MSK | R_12M_MSK | R_24M_MSK;
+		rxon->ofdm_basic_rates = R_6M_MSK | R_12M_MSK | R_24M_MSK;
 
 	rc = ipw_rxon_call(priv, 0);
 	if (rc)
@@ -4287,10 +4402,15 @@
 		} else {
 			unsigned long flags;
 			spin_lock_irqsave(&priv->lock, flags);
+#if IEEE80211_API_VERSION >= 2
 			rc = ieee80211_tx_frame(priv->ieee,
 						(struct ieee80211_hdr
-						 *)&frame, IEEE80211_3ADDR_LEN,
-						sizeof(frame), 0);
+						 *)&frame, 0, sizeof(frame), 0);
+#else
+			rc = ieee80211_tx_frame(priv->ieee,
+						(struct ieee80211_hdr
+						 *)&frame, sizeof(frame));
+#endif
 			spin_unlock_irqrestore(&priv->lock, flags);
 		}
 	}
@@ -4407,27 +4527,24 @@
 	return rc;
 }
 
-static void ipw_send_supported_rates(struct ipw_priv *priv, struct ipw_supported_rates
-				     *rates)
+static void ipw_set_supported_rates_mask(struct ipw_priv *priv, int rates_mask)
 {
-	int index, i;
-	u8 rate, basic;
+	priv->active_rate = rates_mask & 0xffff;
+	priv->active_rate_basic = (rates_mask >> 16) & 0xffff;
+}
 
-	priv->active_rate = 0;
-	priv->active_rate_basic = 0;
-	for (i = 0; i < rates->num_rates; i++) {
-		rate = rates->supported_rates[i];
-		if (rate & IEEE80211_BASIC_RATE_MASK)
-			basic = 1;
-		else
-			basic = 0;
-		rate &= ~IEEE80211_BASIC_RATE_MASK;
-		index = ipw_rate_ieee2index(rate);
-		if (index != -1) {
-			priv->active_rate |= (1 << index);
-			if (basic == 1)
-				priv->active_rate_basic |= (1 << index);
-		}
+static void ipw_init_rates_mask(struct ipw_priv *priv)
+{
+	priv->rates_mask = 0;
+
+	if (priv->ieee->modulation & IEEE80211_OFDM_MODULATION) {
+		priv->rates_mask |= IEEE80211_OFDM_DEFAULT_RATES_MASK;
+		priv->rates_mask |= IEEE80211_OFDM_BASIC_RATES_MASK << 16;
+	}
+
+	if (priv->ieee->modulation & IEEE80211_CCK_MODULATION) {
+		priv->rates_mask |= IEEE80211_CCK_DEFAULT_RATES_MASK;
+		priv->rates_mask |= IEEE80211_CCK_BASIC_RATES_MASK << 16;
 	}
 }
 
@@ -4476,8 +4593,8 @@
 		netif_carrier_off(priv->net_dev);
 	}
 
-	init_supported_rates(priv, &priv->rates);
-	ipw_send_supported_rates(priv, &priv->rates);
+	ipw_init_rates_mask(priv);
+	ipw_set_supported_rates_mask(priv, priv->rates_mask);
 
 #ifdef CONFIG_IPW3945_QOS
 	ipw_qos_activate(priv, NULL);
@@ -4761,10 +4878,15 @@
 			break;
 
 		case DAEMON_FRAME_TX:
+#if IEEE80211_API_VERSION >= 2
 			ieee80211_tx_frame(priv->ieee, (struct ieee80211_hdr *)
-					   daemon_cmd->cmd.data,
-					   IEEE80211_3ADDR_LEN,
+					   daemon_cmd->cmd.data, 0,
 					   daemon_cmd->cmd.data_len, 0);
+#else
+			ieee80211_tx_frame(priv->ieee, (struct ieee80211_hdr *)
+					   daemon_cmd->cmd.data,
+					   daemon_cmd->cmd.data_len);
+#endif
 			daemon_cmd->cmd.data_len = 0;
 			spin_lock_irqsave(&priv->daemon_lock, flags);
 			list_add_tail(&daemon_cmd->list,
@@ -7179,208 +7301,151 @@
 	return 0;
 }
 
-static int ipw_is_rate_in_mask(struct ipw_priv *priv, int ieee_mode, u8 rate)
+#define IEEE80211_RATE_INDEX_MASK (0xf)
+#define IEEE80211_RATE_MASKED (1 << 14)
+#define IEEE80211_RATE_INVALID (1 << 13)
+/* Given a modulation (OFDM or CCK), the rate (1,2,5,6,9,11,12,18,24,36,48,54)
+ * and a bit mask, verify that the rate is supported in that bitmask and return
+ * the rate with the IEEE80211_RATE_MASKED bit set or cleared as appropriate */
+#define IEEE80211_RATE_IN_MASK(mod, rate, mask) \
+        case IEEE80211_## mod ##_RATE_## rate ##MB: \
+             return (mask & IEEE80211_## mod ##_RATE_## rate ##MB_MASK) ? \
+                     IEEE80211_## mod ##_RATE_## rate ##MB_INDEX : \
+                     (IEEE80211_RATE_MASKED | \
+                     IEEE80211_## mod ##_RATE_## rate ##MB_INDEX)
+
+static u16 ipw_is_rate_in_mask(struct ipw_priv *priv, u8 rate, u16 mask)
 {
 	rate &= ~IEEE80211_BASIC_RATE_MASK;
-	if (ieee_mode == IEEE_A) {
-		switch (rate) {
-		case IEEE80211_OFDM_RATE_6MB:
-			return priv->
-			    rates_mask & IEEE80211_OFDM_RATE_6MB_MASK ? 1 : 0;
-		case IEEE80211_OFDM_RATE_9MB:
-			return priv->
-			    rates_mask & IEEE80211_OFDM_RATE_9MB_MASK ? 1 : 0;
-		case IEEE80211_OFDM_RATE_12MB:
-			return priv->
-			    rates_mask & IEEE80211_OFDM_RATE_12MB_MASK ? 1 : 0;
-		case IEEE80211_OFDM_RATE_18MB:
-			return priv->
-			    rates_mask & IEEE80211_OFDM_RATE_18MB_MASK ? 1 : 0;
-		case IEEE80211_OFDM_RATE_24MB:
-			return priv->
-			    rates_mask & IEEE80211_OFDM_RATE_24MB_MASK ? 1 : 0;
-		case IEEE80211_OFDM_RATE_36MB:
-			return priv->
-			    rates_mask & IEEE80211_OFDM_RATE_36MB_MASK ? 1 : 0;
-		case IEEE80211_OFDM_RATE_48MB:
-			return priv->
-			    rates_mask & IEEE80211_OFDM_RATE_48MB_MASK ? 1 : 0;
-		case IEEE80211_OFDM_RATE_54MB:
-			return priv->
-			    rates_mask & IEEE80211_OFDM_RATE_54MB_MASK ? 1 : 0;
-		default:
-			return 0;
-		}
-	}
 
-	/* B and G mixed */
 	switch (rate) {
-	case IEEE80211_CCK_RATE_1MB:
-		return priv->rates_mask & IEEE80211_CCK_RATE_1MB_MASK ? 1 : 0;
-	case IEEE80211_CCK_RATE_2MB:
-		return priv->rates_mask & IEEE80211_CCK_RATE_2MB_MASK ? 1 : 0;
-	case IEEE80211_CCK_RATE_5MB:
-		return priv->rates_mask & IEEE80211_CCK_RATE_5MB_MASK ? 1 : 0;
-	case IEEE80211_CCK_RATE_11MB:
-		return priv->rates_mask & IEEE80211_CCK_RATE_11MB_MASK ? 1 : 0;
-	}
-
-	/* If we are limited to B modulations, bail at this point */
-	if (ieee_mode == IEEE_B)
-		return 0;
-	/* G */
-	switch (rate) {
-	case IEEE80211_OFDM_RATE_6MB:
-		return priv->rates_mask & IEEE80211_OFDM_RATE_6MB_MASK ? 1 : 0;
-	case IEEE80211_OFDM_RATE_9MB:
-		return priv->rates_mask & IEEE80211_OFDM_RATE_9MB_MASK ? 1 : 0;
-	case IEEE80211_OFDM_RATE_12MB:
-		return priv->rates_mask & IEEE80211_OFDM_RATE_12MB_MASK ? 1 : 0;
-	case IEEE80211_OFDM_RATE_18MB:
-		return priv->rates_mask & IEEE80211_OFDM_RATE_18MB_MASK ? 1 : 0;
-	case IEEE80211_OFDM_RATE_24MB:
-		return priv->rates_mask & IEEE80211_OFDM_RATE_24MB_MASK ? 1 : 0;
-	case IEEE80211_OFDM_RATE_36MB:
-		return priv->rates_mask & IEEE80211_OFDM_RATE_36MB_MASK ? 1 : 0;
-	case IEEE80211_OFDM_RATE_48MB:
-		return priv->rates_mask & IEEE80211_OFDM_RATE_48MB_MASK ? 1 : 0;
-	case IEEE80211_OFDM_RATE_54MB:
-		return priv->rates_mask & IEEE80211_OFDM_RATE_54MB_MASK ? 1 : 0;
-	}
-
-	return 0;
-}
+		IEEE80211_RATE_IN_MASK(OFDM, 6, mask);
+		IEEE80211_RATE_IN_MASK(OFDM, 9, mask);
+		IEEE80211_RATE_IN_MASK(OFDM, 12, mask);
+		IEEE80211_RATE_IN_MASK(OFDM, 18, mask);
+		IEEE80211_RATE_IN_MASK(OFDM, 24, mask);
+		IEEE80211_RATE_IN_MASK(OFDM, 36, mask);
+		IEEE80211_RATE_IN_MASK(OFDM, 48, mask);
+		IEEE80211_RATE_IN_MASK(OFDM, 54, mask);
+		IEEE80211_RATE_IN_MASK(CCK, 1, mask);
+		IEEE80211_RATE_IN_MASK(CCK, 2, mask);
+		IEEE80211_RATE_IN_MASK(CCK, 5, mask);
+		IEEE80211_RATE_IN_MASK(CCK, 11, mask);
+	}
+
+	return IEEE80211_RATE_INVALID;
+}
+
+static u32 ipw_find_compatible_rates(struct ipw_priv *priv,
+				     const struct ieee80211_network *network,
+				     u16 rates_mask)
+{
+	int bit_index, i;
+	u32 rates = 0;
+
+	/* rates */
+	for (i = 0; i < network->rates_len; i++) {
+		bit_index = ipw_is_rate_in_mask(priv, network->rates[i],
+						rates_mask);
+		if (bit_index & IEEE80211_RATE_INVALID) {
+			IPW_DEBUG_RATE("Invalid rate requested: "
+				       "%02X\n", network->rates[i]);
+			continue;
+		}
 
-static int ipw_compatible_rates(struct ipw_priv *priv, const struct ieee80211_network
-				*network, struct ipw_supported_rates *rates)
-{
-	int num_rates, i;
-	memset(rates, 0, sizeof(*rates));
-	num_rates = min(network->rates_len, (u8) IPW_MAX_RATES);
-	rates->num_rates = 0;
-	for (i = 0; i < num_rates; i++) {
-		if (!ipw_is_rate_in_mask
-		    (priv, network->mode, network->rates[i])) {
+		if (bit_index & IEEE80211_RATE_MASKED) {
+			if (!(network->rates[i] & IEEE80211_BASIC_RATE_MASK)) {
+				IPW_DEBUG_RATE("Rate %02X masked : 0x%08X\n",
+					       network->rates[i], rates_mask);
 
-			if (network->rates[i] & IEEE80211_BASIC_RATE_MASK) {
-				IPW_DEBUG_SCAN
-				    ("Adding masked mandatory "
-				     "rate %02X\n", network->rates[i]);
-				rates->supported_rates[rates->
-						       num_rates++] =
-				    network->rates[i];
 				continue;
 			}
 
-			IPW_DEBUG_SCAN("Rate %02X masked : 0x%08X\n",
-				       network->rates[i], priv->rates_mask);
-			continue;
+			/* Clear out any bits set in the mask that are not
+			 * specific rates (INVALID and MASKED bits) */
+			bit_index &= IEEE80211_RATE_INDEX_MASK;
+
+			IPW_DEBUG_RATE("Adding masked mandatory "
+				       "rate %02X\n", network->rates[i]);
 		}
 
-		rates->supported_rates[rates->num_rates++] = network->rates[i];
+		if (network->rates[i] & IEEE80211_BASIC_RATE_MASK)
+			rates |= (1 << (bit_index + 16));
+
+		rates |= (1 << bit_index);
 	}
 
-	num_rates = min(network->rates_ex_len,
-			(u8) (IPW_MAX_RATES - num_rates));
-	for (i = 0; i < num_rates; i++) {
-		if (!ipw_is_rate_in_mask
-		    (priv, network->mode, network->rates_ex[i])) {
-			if (network->rates_ex[i] & IEEE80211_BASIC_RATE_MASK) {
-				IPW_DEBUG_SCAN
-				    ("Adding masked mandatory "
-				     "rate %02X\n", network->rates_ex[i]);
-				rates->supported_rates[rates->
-						       num_rates++] =
-				    network->rates[i];
+	/* extended rates */
+	for (i = 0; i < network->rates_ex_len; i++) {
+		bit_index = ipw_is_rate_in_mask(priv, network->rates_ex[i],
+						rates_mask);
+		if (bit_index & IEEE80211_RATE_INVALID) {
+			IPW_DEBUG_RATE("Invalid rate requested: "
+				       "%02X\n", network->rates_ex[i]);
+			continue;
+		}
+
+		if (bit_index & IEEE80211_RATE_MASKED) {
+			if (!(network->rates_ex[i] & IEEE80211_BASIC_RATE_MASK)) {
+				IPW_DEBUG_RATE("Rate %02X masked : 0x%08X\n",
+					       network->rates_ex[i],
+					       rates_mask);
+
 				continue;
 			}
 
-			IPW_DEBUG_SCAN("Rate %02X masked : 0x%08X\n",
-				       network->rates_ex[i], priv->rates_mask);
-			continue;
+			bit_index &= ~IEEE80211_RATE_INDEX_MASK;
+
+			IPW_DEBUG_RATE("Adding masked mandatory "
+				       "rate %02X\n", network->rates_ex[i]);
 		}
 
-		rates->supported_rates[rates->num_rates++] =
-		    network->rates_ex[i];
+		if (network->rates_ex[i] & IEEE80211_BASIC_RATE_MASK)
+			rates |= (1 << (bit_index + 16));
+
+		rates |= (1 << bit_index);
 	}
 
-	return 1;
+	return rates;
 }
 
-static inline void ipw_copy_rates(struct ipw_supported_rates *dest, const struct ipw_supported_rates
-				  *src)
+#if 0
+static int ipw_compatible_basic_rates(struct ipw_priv *priv,
+				      struct ieee80211_network *network,
+				      u32 rates_mask)
 {
-	u8 i;
-	for (i = 0; i < src->num_rates; i++)
-		dest->supported_rates[i] = src->supported_rates[i];
-	dest->num_rates = src->num_rates;
-}
-
-/* TODO: Look at sniffed packets in the air to determine if the basic rate
- * mask should ever be used -- right now all callers to add the scan rates are
- * set with the modulation = CCK, so BASIC_RATE_MASK is never set... */
-static void ipw_add_cck_scan_rates(struct ipw_supported_rates
-				   *rates, u8 modulation, u32 rate_mask)
-{
-	u8 basic_mask =
-	    (IEEE80211_OFDM_MODULATION ==
-	     modulation) ? IEEE80211_BASIC_RATE_MASK : 0;
-	if (rate_mask & IEEE80211_CCK_RATE_1MB_MASK)
-		rates->supported_rates[rates->num_rates++] =
-		    IEEE80211_BASIC_RATE_MASK | IEEE80211_CCK_RATE_1MB;
-	if (rate_mask & IEEE80211_CCK_RATE_2MB_MASK)
-		rates->supported_rates[rates->num_rates++] =
-		    IEEE80211_BASIC_RATE_MASK | IEEE80211_CCK_RATE_2MB;
-	if (rate_mask & IEEE80211_CCK_RATE_5MB_MASK)
-		rates->supported_rates[rates->num_rates++] =
-		    basic_mask | IEEE80211_CCK_RATE_5MB;
-	if (rate_mask & IEEE80211_CCK_RATE_11MB_MASK)
-		rates->supported_rates[rates->num_rates++] =
-		    basic_mask | IEEE80211_CCK_RATE_11MB;
-}
-
-static void ipw_add_ofdm_scan_rates(struct ipw_supported_rates
-				    *rates, u8 modulation, u32 rate_mask)
-{
-	u8 basic_mask =
-	    (IEEE80211_OFDM_MODULATION ==
-	     modulation) ? IEEE80211_BASIC_RATE_MASK : 0;
-	if (rate_mask & IEEE80211_OFDM_RATE_6MB_MASK)
-		rates->supported_rates[rates->num_rates++] =
-		    basic_mask | IEEE80211_OFDM_RATE_6MB;
-	if (rate_mask & IEEE80211_OFDM_RATE_9MB_MASK)
-		rates->supported_rates[rates->num_rates++] =
-		    IEEE80211_OFDM_RATE_9MB;
-	if (rate_mask & IEEE80211_OFDM_RATE_12MB_MASK)
-		rates->supported_rates[rates->num_rates++] =
-		    basic_mask | IEEE80211_OFDM_RATE_12MB;
-	if (rate_mask & IEEE80211_OFDM_RATE_18MB_MASK)
-		rates->supported_rates[rates->num_rates++] =
-		    IEEE80211_OFDM_RATE_18MB;
-	if (rate_mask & IEEE80211_OFDM_RATE_24MB_MASK)
-		rates->supported_rates[rates->num_rates++] =
-		    basic_mask | IEEE80211_OFDM_RATE_24MB;
-	if (rate_mask & IEEE80211_OFDM_RATE_36MB_MASK)
-		rates->supported_rates[rates->num_rates++] =
-		    IEEE80211_OFDM_RATE_36MB;
-	if (rate_mask & IEEE80211_OFDM_RATE_48MB_MASK)
-		rates->supported_rates[rates->num_rates++] =
-		    IEEE80211_OFDM_RATE_48MB;
-	if (rate_mask & IEEE80211_OFDM_RATE_54MB_MASK)
-		rates->supported_rates[rates->num_rates++] =
-		    IEEE80211_OFDM_RATE_54MB;
+	int i;
+
+	for (i = 0; i < network->rates_len; i++) {
+		if (!(network->rates[i] & IEEE80211_BASIC_RATE_MASK))
+			continue;
+		if (!ipw_is_rate_in_mask(priv, network->rates[i], rates_mask))
+			return 1;
+	}
+
+	for (i = 0; i < network->rates_ex_len; i++) {
+		if (!(network->rates_ex[i] & IEEE80211_BASIC_RATE_MASK))
+			continue;
+		if (!ipw_is_rate_in_mask(priv, network->rates_ex[i],
+					 rates_mask))
+			return 1;
+	}
+
+	return 0;
 }
+#endif
 
 struct ipw_network_match {
 	struct ieee80211_network *network;
-	struct ipw_supported_rates rates;
+	u32 rates_mask;
 };
+
 static int ipw_find_adhoc_network(struct ipw_priv *priv,
 				  struct ipw_network_match *match,
 				  struct ieee80211_network *network,
 				  int roaming)
 {
-	struct ipw_supported_rates rates;
+	u16 rates_mask;
 	/* Verify that this network's capability is compatible with the
 	 * current mode (AdHoc or Infrastructure) */
 	if ((priv->ieee->iw_mode == IW_MODE_ADHOC &&
@@ -7524,10 +7589,10 @@
 				MAC_ARG(network->bssid));
 		return 0;
 	}
-
+#if 0
 	/* Ensure that the rates supported by the driver are compatible with
 	 * this AP, including verification of basic rates (mandatory) */
-	if (!ipw_compatible_rates(priv, network, &rates)) {
+	if (!ipw_compatible_basic_rates(priv, network, priv->rates_mask)) {
 		IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded "
 				"because configured rate mask excludes "
 				"AP mandatory rate.\n",
@@ -7536,8 +7601,10 @@
 				MAC_ARG(network->bssid));
 		return 0;
 	}
+#endif
 
-	if (rates.num_rates == 0) {
+	rates_mask = ipw_find_compatible_rates(priv, network, priv->rates_mask);
+	if (!rates_mask) {
 		IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded "
 				"because of no compatible rates.\n",
 				escape_essid(network->ssid,
@@ -7551,7 +7618,7 @@
 	 * should occur within a generic IEEE 802.11 user space tool.  */
 
 	/* Set up 'new' AP to this network */
-	ipw_copy_rates(&match->rates, &rates);
+	match->rates_mask = rates_mask;
 	match->network = network;
 	IPW_DEBUG_MERGE("Network '%s (" MAC_FMT
 			")' is a viable match.\n",
@@ -7607,7 +7674,8 @@
 			    struct ipw_network_match *match,
 			    struct ieee80211_network *network, int roaming)
 {
-	struct ipw_supported_rates rates;
+	u32 rates_mask;
+
 	/* Verify that this network's capability is compatible with the
 	 * current mode (AdHoc or Infrastructure) */
 	if ((priv->ieee->iw_mode == IW_MODE_INFRA &&
@@ -7632,18 +7700,6 @@
 		return 0;
 	}
 
-	/* 802.11h Sanity Checks */
-	if ((ieee80211_get_channel_flags(priv->ieee, network->channel)
-	     & IEEE80211_CH_RADAR_DETECT)
-	    && !(network->capability & WLAN_CAPABILITY_SPECTRUM_MGMT)) {
-		IPW_DEBUG_SCAN("Network '%s (" MAC_FMT ")' "
-			       "is invalid - Spectrum Management mismatch.\n",
-			       escape_essid(network->ssid,
-					    network->ssid_len),
-			       MAC_ARG(network->bssid));
-		return 0;
-	}
-
 	if (network->capability & WLAN_CAPABILITY_SPECTRUM_MGMT) {
 		if ((network->capability & WLAN_CAPABILITY_IBSS) &&
 		    !(network->flags & NETWORK_HAS_IBSS_DFS)) {
@@ -7822,10 +7878,10 @@
 				MAC_ARG(network->bssid));
 		return 0;
 	}
-
+#if 0
 	/* Ensure that the rates supported by the driver are compatible with
 	 * this AP, including verification of basic rates (mandatory) */
-	if (!ipw_compatible_rates(priv, network, &rates)) {
+	if (!ipw_compatible_basic_rates(priv, network, priv->rates_mask)) {
 		IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded "
 				"because configured rate mask excludes "
 				"AP mandatory rate.\n",
@@ -7834,8 +7890,10 @@
 				MAC_ARG(network->bssid));
 		return 0;
 	}
+#endif
 
-	if (rates.num_rates == 0) {
+	rates_mask = ipw_find_compatible_rates(priv, network, priv->rates_mask);
+	if (!rates_mask) {
 		IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded "
 				"because of no compatible rates.\n",
 				escape_essid(network->ssid,
@@ -7849,7 +7907,7 @@
 	 * should occur within a generic IEEE 802.11 user space tool.  */
 
 	/* Set up 'new' AP to this network */
-	ipw_copy_rates(&match->rates, &rates);
+	match->rates_mask = rates_mask;
 	match->network = network;
 	IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT
 			")' is a viable match.\n",
@@ -7964,12 +8022,8 @@
 		network->capability |= WLAN_CAPABILITY_SHORT_PREAMBLE;
 	if (priv->capability & CAP_PRIVACY_ON)
 		network->capability |= WLAN_CAPABILITY_PRIVACY;
-	network->rates_len = min(priv->rates.num_rates, MAX_RATES_LENGTH);
-	memcpy(network->rates, priv->rates.supported_rates, network->rates_len);
-	network->rates_ex_len = priv->rates.num_rates - network->rates_len;
-	memcpy(network->rates_ex,
-	       &priv->rates.supported_rates[network->rates_len],
-	       network->rates_ex_len);
+	ipw_fill_network_rates(network, priv->rates_mask);
+
 	network->last_scanned = 0;
 	network->flags = 0;
 	network->last_associate = 0;
@@ -9319,8 +9373,27 @@
 		if (auth->algorithm == WLAN_AUTH_SHARED_KEY &&
 		    *state <= CMAS_RX_AUTH_SEQ_4) {
 			if (auth->transaction == 2) {
-				struct sk_buff *skb_auth = NULL;
 				struct ieee80211_auth *auth2;
+#if IEEE80211_API_VERSION >= 2
+				BUG_ON(!priv->auth_frame);
+				auth2 = priv->auth_frame;
+				auth2->header.seq_ctl = 0;
+
+				memcpy(auth2->header.addr1, priv->bssid, 6);
+				memcpy(auth2->header.addr2, priv->mac_addr, 6);
+				memcpy(auth2->header.addr3,
+				       priv->ieee->bssid, 6);
+				auth2->algorithm = WLAN_AUTH_SHARED_KEY;
+				auth2->transaction = 3;
+				auth2->status = 0;
+
+				ieee80211_tx_frame(priv->ieee,
+						   (struct ieee80211_hdr *)
+						   priv->auth_frame,
+						   IEEE80211_3ADDR_LEN,
+						   sizeof(*auth2) + 130, 1);
+#else
+				struct sk_buff *skb_auth = NULL;
 				int tx_key =
 				    !(priv->ieee->sec.
 				      flags & SEC_ACTIVE_KEY) ? 0 : priv->ieee->
@@ -9377,13 +9450,14 @@
 
 				memcpy(priv->auth_frame,
 				       skb_auth->data, skb_auth->len);
+
 				ieee80211_tx_frame(priv->ieee,
 						   (struct ieee80211_hdr *)
 						   priv->auth_frame,
-						   IEEE80211_3ADDR_LEN,
-						   skb_auth->len, 0);
+						   skb_auth->len);
 				dev_kfree_skb_any(skb_auth);
 			      out_fail2:
+#endif
 				spin_unlock_irqrestore(&priv->lock, flags);
 				mutex_unlock(&priv->mutex);
 				return;
@@ -9426,8 +9500,12 @@
 		if (len) {
 			IPW_DEBUG_11H("Sending %d bytes.\n", len);
 			spin_lock_irqsave(&priv->lock, flags);
-			ieee80211_tx_frame(priv->ieee, &frame->u.frame,
-					   IEEE80211_3ADDR_LEN, len, 0);
+#if IEEE80211_API_VERSION >= 2
+			ieee80211_tx_frame(priv->ieee, &frame->u.frame, 0, len,
+					   0);
+#else
+			ieee80211_tx_frame(priv->ieee, &frame->u.frame, len);
+#endif
 			spin_unlock_irqrestore(&priv->lock, flags);
 		}
 
@@ -9496,9 +9574,11 @@
 		IPW_DEBUG_11H("Sending %d bytes.\n", len);
 		out_frame->u.frame.frame_ctl = IEEE80211_FTYPE_MGMT |
 		    IEEE80211_STYPE_PROBE_RESP;
-
-		ieee80211_tx_frame(priv->ieee, &out_frame->u.frame,
-				   IEEE80211_3ADDR_LEN, len, 0);
+#if IEEE80211_API_VERSION >= 2
+		ieee80211_tx_frame(priv->ieee, &out_frame->u.frame, 0, len, 0);
+#else
+		ieee80211_tx_frame(priv->ieee, &out_frame->u.frame, len);
+#endif
 	}
 
 	ipw_free_frame(priv, out_frame);
@@ -9571,8 +9651,7 @@
 	   priv->auth_state = CMAS_INIT;
 
 	   ieee80211_tx_frame(priv->ieee,
-	   		      (struct ieee80211_hdr *)&frame, 
-			      IEEE80211_3ADDR_LEN, sizeof(frame), 0);
+	   (struct ieee80211_hdr *)&frame, sizeof(frame));
 
 	   return 0;
 	 */
@@ -9736,6 +9815,7 @@
 	cancel_delayed_work(&priv->associate_timeout);
 
 	priv->assoc_request.assoc_id = resp->aid & 0x3fff;
+	priv->assoc_request.capability = network->capability;
 	queue_work(priv->workqueue, &priv->post_associate);
 #ifdef CONFIG_IPW3945_QOS
 	ipw_qos_association_resp(priv, network);
@@ -9771,7 +9851,7 @@
 
 static int ipw_associate_network(struct ipw_priv *priv,
 				 struct ieee80211_network *network,
-				 struct ipw_supported_rates *rates, int roaming)
+				 u32 rates_mask, int roaming)
 {
 	int err;
 	unsigned long flags;
@@ -9829,14 +9909,14 @@
 
 	IPW_DEBUG_ASSOC
 	    ("%sssociation attempt [%s]: '%s', channel %d, "
-	     "802.11%c [%d], %s[:%s], enc=%s%s%s%c%c\n",
+	     "802.11%c [%08X], %s[:%s], enc=%s%s%s%c%c\n",
 	     roaming ? "Rea" : "A",
 	     (priv->
 	      capability & WLAN_CAPABILITY_IBSS) ? "IBSS" : "BSS",
 	     escape_essid(priv->essid, priv->essid_len),
 	     network->channel,
 	     ipw_modes[priv->assoc_request.ieee_mode],
-	     rates->num_rates,
+	     rates_mask,
 	     (priv->assoc_request.preamble_length ==
 	      DCT_FLAG_LONG_PREAMBLE) ? "long" : "short",
 	     network->
@@ -9881,9 +9961,8 @@
 	}
 
 	priv->assoc_request.listen_interval = network->listen_interval;
-	rates->ieee_mode = priv->assoc_request.ieee_mode;
-	rates->purpose = IPW_RATE_CONNECT;
-	ipw_send_supported_rates(priv, rates);
+
+	ipw_set_supported_rates_mask(priv, rates_mask);
 
 	/*
 	 * If preemption is enabled, it is possible for the association
@@ -9977,8 +10056,8 @@
 	}
 
 	/* Second pass through ROAM process -- request association */
-	ipw_compatible_rates(priv, priv->assoc_network, &match.rates);
-	ipw_associate_network(priv, priv->assoc_network, &match.rates, 1);
+	ipw_find_compatible_rates(priv, priv->assoc_network, match.rates_mask);
+	ipw_associate_network(priv, priv->assoc_network, match.rates_mask, 1);
 	priv->status &= ~STATUS_ROAMING;
 }
 
@@ -10001,7 +10080,7 @@
 	struct ipw_network_match match = {
 		.network = NULL
 	};
-	struct ipw_supported_rates *rates;
+	u32 rates_mask;
 	struct list_head *element;
 	unsigned long flags;
 
@@ -10050,7 +10129,7 @@
 	list_for_each_entry(network, &priv->ieee->network_list, list)
 	    ipw_best_network(priv, &match, network, 0);
 	network = match.network;
-	rates = &match.rates;
+	rates_mask = match.rates_mask;
 	if (network == NULL &&
 	    priv->ieee->iw_mode == IW_MODE_ADHOC &&
 	    priv->config & CFG_ADHOC_CREATE &&
@@ -10060,7 +10139,7 @@
 		element = priv->ieee->network_free_list.next;
 		network = list_entry(element, struct ieee80211_network, list);
 		if (!ipw_adhoc_create(priv, network)) {
-			rates = &priv->rates;
+			rates_mask = priv->rates_mask;
 			list_del(element);
 			list_add_tail(&network->list,
 				      &priv->ieee->network_list);
@@ -10077,7 +10156,7 @@
 		return 0;
 	}
 
-	ipw_associate_network(priv, network, rates, 0);
+	ipw_associate_network(priv, network, rates_mask, 0);
 	return 1;
 }
 
@@ -11853,7 +11932,7 @@
 	struct ipw_priv *priv = ieee80211_priv(dev);
 	struct iw_range *range = (struct iw_range *)extra;
 	const struct ieee80211_geo *geo = ieee80211_get_geo(priv->ieee);
-	int i = 0, j;
+	int i = 0, j, mask;
 
 	if (!ipw_is_ready(priv))
 		return -EAGAIN;
@@ -11873,10 +11952,16 @@
 	range->avg_qual.noise = 0;
 	range->avg_qual.updated = 7;	/* Updated all three */
 	mutex_lock(&priv->mutex);
-	range->num_bitrates = min(priv->rates.num_rates, (u8) IW_MAX_BITRATES);
-	for (i = 0; i < range->num_bitrates; i++)
-		range->bitrate[i] =
-		    (priv->rates.supported_rates[i] & 0x7F) * 500000;
+
+	j = 0;
+	for (i = 0, mask = 1; i < IPW_MAX_RATES; i++, mask <<= 1) {
+		if (!(priv->active_rate & mask))
+			continue;
+		range->bitrate[i] = ipw_index_to_rate(i) * 500000;
+		j++;
+	}
+	range->num_bitrates = j;
+
 	range->max_rts = MAX_RTS_THRESHOLD;
 	range->min_frag = MIN_FRAG_THRESHOLD;
 	range->max_frag = MAX_FRAG_THRESHOLD;
@@ -12117,8 +12202,7 @@
 	struct ipw_priv *priv = ieee80211_priv(dev);
 	u32 target_rate = wrqu->bitrate.value;
 	u32 fixed, mask;
-	int ret = 0, rc = -1;
-	struct ipw_supported_rates rates;
+	int rc = -1;
 
 	if (!ipw_is_ready(priv))
 		return -EAGAIN;
@@ -12194,7 +12278,7 @@
 		priv->config &= ~CFG_FIXED_RATE;
 	else
 		priv->config |= CFG_FIXED_RATE;
-	if (priv->rates_mask == mask) {
+	if ((priv->rates_mask & 0xffff) == mask) {
 		IPW_DEBUG_WX("Mask set to current mask.\n");
 		mutex_unlock(&priv->mutex);
 		return 0;
@@ -12206,11 +12290,14 @@
 		unsigned long flags;
 
 		spin_lock_irqsave(&priv->ieee->lock, flags);
-		ret = ipw_compatible_rates(priv, priv->assoc_network, &rates);
+		mask =
+		    ipw_find_compatible_rates(priv, priv->assoc_network,
+					      priv->rates_mask);
 		spin_unlock_irqrestore(&priv->ieee->lock, flags);
 	}
-	if ((ret) && (rates.num_rates != 0)) {
-		ipw_send_supported_rates(priv, &rates);
+
+	if (mask) {
+		ipw_set_supported_rates_mask(priv, mask);
 		priv->rxon.cck_basic_rates =
 		    ((priv->active_rate_basic & 0xF) | R_1M_MSK);
 		priv->rxon.ofdm_basic_rates =
@@ -12224,8 +12311,8 @@
 			    R_6M_MSK | R_12M_MSK | R_24M_MSK;
 
 		rc = ipw_rxon_call(priv, 1);
-
 	}
+
 	if (rc) {
 		/* Network configuration changed -- force [re]association */
 		IPW_DEBUG_ASSOC
@@ -13113,13 +13200,18 @@
 	priv->ieee->mode = mode;
 	priv->ieee->freq_band = band;
 	priv->ieee->modulation = modulation;
-	init_supported_rates(priv, &priv->rates);
+
+	ipw_init_rates_mask(priv);
+	ipw_set_supported_rates_mask(priv, priv->rates_mask);
+
+	IPW_DEBUG_INFO("ASSOC REQ: Rates: %08X %08X %08X\n",
+		       priv->rates_mask,
+		       priv->active_rate, priv->active_rate_basic);
+
 	/* Network configuration changed -- force [re]association */
 	IPW_DEBUG_ASSOC("[re]association triggered due to mode change.\n");
-	if (!ipw_disassociate(priv)) {
-		ipw_send_supported_rates(priv, &priv->rates);
+	if (!ipw_disassociate(priv))
 		ipw_associate(priv);
-	}
 
 	IPW_DEBUG_WX("PRIV SET MODE: %c%c%c\n",
 		     mode & IEEE_A ? 'a' : '.',
@@ -15435,43 +15527,6 @@
 	mutex_unlock(&priv->mutex);
 }
 
-static int init_supported_rates(struct ipw_priv *priv,
-				struct ipw_supported_rates *rates)
-{
-	/* TODO: Mask out rates based on priv->rates_mask */
-
-	memset(rates, 0, sizeof(*rates));
-	/* configure supported rates */
-	switch (priv->ieee->freq_band) {
-	case IEEE80211_52GHZ_BAND:
-		rates->ieee_mode = IPW_A_MODE;
-		rates->purpose = IPW_RATE_CAPABILITIES;
-		ipw_add_ofdm_scan_rates(rates,
-					IEEE80211_OFDM_MODULATION,
-					IEEE80211_OFDM_DEFAULT_RATES_MASK);
-		break;
-	default:		/* Mixed or 2.4Ghz */
-		rates->ieee_mode = IPW_G_MODE;
-		rates->purpose = IPW_RATE_CAPABILITIES;
-		ipw_add_cck_scan_rates(rates,
-				       IEEE80211_CCK_MODULATION,
-				       IEEE80211_CCK_DEFAULT_RATES_MASK);
-		if (priv->ieee->modulation & IEEE80211_OFDM_MODULATION) {
-			u8 modulation = IEEE80211_CCK_MODULATION;
-
-			if (!
-			    (priv->ieee->modulation & IEEE80211_CCK_MODULATION))
-				modulation = IEEE80211_OFDM_MODULATION;
-
-			ipw_add_ofdm_scan_rates(rates, modulation,
-						IEEE80211_OFDM_DEFAULT_RATES_MASK);
-		}
-		break;
-	}
-
-	return 0;
-}
-
 /*
   Power management (not Tx power!) functions
 */
@@ -15646,11 +15701,14 @@
   call registered function about change in current network
   beacon
 */
-static int ipw_card_bss_active_changed_notify(struct ipw_priv *priv, struct ieee80211_network
-					      *network)
+static int ipw_card_bss_active_changed_notify(struct ipw_priv *priv,
+					      struct ieee80211_network *network)
 {
 	int rc = 0;
 	u8 period = 0;
+	struct daemon_rx_config rxon;
+
+	memcpy(&rxon, &priv->rxon, sizeof(rxon));
 
 	if (network != NULL)
 		period = network->tim.tim_period;
@@ -15663,6 +15721,29 @@
 		else
 			priv->power_data.active_index = IPW_POWER_RANGE_1;
 	}
+
+	if (network->capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
+		priv->rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK;
+	else
+		priv->rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK;
+
+	if (priv->assoc_request.ieee_mode == IPW_G_MODE) {
+		if (network->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)
+			priv->rxon.flags |= RXON_FLG_SHORT_SLOT_MSK;
+		else
+			priv->rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
+
+		if (network->erp_value & IEEE80211_ERP_USE_PROTECTION)
+			priv->rxon.flags |= RXON_FLG_TGG_PROTECT_MSK;
+		else
+			priv->rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
+	}
+
+	if (memcmp(&rxon, &priv->rxon, sizeof(rxon))) {
+		IPW_DEBUG_INFO("rxon changed\n");
+		ipw_rxon_assoc_async(priv);
+	}
+
 	return rc;
 }
 
@@ -16265,7 +16346,9 @@
 		goto out_destroy_workqueue;
 	}
 
-	priv->rates_mask = IEEE80211_DEFAULT_RATES_MASK;
+	priv->rates_mask = IEEE80211_DEFAULT_RATES_MASK |
+	    (IEEE80211_OFDM_BASIC_RATES_MASK |
+	     IEEE80211_CCK_BASIC_RATES_MASK) << 16;
 	priv->missed_beacon_threshold = IPW_MB_DISASSOCIATE_THRESHOLD_DEFAULT;
 	priv->roaming_threshold = IPW_MB_ROAMING_THRESHOLD_DEFAULT;
 	priv->rts_threshold = DEFAULT_RTS_THRESHOLD;
--- linux-2.6.18.noarch/drivers/net/wireless/ipw3945.h.orig	2006-09-20 15:30:01.000000000 -0400
+++ linux-2.6.18.noarch/drivers/net/wireless/ipw3945.h	2006-09-20 15:30:07.000000000 -0400
@@ -1751,14 +1751,6 @@
 	spinlock_t lock;
 };				/* Not transferred over network, so not  __attribute__ ((packed)) */
 
-#define IPW_SUPPORTED_RATES_IE_LEN         8
-#define IPW_MAX_RATES                     12
-
-struct ipw_rates {
-	u8 num_rates;
-	u8 rates[IPW_MAX_RATES];
-} __attribute__ ((packed));
-
 struct ipw_multicast_addr {
 	u8 num_of_multicast_addresses;
 	u8 reserved[3];
@@ -1800,6 +1792,9 @@
 	u8 erp_value;
 } __attribute__ ((packed));
 
+#define IPW_SUPPORTED_RATES_IE_LEN         8
+#define IPW_MAX_RATES                     12
+
 struct ipw_supported_rates {
 	u8 ieee_mode;
 	u8 num_rates;
@@ -2177,6 +2172,8 @@
 	struct ipw_activity_blink activity;
 	unsigned long led_packets;
 	int led_state;
+
+	u32 rates_mask;
 	u16 active_rate;
 	u16 active_rate_basic;
 
@@ -2214,15 +2211,13 @@
 	struct ipw_associate assoc_request;
 	struct ieee80211_network *assoc_network;
 
-	struct ipw_supported_rates rates;
-
 	struct ipw_notif_statistics statistics;
 
 	/* context information */
 	u8 essid[IW_ESSID_MAX_SIZE];
 	u8 essid_len;
 	u8 nick[IW_ESSID_MAX_SIZE];
-	u16 rates_mask;
+
 	u8 channel;
 	u32 power_mode;
 	u32 antenna;

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.2861
retrieving revision 1.2861.2.1
diff -u -r1.2861 -r1.2861.2.1
--- kernel-2.6.spec	7 Dec 2006 20:53:14 -0000	1.2861
+++ kernel-2.6.spec	12 Dec 2006 19:28:13 -0000	1.2861.2.1
@@ -32,7 +32,7 @@
 %define sublevel 18
 %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.16
 %define signmodules 0
 %define xen_hv_cset 11774
 %define make_target bzImage
@@ -424,6 +424,14 @@
 Patch1301: linux-2.6-net-netlabel-cipso.patch
 
 # NIC driver fixes
+Patch1350: jwltest-ipw3945-1_0_5.patch
+Patch1351: jwltest-ipw3945-1_1_0.patch
+Patch1352: jwltest-e1000_set_ringparam-leak.patch
+Patch1353: jwltest-ipw2200-1_2_0.patch
+Patch1354: jwltest-bcm43xx-1gb-fix.patch
+Patch1355: jwltest-bcm43xx-add-PCI-E-code.patch
+Patch1356: jwltest-ipw2100-lockdep-fix.patch
+Patch1357: jwltest-softmac_wx_get_rate-running-check.patch
 
 # Filesystem stuff.
 # Squashfs
@@ -565,6 +573,13 @@
 Patch5060: linux-2.6-olpc-battery.patch
 
 #
+# d80211 backport
+#
+Patch6000: jwltest-d80211-backport.patch
+Patch6001: jwltest-d80211-backport-fixup.patch
+Patch6002: jwltest-cfg80211-fixup.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.
@@ -1043,6 +1058,22 @@
 %patch1301 -p1
 
 # NIC driver fixes
+# ipw3945 1.0.5
+%patch1350 -p1
+# ipw3945 1.1.0
+%patch1351 -p1
+# plug leak in e1000_set_ringparam
+%patch1352 -p1
+# ipw2200 1.2.0 (from ipw2200.sf.net)
+%patch1353 -p1
+# bcm43xx: fix hang w/ >30-bit DMA
+%patch1354 -p1
+# bcm43xx: support PCI-E devices
+%patch1355 -p1
+# ipw2100: fix lockdep noise
+%patch1356 -p1
+# check mac->running to avoid assert in ieee80211softmac_wx_get_rate
+%patch1357 -p1
 
 # Filesystem patches.
 # Squashfs
@@ -1257,6 +1288,11 @@
 # final stuff
 #
 
+# d80211 stuff
+%patch6000 -p1
+%patch6001 -p1
+%patch6002 -p1
+
 #
 # misc small stuff to make things compile or otherwise improve performance
 #




More information about the fedora-cvs-commits mailing list