rpms/kernel/F-7 linux-2.6-libata-dont-fail-revalidation-for-bad-gtf-methods.patch, NONE, 1.1 linux-2.6-libata-pata_serverworks-fix-drive-combinations.patch, NONE, 1.1 linux-2.6-netfilter-fix-null-deref-nf_nat_move_storage.patch, NONE, 1.1 Makefile, 1.47, 1.48 kernel-2.6.spec, 1.3382, 1.3383 linux-2.6-ath5k.patch, 1.5, 1.6 linux-2.6-b43-use-old-fw.patch, 1.1, 1.2 linux-2.6-upstream-reverts.patch, 1.1, 1.2 linux-2.6-wireless.patch, 1.14, 1.15 linux-2.6-zd1211rw-mac80211.patch, 1.1, 1.2 linux-2.6-ath5k-fixes.patch, 1.2, NONE linux-2.6-iwlwifi-fixes.patch, 1.2, NONE linux-2.6-mac80211-extras.patch, 1.1, NONE linux-2.6-wireless-fixes.patch, 1.3, NONE

Kyle McMartin (kyle) fedora-extras-commits at redhat.com
Thu Nov 22 01:14:52 UTC 2007


Author: kyle

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7896

Modified Files:
	Makefile kernel-2.6.spec linux-2.6-ath5k.patch 
	linux-2.6-b43-use-old-fw.patch 
	linux-2.6-upstream-reverts.patch linux-2.6-wireless.patch 
	linux-2.6-zd1211rw-mac80211.patch 
Added Files:
	linux-2.6-libata-dont-fail-revalidation-for-bad-gtf-methods.patch 
	linux-2.6-libata-pata_serverworks-fix-drive-combinations.patch 
	linux-2.6-netfilter-fix-null-deref-nf_nat_move_storage.patch 
Removed Files:
	linux-2.6-ath5k-fixes.patch linux-2.6-iwlwifi-fixes.patch 
	linux-2.6-mac80211-extras.patch linux-2.6-wireless-fixes.patch 
Log Message:
* Wed Nov 21 2007 Kyle McMartin <kmcmartin at redhat.com>
- Update linux-2.6-wireless.patch to match F-8.
- Fix oops in netfilter NAT module (#259501)
- libata: fix resume on some systems
- libata: fix pata_serverworks with some drive combinations


linux-2.6-libata-dont-fail-revalidation-for-bad-gtf-methods.patch:

--- NEW FILE linux-2.6-libata-dont-fail-revalidation-for-bad-gtf-methods.patch ---
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <git-commits-head-owner at vger.kernel.org>
Received: from mail.boston.redhat.com ([unix socket])
	 by mail.boston.redhat.com (Cyrus v2.2.12-Invoca-RPM-2.2.12-8.1.RHEL4) with LMTPA;
	 Sun, 11 Nov 2007 02:04:34 -0500
X-Sieve: CMU Sieve 2.2
Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254])
	by mail.boston.redhat.com (8.13.1/8.13.1) with ESMTP id lAB74Ycp014461;
	Sun, 11 Nov 2007 02:04:34 -0500
Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31])
	by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAB74XrW020470;
	Sun, 11 Nov 2007 02:04:33 -0500
Received: from vger.kernel.org (vger.kernel.org [209.132.176.167])
	by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id lAB6ptmC020626;
	Sun, 11 Nov 2007 02:04:26 -0500
Received: (majordomo at vger.kernel.org) by vger.kernel.org via listexpand
	id S1755344AbXKJW74 (ORCPT <rfc822;cebbert at redhat.com> + 6 others);
	Sat, 10 Nov 2007 17:59:56 -0500
Received: (majordomo at vger.kernel.org) by vger.kernel.org id S1755289AbXKJW74
	(ORCPT <rfc822;git-commits-head-outgoing>);
	Sat, 10 Nov 2007 17:59:56 -0500
Received: from hera.kernel.org ([140.211.167.34]:42550 "EHLO hera.kernel.org"
	rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
	id S1755934AbXKJW7h (ORCPT
	<rfc822;git-commits-head at vger.kernel.org>);
	Sat, 10 Nov 2007 17:59:37 -0500
Received: from hera.kernel.org (localhost [127.0.0.1])
	by hera.kernel.org (8.13.8/8.13.8) with ESMTP id lAAMxaC0031855
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <git-commits-head at vger.kernel.org>; Sat, 10 Nov 2007 22:59:36 GMT
Received: (from dwmw2 at localhost)
	by hera.kernel.org (8.13.8/8.13.1/Submit) id lAAMxZkx031838
	for git-commits-head at vger.kernel.org; Sat, 10 Nov 2007 22:59:35 GMT
Date: 	Sat, 10 Nov 2007 22:59:35 GMT
Message-Id: <200711102259.lAAMxZkx031838 at hera.kernel.org>
From: Linux Kernel Mailing List <linux-kernel at vger.kernel.org>
To: git-commits-head at vger.kernel.org
Subject: libata: Don't fail device revalidation for bad _GTF methods
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Git-Commit: 037f6bb79f753c014bc84bca0de9bf98bb5ab169
X-Git-Parent: 32ebbc0c0d5d18c0135b55d1eb0029f48c54aff0
X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
	autolearn=ham version=3.2.3
X-Spam-Checker-Version: 	SpamAssassin 3.2.3 (2007-08-08) on hera.kernel.org
Sender: git-commits-head-owner at vger.kernel.org
Precedence: bulk
X-Mailing-List: 	git-commits-head at vger.kernel.org
X-RedHat-Spam-Score: 0.147 
X-Scanned-By: MIMEDefang 2.63 on 172.16.48.31

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=037f6bb79f753c014bc84bca0de9bf98bb5ab169
Commit:     037f6bb79f753c014bc84bca0de9bf98bb5ab169
Parent:     32ebbc0c0d5d18c0135b55d1eb0029f48c54aff0
Author:     Matthew Garrett <mjg59 at srcf.ucam.org>
AuthorDate: Thu Nov 8 18:37:07 2007 +0000
Committer:  Jeff Garzik <jeff at garzik.org>
CommitDate: Sat Nov 10 00:31:27 2007 -0500

    libata: Don't fail device revalidation for bad _GTF methods
    
    Experience suggests that the _GTF method may be bad. We currently fail
    device revalidation in that case, which seems excessive.
    
    Signed-off-by: Matthew Garrett <mjg59 at srcf.ucam.org>
    Signed-off-by: Jeff Garzik <jeff at garzik.org>
---
 drivers/ata/libata-acpi.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 08a52dd..545ea86 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(ata_acpi_stm);
  *
  * RETURNS:
  * Number of taskfiles on success, 0 if _GTF doesn't exist or doesn't
- * contain valid data.  -errno on other errors.
+ * contain valid data.
  */
 static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
 			   void **ptr_to_free)
@@ -339,7 +339,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
 			ata_dev_printk(dev, KERN_WARNING,
 				       "_GTF evaluation failed (AE 0x%x)\n",
 				       status);
-			rc = -EIO;
 		}
 		goto out_free;
 	}
@@ -359,7 +358,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
 		ata_dev_printk(dev, KERN_WARNING,
 			       "_GTF unexpected object type 0x%x\n",
 			       out_obj->type);
-		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -367,7 +365,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
 		ata_dev_printk(dev, KERN_WARNING,
 			       "unexpected _GTF length (%d)\n",
 			       out_obj->buffer.length);
-		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -511,10 +508,7 @@ static int ata_acpi_exec_tfs(struct ata_device *dev)
 	int gtf_count, i, rc;
 
 	/* get taskfiles */
-	rc = ata_dev_get_GTF(dev, &gtf, &ptr_to_free);
-	if (rc < 0)
-		return rc;
-	gtf_count = rc;
+	gtf_count = ata_dev_get_GTF(dev, &gtf, &ptr_to_free);
 
 	/* execute them */
 	for (i = 0, rc = 0; i < gtf_count; i++) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


linux-2.6-libata-pata_serverworks-fix-drive-combinations.patch:

--- NEW FILE linux-2.6-libata-pata_serverworks-fix-drive-combinations.patch ---
bz 379971?

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=36beb82390235236c60eb97ca526b1cad97e2df3
Commit:     36beb82390235236c60eb97ca526b1cad97e2df3
Parent:     152af05cc85119d294b977ab4de07a781795c298
Author:     Alan Cox <alan at lxorguk.ukuu.org.uk>
AuthorDate: Mon Nov 5 15:04:40 2007 +0000
Committer:  Jeff Garzik <jeff at garzik.org>
CommitDate: Mon Nov 5 18:08:46 2007 -0500

    pata_serverworks: Fix problem with some drive combinations
    
    The driver used the channel not the device number for deciding where to
    load some timing parameters. Also change so that we clear the UDMA field
    as the old driver did. Not believed neccessary but does no harm.
    
    Signed-off-by: Alan Cox <alan at redhat.com>
    Signed-off-by: Jeff Garzik <jeff at garzik.org>
---
 drivers/ata/pata_serverworks.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index df68806..8bed888 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -274,28 +274,27 @@ static void serverworks_set_dmamode(struct ata_port *ap, struct ata_device *adev
 {
 	static const u8 dma_mode[] = { 0x77, 0x21, 0x20 };
 	int offset = 1 + 2 * ap->port_no - adev->devno;
-	int devbits = (2 * ap->port_no + adev->devno);
+	int devbits = 2 * ap->port_no + adev->devno;
 	u8 ultra;
 	u8 ultra_cfg;
 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
 
 	pci_read_config_byte(pdev, 0x54, &ultra_cfg);
+	pci_read_config_byte(pdev, 0x56 + ap->port_no, &ultra);
+	ultra &= ~(0x0F << (adev->devno * 4));
 
 	if (adev->dma_mode >= XFER_UDMA_0) {
 		pci_write_config_byte(pdev, 0x44 + offset,  0x20);
 
-		pci_read_config_byte(pdev, 0x56 + ap->port_no, &ultra);
-		ultra &= ~(0x0F << (ap->port_no * 4));
 		ultra |= (adev->dma_mode - XFER_UDMA_0)
-					<< (ap->port_no * 4);
-		pci_write_config_byte(pdev, 0x56 + ap->port_no, ultra);
-
+					<< (adev->devno * 4);
 		ultra_cfg |=  (1 << devbits);
 	} else {
 		pci_write_config_byte(pdev, 0x44 + offset,
 			dma_mode[adev->dma_mode - XFER_MW_DMA_0]);
 		ultra_cfg &= ~(1 << devbits);
 	}
+	pci_write_config_byte(pdev, 0x56 + ap->port_no, ultra);
 	pci_write_config_byte(pdev, 0x54, ultra_cfg);
 }
 

linux-2.6-netfilter-fix-null-deref-nf_nat_move_storage.patch:

--- NEW FILE linux-2.6-netfilter-fix-null-deref-nf_nat_move_storage.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7799652557d966e49512479f4d3b9079bbc01fff
Commit:     7799652557d966e49512479f4d3b9079bbc01fff
Parent:     a5a97263a9fd6a94f954d41ae3233ea65a90bd8a
Author:     Evgeniy Polyakov <johnpol at 2ka.mipt.ru>
AuthorDate: Thu Nov 15 15:52:32 2007 -0800
Committer:  David S. Miller <davem at davemloft.net>
CommitDate: Thu Nov 15 15:52:32 2007 -0800

    [NETFILTER]: Fix NULL pointer dereference in nf_nat_move_storage()
    
    Reported by Chuck Ebbert as:
    
    	https://bugzilla.redhat.com/show_bug.cgi?id=259501#c14
    
    This routine is called each time hash should be replaced, nf_conn has
    extension list which contains pointers to connection tracking users
    (like nat, which is right now the only such user), so when replace takes
    place it should copy own extensions. Loop above checks for own
    extension, but tries to move higer-layer one, which can lead to above
    oops.
    
    Signed-off-by: Evgeniy Polyakov <johnpol at 2ka.mipt.ru>
    Signed-off-by: David S. Miller <davem at davemloft.net>
---
 net/netfilter/nf_conntrack_extend.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c
index a1a65a1..cf6ba66 100644
--- a/net/netfilter/nf_conntrack_extend.c
+++ b/net/netfilter/nf_conntrack_extend.c
@@ -109,7 +109,7 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp)
 			rcu_read_lock();
 			t = rcu_dereference(nf_ct_ext_types[i]);
 			if (t && t->move)
-				t->move(ct, ct->ext + ct->ext->offset[id]);
+				t->move(ct, ct->ext + ct->ext->offset[i]);
 			rcu_read_unlock();
 		}
 		kfree(ct->ext);


Index: Makefile
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/Makefile,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- Makefile	24 May 2007 01:59:17 -0000	1.47
+++ Makefile	22 Nov 2007 01:14:04 -0000	1.48
@@ -65,7 +65,7 @@
 
 reconfig:
 	@rm -f kernel-*-config
-	@VERSION="2.6.21" make -f Makefile.config configs
+	@VERSION="2.6.23" make -f Makefile.config configs
 	@scripts/reconfig.sh
 
 # since i386 isn't a target...


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3382
retrieving revision 1.3383
diff -u -r1.3382 -r1.3383
--- kernel-2.6.spec	20 Nov 2007 20:39:27 -0000	1.3382
+++ kernel-2.6.spec	22 Nov 2007 01:14:04 -0000	1.3383
@@ -568,6 +568,7 @@
 Patch427: linux-2.6-cifs-fix-oops-on-second-mount.patch
 
 Patch430: linux-2.6-net-silence-noisy-printks.patch
+Patch431: linux-2.6-netfilter-fix-null-deref-nf_nat_move_storage.patch
 
 Patch440: linux-2.6-sha_alignment.patch
 Patch450: linux-2.6-input-kill-stupid-messages.patch
@@ -590,20 +591,18 @@
 
 Patch660: linux-2.6-libata-ali-atapi-dma.patch
 Patch662: linux-2.6-ata-quirk.patch
-Patch664: linux-2.6-libata-add-dma-disable-option.patch
+Patch663: linux-2.6-libata-add-dma-disable-option.patch
+Patch664: linux-2.6-libata-dont-fail-revalidation-for-bad-gtf-methods.patch
+Patch665: linux-2.6-libata-pata_serverworks-fix-drive-combinations.patch
 Patch666: linux-2.6-ppc-pegasos-via-ata-legacy-irq.patch
 Patch668: linux-2.6-libata-sata_sis_correct-sg-table-size.patch
 Patch669: linux-2.6-libata-sata_sis-fix-scr-read.patch
 
 Patch680: linux-2.6-wireless.patch
 Patch682: linux-2.6-bcm43xx-pci-neuter.patch
-Patch683: linux-2.6-iwlwifi-fixes.patch
 Patch690: linux-2.6-at76.patch
 Patch691: linux-2.6-ath5k.patch
-Patch692: linux-2.6-ath5k-fixes.patch
 Patch693: linux-2.6-zd1211rw-mac80211.patch
-Patch694: linux-2.6-mac80211-extras.patch
-Patch695: linux-2.6-wireless-fixes.patch
 Patch700: linux-2.6-b43-module-alias.patch
 Patch701: linux-2.6-b43-use-old-fw.patch
 
@@ -1214,6 +1213,8 @@
 # Networking
 # Disable easy to trigger printk's.
 ApplyPatch linux-2.6-net-silence-noisy-printks.patch
+# fix oops in netfilter (#259501)
+ApplyPatch linux-2.6-netfilter-fix-null-deref-nf_nat_move_storage.patch
 
 # Misc fixes
 # Fix SHA1 alignment problem on ia64
@@ -1268,21 +1269,20 @@
 ApplyPatch linux-2.6-libata-sata_sis_correct-sg-table-size.patch
 # sata_sis: fix missing parameter in SCR read function
 ApplyPatch linux-2.6-libata-sata_sis-fix-scr-read.patch
+# fix resume failure on some systems                                  
+ApplyPatch linux-2.6-libata-dont-fail-revalidation-for-bad-gtf-methods.patch   
+# serverworks is broken with some drive combinations                  
+ApplyPatch linux-2.6-libata-pata_serverworks-fix-drive-combinations.patch 
 
 # post-2.6.23 wireless patches from upstream
 ApplyPatch linux-2.6-wireless.patch
 # pre-2.6.25 wireless patches from upstream
 #ApplyPatch linux-2.6-wireless-pending.patch
-# late-breaking iwlwifi fixes (will be rolled into wireless-pending patch)
-ApplyPatch linux-2.6-iwlwifi-fixes.patch
 
 # Add misc wireless bits from upstream wireless tree
 ApplyPatch linux-2.6-at76.patch
 ApplyPatch linux-2.6-ath5k.patch
-ApplyPatch linux-2.6-ath5k-fixes.patch
 ApplyPatch linux-2.6-zd1211rw-mac80211.patch
-ApplyPatch linux-2.6-mac80211-extras.patch
-ApplyPatch linux-2.6-wireless-fixes.patch
 # avoid bcm3xx vs bcm43xx-mac80211 PCI ID conflicts
 ApplyPatch linux-2.6-bcm43xx-pci-neuter.patch
 # add module alias for "bcm43xx-mac80211"
@@ -2262,6 +2262,12 @@
 %endif
 
 %changelog
+* Wed Nov 21 2007 Kyle McMartin <kmcmartin at redhat.com>
+- Update linux-2.6-wireless.patch to match F-8.
+- Fix oops in netfilter NAT module (#259501)
+- libata: fix resume on some systems
+- libata: fix pata_serverworks with some drive combinations
+
 * Tue Nov 20 2007 Kyle McMartin <kmcmartin at redhat.com>
 - Linux 2.6.23.8
 

linux-2.6-ath5k.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.5 -r 1.6 linux-2.6-ath5k.patch
Index: linux-2.6-ath5k.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/linux-2.6-ath5k.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- linux-2.6-ath5k.patch	17 Oct 2007 22:20:39 -0000	1.5
+++ linux-2.6-ath5k.patch	22 Nov 2007 01:14:04 -0000	1.6
@@ -1,34 +1,7 @@
-diff -up linux-2.6.23.noarch/MAINTAINERS.orig linux-2.6.23.noarch/MAINTAINERS
---- linux-2.6.23.noarch/MAINTAINERS.orig	2007-10-15 21:21:41.000000000 -0400
-+++ linux-2.6.23.noarch/MAINTAINERS	2007-10-15 21:21:48.000000000 -0400
-@@ -642,6 +642,14 @@ M:	ecashin at coraid.com
- W:	http://www.coraid.com/support/linux
- S:	Supported
- 
-+ATHEROS ATH5K WIRELESS DRIVER
-+P:	Jiri Slaby
-+M:	jirislaby at gmail.com
-+P:	Luis R. Rodriguez
-+M:	mcgrof at gmail.com
-+L:	linux-wireless at vger.kernel.org
-+S:	Maintained
-+
- ATL1 ETHERNET DRIVER
- P:	Jay Cliburn
- M:	jcliburn at gmail.com
-diff -up linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig linux-2.6.23.noarch/drivers/net/wireless/Makefile
---- linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig	2007-10-15 21:21:41.000000000 -0400
-+++ linux-2.6.23.noarch/drivers/net/wireless/Makefile	2007-10-15 21:21:48.000000000 -0400
-@@ -62,3 +62,5 @@ obj-$(CONFIG_RT2X00)		+= rt2x00/
- obj-$(CONFIG_P54_COMMON)	+= p54common.o
- obj-$(CONFIG_P54_USB)		+= p54usb.o
- obj-$(CONFIG_P54_PCI)		+= p54pci.o
-+
-+obj-$(CONFIG_ATH5K)	+= ath5k/
 diff -up linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig linux-2.6.23.noarch/drivers/net/wireless/Kconfig
---- linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig	2007-10-15 21:21:41.000000000 -0400
-+++ linux-2.6.23.noarch/drivers/net/wireless/Kconfig	2007-10-15 21:21:48.000000000 -0400
-@@ -598,6 +598,19 @@ config P54_PCI
+--- linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig	2007-11-15 12:47:29.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/Kconfig	2007-11-15 13:14:13.000000000 -0500
+@@ -598,6 +598,24 @@ config P54_PCI
  	tristate "Prism54 PCI support"
  	depends on P54_COMMON && PCI
  
@@ -37,8 +10,13 @@
 +	depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
 +	default m
 +	---help---
-+	  This module adds support for atheros 5xxx (e.g. 5212) wireless
-+	  cards. If you have this card in your PC, select this to be build.
++	  This module adds support for wireless adapters based on
++	  Atheros 5xxx chipset.
++
++	  Currently the following chip versions are supported:
++
++	  MAC: AR5211 AR5212
++	  PHY: RF5111/2111 RF5112/2112 RF5413/2413
 +
 +	  This driver uses the kernel's mac80211 subsystem.
 +
@@ -48,12 +26,21 @@
  source "drivers/net/wireless/hostap/Kconfig"
  source "drivers/net/wireless/bcm43xx/Kconfig"
  source "drivers/net/wireless/b43/Kconfig"
-diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/ath5k/phy.c
---- /dev/null	2007-10-15 19:30:01.791299883 -0400
-+++ linux-2.6.23.noarch/drivers/net/wireless/ath5k/phy.c	2007-10-15 21:22:03.000000000 -0400
-@@ -0,0 +1,1686 @@
+diff -up linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig linux-2.6.23.noarch/drivers/net/wireless/Makefile
+--- linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig	2007-11-15 12:47:29.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/Makefile	2007-11-15 13:13:38.000000000 -0500
+@@ -62,3 +62,5 @@ obj-$(CONFIG_RT2X00)		+= rt2x00/
+ obj-$(CONFIG_P54_COMMON)	+= p54common.o
+ obj-$(CONFIG_P54_USB)		+= p54usb.o
+ obj-$(CONFIG_P54_PCI)		+= p54pci.o
++
++obj-$(CONFIG_ATH5K)	+= ath5k/
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/ath5k/initvals.c
+--- /dev/null	2007-11-12 23:12:46.917997680 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/ath5k/initvals.c	2007-11-15 13:13:38.000000000 -0500
+@@ -0,0 +1,1332 @@
 +/*
-+ * PHY functions
++ * Initial register settings functions
 + *
 + * Copyright (c) 2004, 2005, 2006, 2007 Reyk Floeter <reyk at openbsd.org>
 + * Copyright (c) 2006, 2007 Nick Kossifidis <mickflemm at gmail.com>
@@ -73,1678 +60,1328 @@
 + *
 + */
 +
-+#include <linux/delay.h>
-+
 +#include "ath5k.h"
 +#include "reg.h"
 +
-+/* Struct to hold initial RF register values (RF Banks) */
-+struct ath5k_ini_rf {
-+	u8	rf_bank;	/* check out ath5k_reg.h */
-+	u16	rf_register;	/* register address */
-+	u32	rf_value[5];	/* register value for different modes (above) */
-+};
++/*
++ * MAC/PHY REGISTERS
++ */
++
 +
 +/*
-+ * Mode-specific RF Gain table (64bytes) for RF5111/5112
-+ * (RF5110 only comes with AR5210 and only supports a/turbo a mode so initial
-+ * RF Gain values are included in AR5K_AR5210_INI)
++ * Mode-independent initial register writes
 + */
-+struct ath5k_ini_rfgain {
-+	u16	rfg_register;	/* RF Gain register address */
-+	u32	rfg_value[2];	/* [freq (see below)] */
-+};
 +
-+struct ath5k_gain_opt {
-+	u32			go_default;
-+	u32			go_steps_count;
-+	const struct ath5k_gain_opt_step	go_step[AR5K_GAIN_STEP_COUNT];
-+};
++struct ath5k_ini {
++	u16	ini_register;
++	u32	ini_value;
 +
-+/* RF5111 mode-specific init registers */
-+static const struct ath5k_ini_rf rfregs_5111[] = {
-+	{ 0, 0x989c,
-+	/*    mode a/XR   mode aTurbo mode b      mode g      mode gTurbo */
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00380000, 0x00380000, 0x00380000, 0x00380000, 0x00380000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 0, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x000000c0, 0x00000080, 0x00000080 } },
-+	{ 0, 0x989c,
-+	    { 0x000400f9, 0x000400f9, 0x000400ff, 0x000400fd, 0x000400fd } },
-+	{ 0, 0x98d4,
-+	    { 0x00000000, 0x00000000, 0x00000004, 0x00000004, 0x00000004 } },
-+	{ 1, 0x98d4,
-+	    { 0x00000020, 0x00000020, 0x00000020, 0x00000020, 0x00000020 } },
-+	{ 2, 0x98d4,
-+	    { 0x00000010, 0x00000014, 0x00000010, 0x00000010, 0x00000014 } },
-+	{ 3, 0x98d8,
-+	    { 0x00601068, 0x00601068, 0x00601068, 0x00601068, 0x00601068 } },
-+	{ 6, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 6, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 6, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 6, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 6, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 6, 0x989c,
-+	    { 0x10000000, 0x10000000, 0x10000000, 0x10000000, 0x10000000 } },
-+	{ 6, 0x989c,
-+	    { 0x04000000, 0x04000000, 0x04000000, 0x04000000, 0x04000000 } },
-+	{ 6, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 6, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 6, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
-+	{ 6, 0x989c,
-+	    { 0x00000000, 0x00000000, 0x0a000000, 0x00000000, 0x00000000 } },
-+	{ 6, 0x989c,
-+	    { 0x003800c0, 0x00380080, 0x023800c0, 0x003800c0, 0x003800c0 } },
-+	{ 6, 0x989c,
-+	    { 0x00020006, 0x00020006, 0x00000006, 0x00020006, 0x00020006 } },
-+	{ 6, 0x989c,
-+	    { 0x00000089, 0x00000089, 0x00000089, 0x00000089, 0x00000089 } },
[...27146 lines suppressed...]
++extern void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id);
++extern int ath5k_hw_set_bssid_mask(struct ath5k_hw *ah, const u8 *mask);
++/* Receive start/stop functions */
++extern void ath5k_hw_start_rx_pcu(struct ath5k_hw *ah);
++extern void ath5k_hw_stop_pcu_recv(struct ath5k_hw *ah);
++/* RX Filter functions */
++extern void ath5k_hw_set_mcast_filter(struct ath5k_hw *ah, u32 filter0, u32 filter1);
++extern int ath5k_hw_set_mcast_filterindex(struct ath5k_hw *ah, u32 index);
++extern int ath5k_hw_clear_mcast_filter_idx(struct ath5k_hw *ah, u32 index);
++extern u32 ath5k_hw_get_rx_filter(struct ath5k_hw *ah);
++extern void ath5k_hw_set_rx_filter(struct ath5k_hw *ah, u32 filter);
++/* Beacon related functions */
++extern u32 ath5k_hw_get_tsf32(struct ath5k_hw *ah);
++extern u64 ath5k_hw_get_tsf64(struct ath5k_hw *ah);
++extern void ath5k_hw_reset_tsf(struct ath5k_hw *ah);
++extern void ath5k_hw_init_beacon(struct ath5k_hw *ah, u32 next_beacon, u32 interval);
++extern int ath5k_hw_set_beacon_timers(struct ath5k_hw *ah, const struct ath5k_beacon_state *state);
++extern void ath5k_hw_reset_beacon(struct ath5k_hw *ah);
++extern int ath5k_hw_wait_for_beacon(struct ath5k_hw *ah, unsigned long phys_addr);
++extern void ath5k_hw_update_mib_counters(struct ath5k_hw *ah, struct ath5k_mib_stats *statistics);
++/* ACK bit rate */
++void ath5k_hw_set_ack_bitrate_high(struct ath5k_hw *ah, bool high);
++/* ACK/CTS Timeouts */
++extern int ath5k_hw_set_ack_timeout(struct ath5k_hw *ah, unsigned int timeout);
++extern unsigned int ath5k_hw_get_ack_timeout(struct ath5k_hw *ah);
++extern int ath5k_hw_set_cts_timeout(struct ath5k_hw *ah, unsigned int timeout);
++extern unsigned int ath5k_hw_get_cts_timeout(struct ath5k_hw *ah);
++/* Key table (WEP) functions */
++extern int ath5k_hw_reset_key(struct ath5k_hw *ah, u16 entry);
++extern int ath5k_hw_is_key_valid(struct ath5k_hw *ah, u16 entry);
++extern int ath5k_hw_set_key(struct ath5k_hw *ah, u16 entry, const struct ieee80211_key_conf *key, const u8 *mac);
++extern int ath5k_hw_set_key_lladdr(struct ath5k_hw *ah, u16 entry, const u8 *mac);
++/* Queue Control Unit, DFS Control Unit Functions */
++extern int ath5k_hw_setup_tx_queue(struct ath5k_hw *ah, enum ath5k_tx_queue queue_type, struct ath5k_txq_info *queue_info);
++extern int ath5k_hw_setup_tx_queueprops(struct ath5k_hw *ah, int queue, const struct ath5k_txq_info *queue_info);
++extern int ath5k_hw_get_tx_queueprops(struct ath5k_hw *ah, int queue, struct ath5k_txq_info *queue_info);
++extern void ath5k_hw_release_tx_queue(struct ath5k_hw *ah, unsigned int queue);
++extern int ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue);
++extern u32 ath5k_hw_num_tx_pending(struct ath5k_hw *ah, unsigned int queue);
++extern int ath5k_hw_set_slot_time(struct ath5k_hw *ah, unsigned int slot_time);
++extern unsigned int ath5k_hw_get_slot_time(struct ath5k_hw *ah);
++/* Hardware Descriptor Functions */
++extern int ath5k_hw_setup_rx_desc(struct ath5k_hw *ah, struct ath5k_desc *desc, u32 size, unsigned int flags);
++/* GPIO Functions */
++extern void ath5k_hw_set_ledstate(struct ath5k_hw *ah, unsigned int state);
++extern int ath5k_hw_set_gpio_output(struct ath5k_hw *ah, u32 gpio);
++extern int ath5k_hw_set_gpio_input(struct ath5k_hw *ah, u32 gpio);
++extern u32 ath5k_hw_get_gpio(struct ath5k_hw *ah, u32 gpio);
++extern int ath5k_hw_set_gpio(struct ath5k_hw *ah, u32 gpio, u32 val);
++extern void ath5k_hw_set_gpio_intr(struct ath5k_hw *ah, unsigned int gpio, u32 interrupt_level);
++/* Regulatory Domain/Channels Setup */
++extern u16 ath5k_get_regdomain(struct ath5k_hw *ah);
++/* Misc functions */
++extern void ath5k_hw_dump_state(struct ath5k_hw *ah);
++extern int ath5k_hw_get_capability(struct ath5k_hw *ah, enum ath5k_capability_type cap_type, u32 capability, u32 *result);
 +
-+#include "regdom.h"
 +
-+static const struct ath5k_regdommap {
-+	enum ath5k_regdom dmn;
-+	enum ath5k_regdom dmn5;
-+	enum ath5k_regdom dmn2;
-+} r_map[] = {
-+	{ DMN_DEFAULT,		DMN_DEBUG,	DMN_DEBUG },
-+	{ DMN_NULL_WORLD,	DMN_NULL,	DMN_WORLD },
-+	{ DMN_NULL_ETSIB,	DMN_NULL,	DMN_ETSIB },
-+	{ DMN_NULL_ETSIC,	DMN_NULL,	DMN_ETSIC },
-+	{ DMN_FCC1_FCCA,	DMN_FCC1,	DMN_FCCA },
-+	{ DMN_FCC1_WORLD,	DMN_FCC1,	DMN_WORLD },
-+	{ DMN_FCC2_FCCA,	DMN_FCC2,	DMN_FCCA },
-+	{ DMN_FCC2_WORLD,	DMN_FCC2,	DMN_WORLD },
-+	{ DMN_FCC2_ETSIC,	DMN_FCC2,	DMN_ETSIC },
-+	{ DMN_FRANCE_NULL,	DMN_ETSI3,	DMN_ETSI3 },
-+	{ DMN_FCC3_FCCA,	DMN_FCC3,	DMN_WORLD },
-+	{ DMN_ETSI1_WORLD,	DMN_ETSI1,	DMN_WORLD },
-+	{ DMN_ETSI3_ETSIA,	DMN_ETSI3,	DMN_WORLD },
-+	{ DMN_ETSI2_WORLD,	DMN_ETSI2,	DMN_WORLD },
-+	{ DMN_ETSI3_WORLD,	DMN_ETSI3,	DMN_WORLD },
-+	{ DMN_ETSI4_WORLD,	DMN_ETSI4,	DMN_WORLD },
-+	{ DMN_ETSI4_ETSIC,	DMN_ETSI4,	DMN_ETSIC },
-+	{ DMN_ETSI5_WORLD,	DMN_ETSI5,	DMN_WORLD },
-+	{ DMN_ETSI6_WORLD,	DMN_ETSI6,	DMN_WORLD },
-+	{ DMN_ETSI_NULL,	DMN_ETSI1,	DMN_ETSI1 },
-+	{ DMN_MKK1_MKKA,	DMN_MKK1,	DMN_MKKA },
-+	{ DMN_MKK1_MKKB,	DMN_MKK1,	DMN_MKKA },
-+	{ DMN_APL4_WORLD,	DMN_APL4,	DMN_WORLD },
-+	{ DMN_MKK2_MKKA,	DMN_MKK2,	DMN_MKKA },
-+	{ DMN_APL_NULL,		DMN_APL1,	DMN_NULL },
-+	{ DMN_APL2_WORLD,	DMN_APL2,	DMN_WORLD },
-+	{ DMN_APL2_APLC,	DMN_APL2,	DMN_WORLD },
-+	{ DMN_APL3_WORLD,	DMN_APL3,	DMN_WORLD },
-+	{ DMN_MKK1_FCCA,	DMN_MKK1,	DMN_FCCA },
-+	{ DMN_APL2_APLD,	DMN_APL2,	DMN_APLD },
-+	{ DMN_MKK1_MKKA1,	DMN_MKK1,	DMN_MKKA },
-+	{ DMN_MKK1_MKKA2,	DMN_MKK1,	DMN_MKKA },
-+	{ DMN_APL1_WORLD,	DMN_APL1,	DMN_WORLD },
-+	{ DMN_APL1_FCCA,	DMN_APL1,	DMN_FCCA },
-+	{ DMN_APL1_APLA,	DMN_APL1,	DMN_WORLD },
-+	{ DMN_APL1_ETSIC,	DMN_APL1,	DMN_ETSIC },
-+	{ DMN_APL2_ETSIC,	DMN_APL2,	DMN_ETSIC },
-+	{ DMN_APL5_WORLD,	DMN_APL5,	DMN_WORLD },
-+	{ DMN_WOR0_WORLD,	DMN_WORLD,	DMN_WORLD },
-+	{ DMN_WOR1_WORLD,	DMN_WORLD,	DMN_WORLD },
-+	{ DMN_WOR2_WORLD,	DMN_WORLD,	DMN_WORLD },
-+	{ DMN_WOR3_WORLD,	DMN_WORLD,	DMN_WORLD },
-+	{ DMN_WOR4_WORLD,	DMN_WORLD,	DMN_WORLD },
-+	{ DMN_WOR5_ETSIC,	DMN_WORLD,	DMN_WORLD },
-+	{ DMN_WOR01_WORLD,	DMN_WORLD,	DMN_WORLD },
-+	{ DMN_WOR02_WORLD,	DMN_WORLD,	DMN_WORLD },
-+	{ DMN_EU1_WORLD,	DMN_ETSI1,	DMN_WORLD },
-+	{ DMN_WOR9_WORLD,	DMN_WORLD,	DMN_WORLD },
-+	{ DMN_WORA_WORLD,	DMN_WORLD,	DMN_WORLD },
-+};
++/* Initial register settings functions */
++extern int ath5k_hw_write_initvals(struct ath5k_hw *ah, u8 mode, bool change_channel);
++/* Initialize RF */
++extern int ath5k_hw_rfregs(struct ath5k_hw *ah, struct ieee80211_channel *channel, unsigned int mode);
++extern int ath5k_hw_rfgain(struct ath5k_hw *ah, unsigned int freq);
++extern enum ath5k_rfgain ath5k_hw_get_rf_gain(struct ath5k_hw *ah);
++extern int ath5k_hw_set_rfgain_opt(struct ath5k_hw *ah);
 +
-+enum ath5k_regdom ath5k_regdom2flag(enum ath5k_regdom dmn, u16 mhz)
-+{
-+	unsigned int i;
 +
-+	for (i = 0; i < ARRAY_SIZE(r_map); i++) {
-+		if (r_map[i].dmn == dmn) {
-+			if (mhz >= 2000 && mhz <= 3000)
-+				return r_map[i].dmn2;
-+			if (mhz >= IEEE80211_CHANNELS_5GHZ_MIN &&
-+					mhz <= IEEE80211_CHANNELS_5GHZ_MAX)
-+				return r_map[i].dmn5;
-+		}
-+	}
++/* PHY/RF channel functions */
++extern bool ath5k_channel_ok(struct ath5k_hw *ah, u16 freq, unsigned int flags);
++extern int ath5k_hw_channel(struct ath5k_hw *ah, struct ieee80211_channel *channel);
++/* PHY calibration */
++extern int ath5k_hw_phy_calibrate(struct ath5k_hw *ah, struct ieee80211_channel *channel);
++extern int ath5k_hw_phy_disable(struct ath5k_hw *ah);
++/* Misc PHY functions */
++extern u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, unsigned int chan);
++extern void ath5k_hw_set_def_antenna(struct ath5k_hw *ah, unsigned int ant);
++extern unsigned int ath5k_hw_get_def_antenna(struct ath5k_hw *ah);
++/* TX power setup */
++extern int ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel, unsigned int txpower);
++extern int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, unsigned int power);
 +
-+	return DMN_DEBUG;
-+}
 +
-+u16 ath5k_regdom_from_ieee(enum ath5k_regdom ieee)
++static inline u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg)
 +{
-+	u32 regdomain = (u32)ieee;
-+
-+	/*
-+	 * Use the default regulation domain if the value is empty
-+	 * or not supported by the net80211 regulation code.
-+	 */
-+	if (ath5k_regdom2flag(regdomain, IEEE80211_CHANNELS_5GHZ_MIN) ==
-+			DMN_DEBUG)
-+		return (u16)AR5K_TUNE_REGDOMAIN;
-+
-+	/* It is supported, just return the value */
-+	return regdomain;
++	return ioread32(ah->ah_iobase + reg);
 +}
 +
-+enum ath5k_regdom ath5k_regdom_to_ieee(u16 regdomain)
++static inline void ath5k_hw_reg_write(struct ath5k_hw *ah, u32 val, u16 reg)
 +{
-+	enum ath5k_regdom ieee = (enum ath5k_regdom)regdomain;
-+
-+	return ieee;
++	iowrite32(val, ah->ah_iobase + reg);
 +}
 +
++#endif
+diff -up linux-2.6.23.noarch/MAINTAINERS.orig linux-2.6.23.noarch/MAINTAINERS
+--- linux-2.6.23.noarch/MAINTAINERS.orig	2007-11-15 12:47:29.000000000 -0500
++++ linux-2.6.23.noarch/MAINTAINERS	2007-11-15 13:13:38.000000000 -0500
+@@ -642,6 +642,17 @@ M:	ecashin at coraid.com
+ W:	http://www.coraid.com/support/linux
+ S:	Supported
+ 
++ATHEROS ATH5K WIRELESS DRIVER
++P:	Jiri Slaby
++M:	jirislaby at gmail.com
++P:	Nick Kossifidis
++M:	mickflemm at gmail.com
++P:	Luis R. Rodriguez
++M:	mcgrof at gmail.com
++L:	linux-wireless at vger.kernel.org
++L:	ath5k-devel at lists.ath5k.org
++S:	Maintained
++
+ ATL1 ETHERNET DRIVER
+ P:	Jay Cliburn
+ M:	jcliburn at gmail.com

linux-2.6-b43-use-old-fw.patch:

Index: linux-2.6-b43-use-old-fw.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/linux-2.6-b43-use-old-fw.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-b43-use-old-fw.patch	25 Aug 2007 02:33:52 -0000	1.1
+++ linux-2.6-b43-use-old-fw.patch	22 Nov 2007 01:14:04 -0000	1.2
@@ -8,7 +8,7 @@
  
  #include "b43.h"
  #include "main.h"
-@@ -1580,184 +1579,140 @@ static void b43_release_firmware(struct 
+@@ -1580,183 +1579,140 @@ static void b43_release_firmware(struct 
  	dev->fw.ucode = NULL;
  	release_firmware(dev->fw.pcm);
  	dev->fw.pcm = NULL;
@@ -29,8 +29,7 @@
 -			 const char *name,
 -			 const struct firmware **fw)
 -{
--	const size_t plen = sizeof(modparam_fwpostfix) + 32;
--	char path[plen];
+-	char path[sizeof(modparam_fwpostfix) + 32];
 -	struct b43_fw_header *hdr;
 -	u32 size;
 -	int err;

linux-2.6-upstream-reverts.patch:

Index: linux-2.6-upstream-reverts.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/linux-2.6-upstream-reverts.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-upstream-reverts.patch	20 Nov 2007 20:39:27 -0000	1.1
+++ linux-2.6-upstream-reverts.patch	22 Nov 2007 01:14:04 -0000	1.2
@@ -1,361 +1,3 @@
-From stable-bounces at linux.kernel.org Wed Oct 10 06:19:13 2007
-From: Takashi Iwai <tiwai at suse.de>
-Date: Wed, 10 Oct 2007 15:18:45 +0200
-Subject: ALSA: emu10k1 - Fix memory corruption
-To: stable at kernel.org
-Message-ID: <s5hsl4jqf9m.wl%tiwai at suse.de>
-Status: O
-Content-Length: 1231
-Lines: 36
-
-From: Takashi Iwai <tiwai at suse.de>
-
-patch 7583cb51a1e276591f57a2fae05489c878f8ef54 from mainline.
-
-[ALSA] emu10k1 - Fix memory corruption
-
-The number of mixer elements for SPDIF control don't match with the
-actual array size (3).  This may result in a memory corruption that
-overwrites the i2c_capture_source field (ALSA bug#3095).
-
-Signed-off-by: Takashi Iwai <tiwai at suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
-
----
- sound/pci/emu10k1/emumixer.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/sound/pci/emu10k1/emumixer.c
-+++ b/sound/pci/emu10k1/emumixer.c
-@@ -871,7 +871,7 @@ static struct snd_kcontrol_new snd_emu10
- 	.access =	SNDRV_CTL_ELEM_ACCESS_READ,
- 	.iface =        SNDRV_CTL_ELEM_IFACE_PCM,
- 	.name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
--	.count =	4,
-+	.count =	3,
- 	.info =         snd_emu10k1_spdif_info,
- 	.get =          snd_emu10k1_spdif_get_mask
- };
-@@ -880,7 +880,7 @@ static struct snd_kcontrol_new snd_emu10
- {
- 	.iface =	SNDRV_CTL_ELEM_IFACE_PCM,
- 	.name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
--	.count =	4,
-+	.count =	3,
- 	.info =         snd_emu10k1_spdif_info,
- 	.get =          snd_emu10k1_spdif_get,
- 	.put =          snd_emu10k1_spdif_put
-From stable-bounces at linux.kernel.org Wed Oct 10 06:17:37 2007
-From: Takashi Iwai <tiwai at suse.de>
-Date: Wed, 10 Oct 2007 15:17:17 +0200
-Subject: ALSA: Fix build error without CONFIG_HAS_DMA
-To: stable at kernel.org
-Message-ID: <s5htzozqfc2.wl%tiwai at suse.de>
-Status: O
-Content-Length: 2249
-Lines: 76
-
-From: Takashi Iwai <tiwai at suse.de>
-
-patch 8f11551b1798170dcffdd28475075ca4f1c6c990 in mainline
-
-[ALSA] Fix build error without CONFIG_HAS_DMA
-
-The recent change of include/asm-generic/dma-mapping-broken.h breaks
-the build without CONFIG_HAS_DMA.  This patch is an ad hoc fix.
-
-Signed-off-by: Takashi Iwai <tiwai at suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
-
----
- sound/core/Makefile   |    3 ++-
- sound/core/memalloc.c |    6 ++++++
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
---- a/sound/core/Makefile
-+++ b/sound/core/Makefile
-@@ -14,7 +14,8 @@ endif
- snd-pcm-objs := pcm.o pcm_native.o pcm_lib.o pcm_timer.o pcm_misc.o \
- 		pcm_memory.o
- 
--snd-page-alloc-objs := memalloc.o sgbuf.o
-+snd-page-alloc-y := memalloc.o
-+snd-page-alloc-$(CONFIG_HAS_DMA) += sgbuf.o
- 
- snd-rawmidi-objs  := rawmidi.o
- snd-timer-objs    := timer.o
---- a/sound/core/memalloc.c
-+++ b/sound/core/memalloc.c
-@@ -206,6 +206,7 @@ void snd_free_pages(void *ptr, size_t si
-  *
-  */
- 
-+#ifdef CONFIG_HAS_DMA
- /* allocate the coherent DMA pages */
- static void *snd_malloc_dev_pages(struct device *dev, size_t size, dma_addr_t *dma)
- {
-@@ -239,6 +240,7 @@ static void snd_free_dev_pages(struct de
- 	dec_snd_pages(pg);
- 	dma_free_coherent(dev, PAGE_SIZE << pg, ptr, dma);
- }
-+#endif /* CONFIG_HAS_DMA */
- 
- #ifdef CONFIG_SBUS
- 
-@@ -312,12 +314,14 @@ int snd_dma_alloc_pages(int type, struct
- 		dmab->area = snd_malloc_sbus_pages(device, size, &dmab->addr);
- 		break;
- #endif
-+#ifdef CONFIG_HAS_DMA
- 	case SNDRV_DMA_TYPE_DEV:
- 		dmab->area = snd_malloc_dev_pages(device, size, &dmab->addr);
- 		break;
- 	case SNDRV_DMA_TYPE_DEV_SG:
- 		snd_malloc_sgbuf_pages(device, size, dmab, NULL);
- 		break;
-+#endif
- 	default:
- 		printk(KERN_ERR "snd-malloc: invalid device type %d\n", type);
- 		dmab->area = NULL;
-@@ -383,12 +387,14 @@ void snd_dma_free_pages(struct snd_dma_b
- 		snd_free_sbus_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr);
- 		break;
- #endif
-+#ifdef CONFIG_HAS_DMA
- 	case SNDRV_DMA_TYPE_DEV:
- 		snd_free_dev_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr);
- 		break;
- 	case SNDRV_DMA_TYPE_DEV_SG:
- 		snd_free_sgbuf_pages(dmab);
- 		break;
-+#endif
- 	default:
- 		printk(KERN_ERR "snd-malloc: invalid device type %d\n", dmab->dev.type);
- 	}
-From stable-bounces at linux.kernel.org Wed Oct 10 06:15:38 2007
-From: Russ Cox <rsc at swtch.com>
-Date: Wed, 10 Oct 2007 15:15:12 +0200
-Subject: ALSA: fix selector unit bug affecting some USB speakerphones
-To: stable at kernel.org
-Message-ID: <s5hve9fqffj.wl%tiwai at suse.de>
-Status: O
-Content-Length: 1049
-Lines: 31
-
-From: Russ Cox <rsc at swtch.com>
-
-patch 38977e96cb32e658716e11a05ec7f1fc4618e0f3 in mainline.
-
-[ALSA] fix selector unit bug affecting some USB speakerphones
-
-Following the suggestion in this thread:
-https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/26683
-the correct upper bound on desc[0] is 5 + num_ins not 6 + num_ins,
-because the index used later is 5+i, not 6+i.
-This change makes my Vosky Chatterbox speakerphone work.
-Apparently it also helps with the Minivox MV100.
-
-Signed-off-by: Russ Cox <rsc at swtch.com>
-Signed-off-by: Takashi Iwai <tiwai at suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
-
----
- sound/usb/usbmixer.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/sound/usb/usbmixer.c
-+++ b/sound/usb/usbmixer.c
-@@ -1483,7 +1483,7 @@ static int parse_audio_selector_unit(str
- 	struct snd_kcontrol *kctl;
- 	char **namelist;
- 
--	if (! num_ins || desc[0] < 6 + num_ins) {
-+	if (! num_ins || desc[0] < 5 + num_ins) {
- 		snd_printk(KERN_ERR "invalid SELECTOR UNIT descriptor %d\n", unitid);
- 		return -EINVAL;
- 	}
-From stable-bounces at linux.kernel.org Mon Oct 15 06:05:14 2007
-From: Takashi Iwai <tiwai at suse.de>
-Date: Mon, 15 Oct 2007 14:37:11 +0200
-Subject: ALSA: hda-codec - Add array terminator for dmic in STAC codec
-To: stable at kernel.org
-Message-ID: <s5habqk5zbc.wl%tiwai at suse.de>
-Status: O
-Content-Length: 1812
-Lines: 61
-
-From: Takashi Iwai <tiwai at suse.de>
-
-patch f6e9852ad05fa28301c83d4e2b082620de010358 in mainline.
-
-[ALSA] hda-codec - Add array terminator for dmic in STAC codec
-
-Reported by Jan-Marek Glogowski.
-
-The dmic array is passed to snd_hda_parse_pin_def_config() and
-should be zero-terminated.
-
-Signed-off-by: Takashi Iwai <tiwai at suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
-
----
- sound/pci/hda/patch_sigmatel.c |   14 ++++++++------
- 1 file changed, 8 insertions(+), 6 deletions(-)
-
---- a/sound/pci/hda/patch_sigmatel.c
-+++ b/sound/pci/hda/patch_sigmatel.c
-@@ -162,8 +162,9 @@ static hda_nid_t stac925x_dac_nids[1] = 
-         0x02,
- };
- 
--static hda_nid_t stac925x_dmic_nids[1] = {
--	0x15, 
-+#define STAC925X_NUM_DMICS	1
-+static hda_nid_t stac925x_dmic_nids[STAC925X_NUM_DMICS + 1] = {
-+	0x15, 0
- };
- 
- static hda_nid_t stac922x_adc_nids[2] = {
-@@ -190,8 +191,9 @@ static hda_nid_t stac9205_mux_nids[2] = 
-         0x19, 0x1a
- };
- 
--static hda_nid_t stac9205_dmic_nids[2] = {
--        0x17, 0x18,
-+#define STAC9205_NUM_DMICS	2
-+static hda_nid_t stac9205_dmic_nids[STAC9205_NUM_DMICS + 1] = {
-+        0x17, 0x18, 0
- };
- 
- static hda_nid_t stac9200_pin_nids[8] = {
-@@ -2063,7 +2065,7 @@ static int patch_stac925x(struct hda_cod
- 	case 0x83847633: /* STAC9202D */
- 	case 0x83847636: /* STAC9251  */
- 	case 0x83847637: /* STAC9251D */
--		spec->num_dmics = 1;
-+		spec->num_dmics = STAC925X_NUM_DMICS;
- 		spec->dmic_nids = stac925x_dmic_nids;
- 		break;
- 	default:
-@@ -2307,7 +2309,7 @@ static int patch_stac9205(struct hda_cod
- 	spec->mux_nids = stac9205_mux_nids;
- 	spec->num_muxes = ARRAY_SIZE(stac9205_mux_nids);
- 	spec->dmic_nids = stac9205_dmic_nids;
--	spec->num_dmics = ARRAY_SIZE(stac9205_dmic_nids);
-+	spec->num_dmics = STAC9205_NUM_DMICS;
- 	spec->dmux_nid = 0x1d;
- 
- 	spec->init = stac9205_core_init;
-From stable-bounces at linux.kernel.org Wed Oct 10 06:13:31 2007
-From: Takashi Iwai <tiwai at suse.de>
-Date: Wed, 10 Oct 2007 15:13:07 +0200
-Subject: ALSA: hda-codec - Avoid zero NID in line_out_pins[] of STAC codecs
-To: stable at kernel.org
-Message-ID: <s5hwstvqfj0.wl%tiwai at suse.de>
-Status: O
-Content-Length: 2233
-Lines: 62
-
-From: Takashi Iwai <tiwai at suse.de>
-
-patch c480f79bdca58923e605ff5e4698cfe1779bae70 in mainline
-
-[ALSA] hda-codec - Avoid zero NID in line_out_pins[] of STAC codecs
-
-The STAC codes adds line_out_pins[] for shared mic/line-inputs accordingly.
-But, the current code may give a hole with NID=0 in some setting, which
-results in an error at probe.  This patch fixes the problem.
-
-Signed-off-by: Takashi Iwai <tiwai at suse.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
-
----
- sound/pci/hda/patch_sigmatel.c |   15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-
---- a/sound/pci/hda/patch_sigmatel.c
-+++ b/sound/pci/hda/patch_sigmatel.c
-@@ -1182,7 +1182,8 @@ static int stac92xx_add_dyn_out_pins(str
- 	case 3:
- 		/* add line-in as side */
- 		if (cfg->input_pins[AUTO_PIN_LINE] && num_dacs > 3) {
--			cfg->line_out_pins[3] = cfg->input_pins[AUTO_PIN_LINE];
-+			cfg->line_out_pins[cfg->line_outs] =
-+				cfg->input_pins[AUTO_PIN_LINE];
- 			spec->line_switch = 1;
- 			cfg->line_outs++;
- 		}
-@@ -1190,12 +1191,14 @@ static int stac92xx_add_dyn_out_pins(str
- 	case 2:
- 		/* add line-in as clfe and mic as side */
- 		if (cfg->input_pins[AUTO_PIN_LINE] && num_dacs > 2) {
--			cfg->line_out_pins[2] = cfg->input_pins[AUTO_PIN_LINE];
-+			cfg->line_out_pins[cfg->line_outs] =
-+				cfg->input_pins[AUTO_PIN_LINE];
- 			spec->line_switch = 1;
- 			cfg->line_outs++;
- 		}
- 		if (cfg->input_pins[AUTO_PIN_MIC] && num_dacs > 3) {
--			cfg->line_out_pins[3] = cfg->input_pins[AUTO_PIN_MIC];
-+			cfg->line_out_pins[cfg->line_outs] =
-+				cfg->input_pins[AUTO_PIN_MIC];
- 			spec->mic_switch = 1;
- 			cfg->line_outs++;
- 		}
-@@ -1203,12 +1206,14 @@ static int stac92xx_add_dyn_out_pins(str
- 	case 1:
- 		/* add line-in as surr and mic as clfe */
- 		if (cfg->input_pins[AUTO_PIN_LINE] && num_dacs > 1) {
--			cfg->line_out_pins[1] = cfg->input_pins[AUTO_PIN_LINE];
-+			cfg->line_out_pins[cfg->line_outs] =
-+				cfg->input_pins[AUTO_PIN_LINE];
- 			spec->line_switch = 1;
- 			cfg->line_outs++;
- 		}
- 		if (cfg->input_pins[AUTO_PIN_MIC] && num_dacs > 2) {
--			cfg->line_out_pins[2] = cfg->input_pins[AUTO_PIN_MIC];
-+			cfg->line_out_pins[cfg->line_outs] =
-+				cfg->input_pins[AUTO_PIN_MIC];
- 			spec->mic_switch = 1;
- 			cfg->line_outs++;
- 		}
-From 2a3988f6d2c5be9d02463097775d1c66a8290527 Mon Sep 17 00:00:00 2001
-From: Takashi Iwai <tiwai at suse.de>
-Date: Tue, 16 Oct 2007 14:26:32 +0200
-Subject: ALSA: hdsp - Fix zero division
-Message-ID: <b28811ef0711061446q3eb7330cm31a4c57a9ed00cc3 at mail.gmail.com>
-Status: O
-Content-Length: 759
-Lines: 27
-
-From: Takashi Iwai <tiwai at suse.de>
-
-patch 2a3988f6d2c5be9d02463097775d1c66a8290527 in mainline.
-
-Fix zero-division bug in the calculation dds offset.
-
-Signed-off-by: Takashi Iwai <tiwai at suse.de>
-Signed-off-by: Jaroslav Kysela <perex at perex.cz>
-Cc: Maarten Bressers <mbressers at gmail.com>
-Cc: gentoo kernel <kernel at gentoo.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
-
----
- sound/pci/rme9652/hdsp.c |    3 +++
- 1 file changed, 3 insertions(+)
-
---- a/sound/pci/rme9652/hdsp.c
-+++ b/sound/pci/rme9652/hdsp.c
-@@ -3108,6 +3108,9 @@ static int hdsp_dds_offset(struct hdsp *
- 	unsigned int dds_value = hdsp->dds_value;
- 	int system_sample_rate = hdsp->system_sample_rate;
- 
-+	if (!dds_value)
-+		return 0;
-+
- 	n = DDS_NUMERATOR;
- 	/*
- 	 * dds_value = n / rate
 From stable-bounces at linux.kernel.org Fri Oct 26 14:07:45 2007
 From: "John W. Linville" <linville at tuxdriver.com>
 Date: Fri, 26 Oct 2007 17:04:35 -0400

linux-2.6-wireless.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.14 -r 1.15 linux-2.6-wireless.patch
Index: linux-2.6-wireless.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/linux-2.6-wireless.patch,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- linux-2.6-wireless.patch	17 Oct 2007 21:23:45 -0000	1.14
+++ linux-2.6-wireless.patch	22 Nov 2007 01:14:04 -0000	1.15
@@ -1,26081 +1,8056 @@
-diff -up linux-2.6.22.noarch/CREDITS.orig linux-2.6.22.noarch/CREDITS
---- linux-2.6.22.noarch/CREDITS.orig	2007-09-26 19:41:26.000000000 -0400
-+++ linux-2.6.22.noarch/CREDITS	2007-09-26 19:49:37.000000000 -0400
-@@ -665,6 +665,11 @@ D: Minor updates to SCSI types, added /p
- S: (ask for current address)
- S: USA
+diff -up linux-2.6.23.noarch/drivers/Kconfig.orig linux-2.6.23.noarch/drivers/Kconfig
+--- linux-2.6.23.noarch/drivers/Kconfig.orig	2007-11-15 20:56:59.000000000 -0500
++++ linux-2.6.23.noarch/drivers/Kconfig	2007-11-15 20:57:07.000000000 -0500
+@@ -58,6 +58,8 @@ source "drivers/power/Kconfig"
  
-+N: Robin Cornelius
-+E: robincornelius at users.sourceforge.net
-+D: Ralink rt2x00 WLAN driver
-+S: Cornwall, U.K.
-+
- N: Mark Corner
- E: mcorner at umich.edu
- W: http://www.eecs.umich.edu/~mcorner/
-@@ -679,6 +684,11 @@ D: Kernel module SMART utilities
- S: Santa Cruz, California
- S: USA
+ source "drivers/hwmon/Kconfig"
  
-+N: Luis Correia
-+E: lfcorreia at users.sf.net
-+D: Ralink rt2x00 WLAN driver
-+S: Belas, Portugal
++source "drivers/ssb/Kconfig"
 +
- N: Alan Cox
- W: http://www.linux.org.uk/diary/
- D: Linux Networking (0.99.10->2.0.29)
-@@ -833,6 +843,12 @@ S: Lancs
- S: PR4 6AX
- S: United Kingdom
+ source "drivers/mfd/Kconfig"
  
-+N: Ivo van Doorn
-+E: IvDoorn at gmail.com
-+W: http://www.mendiosus.nl
-+D: Ralink rt2x00 WLAN driver
-+S: Haarlem, The Netherlands
+ source "drivers/media/Kconfig"
+diff -up /dev/null linux-2.6.23.noarch/drivers/ssb/ssb_private.h
+--- /dev/null	2007-11-12 23:12:46.917997680 -0500
++++ linux-2.6.23.noarch/drivers/ssb/ssb_private.h	2007-11-15 20:57:07.000000000 -0500
+@@ -0,0 +1,136 @@
++#ifndef LINUX_SSB_PRIVATE_H_
++#define LINUX_SSB_PRIVATE_H_
 +
- N: John G Dorsey
- E: john+ at cs.cmu.edu
- D: ARM Linux ports to Assabet/Neponset, Spot
-@@ -3517,6 +3533,12 @@ S: Maastrichterweg 63
- S: 5554 GG Valkenswaard
- S: The Netherlands
- 
-+N: Mark Wallis
-+E: mwallis at serialmonkey.com
-+W: http://mark.serialmonkey.com
-+D: Ralink rt2x00 WLAN driver
-+S: Newcastle, Australia
++#include <linux/ssb/ssb.h>
++#include <linux/types.h>
 +
- N: Peter Shaobo Wang
- E: pwang at mmdcorp.com
- W: http://www.mmdcorp.com/pw/linux
-@@ -3651,6 +3673,15 @@ S: Alte Regensburger Str. 11a
- S: 93149 Nittenau
- S: Germany
- 
-+N: Gertjan van Wingerde
-+E: gwingerde at home.nl
-+D: Ralink rt2x00 WLAN driver
-+D: Minix V2 file-system
-+D: Misc fixes
-+S: Geessinkweg 177
-+S: 7544 TX Enschede
-+S: The Netherlands
 +
- N: Lars Wirzenius
- E: liw at iki.fi
- D: Linux System Administrator's Guide, author, former maintainer
-diff -up linux-2.6.22.noarch/include/linux/nl80211.h.orig linux-2.6.22.noarch/include/linux/nl80211.h
---- linux-2.6.22.noarch/include/linux/nl80211.h.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/include/linux/nl80211.h	2007-09-26 19:49:38.000000000 -0400
-@@ -7,7 +7,97 @@
-  */
- 
- /**
-+ * enum nl80211_commands - supported nl80211 commands
-+ *
-+ * @NL80211_CMD_UNSPEC: unspecified command to catch errors
-+ *
-+ * @NL80211_CMD_GET_WIPHY: request information about a wiphy or dump request
-+ *	to get a list of all present wiphys.
-+ * @NL80211_CMD_SET_WIPHY: set wiphy name, needs %NL80211_ATTR_WIPHY and
-+ *	%NL80211_ATTR_WIPHY_NAME.
-+ * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request
-+ *	or rename notification. Has attributes %NL80211_ATTR_WIPHY and
-+ *	%NL80211_ATTR_WIPHY_NAME.
-+ * @NL80211_CMD_DEL_WIPHY: Wiphy deleted. Has attributes
-+ *	%NL80211_ATTR_WIPHY and %NL80211_ATTR_WIPHY_NAME.
-+ *
-+ * @NL80211_CMD_GET_INTERFACE: Request an interface's configuration;
-+ *	either a dump request on a %NL80211_ATTR_WIPHY or a specific get
-+ *	on an %NL80211_ATTR_IFINDEX is supported.
-+ * @NL80211_CMD_SET_INTERFACE: Set type of a virtual interface, requires
-+ 	%NL80211_ATTR_IFINDEX and %NL80211_ATTR_IFTYPE.
-+ * @NL80211_CMD_NEW_INTERFACE: Newly created virtual interface or response
-+ *	to %NL80211_CMD_GET_INTERFACE. Has %NL80211_ATTR_IFINDEX,
-+ *	%NL80211_ATTR_WIPHY and %NL80211_ATTR_IFTYPE attributes. Can also
-+ *	be sent from userspace to request creation of a new virtual interface,
-+ *	then requires attributes %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFTYPE and
-+ *	%NL80211_ATTR_IFNAME.
-+ * @NL80211_CMD_DEL_INTERFACE: Virtual interface was deleted, has attributes
-+ *	%NL80211_ATTR_IFINDEX and %NL80211_ATTR_WIPHY. Can also be sent from
-+ *	userspace to request deletion of a virtual interface, then requires
-+ *	attribute %NL80211_ATTR_IFINDEX.
-+ *
-+ * @NL80211_CMD_MAX: highest used command number
-+ * @__NL80211_CMD_AFTER_LAST: internal use
-+ */
-+enum nl80211_commands {
-+/* don't change the order or add anything inbetween, this is ABI! */
-+	NL80211_CMD_UNSPEC,
++#define PFX	"ssb: "
 +
-+	NL80211_CMD_GET_WIPHY,		/* can dump */
-+	NL80211_CMD_SET_WIPHY,
-+	NL80211_CMD_NEW_WIPHY,
-+	NL80211_CMD_DEL_WIPHY,
++#ifdef CONFIG_SSB_SILENT
++# define ssb_printk(fmt, x...)	do { /* nothing */ } while (0)
++#else
++# define ssb_printk		printk
++#endif /* CONFIG_SSB_SILENT */
 +
-+	NL80211_CMD_GET_INTERFACE,	/* can dump */
-+	NL80211_CMD_SET_INTERFACE,
-+	NL80211_CMD_NEW_INTERFACE,
-+	NL80211_CMD_DEL_INTERFACE,
++/* dprintk: Debugging printk; vanishes for non-debug compilation */
++#ifdef CONFIG_SSB_DEBUG
++# define ssb_dprintk(fmt, x...)	ssb_printk(fmt , ##x)
++#else
++# define ssb_dprintk(fmt, x...)	do { /* nothing */ } while (0)
++#endif
 +
-+	/* add commands here */
++#ifdef CONFIG_SSB_DEBUG
++# define SSB_WARN_ON(x)		WARN_ON(x)
++# define SSB_BUG_ON(x)		BUG_ON(x)
++#else
++static inline int __ssb_do_nothing(int x) { return x; }
++# define SSB_WARN_ON(x)		__ssb_do_nothing(unlikely(!!(x)))
++# define SSB_BUG_ON(x)		__ssb_do_nothing(unlikely(!!(x)))
++#endif
 +
-+	/* used to define NL80211_CMD_MAX below */
-+	__NL80211_CMD_AFTER_LAST,
-+	NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1
-+};
 +
++/* pci.c */
++#ifdef CONFIG_SSB_PCIHOST
++extern int ssb_pci_switch_core(struct ssb_bus *bus,
++			       struct ssb_device *dev);
++extern int ssb_pci_switch_coreidx(struct ssb_bus *bus,
++				  u8 coreidx);
++extern int ssb_pci_xtal(struct ssb_bus *bus, u32 what,
++			int turn_on);
++extern int ssb_pci_get_invariants(struct ssb_bus *bus,
++				  struct ssb_init_invariants *iv);
++extern void ssb_pci_exit(struct ssb_bus *bus);
++extern int ssb_pci_init(struct ssb_bus *bus);
++extern const struct ssb_bus_ops ssb_pci_ops;
 +
-+/**
-+ * enum nl80211_attrs - nl80211 netlink attributes
-+ *
-+ * @NL80211_ATTR_UNSPEC: unspecified attribute to catch errors
-+ *
-+ * @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf.
-+ *	/sys/class/ieee80211/<phyname>/index
-+ * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
++#else /* CONFIG_SSB_PCIHOST */
++
++static inline int ssb_pci_switch_core(struct ssb_bus *bus,
[...248121 lines suppressed...]
++T:	git kernel.org:/pub/scm/linux/kernel/git/mwu/mac80211-drivers.git
++S:	Maintained
 +
-+	if (!pdev)
-+		goto out;
-+	bus = pdev->bus;
+ PRISM54 WIRELESS DRIVER
+ P:	Luis R. Rodriguez
+ M:	mcgrof at gmail.com
+@@ -3106,6 +3151,14 @@ M:	corey at world.std.com
+ L:	linux-wireless at vger.kernel.org
+ S:	Maintained
+ 
++RALINK RT2X00 WLAN DRIVER
++P:	rt2x00 project
++L:	linux-wireless at vger.kernel.org
++L:	rt2400-devel at lists.sourceforge.net
++W:	http://rt2x00.serialmonkey.com/
++S:	Maintained
++F:	drivers/net/wireless/rt2x00/
 +
-+	/* Enable interrupts for this device. */
-+	if (bus->host_pci &&
-+	    ((pdev->id.revision >= 6) || (pdev->id.coreid == SSB_DEV_PCIE))) {
-+		u32 coremask;
+ RANDOM NUMBER DRIVER
+ P:	Matt Mackall
+ M:	mpm at selenic.com
+@@ -3390,15 +3443,10 @@ L:	lm-sensors at lm-sensors.org
+ S:	Maintained
+ 
+ SOFTMAC LAYER (IEEE 802.11)
+-P:	Johannes Berg
+-M:	johannes at sipsolutions.net
+-P:	Joe Jezak
+-M:	josejx at gentoo.org
+ P:	Daniel Drake
+ M:	dsd at gentoo.org
+-W:	http://softmac.sipsolutions.net/
+ L:	linux-wireless at vger.kernel.org
+-S:	Maintained
++S:	Obsolete
+ 
+ SOFTWARE RAID (Multiple Disks) SUPPORT
+ P:	Ingo Molnar
+@@ -3430,6 +3478,12 @@ M:	tsbogend at alpha.franken.de
+ L:	netdev at vger.kernel.org
+ S:	Maintained
+ 
++SONICS SILICON BACKPLANE DRIVER (SSB)
++P:	Michael Buesch
++M:	mb at bu3sch.de
++L:	netdev at vger.kernel.org
++S:	Maintained
 +
-+		/* Calculate the "coremask" for the device. */
-+		coremask = (1 << dev->core_index);
+ SONY VAIO CONTROL DEVICE DRIVER
+ P:	Mattia Dongili
+ M:	malattia at linux.it
+diff -up linux-2.6.23.noarch/CREDITS.orig linux-2.6.23.noarch/CREDITS
+--- linux-2.6.23.noarch/CREDITS.orig	2007-11-15 20:57:00.000000000 -0500
++++ linux-2.6.23.noarch/CREDITS	2007-11-15 20:57:07.000000000 -0500
+@@ -665,6 +665,11 @@ D: Minor updates to SCSI types, added /p
+ S: (ask for current address)
+ S: USA
+ 
++N: Robin Cornelius
++E: robincornelius at users.sourceforge.net
++D: Ralink rt2x00 WLAN driver
++S: Cornwall, U.K.
 +
-+		err = pci_read_config_dword(bus->host_pci, SSB_PCI_IRQMASK, &tmp);
-+		if (err)
-+			goto out;
-+		tmp |= coremask << 8;
-+		err = pci_write_config_dword(bus->host_pci, SSB_PCI_IRQMASK, tmp);
-+		if (err)
-+			goto out;
-+	} else {
-+		u32 intvec;
+ N: Mark Corner
+ E: mcorner at umich.edu
+ W: http://www.eecs.umich.edu/~mcorner/
+@@ -679,6 +684,11 @@ D: Kernel module SMART utilities
+ S: Santa Cruz, California
+ S: USA
+ 
++N: Luis Correia
++E: lfcorreia at users.sf.net
++D: Ralink rt2x00 WLAN driver
++S: Belas, Portugal
 +
-+		intvec = ssb_read32(pdev, SSB_INTVEC);
-+		if ((bus->chip_id & 0xFF00) == 0x4400) {
-+			/* Workaround: On the BCM44XX the BPFLAG routing
-+			 * bit is wrong. Use a hardcoded constant. */
-+			intvec |= 0x00000002;
-+		} else {
-+			tmp = ssb_read32(dev, SSB_TPSFLAG);
-+			tmp &= SSB_TPSFLAG_BPFLAG;
-+			intvec |= tmp;
-+		}
-+		ssb_write32(pdev, SSB_INTVEC, intvec);
-+	}
+ N: Alan Cox
+ W: http://www.linux.org.uk/diary/
+ D: Linux Networking (0.99.10->2.0.29)
+@@ -833,6 +843,12 @@ S: Lancs
+ S: PR4 6AX
+ S: United Kingdom
+ 
++N: Ivo van Doorn
++E: IvDoorn at gmail.com
++W: http://www.mendiosus.nl
++D: Ralink rt2x00 WLAN driver
++S: Haarlem, The Netherlands
 +
-+	/* Setup PCIcore operation. */
-+	if (pc->setup_done)
-+		goto out;
-+	if (pdev->id.coreid == SSB_DEV_PCI) {
-+		tmp = pcicore_read32(pc, SSB_PCICORE_SBTOPCI2);
-+		tmp |= SSB_PCICORE_SBTOPCI_PREF;
-+		tmp |= SSB_PCICORE_SBTOPCI_BURST;
-+		pcicore_write32(pc, SSB_PCICORE_SBTOPCI2, tmp);
+ N: John G Dorsey
+ E: john+ at cs.cmu.edu
+ D: ARM Linux ports to Assabet/Neponset, Spot
+@@ -3517,6 +3533,12 @@ S: Maastrichterweg 63
+ S: 5554 GG Valkenswaard
+ S: The Netherlands
+ 
++N: Mark Wallis
++E: mwallis at serialmonkey.com
++W: http://mark.serialmonkey.com
++D: Ralink rt2x00 WLAN driver
++S: Newcastle, Australia
 +
-+		if (pdev->id.revision < 5) {
-+			tmp = ssb_read32(pdev, SSB_IMCFGLO);
-+			tmp &= ~SSB_IMCFGLO_SERTO;
-+			tmp |= 2;
-+			tmp &= ~SSB_IMCFGLO_REQTO;
-+			tmp |= 3 << SSB_IMCFGLO_REQTO_SHIFT;
-+			ssb_write32(pdev, SSB_IMCFGLO, tmp);
-+			ssb_commit_settings(bus);
-+		} else if (pdev->id.revision >= 11) {
-+			tmp = pcicore_read32(pc, SSB_PCICORE_SBTOPCI2);
-+			tmp |= SSB_PCICORE_SBTOPCI_MRM;
-+			pcicore_write32(pc, SSB_PCICORE_SBTOPCI2, tmp);
-+		}
-+	} else {
-+		WARN_ON(pdev->id.coreid != SSB_DEV_PCIE);
-+		//TODO: Better make defines for all these magic PCIE values.
-+		if ((pdev->id.revision == 0) || (pdev->id.revision == 1)) {
-+			/* TLP Workaround register. */
-+			tmp = ssb_pcie_read(pc, 0x4);
-+			tmp |= 0x8;
-+			ssb_pcie_write(pc, 0x4, tmp);
-+		}
-+		if (pdev->id.revision == 0) {
-+			const u8 serdes_rx_device = 0x1F;
+ N: Peter Shaobo Wang
+ E: pwang at mmdcorp.com
+ W: http://www.mmdcorp.com/pw/linux
+@@ -3651,6 +3673,15 @@ S: Alte Regensburger Str. 11a
+ S: 93149 Nittenau
+ S: Germany
+ 
++N: Gertjan van Wingerde
++E: gwingerde at home.nl
++D: Ralink rt2x00 WLAN driver
++D: Minix V2 file-system
++D: Misc fixes
++S: Geessinkweg 177
++S: 7544 TX Enschede
++S: The Netherlands
 +
-+			ssb_pcie_mdio_write(pc, serdes_rx_device,
-+					    2 /* Timer */, 0x8128);
-+			ssb_pcie_mdio_write(pc, serdes_rx_device,
-+					    6 /* CDR */, 0x0100);
-+			ssb_pcie_mdio_write(pc, serdes_rx_device,
-+					    7 /* CDR BW */, 0x1466);
-+		} else if (pdev->id.revision == 1) {
-+			/* DLLP Link Control register. */
-+			tmp = ssb_pcie_read(pc, 0x100);
-+			tmp |= 0x40;
-+			ssb_pcie_write(pc, 0x100, tmp);
-+		}
-+	}
-+	pc->setup_done = 1;
-+out:
-+	return err;
-+}
-+EXPORT_SYMBOL(ssb_pcicore_dev_irqvecs_enable);
+ N: Lars Wirzenius
+ E: liw at iki.fi
+ D: Linux System Administrator's Guide, author, former maintainer

linux-2.6-zd1211rw-mac80211.patch:

Index: linux-2.6-zd1211rw-mac80211.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/linux-2.6-zd1211rw-mac80211.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-zd1211rw-mac80211.patch	27 Sep 2007 15:33:19 -0000	1.1
+++ linux-2.6-zd1211rw-mac80211.patch	22 Nov 2007 01:14:06 -0000	1.2
@@ -1,11 +1,11 @@
-diff -up linux-2.6.22.noarch/MAINTAINERS.orig linux-2.6.22.noarch/MAINTAINERS
---- linux-2.6.22.noarch/MAINTAINERS.orig	2007-09-27 11:24:13.000000000 -0400
-+++ linux-2.6.22.noarch/MAINTAINERS	2007-09-27 11:24:44.000000000 -0400
-@@ -4157,6 +4157,16 @@ W:	http://www.qsl.net/dl1bke/
+diff -up linux-2.6.23.noarch/MAINTAINERS.orig linux-2.6.23.noarch/MAINTAINERS
+--- linux-2.6.23.noarch/MAINTAINERS.orig	2007-10-19 14:54:06.000000000 -0400
++++ linux-2.6.23.noarch/MAINTAINERS	2007-10-19 14:54:14.000000000 -0400
+@@ -4287,6 +4287,16 @@ W:	http://www.qsl.net/dl1bke/
  L:	linux-hams at vger.kernel.org
  S:	Maintained
  
-+ZD1211RW-MAC80211 WIRELESS DRIVER
++ZD1211-MAC80211 WIRELESS DRIVER
 +P:	Daniel Drake
 +M:	dsd at gentoo.org
 +P:	Ulrich Kunitz
@@ -18,9 +18,9 @@
  ZD1211RW WIRELESS DRIVER
  P:	Daniel Drake
  M:	dsd at gentoo.org
-diff -up linux-2.6.22.noarch/drivers/net/wireless/Makefile.orig linux-2.6.22.noarch/drivers/net/wireless/Makefile
---- linux-2.6.22.noarch/drivers/net/wireless/Makefile.orig	2007-09-27 11:24:13.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/Makefile	2007-09-27 11:24:44.000000000 -0400
+diff -up linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig linux-2.6.23.noarch/drivers/net/wireless/Makefile
+--- linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig	2007-10-19 14:54:06.000000000 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/Makefile	2007-10-19 14:54:14.000000000 -0400
 @@ -41,6 +41,7 @@ obj-$(CONFIG_BCM43XX)		+= bcm43xx/
  obj-$(CONFIG_B43)		+= b43/
  obj-$(CONFIG_B43LEGACY)		+= b43legacy/
@@ -29,10 +29,10 @@
  
  # 16-bit wireless PCMCIA client drivers
  obj-$(CONFIG_PCMCIA_RAYCS)	+= ray_cs.o
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_chip.c
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_chip.c	2007-09-27 11:24:44.000000000 -0400
-@@ -0,0 +1,1619 @@
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_chip.c
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_chip.c	2007-10-19 14:54:54.000000000 -0400
+@@ -0,0 +1,1621 @@
 +/* zd_chip.c
 + *
 + * This program is free software; you can redistribute it and/or modify
@@ -63,7 +63,6 @@
 +#include "zd_ieee80211.h"
 +#include "zd_mac.h"
 +#include "zd_rf.h"
-+#include "zd_util.h"
 +
 +void zd_chip_init(struct zd_chip *chip,
 +	         struct ieee80211_hw *hw,
@@ -86,7 +85,7 @@
 +
 +static int scnprint_mac_oui(struct zd_chip *chip, char *buffer, size_t size)
 +{
-+	u8 *addr = zd_chip_to_mac(chip)->hwaddr;
++	u8 *addr = zd_mac_get_perm_addr(zd_chip_to_mac(chip));
 +	return scnprintf(buffer, size, "%02x-%02x-%02x",
 +		         addr[0], addr[1], addr[2]);
 +}
@@ -413,15 +412,18 @@
 +		[1] = { .addr = CR_MAC_ADDR_P2 },
 +	};
 +
-+	reqs[0].value = (mac_addr[3] << 24)
-+		      | (mac_addr[2] << 16)
-+		      | (mac_addr[1] <<  8)
-+		      |  mac_addr[0];
-+	reqs[1].value = (mac_addr[5] <<  8)
-+		      |  mac_addr[4];
-+
-+	dev_dbg_f(zd_chip_dev(chip),
-+		"mac addr " MAC_FMT "\n", MAC_ARG(mac_addr));
++	if (mac_addr) {
++		reqs[0].value = (mac_addr[3] << 24)
++			      | (mac_addr[2] << 16)
++			      | (mac_addr[1] <<  8)
++			      |  mac_addr[0];
++		reqs[1].value = (mac_addr[5] <<  8)
++			      |  mac_addr[4];
++		dev_dbg_f(zd_chip_dev(chip),
++			"mac addr " MAC_FMT "\n", MAC_ARG(mac_addr));
++	} else {
++		dev_dbg_f(zd_chip_dev(chip), "set NULL mac\n");
++	}
 +
 +	mutex_lock(&chip->mutex);
 +	r = zd_iowrite32a_locked(chip, reqs, ARRAY_SIZE(reqs));
@@ -1652,24 +1654,24 @@
 +
 +	return zd_iowrite32a(chip, ioreqs, ARRAY_SIZE(ioreqs));
 +}
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/Makefile
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/Makefile	2007-09-27 11:24:44.000000000 -0400
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/Makefile
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/Makefile	2007-10-19 14:54:14.000000000 -0400
 @@ -0,0 +1,10 @@
 +obj-$(CONFIG_ZD1211RW_MAC80211) += zd1211rw-mac80211.o
 +
 +zd1211rw-mac80211-objs := zd_chip.o zd_mac.o \
 +		zd_rf_al2230.o zd_rf_rf2959.o \
 +		zd_rf_al7230b.o zd_rf_uw2453.o \
-+		zd_ieee80211.o zd_rf.o zd_usb.o zd_util.o
++		zd_ieee80211.o zd_rf.o zd_usb.o
 +
 +ifeq ($(CONFIG_ZD1211RW_MAC80211_DEBUG),y)
 +EXTRA_CFLAGS += -DDEBUG
 +endif
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_def.h
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_def.h	2007-09-27 11:24:44.000000000 -0400
-@@ -0,0 +1,57 @@
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_def.h
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_def.h	2007-10-19 14:54:14.000000000 -0400
+@@ -0,0 +1,56 @@
 +/* zd_def.h
 + *
 + * This program is free software; you can redistribute it and/or modify
@@ -1693,7 +1695,6 @@
 +#include <linux/kernel.h>
 +#include <linux/stringify.h>
 +#include <linux/device.h>
-+#include <linux/kernel.h>
 +
 +typedef u16 __nocast zd_addr_t;
 +
@@ -1727,9 +1728,9 @@
 +#endif
 +
 +#endif /* _ZD_DEF_H */
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf.h
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf.h	2007-09-27 11:24:44.000000000 -0400
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf.h
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf.h	2007-10-19 14:54:14.000000000 -0400
 @@ -0,0 +1,108 @@
 +/* zd_rf.h
 + *
@@ -1839,10 +1840,10 @@
 +int zd_rf_init_uw2453(struct zd_rf *rf);
 +
 +#endif /* _ZD_RF_H */
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_chip.h
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_chip.h	2007-09-27 11:24:44.000000000 -0400
-@@ -0,0 +1,921 @@
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_chip.h
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_chip.h	2007-10-19 14:54:14.000000000 -0400
+@@ -0,0 +1,943 @@
 +/* zd_chip.h
 + *
 + * This program is free software; you can redistribute it and/or modify
@@ -2355,15 +2356,37 @@
 +#define CR_UNDERRUN_CNT			CTL_REG(0x0688)
 +
 +#define CR_RX_FILTER			CTL_REG(0x068c)
++#define RX_FILTER_ASSOC_REQUEST		(1 <<  0)
 +#define RX_FILTER_ASSOC_RESPONSE	(1 <<  1)
++#define RX_FILTER_REASSOC_REQUEST	(1 <<  2)
 +#define RX_FILTER_REASSOC_RESPONSE	(1 <<  3)
++#define RX_FILTER_PROBE_REQUEST		(1 <<  4)
 +#define RX_FILTER_PROBE_RESPONSE	(1 <<  5)
++/* bits 6 and 7 reserved */
 +#define RX_FILTER_BEACON		(1 <<  8)
++#define RX_FILTER_ATIM			(1 <<  9)
 +#define RX_FILTER_DISASSOC		(1 << 10)
 +#define RX_FILTER_AUTH			(1 << 11)
++#define RX_FILTER_DEAUTH		(1 << 12)
++#define RX_FILTER_PSPOLL		(1 << 26)
++#define RX_FILTER_RTS			(1 << 27)
++#define RX_FILTER_CTS			(1 << 28)
 +#define RX_FILTER_ACK			(1 << 29)
-+#define AP_RX_FILTER			0x0400feff
-+#define STA_RX_FILTER			0x2000ffff
++#define RX_FILTER_CFEND			(1 << 30)
++#define RX_FILTER_CFACK			(1 << 31)
++
++/* Enable bits for all frames you are interested in. */
++#define STA_RX_FILTER	(RX_FILTER_ASSOC_REQUEST | RX_FILTER_ASSOC_RESPONSE | \
++	RX_FILTER_REASSOC_REQUEST | RX_FILTER_REASSOC_RESPONSE | \
++	RX_FILTER_PROBE_REQUEST | RX_FILTER_PROBE_RESPONSE | \
++	(0x3 << 6) /* vendor driver sets these reserved bits */ | \
++	RX_FILTER_BEACON | RX_FILTER_ATIM | RX_FILTER_DISASSOC | \
++	RX_FILTER_AUTH | RX_FILTER_DEAUTH | \
++	(0x7 << 13) /* vendor driver sets these reserved bits */ | \
++	RX_FILTER_PSPOLL | RX_FILTER_ACK) /* 0x2400ffff */
++
++#define RX_FILTER_CTRL (RX_FILTER_RTS | RX_FILTER_CTS | \
++	RX_FILTER_CFEND | RX_FILTER_CFACK)
 +
 +/* Monitor mode sets filter to 0xfffff */
 +
@@ -2764,9 +2787,9 @@
 +	                       struct zd_mc_hash *hash);
 +
 +#endif /* _ZD_CHIP_H */
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_al2230.c
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_al2230.c	2007-09-27 11:24:44.000000000 -0400
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_al2230.c
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_al2230.c	2007-10-19 14:54:14.000000000 -0400
 @@ -0,0 +1,439 @@
 +/* zd_rf_al2230.c: Functions for the AL2230 RF controller
 + *
@@ -3207,128 +3230,9 @@
 +	rf->patch_cck_gain = 1;
 +	return 0;
 +}
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_util.h
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_util.h	2007-09-27 11:24:44.000000000 -0400
-@@ -0,0 +1,29 @@
-+/* zd_util.h
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ */
-+
-+#ifndef _ZD_UTIL_H
-+#define _ZD_UTIL_H
-+
-+void *zd_tail(const void *buffer, size_t buffer_size, size_t tail_size);
-+
-+#ifdef DEBUG
-+void zd_hexdump(const void *bytes, size_t size);
-+#else
-+#define zd_hexdump(bytes, size)
-+#endif /* DEBUG */
-+
-+#endif /* _ZD_UTIL_H */
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_util.c
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_util.c	2007-09-27 11:24:44.000000000 -0400
-@@ -0,0 +1,82 @@
-+/* zd_util.c
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ *
-+ * Utility program
-+ */
-+
-+#include "zd_def.h"
-+#include "zd_util.h"
-+
-+#ifdef DEBUG
-+static char hex(u8 v)
-+{
-+	v &= 0xf;
-+	return (v < 10 ? '0' : 'a' - 10) + v;
-+}
-+
-+static char hex_print(u8 c)
-+{
-+	return (0x20 <= c && c < 0x7f) ? c : '.';
-+}
-+
-+static void dump_line(const u8 *bytes, size_t size)
-+{
-+	char c;
-+	size_t i;
-+
-+	size = size <= 8 ? size : 8;
-+	printk(KERN_DEBUG "zd1211 %p ", bytes);
-+	for (i = 0; i < 8; i++) {
-+		switch (i) {
-+		case 1:
-+		case 5:
-+			c = '.';
-+			break;
-+		case 3:
-+			c = ':';
-+			break;
-+		default:
-+			c = ' ';
-+		}
-+		if (i < size) {
-+			printk("%c%c%c", hex(bytes[i] >> 4), hex(bytes[i]), c);
-+		} else {
-+			printk("  %c", c);
-+		}
-+	}
-+
-+	for (i = 0; i < size; i++)
-+		printk("%c", hex_print(bytes[i]));
-+	printk("\n");
-+}
-+
-+void zd_hexdump(const void *bytes, size_t size)
-+{
-+	size_t i = 0;
-+
-+	do {
-+		dump_line((u8 *)bytes + i, size-i);
-+		i += 8;
-+	} while (i < size);
-+}
-+#endif /* DEBUG */
-+
-+void *zd_tail(const void *buffer, size_t buffer_size, size_t tail_size)
-+{
-+	if (buffer_size < tail_size)
-+		return NULL;
-+	return (u8 *)buffer + (buffer_size - tail_size);
-+}
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_rf2959.c
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_rf2959.c	2007-09-27 11:24:44.000000000 -0400
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_rf2959.c
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_rf2959.c	2007-10-19 14:54:14.000000000 -0400
 @@ -0,0 +1,279 @@
 +/* zd_rf_rfmd.c: Functions for the RFMD RF controller
 + *
@@ -3609,9 +3513,9 @@
 +	rf->switch_radio_off = rf2959_switch_radio_off;
 +	return 0;
 +}
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_ieee80211.h
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_ieee80211.h	2007-09-27 11:24:44.000000000 -0400
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_ieee80211.h
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_ieee80211.h	2007-10-19 14:54:14.000000000 -0400
 @@ -0,0 +1,75 @@
 +#ifndef _ZD_IEEE80211_H
 +#define _ZD_IEEE80211_H
@@ -3688,9 +3592,9 @@
 +#define ZD_CCK_PLCP_SIGNAL_11M	0x6e
 +
 +#endif /* _ZD_IEEE80211_H */
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/Kconfig
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/Kconfig	2007-09-27 11:24:44.000000000 -0400
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/Kconfig
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/Kconfig	2007-10-19 14:54:14.000000000 -0400
 @@ -0,0 +1,18 @@
 +config ZD1211RW_MAC80211
 +	tristate "ZyDAS ZD1211/ZD1211B USB support (mac80211 stack)"
@@ -3710,9 +3614,9 @@
 +	---help---
 +	  ZD1211 debugging messages. Choosing Y will result in additional debug
 +	  messages being saved to your kernel logs, which may help debug any
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_ieee80211.c
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_ieee80211.c	2007-09-27 11:24:44.000000000 -0400
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_ieee80211.c
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_ieee80211.c	2007-10-19 14:54:14.000000000 -0400
 @@ -0,0 +1,100 @@
 +/* zd_ieee80211.c
 + *
@@ -3814,9 +3718,9 @@
 +	unmask_bg_channels(hw, range, &mac->modes[1]);
 +}
 +
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_usb.h
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_usb.h	2007-09-27 11:24:44.000000000 -0400
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_usb.h
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_usb.h	2007-10-19 14:54:14.000000000 -0400
 @@ -0,0 +1,263 @@
 +/* zd_usb.h: Header for USB interface implemented by ZD1211 chip
 + *
@@ -4081,9 +3985,9 @@
 +extern struct workqueue_struct *zd_workqueue;
 +
 +#endif /* _ZD_USB_H */
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf.c
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf.c	2007-09-27 11:24:44.000000000 -0400
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf.c
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf.c	2007-10-19 14:54:14.000000000 -0400
 @@ -0,0 +1,178 @@
 +/* zd_rf.c
 + *
@@ -4263,9 +4167,9 @@
 +	return zd_chip_generic_patch_6m_band(zd_rf_to_chip(rf), channel);
 +}
 +
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_uw2453.c
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_uw2453.c	2007-09-27 11:24:44.000000000 -0400
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_uw2453.c
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_uw2453.c	2007-10-19 14:54:14.000000000 -0400
 @@ -0,0 +1,534 @@
 +/* zd_rf_uw2453.c: Functions for the UW2453 RF controller
 + *
@@ -4801,10 +4705,10 @@
 +	return 0;
 +}
 +
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_mac.h
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_mac.h	2007-09-27 11:24:44.000000000 -0400
-@@ -0,0 +1,227 @@
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_mac.h
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_mac.h	2007-10-19 14:54:14.000000000 -0400
+@@ -0,0 +1,238 @@
 +/* zd_mac.h
 + *
 + * This program is free software; you can redistribute it and/or modify
@@ -4980,12 +4884,12 @@
 +	struct housekeeping housekeeping;
 +	struct work_struct set_multicast_hash_work;
 +	struct work_struct set_rts_cts_work;
++	struct work_struct set_rx_filter_work;
 +	struct zd_mc_hash multicast_hash;
 +	u8 regdomain;
 +	u8 default_regdomain;
 +	int type;
 +	int associated;
-+	u8 *hwaddr;
 +	struct sk_buff_head ack_wait_queue;
 +	struct ieee80211_channel channels[14];
 +	struct ieee80211_rate rates[12];
@@ -4996,6 +4900,12 @@
 +
 +	/* flags to indicate update in progress */
 +	unsigned int updating_rts_rate:1;
++
++	/* whether to pass frames with CRC errors to stack */
++	unsigned int pass_failed_fcs:1;
++
++	/* whether to pass control frames to stack */
++	unsigned int pass_ctrl:1;
 +};
 +
 +static inline struct zd_mac *zd_hw_mac(struct ieee80211_hw *hw)
@@ -5013,6 +4923,11 @@
 +	return zd_chip_to_mac(zd_usb_to_chip(usb));
 +}
 +
++static inline u8 *zd_mac_get_perm_addr(struct zd_mac *mac)
++{
++	return mac->hw->wiphy->perm_addr;
++}
++
 +#define zd_mac_dev(mac) (zd_chip_dev(&(mac)->chip))
 +
 +struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf);
@@ -5032,9 +4947,9 @@
 +#endif /* DEBUG */
 +
 +#endif /* _ZD_MAC_H */
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_al7230b.c
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_al7230b.c	2007-09-27 11:24:44.000000000 -0400
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_al7230b.c
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_rf_al7230b.c	2007-10-19 14:54:14.000000000 -0400
 @@ -0,0 +1,492 @@
 +/* zd_rf_al7230b.c: Functions for the AL7230B RF controller
 + *
@@ -5528,9 +5443,9 @@
 +
 +	return 0;
 +}
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_usb.c
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_usb.c	2007-09-27 11:24:44.000000000 -0400
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_usb.c
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_usb.c	2007-10-19 14:54:14.000000000 -0400
 @@ -0,0 +1,1528 @@
 +/* zd_usb.c
 + *
@@ -5563,7 +5478,6 @@
 +#include "zd_def.h"
 +#include "zd_mac.h"
 +#include "zd_usb.h"
-+#include "zd_util.h"
 +
 +static struct usb_device_id usb_ids[] = {
 +	/* ZD1211 */
@@ -5609,6 +5523,7 @@
 +	{ USB_DEVICE(0x129b, 0x1667), .driver_info = DEVICE_ZD1211B },
 +	{ USB_DEVICE(0x0cde, 0x001a), .driver_info = DEVICE_ZD1211B },
 +	{ USB_DEVICE(0x0586, 0x340a), .driver_info = DEVICE_ZD1211B },
++	{ USB_DEVICE(0x0471, 0x1237), .driver_info = DEVICE_ZD1211B },
 +	/* "Driverless" devices that need ejecting */
 +	{ USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER },
 +	{ USB_DEVICE(0x0ace, 0x20ff), .driver_info = DEVICE_INSTALLER },
@@ -7060,12 +6975,14 @@
 +	kfree(req);
 +	return r;
 +}
-diff -up /dev/null linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_mac.c
---- /dev/null	2007-09-27 08:31:24.563724082 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_mac.c	2007-09-27 11:24:44.000000000 -0400
-@@ -0,0 +1,950 @@
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_mac.c
+--- /dev/null	2007-10-19 09:45:41.508682727 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/zd1211rw-mac80211/zd_mac.c	2007-10-19 14:54:54.000000000 -0400
+@@ -0,0 +1,976 @@
 +/* zd_mac.c
 + *
++ * Copyright (c) 2007 Luis R. Rodriguez <mcgrof at winlab.rutgers.edu>
++ *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
 + * the Free Software Foundation; either version 2 of the License, or
@@ -7092,7 +7009,6 @@
 +#include "zd_mac.h"
 +#include "zd_ieee80211.h"
 +#include "zd_rf.h"
-+#include "zd_util.h"
 +
 +/* This table contains the hardware specific values for the modulation rates. */
 +static const struct ieee80211_rate zd_rates[] = {
@@ -7182,10 +7098,7 @@
 +	if (r)
 +		return r;
 +
-+	spin_lock_irq(&mac->lock);
 +	SET_IEEE80211_PERM_ADDR(hw, addr);
-+	memcpy(mac->hwaddr, addr, ETH_ALEN);
-+	spin_unlock_irq(&mac->lock);
 +
 +	return 0;
 +}
@@ -7236,43 +7149,27 @@
 +	ZD_MEMCLEAR(mac, sizeof(struct zd_mac));
 +}
 +
-+/**
-+ * has_monitor_interfaces - have monitor interfaces been enabled?
-+ * @mac: the struct zd_mac pointer
-+ *
-+ * The function returns, whether the device has monitor interfaces attached.
-+ */
-+static int has_monitor_interfaces(struct zd_mac *mac)
-+{
-+	return mac->type == IEEE80211_IF_TYPE_MNTR;
-+}
-+
 +static int set_rx_filter(struct zd_mac *mac)
 +{
-+	u32 filter = has_monitor_interfaces(mac) ? ~0 : STA_RX_FILTER;
++	unsigned long flags;
++	u32 filter = STA_RX_FILTER;
 +
-+	return zd_iowrite32(&mac->chip, CR_RX_FILTER, filter);
-+}
++	spin_lock_irqsave(&mac->lock, flags);
++	if (mac->pass_ctrl)
++		filter |= RX_FILTER_CTRL;
++	spin_unlock_irqrestore(&mac->lock, flags);
 +
-+static int set_sniffer(struct zd_mac *mac)
-+{
-+	return zd_iowrite32(&mac->chip, CR_SNIFFER_ON,
-+		has_monitor_interfaces(mac) ? 1 : 0);
-+	return 0;
++	return zd_iowrite32(&mac->chip, CR_RX_FILTER, filter);
 +}
 +
 +static int set_mc_hash(struct zd_mac *mac)
 +{
 +	struct zd_mc_hash hash;
-+
 +	zd_mc_clear(&hash);
-+	if (has_monitor_interfaces(mac))
-+		zd_mc_add_all(&hash);
-+
 +	return zd_chip_set_multicast_hash(&mac->chip, &hash);
 +}
 +
-+static int zd_op_open(struct ieee80211_hw *hw)
++static int zd_op_start(struct ieee80211_hw *hw)
 +{
 +	struct zd_mac *mac = zd_hw_mac(hw);
 +	struct zd_chip *chip = &mac->chip;
@@ -7289,18 +7186,12 @@
 +	if (r < 0)
 +		goto out;
 +
-+	r = zd_write_mac_addr(chip, mac->hwaddr);
-+	if (r)
-+		goto disable_int;
 +	r = zd_chip_set_basic_rates(chip, CR_RATES_80211B | CR_RATES_80211G);
 +	if (r < 0)
 +		goto disable_int;
 +	r = set_rx_filter(mac);
 +	if (r)
 +		goto disable_int;
-+	r = set_sniffer(mac);
-+	if (r)
-+		goto disable_int;
 +	r = set_mc_hash(mac);
 +	if (r)
 +		goto disable_int;
@@ -7356,7 +7247,7 @@
 +	dev_kfree_skb_any(skb);
 +}
 +
-+static int zd_op_stop(struct ieee80211_hw *hw)
++static void zd_op_stop(struct ieee80211_hw *hw)
 +{
 +	struct zd_mac *mac = zd_hw_mac(hw);
 +	struct zd_chip *chip = &mac->chip;
@@ -7379,8 +7270,6 @@
 +
 +	while ((skb = skb_dequeue(ack_wait_queue)))
 +		kfree_tx_skb(skb);
-+
-+	return 0;
 +}
 +
 +/**
@@ -7668,32 +7557,6 @@
 +	return 0;
 +}
 +
-+static int fill_rx_stats(struct ieee80211_rx_status *stats,
-+	                 const struct rx_status **pstatus,
-+		         struct zd_mac *mac,
-+			 const u8 *buffer, unsigned int length)
-+{
-+	const struct rx_status *status;
-+
-+	*pstatus = status = zd_tail(buffer, length, sizeof(struct rx_status));
-+	if (status->frame_status & ZD_RX_ERROR) {
-+		/* FIXME: update? */
-+		return -EINVAL;
-+	}
-+	memset(stats, 0, sizeof(*stats));
-+
-+	stats->channel = _zd_chip_get_channel(&mac->chip);
-+	stats->freq = zd_channels[stats->channel - 1].freq;
-+	stats->phymode = MODE_IEEE80211G;
-+	stats->ssi = status->signal_strength;
-+	stats->signal = zd_rx_qual_percent(buffer,
-+		                          length - sizeof(struct rx_status),
-+		                          status);
-+	stats->rate = zd_rx_rate(buffer, status);
-+
-+	return 0;
-+}
-+
 +/**
 + * filter_ack - filters incoming packets for acknowledgements
 + * @dev: the mac80211 device
@@ -7705,6 +7568,8 @@
 + * the upper layers is informed about the successful transmission. If
 + * mac80211 queues have been stopped and the number of frames still to be
 + * transmitted is low the queues will be opened again.
++ *
++ * Returns 1 if the frame was an ACK, 0 if it was ignored.
 + */
 +static int filter_ack(struct ieee80211_hw *hw, struct ieee80211_hdr *rx_hdr,
 +		      struct ieee80211_rx_status *stats)
@@ -7741,25 +7606,60 @@
 +
 +int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length)
 +{
-+	int r;
 +	struct zd_mac *mac = zd_hw_mac(hw);
 +	struct ieee80211_rx_status stats;
 +	const struct rx_status *status;
 +	struct sk_buff *skb;
++	int bad_frame = 0;
 +
 +	if (length < ZD_PLCP_HEADER_SIZE + 10 /* IEEE80211_1ADDR_LEN */ +
 +	             FCS_LEN + sizeof(struct rx_status))
 +		return -EINVAL;
 +
-+	r = fill_rx_stats(&stats, &status, mac, buffer, length);
-+	if (r)
-+		return r;
++	memset(&stats, 0, sizeof(stats));
++
++	/* Note about pass_failed_fcs and pass_ctrl access below:
++	 * mac locking intentionally omitted here, as this is the only unlocked
++	 * reader and the only writer is configure_filter. Plus, if there were
++	 * any races accessing these variables, it wouldn't really matter.
++	 * If mac80211 ever provides a way for us to access filter flags
++	 * from outside configure_filter, we could improve on this. Also, this
++	 * situation may change once we implement some kind of DMA-into-skb
++	 * RX path. */
++
++	/* Caller has to ensure that length >= sizeof(struct rx_status). */
++	status = (struct rx_status *)
++		(buffer + (length - sizeof(struct rx_status)));
++	if (status->frame_status & ZD_RX_ERROR) {
++		if (mac->pass_failed_fcs &&
++				(status->frame_status & ZD_RX_CRC32_ERROR)) {
++			stats.flag |= RX_FLAG_FAILED_FCS_CRC;
++			bad_frame = 1;
++		} else {
++			return -EINVAL;
++		}
++	}
++
++	stats.channel = _zd_chip_get_channel(&mac->chip);
++	stats.freq = zd_channels[stats.channel - 1].freq;
++	stats.phymode = MODE_IEEE80211G;
++	stats.ssi = status->signal_strength;
++	stats.signal = zd_rx_qual_percent(buffer,
++		                          length - sizeof(struct rx_status),
++		                          status);
++	stats.rate = zd_rx_rate(buffer, status);
 +
 +	length -= ZD_PLCP_HEADER_SIZE + sizeof(struct rx_status);
 +	buffer += ZD_PLCP_HEADER_SIZE;
 +
-+	if (filter_ack(hw, (struct ieee80211_hdr *)buffer, &stats) &&
-+	    !has_monitor_interfaces(mac))
++	/* Except for bad frames, filter each frame to see if it is an ACK, in
++	 * which case our internal TX tracking is updated. Normally we then
++	 * bail here as there's no need to pass ACKs on up to the stack, but
++	 * there is also the case where the stack has requested us to pass
++	 * control frames on up (pass_ctrl) which we must consider. */
++	if (!bad_frame &&
++			filter_ack(hw, (struct ieee80211_hdr *)buffer, &stats)
++			&& !mac->pass_ctrl)
 +		return 0;
 +
 +	skb = dev_alloc_skb(length);
@@ -7776,9 +7676,9 @@
 +{
 +	struct zd_mac *mac = zd_hw_mac(hw);
 +
-+	/* NOTE: using IEEE80211_IF_TYPE_MGMT to indicate no mode selected */
-+	if (mac->type != IEEE80211_IF_TYPE_MGMT)
-+		return -1;
++	/* using IEEE80211_IF_TYPE_INVALID to indicate no mode selected */
++	if (mac->type != IEEE80211_IF_TYPE_INVALID)
++		return -EOPNOTSUPP;
 +
 +	switch (conf->type) {
 +	case IEEE80211_IF_TYPE_MNTR:
@@ -7789,16 +7689,15 @@
 +		return -EOPNOTSUPP;
 +	}
 +
-+	mac->hwaddr = conf->mac_addr;
-+
-+	return 0;
++	return zd_write_mac_addr(&mac->chip, conf->mac_addr);
 +}
 +
 +static void zd_op_remove_interface(struct ieee80211_hw *hw,
 +				    struct ieee80211_if_init_conf *conf)
 +{
 +	struct zd_mac *mac = zd_hw_mac(hw);
-+	mac->type = IEEE80211_IF_TYPE_MGMT;
++	mac->type = IEEE80211_IF_TYPE_INVALID;
++	zd_write_mac_addr(&mac->chip, NULL);
 +}
 +
 +static int zd_op_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
@@ -7812,7 +7711,9 @@
 +{
 +	struct zd_mac *mac = zd_hw_mac(hw);
 +
++	spin_lock_irq(&mac->lock);
 +	mac->associated = is_valid_ether_addr(conf->bssid);
++	spin_unlock_irq(&mac->lock);
 +
 +	/* TODO: do hardware bssid filtering */
 +	return 0;
@@ -7831,33 +7732,73 @@
 +	zd_chip_set_multicast_hash(&mac->chip, &hash);
 +}
 +
-+static void zd_op_set_multicast_list(struct ieee80211_hw *hw,
-+				      unsigned short dev_flags, int mc_count)
++static void set_rx_filter_handler(struct work_struct *work)
++{
++	struct zd_mac *mac =
++		container_of(work, struct zd_mac, set_rx_filter_work);
++	int r;
++
++	dev_dbg_f(zd_mac_dev(mac), "\n");
++	r = set_rx_filter(mac);
++	if (r)
++		dev_err(zd_mac_dev(mac), "set_rx_filter_handler error %d\n", r);
++}
++
++#define SUPPORTED_FIF_FLAGS \
++	(FIF_PROMISC_IN_BSS | FIF_ALLMULTI | FIF_FCSFAIL | FIF_CONTROL | \
++	FIF_OTHER_BSS)
++static void zd_op_configure_filter(struct ieee80211_hw *hw,
++			unsigned int changed_flags,
++			unsigned int *new_flags,
++			int mc_count, struct dev_mc_list *mclist)
 +{
 +	struct zd_mc_hash hash;
 +	struct zd_mac *mac = zd_hw_mac(hw);
 +	unsigned long flags;
++	int i;
 +
-+	if ((dev_flags & (IFF_PROMISC|IFF_ALLMULTI)) ||
-+	     has_monitor_interfaces(mac))
-+	{
++	/* Only deal with supported flags */
++	changed_flags &= SUPPORTED_FIF_FLAGS;
++	*new_flags &= SUPPORTED_FIF_FLAGS;
++
++	/* changed_flags is always populated but this driver
++	 * doesn't support all FIF flags so its possible we don't
++	 * need to do anything */
++	if (!changed_flags)
++		return;
++
++	if (*new_flags & (FIF_PROMISC_IN_BSS | FIF_ALLMULTI)) {
 +		zd_mc_add_all(&hash);
 +	} else {
-+		struct dev_mc_list *mc = NULL;
-+		void *tmp = NULL;
-+
 +		zd_mc_clear(&hash);
-+		while ((mc = ieee80211_get_mc_list_item(hw, mc, &tmp))) {
++		for (i = 0; i < mc_count; i++) {
++			if (!mclist)
++				break;
 +			dev_dbg_f(zd_mac_dev(mac), "mc addr " MAC_FMT "\n",
-+				  MAC_ARG(mc->dmi_addr));
-+			zd_mc_add_addr(&hash, mc->dmi_addr);
++				  MAC_ARG(mclist->dmi_addr));
++			zd_mc_add_addr(&hash, mclist->dmi_addr);
++			mclist = mclist->next;
 +		}
 +	}
 +
 +	spin_lock_irqsave(&mac->lock, flags);
++	mac->pass_failed_fcs = !!(*new_flags & FIF_FCSFAIL);
++	mac->pass_ctrl = !!(*new_flags & FIF_CONTROL);
 +	mac->multicast_hash = hash;
 +	spin_unlock_irqrestore(&mac->lock, flags);
 +	queue_work(zd_workqueue, &mac->set_multicast_hash_work);
++
++	if (changed_flags & FIF_CONTROL)
++		queue_work(zd_workqueue, &mac->set_rx_filter_work);
++
++	/* no handling required for FIF_OTHER_BSS as we don't currently
++	 * do BSSID filtering */
++	/* FIXME: in future it would be nice to enable the probe response
++	 * filter (so that the driver doesn't see them) until
++	 * FIF_BCN_PRBRESP_PROMISC is set. however due to atomicity here, we'd
++	 * have to schedule work to enable prbresp reception, which might
++	 * happen too late. For now we'll just listen and forward them all the
++	 * time. */
 +}
 +
 +static void set_rts_cts_work(struct work_struct *work)
@@ -7901,13 +7842,13 @@
 +
 +static const struct ieee80211_ops zd_ops = {
 +	.tx			= zd_op_tx,
-+	.open			= zd_op_open,
++	.start			= zd_op_start,
 +	.stop			= zd_op_stop,
 +	.add_interface		= zd_op_add_interface,
 +	.remove_interface	= zd_op_remove_interface,
 +	.config			= zd_op_config,
 +	.config_interface	= zd_op_config_interface,
-+	.set_multicast_list	= zd_op_set_multicast_list,
++	.configure_filter	= zd_op_configure_filter,
 +	.erp_ie_changed		= zd_op_erp_ie_changed,
 +};
 +
@@ -7929,8 +7870,7 @@
 +	spin_lock_init(&mac->lock);
 +	mac->hw = hw;
 +
-+	mac->type = IEEE80211_IF_TYPE_MGMT;
-+	mac->hwaddr = hw->wiphy->perm_addr;
++	mac->type = IEEE80211_IF_TYPE_INVALID;
 +
 +	memcpy(mac->channels, zd_channels, sizeof(zd_channels));
 +	memcpy(mac->rates, zd_rates, sizeof(zd_rates));
@@ -7967,6 +7907,7 @@
 +	housekeeping_init(mac);
 +	INIT_WORK(&mac->set_multicast_hash_work, set_multicast_hash_handler);
 +	INIT_WORK(&mac->set_rts_cts_work, set_rts_cts_work);
++	INIT_WORK(&mac->set_rx_filter_work, set_rx_filter_handler);
 +
 +	SET_IEEE80211_DEV(hw, &intf->dev);
 +	return hw;
@@ -7989,7 +7930,7 @@
 +	r = zd_chip_control_leds(chip,
 +		                 is_associated ? LED_ASSOCIATED : LED_SCANNING);
 +	if (r)
-+		dev_err(zd_mac_dev(mac), "zd_chip_control_leds error %d\n", r);
++		dev_dbg_f(zd_mac_dev(mac), "zd_chip_control_leds error %d\n", r);
 +
 +	queue_delayed_work(zd_workqueue, &mac->housekeeping.link_led_work,
 +		           LINK_LED_WORK_DELAY);
@@ -8014,14 +7955,13 @@
 +		&mac->housekeeping.link_led_work);
 +	zd_chip_control_leds(&mac->chip, LED_OFF);
 +}
-diff -up linux-2.6.22.noarch/drivers/net/wireless/Kconfig.orig linux-2.6.22.noarch/drivers/net/wireless/Kconfig
---- linux-2.6.22.noarch/drivers/net/wireless/Kconfig.orig	2007-09-27 11:24:13.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/Kconfig	2007-09-27 11:24:44.000000000 -0400
-@@ -616,6 +616,7 @@ source "drivers/net/wireless/bcm43xx/Kco
- source "drivers/net/wireless/b43/Kconfig"
- source "drivers/net/wireless/b43legacy/Kconfig"
+diff -up linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig linux-2.6.23.noarch/drivers/net/wireless/Kconfig
+--- linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig	2007-10-19 14:54:06.000000000 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/Kconfig	2007-10-19 14:54:14.000000000 -0400
+@@ -618,5 +618,6 @@ source "drivers/net/wireless/b43legacy/K
  source "drivers/net/wireless/zd1211rw/Kconfig"
-+source "drivers/net/wireless/zd1211rw-mac80211/Kconfig"
  source "drivers/net/wireless/rt2x00/Kconfig"
  source "drivers/net/wireless/iwlwifi/Kconfig"
++source "drivers/net/wireless/zd1211rw-mac80211/Kconfig"
  
+ endmenu


--- linux-2.6-ath5k-fixes.patch DELETED ---


--- linux-2.6-iwlwifi-fixes.patch DELETED ---


--- linux-2.6-mac80211-extras.patch DELETED ---


--- linux-2.6-wireless-fixes.patch DELETED ---




More information about the fedora-extras-commits mailing list