rpms/kernel/F-7 git-wireless-dev.patch, 1.15, 1.16 kernel-2.6.spec, 1.3288, 1.3289 linux-2.6-wireless.patch, 1.5, 1.6

John W. Linville (linville) fedora-extras-commits at redhat.com
Fri Jul 20 21:21:45 UTC 2007


Author: linville

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

Modified Files:
	git-wireless-dev.patch kernel-2.6.spec 
	linux-2.6-wireless.patch 
Log Message:
rt2x00 updates

git-wireless-dev.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.15 -r 1.16 git-wireless-dev.patch
Index: git-wireless-dev.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/git-wireless-dev.patch,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- git-wireless-dev.patch	17 Jul 2007 20:22:34 -0000	1.15
+++ git-wireless-dev.patch	20 Jul 2007 21:21:41 -0000	1.16
@@ -1,5 +1,5 @@
---- linux-2.6.22.noarch/CREDITS.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/CREDITS	2007-07-17 15:57:34.000000000 -0400
+--- linux-2.6.22.noarch/CREDITS.orig	2007-07-20 17:13:49.000000000 -0400
++++ linux-2.6.22.noarch/CREDITS	2007-07-20 17:13:54.000000000 -0400
 @@ -665,6 +665,11 @@ D: Minor updates to SCSI types, added /p
  S: (ask for current address)
  S: USA
@@ -66,9 +66,9 @@
  N: Lars Wirzenius
  E: liw at iki.fi
  D: Linux System Administrator's Guide, author, former maintainer
---- 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-07-17 15:57:34.000000000 -0400
-@@ -7,6 +7,217 @@
+--- linux-2.6.22.noarch/include/linux/nl80211.h.orig	2007-07-20 17:13:49.000000000 -0400
++++ linux-2.6.22.noarch/include/linux/nl80211.h	2007-07-20 17:13:54.000000000 -0400
+@@ -7,6 +7,201 @@
   */
  
  /**
@@ -254,22 +254,6 @@
 +};
 +#define NL80211_ATTR_MAX (__NL80211_ATTR_AFTER_LAST - 1)
 +
-+/**
-+ * enum nl80211_multicast_groups - multicast groups for nl80211
-+ * @NL80211_GROUP_CONFIG: members of this group are notified of
-+ *	configuration changes
-+ */
-+enum nl80211_multicast_groups {
-+	/* be notified of configuration changes like wiphy renames */
-+	NL80211_GROUP_CONFIG,
-+
-+	/* add groups here */
-+
-+	/* keep last */
-+	__NL80211_GROUP_AFTER_LAST
-+};
-+#define NL80211_GROUP_MAX (__NL80211_GROUP_AFTER_LAST - 1)
-+
 +/*
 + * maximum length of IE(s) passed in an NL80211_ATTR_IE.
 + * this is an arbitrary limit, 774 means three full-length
@@ -286,7 +270,7 @@
   * enum nl80211_iftype - (virtual) interface types
   * @NL80211_IFTYPE_UNSPECIFIED: unspecified type, driver decides
   * @NL80211_IFTYPE_ADHOC: independent BSS member
-@@ -35,4 +246,56 @@ enum nl80211_iftype {
+@@ -35,4 +230,56 @@ enum nl80211_iftype {
  };
  #define NL80211_IFTYPE_MAX (__NL80211_IFTYPE_AFTER_LAST - 1)
  
@@ -343,8 +327,8 @@
 +#define NL80211_KEYTYPE_MAX (__NL80211_KEYTYPE_AFTER_LAST - 1)
 +
  #endif /* __LINUX_NL80211_H */
---- linux-2.6.22.noarch/include/linux/ieee80211.h.orig	2007-07-17 15:56:37.000000000 -0400
-+++ linux-2.6.22.noarch/include/linux/ieee80211.h	2007-07-17 15:57:34.000000000 -0400
+--- linux-2.6.22.noarch/include/linux/ieee80211.h.orig	2007-07-20 17:13:49.000000000 -0400
++++ linux-2.6.22.noarch/include/linux/ieee80211.h	2007-07-20 17:13:54.000000000 -0400
 @@ -106,6 +106,75 @@ struct ieee80211_hdr {
  } __attribute__ ((packed));
  
@@ -643,8 +627,8 @@
 +};
 +
  #endif /* IEEE80211_H */
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/include/linux/ssb/ssb_driver_chipcommon.h	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/include/linux/ssb/ssb_driver_chipcommon.h	2007-07-20 17:13:54.000000000 -0400
 @@ -0,0 +1,387 @@
 +#ifndef LINUX_SSB_CHIPCO_H_
 +#define LINUX_SSB_CHIPCO_H_
@@ -1033,8 +1017,8 @@
 +
 +#endif /* __KERNEL__ */
 +#endif /* LINUX_SSB_CHIPCO_H_ */
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/include/linux/ssb/ssb_driver_extif.h	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/include/linux/ssb/ssb_driver_extif.h	2007-07-20 17:13:54.000000000 -0400
 @@ -0,0 +1,163 @@
 +/*
 + * Hardware-specific External Interface I/O core definitions
@@ -1199,8 +1183,8 @@
 +
 +#endif /* __KERNEL__ */
 +#endif /* LINUX_SSB_EXTIFCORE_H_ */
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/include/linux/ssb/ssb_driver_mips.h	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/include/linux/ssb/ssb_driver_mips.h	2007-07-20 17:13:54.000000000 -0400
 @@ -0,0 +1,47 @@
 +#ifndef LINUX_SSB_MIPSCORE_H_
 +#define LINUX_SSB_MIPSCORE_H_
@@ -1249,8 +1233,8 @@
 +
 +#endif /* __KERNEL__ */
 +#endif /* LINUX_SSB_MIPSCORE_H_ */
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/include/linux/ssb/ssb_regs.h	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/include/linux/ssb/ssb_regs.h	2007-07-20 17:13:54.000000000 -0400
 @@ -0,0 +1,294 @@
 +#ifndef LINUX_SSB_REGS_H_
 +#define LINUX_SSB_REGS_H_
@@ -1546,8 +1530,8 @@
 +
 +#endif /* __KERNEL__ */
 +#endif /* LINUX_SSB_REGS_H_ */
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/include/linux/ssb/ssb_driver_pci.h	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/include/linux/ssb/ssb_driver_pci.h	2007-07-20 17:13:54.000000000 -0400
 @@ -0,0 +1,108 @@
 +#ifndef LINUX_SSB_PCICORE_H_
 +#define LINUX_SSB_PCICORE_H_
@@ -1657,8 +1641,8 @@
 +#endif /* CONFIG_SSB_DRIVER_PCICORE */
 +#endif /* __KERNEL__ */
 +#endif /* LINUX_SSB_PCICORE_H_ */
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/include/linux/ssb/ssb.h	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/include/linux/ssb/ssb.h	2007-07-20 17:13:54.000000000 -0400
 @@ -0,0 +1,422 @@
 +#ifndef LINUX_SSB_H_
 +#define LINUX_SSB_H_
@@ -2082,8 +2066,8 @@
 +
 +#endif /* __KERNEL__ */
 +#endif /* LINUX_SSB_H_ */
---- linux-2.6.22.noarch/include/net/cfg80211.h.orig	2007-07-17 15:56:37.000000000 -0400
-+++ linux-2.6.22.noarch/include/net/cfg80211.h	2007-07-17 15:57:34.000000000 -0400
+--- linux-2.6.22.noarch/include/net/cfg80211.h.orig	2007-07-20 17:13:49.000000000 -0400
++++ linux-2.6.22.noarch/include/net/cfg80211.h	2007-07-20 17:13:54.000000000 -0400
 @@ -3,6 +3,7 @@
  
  #include <linux/netlink.h>
@@ -2226,8 +2210,8 @@
 +			    u32 seq, int flags, u8 cmd);
 +
  #endif /* __NET_CFG80211_H */
---- linux-2.6.22.noarch/include/net/mac80211.h.orig	2007-07-17 15:56:37.000000000 -0400
-+++ linux-2.6.22.noarch/include/net/mac80211.h	2007-07-17 15:57:34.000000000 -0400
+--- linux-2.6.22.noarch/include/net/mac80211.h.orig	2007-07-20 17:13:49.000000000 -0400
++++ linux-2.6.22.noarch/include/net/mac80211.h	2007-07-20 17:13:54.000000000 -0400
 @@ -300,7 +300,6 @@ struct ieee80211_conf {
  	/* Following five fields are used for IEEE 802.11H */
  	unsigned int radar_detect;
@@ -2256,7 +2240,22 @@
  	int (*set_port_auth)(struct ieee80211_hw *hw, u8 *addr,
  			     int authorized);
  
-@@ -702,8 +703,9 @@ struct ieee80211_ops {
+@@ -692,6 +693,14 @@ struct ieee80211_ops {
+ 	void (*sta_table_notification)(struct ieee80211_hw *hw,
+ 				       int num_sta);
+ 
++	/* Handle ERP IE change notifications. Must be atomic. */
++	void (*erp_ie_changed)(struct ieee80211_hw *hw, u8 changes,
++			       int cts_protection, int preamble);
++
++	/* Flags for the erp_ie_changed changes parameter */
++#define IEEE80211_ERP_CHANGE_PROTECTION (1<<0) /* protection flag changed */
++#define IEEE80211_ERP_CHANGE_PREAMBLE (1<<1) /* barker preamble mode changed */
++
+ 	/* Configure TX queue parameters (EDCF (aifs, cw_min, cw_max),
+ 	 * bursting) for a hardware TX queue.
+ 	 * queue = IEEE80211_TX_QUEUE_*.
+@@ -702,8 +711,9 @@ struct ieee80211_ops {
  	/* Get statistics of the current TX queue status. This is used to get
  	 * number of currently queued packets (queue length), maximum queue
  	 * size (limit), and total number of packets sent using each TX queue
@@ -2268,7 +2267,7 @@
  	int (*get_tx_stats)(struct ieee80211_hw *hw,
  			    struct ieee80211_tx_queue_stats *stats);
  
-@@ -713,12 +715,25 @@ struct ieee80211_ops {
+@@ -713,12 +723,25 @@ struct ieee80211_ops {
  	 * Must be atomic. */
  	u64 (*get_tsf)(struct ieee80211_hw *hw);
  
@@ -2294,8 +2293,90 @@
  	/* Setup beacon data for IBSS beacons. Unlike access point (Master),
  	 * IBSS uses a fixed beacon frame which is configured using this
  	 * function. This handler is required only for IBSS mode. */
---- linux-2.6.22.noarch/include/net/iw_handler.h.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/include/net/iw_handler.h	2007-07-17 15:57:34.000000000 -0400
+@@ -830,6 +853,7 @@ struct sk_buff *ieee80211_beacon_get(str
[...8264 lines suppressed...]
 +static const struct ieee80211_ops rt73usb_mac80211_ops = {
 +	.tx			= rt2x00lib_tx,
 +	.reset			= rt2x00lib_reset,
-+	.open			= rt2x00lib_open,
-+	.stop			= rt2x00lib_stop,
 +	.add_interface		= rt2x00lib_add_interface,
 +	.remove_interface	= rt2x00lib_remove_interface,
 +	.config			= rt2x00lib_config,
@@ -84831,6 +85150,7 @@
 +	.write_tx_desc		= rt73usb_write_tx_desc,
 +	.write_tx_data		= rt2x00usb_write_tx_data,
 +	.kick_tx_queue		= rt73usb_kick_tx_queue,
++	.fill_rxdone		= rt73usb_fill_rxdone,
 +	.config_type		= rt73usb_config_type,
 +	.config_phymode		= rt73usb_config_phymode,
 +	.config_channel		= rt73usb_config_channel,
@@ -84933,26 +85253,23 @@
 +
 +static int __init rt73usb_init(void)
 +{
-+	printk(KERN_INFO "Loading module: %s - %s by %s.\n",
-+		DRV_NAME, DRV_VERSION, DRV_PROJECT);
 +	return usb_register(&rt73usb_driver);
 +}
 +
 +static void __exit rt73usb_exit(void)
 +{
-+	printk(KERN_INFO "Unloading module: %s.\n", DRV_NAME);
 +	usb_deregister(&rt73usb_driver);
 +}
 +
 +module_init(rt73usb_init);
 +module_exit(rt73usb_exit);
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/mac80211/README	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/mac80211/README	2007-07-20 17:13:55.000000000 -0400
 @@ -0,0 +1,2 @@
 +This directory contains IEEE 802.11 wireless LAN drivers that are using
 +Devicescape IEEE 802.11 stack (net/mac80211).
---- linux-2.6.22.noarch/drivers/net/wireless/Kconfig.orig	2007-07-17 15:56:37.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/Kconfig	2007-07-17 15:57:34.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/Kconfig.orig	2007-07-20 17:13:49.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/Kconfig	2007-07-20 17:13:55.000000000 -0400
 @@ -562,4 +562,6 @@ source "drivers/net/wireless/hostap/Kcon
  source "drivers/net/wireless/bcm43xx/Kconfig"
  source "drivers/net/wireless/zd1211rw/Kconfig"
@@ -84960,8 +85277,8 @@
 +source "drivers/net/wireless/mac80211/Kconfig"
 +
  endmenu
---- linux-2.6.22.noarch/drivers/net/wireless/bcm43xx/Kconfig.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/bcm43xx/Kconfig	2007-07-17 15:57:34.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/bcm43xx/Kconfig.orig	2007-07-20 17:13:49.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/bcm43xx/Kconfig	2007-07-20 17:13:55.000000000 -0400
 @@ -1,6 +1,7 @@
  config BCM43XX
  	tristate "Broadcom BCM43xx wireless support"
@@ -84970,8 +85287,8 @@
  	select WIRELESS_EXT
  	select FW_LOADER
  	select HW_RANDOM
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/ssb/Makefile	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/ssb/Makefile	2007-07-20 17:13:55.000000000 -0400
 @@ -0,0 +1,11 @@
 +ssb-builtin-drivers-y					+= driver_chipcommon.o
 +ssb-builtin-drivers-$(CONFIG_SSB_DRIVER_MIPS)		+= driver_mipscore.o
@@ -84984,8 +85301,8 @@
 +
 +ssb-objs	:= main.o scan.o \
 +		   $(ssb-hostsupport-y) $(ssb-builtin-drivers-y)
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/ssb/pcmcia.c	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/ssb/pcmcia.c	2007-07-20 17:13:55.000000000 -0400
 @@ -0,0 +1,263 @@
 +/*
 + * Sonics Silicon Backplane
@@ -85250,8 +85567,8 @@
 +error:
 +	return -ENODEV;
 +}
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/ssb/main.c	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/ssb/main.c	2007-07-20 17:13:55.000000000 -0400
 @@ -0,0 +1,1061 @@
 +/*
 + * Sonics Silicon Backplane
@@ -86314,8 +86631,8 @@
 +	bus_unregister(&ssb_bustype);
 +}
 +module_exit(ssb_modexit)
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/ssb/pcihost_wrapper.c	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/ssb/pcihost_wrapper.c	2007-07-20 17:13:55.000000000 -0400
 @@ -0,0 +1,104 @@
 +/*
 + * Sonics Silicon Backplane
@@ -86421,8 +86738,8 @@
 +	return pci_register_driver(driver);
 +}
 +EXPORT_SYMBOL(ssb_pcihost_register);
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/ssb/driver_mipscore.c	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/ssb/driver_mipscore.c	2007-07-20 17:13:55.000000000 -0400
 @@ -0,0 +1,258 @@
 +/*
 + * Sonics Silicon Backplane
@@ -86682,8 +86999,8 @@
 +	ssb_mips_serial_init(mcore);
 +	ssb_mips_flash_detect(mcore);
 +}
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/ssb/ssb_private.h	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/ssb/ssb_private.h	2007-07-20 17:13:55.000000000 -0400
 @@ -0,0 +1,137 @@
 +#ifndef LINUX_SSB_PRIVATE_H_
 +#define LINUX_SSB_PRIVATE_H_
@@ -86822,8 +87139,8 @@
 +#endif /* CONFIG_SSB_PCIHOST */
 +
 +#endif /* LINUX_SSB_PRIVATE_H_ */
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/ssb/pci.c	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/ssb/pci.c	2007-07-20 17:13:55.000000000 -0400
 @@ -0,0 +1,688 @@
 +/*
 + * Sonics Silicon Backplane PCI-Hostbus related functions.
@@ -87513,8 +87830,8 @@
 +out:
 +	return err;
 +}
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/ssb/driver_chipcommon.c	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/ssb/driver_chipcommon.c	2007-07-20 17:13:55.000000000 -0400
 @@ -0,0 +1,402 @@
 +/*
 + * Sonics Silicon Backplane
@@ -87918,8 +88235,8 @@
 +	return nr_ports;
 +}
 +#endif /* CONFIG_SSB_SERIAL */
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/ssb/Kconfig	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/ssb/Kconfig	2007-07-20 17:13:55.000000000 -0400
 @@ -0,0 +1,93 @@
 +menu "Sonics Silicon Backplane"
 +
@@ -88014,8 +88331,8 @@
 +	  If unsure, say N
 +
 +endmenu
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/ssb/scan.c	2007-07-17 15:57:34.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/ssb/scan.c	2007-07-20 17:13:55.000000000 -0400
 @@ -0,0 +1,407 @@
 +/*
 + * Sonics Silicon Backplane
@@ -88424,9 +88741,9 @@
 +	ssb_iounmap(bus);
 +	goto out;
 +}
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/ssb/driver_pcicore.c	2007-07-17 15:57:34.000000000 -0400
-@@ -0,0 +1,556 @@
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/ssb/driver_pcicore.c	2007-07-20 17:13:55.000000000 -0400
+@@ -0,0 +1,562 @@
 +/*
 + * Sonics Silicon Backplane
 + * Broadcom PCI-core driver
@@ -88925,9 +89242,15 @@
 +		u32 intvec;
 +
 +		intvec = ssb_read32(pdev, SSB_INTVEC);
-+		tmp = ssb_read32(dev, SSB_TPSFLAG);
-+		tmp &= SSB_TPSFLAG_BPFLAG;
-+		intvec |= tmp;
++		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);
 +	}
 +


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3288
retrieving revision 1.3289
diff -u -r1.3288 -r1.3289
--- kernel-2.6.spec	20 Jul 2007 18:48:03 -0000	1.3288
+++ kernel-2.6.spec	20 Jul 2007 21:21:41 -0000	1.3289
@@ -2261,6 +2261,9 @@
 %endif
 
 %changelog
+* Tue Jul 20 2007 John W. Linville <linville at redhat.com>
+- update wireless bits
+
 * Fri Jul 20 2007 Chuck Ebbert <cebbert at redhat.com>
 - utrace update
 - CFS scheduler update

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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- linux-2.6-wireless.patch	17 Jul 2007 20:22:35 -0000	1.5
+++ linux-2.6-wireless.patch	20 Jul 2007 21:21:41 -0000	1.6
@@ -1,5 +1,5 @@
---- linux-2.6.22.noarch/include/linux/ieee80211.h.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/include/linux/ieee80211.h	2007-07-17 15:47:36.000000000 -0400
+--- linux-2.6.22.noarch/include/linux/ieee80211.h.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/include/linux/ieee80211.h	2007-07-20 17:06:56.000000000 -0400
 @@ -227,6 +227,17 @@ struct ieee80211_cts {
  #define WLAN_CAPABILITY_SHORT_SLOT_TIME	(1<<10)
  #define WLAN_CAPABILITY_DSSS_OFDM	(1<<13)
@@ -18,8 +18,8 @@
  /* Status codes */
  enum ieee80211_statuscode {
  	WLAN_STATUS_SUCCESS = 0,
---- linux-2.6.22.noarch/include/net/cfg80211.h.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/include/net/cfg80211.h	2007-07-17 15:47:36.000000000 -0400
+--- linux-2.6.22.noarch/include/net/cfg80211.h.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/include/net/cfg80211.h	2007-07-20 17:06:56.000000000 -0400
 @@ -11,6 +11,44 @@
   * Copyright 2006 Johannes Berg <johannes at sipsolutions.net>
   */
@@ -65,8 +65,8 @@
  /* from net/wireless.h */
  struct wiphy;
  
---- linux-2.6.22.noarch/include/net/mac80211.h.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/include/net/mac80211.h	2007-07-17 15:47:36.000000000 -0400
+--- linux-2.6.22.noarch/include/net/mac80211.h.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/include/net/mac80211.h	2007-07-20 17:06:56.000000000 -0400
 @@ -347,9 +347,16 @@ enum ieee80211_if_types {
   * @mac_addr: pointer to MAC address of the interface. This pointer is valid
   *	until the interface is removed (i.e. it cannot be used after
@@ -113,8 +113,27 @@
  /* Given an sk_buff with a raw 802.11 header at the data pointer this function
   * returns the 802.11 header length in bytes (not including encryption
   * headers). If the data in the sk_buff is too short to contain a valid 802.11
---- linux-2.6.22.noarch/net/ieee80211/softmac/ieee80211softmac_assoc.c.orig	2007-07-17 15:51:35.000000000 -0400
-+++ linux-2.6.22.noarch/net/ieee80211/softmac/ieee80211softmac_assoc.c	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/net/ieee80211/ieee80211_wx.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/ieee80211/ieee80211_wx.c	2007-07-20 17:06:56.000000000 -0400
+@@ -90,14 +90,11 @@ static char *ieee80211_translate_scan(st
+ 	}
+ 
+ 	/* Add channel and frequency */
++	/* Note : userspace automatically computes channel using iwrange */
+ 	iwe.cmd = SIOCGIWFREQ;
+-	iwe.u.freq.m = network->channel;
+-	iwe.u.freq.e = 0;
+-	iwe.u.freq.i = 0;
+-	start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN);
+-
+ 	iwe.u.freq.m = ieee80211_channel_to_freq(ieee, network->channel);
+ 	iwe.u.freq.e = 6;
++	iwe.u.freq.i = 0;
+ 	start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN);
+ 
+ 	/* Add encryption capability */
+--- linux-2.6.22.noarch/net/ieee80211/softmac/ieee80211softmac_assoc.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/ieee80211/softmac/ieee80211softmac_assoc.c	2007-07-20 17:06:56.000000000 -0400
 @@ -271,8 +271,11 @@ ieee80211softmac_assoc_work(struct work_
  			 */
  			dprintk(KERN_INFO PFX "Associate: Scanning for networks first.\n");
@@ -128,8 +147,69 @@
  			goto out;
  		} else {
  			mac->associnfo.associating = 0;
---- linux-2.6.22.noarch/net/mac80211/ieee80211_iface.c.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/net/mac80211/ieee80211_iface.c	2007-07-17 15:47:36.000000000 -0400
+--- linux-2.6.22.noarch/net/ieee80211/softmac/ieee80211softmac_module.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/ieee80211/softmac/ieee80211softmac_module.c	2007-07-20 17:06:56.000000000 -0400
+@@ -456,18 +456,13 @@ void
+ ieee80211softmac_add_network_locked(struct ieee80211softmac_device *mac,
+ 	struct ieee80211softmac_network *add_net)
+ {
+-	struct list_head *list_ptr;
+-	struct ieee80211softmac_network *softmac_net = NULL;
++	struct ieee80211softmac_network *softmac_net;
+ 
+-	list_for_each(list_ptr, &mac->network_list) {
+-		softmac_net = list_entry(list_ptr, struct ieee80211softmac_network, list);
++	list_for_each_entry(softmac_net, &mac->network_list, list) {
+ 		if(!memcmp(softmac_net->bssid, add_net->bssid, ETH_ALEN))
+-			break;
+-		else
+-			softmac_net = NULL;
++			return;
+ 	}
+-	if(softmac_net == NULL)
+-		list_add(&(add_net->list), &mac->network_list);
++	list_add(&(add_net->list), &mac->network_list);
+ }
+ 
+ /* Add a network to the list, with locking */
+@@ -506,16 +501,13 @@ struct ieee80211softmac_network *
+ ieee80211softmac_get_network_by_bssid_locked(struct ieee80211softmac_device *mac,
+ 	u8 *bssid)
+ {
+-	struct list_head *list_ptr;
+-	struct ieee80211softmac_network *softmac_net = NULL;
+-	list_for_each(list_ptr, &mac->network_list) {
+-		softmac_net = list_entry(list_ptr, struct ieee80211softmac_network, list);
++	struct ieee80211softmac_network *softmac_net;
++
++	list_for_each_entry(softmac_net, &mac->network_list, list) {
+ 		if(!memcmp(softmac_net->bssid, bssid, ETH_ALEN))
+-			break;
+-		else
+-			softmac_net = NULL;
++			return softmac_net;
+ 	}
+-	return softmac_net;
++	return NULL;
+ }
+ 
+ /* Get a network from the list by BSSID with locking */
+@@ -537,11 +529,9 @@ struct ieee80211softmac_network *
+ ieee80211softmac_get_network_by_essid_locked(struct ieee80211softmac_device *mac,
+ 	struct ieee80211softmac_essid *essid)
+ {
+-	struct list_head *list_ptr;
+-	struct ieee80211softmac_network *softmac_net = NULL;
++	struct ieee80211softmac_network *softmac_net;
+ 
+-	list_for_each(list_ptr, &mac->network_list) {
+-		softmac_net = list_entry(list_ptr, struct ieee80211softmac_network, list);
++	list_for_each_entry(softmac_net, &mac->network_list, list) {
+ 		if (softmac_net->essid.len == essid->len &&
+ 			!memcmp(softmac_net->essid.data, essid->data, essid->len))
+ 			return softmac_net;
+--- linux-2.6.22.noarch/net/mac80211/ieee80211_iface.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/mac80211/ieee80211_iface.c	2007-07-20 17:06:56.000000000 -0400
 @@ -157,6 +157,8 @@ void ieee80211_if_set_type(struct net_de
  	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
  	int oldtype = sdata->type;
@@ -147,9 +227,30 @@
  		break;
  	default:
  		printk(KERN_WARNING "%s: %s: Unknown interface type 0x%x",
---- linux-2.6.22.noarch/net/mac80211/ieee80211_ioctl.c.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/net/mac80211/ieee80211_ioctl.c	2007-07-17 15:47:36.000000000 -0400
-@@ -345,6 +345,8 @@ static int ieee80211_ioctl_giwrange(stru
+--- linux-2.6.22.noarch/net/mac80211/ieee80211_ioctl.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/mac80211/ieee80211_ioctl.c	2007-07-20 17:06:56.000000000 -0400
+@@ -27,20 +27,6 @@
+ #include "aes_ccm.h"
+ #include "debugfs_key.h"
+ 
+-static int ieee80211_regdom = 0x10; /* FCC */
+-module_param(ieee80211_regdom, int, 0444);
+-MODULE_PARM_DESC(ieee80211_regdom, "IEEE 802.11 regulatory domain; 64=MKK");
+-
+-/*
+- * If firmware is upgraded by the vendor, additional channels can be used based
+- * on the new Japanese regulatory rules. This is indicated by setting
+- * ieee80211_japan_5ghz module parameter to one when loading the 80211 kernel
+- * module.
+- */
+-static int ieee80211_japan_5ghz /* = 0 */;
+-module_param(ieee80211_japan_5ghz, int, 0444);
+-MODULE_PARM_DESC(ieee80211_japan_5ghz, "Vendor-updated firmware for 5 GHz");
+-
+ static void ieee80211_set_hw_encryption(struct net_device *dev,
+ 					struct sta_info *sta, u8 addr[ETH_ALEN],
+ 					struct ieee80211_key *key)
+@@ -345,6 +331,8 @@ static int ieee80211_ioctl_giwrange(stru
  {
  	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
  	struct iw_range *range = (struct iw_range *) extra;
@@ -158,37 +259,158 @@
  
  	data->length = sizeof(struct iw_range);
  	memset(range, 0, sizeof(struct iw_range));
-@@ -378,6 +380,29 @@ static int ieee80211_ioctl_giwrange(stru
+@@ -378,130 +366,34 @@ static int ieee80211_ioctl_giwrange(stru
  	range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 |
  			  IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP;
  
+-	IW_EVENT_CAPA_SET_KERNEL(range->event_capa);
+-	IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWTHRSPY);
+-	IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP);
+-	IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN);
+-
+-	return 0;
+-}
+-
+-
+-struct ieee80211_channel_range {
+-	short start_freq;
+-	short end_freq;
+-	unsigned char power_level;
+-	unsigned char antenna_max;
+-};
+-
+-static const struct ieee80211_channel_range ieee80211_fcc_channels[] = {
+-	{ 2412, 2462, 27, 6 } /* IEEE 802.11b/g, channels 1..11 */,
+-	{ 5180, 5240, 17, 6 } /* IEEE 802.11a, channels 36..48 */,
+-	{ 5260, 5320, 23, 6 } /* IEEE 802.11a, channels 52..64 */,
+-	{ 5745, 5825, 30, 6 } /* IEEE 802.11a, channels 149..165, outdoor */,
+-	{ 0 }
+-};
+-
+-static const struct ieee80211_channel_range ieee80211_mkk_channels[] = {
+-	{ 2412, 2472, 20, 6 } /* IEEE 802.11b/g, channels 1..13 */,
+-	{ 5170, 5240, 20, 6 } /* IEEE 802.11a, channels 34..48 */,
+-	{ 5260, 5320, 20, 6 } /* IEEE 802.11a, channels 52..64 */,
+-	{ 0 }
+-};
+-
+-
+-static const struct ieee80211_channel_range *channel_range =
+-	ieee80211_fcc_channels;
+-
+-
+-static void ieee80211_unmask_channel(struct net_device *dev, int mode,
+-				     struct ieee80211_channel *chan)
+-{
+-	int i;
+-
+-	chan->flag = 0;
+-
+-	if (ieee80211_regdom == 64 &&
+-	    (mode == MODE_ATHEROS_TURBO || mode == MODE_ATHEROS_TURBOG)) {
+-		/* Do not allow Turbo modes in Japan. */
+-		return;
+-	}
+-
+-	for (i = 0; channel_range[i].start_freq; i++) {
+-		const struct ieee80211_channel_range *r = &channel_range[i];
+-		if (r->start_freq <= chan->freq && r->end_freq >= chan->freq) {
+-			if (ieee80211_regdom == 64 && !ieee80211_japan_5ghz &&
+-			    chan->freq >= 5260 && chan->freq <= 5320) {
+-				/*
+-				 * Skip new channels in Japan since the
+-				 * firmware was not marked having been upgraded
+-				 * by the vendor.
+-				 */
+-				continue;
+-			}
 +	list_for_each_entry(mode, &local->modes_list, list) {
 +		int i = 0;
-+
+ 
+-			if (ieee80211_regdom == 0x10 &&
+-			    (chan->freq == 5190 || chan->freq == 5210 ||
+-			     chan->freq == 5230)) {
+-				    /* Skip MKK channels when in FCC domain. */
+-				    continue;
+-			}
 +		if (!(local->enabled_modes & (1 << mode->mode)) ||
 +		    (local->hw_modes & local->enabled_modes &
 +		     (1 << MODE_IEEE80211G) && mode->mode == MODE_IEEE80211B))
 +			continue;
-+
+ 
+-			chan->flag |= IEEE80211_CHAN_W_SCAN |
+-				IEEE80211_CHAN_W_ACTIVE_SCAN |
+-				IEEE80211_CHAN_W_IBSS;
+-			chan->power_level = r->power_level;
+-			chan->antenna_max = r->antenna_max;
+-
+-			if (ieee80211_regdom == 64 &&
+-			    (chan->freq == 5170 || chan->freq == 5190 ||
+-			     chan->freq == 5210 || chan->freq == 5230)) {
+-				/*
+-				 * New regulatory rules in Japan have backwards
+-				 * compatibility with old channels in 5.15-5.25
+-				 * GHz band, but the station is not allowed to
+-				 * use active scan on these old channels.
+-				 */
+-				chan->flag &= ~IEEE80211_CHAN_W_ACTIVE_SCAN;
+-			}
 +		while (i < mode->num_channels && c < IW_MAX_FREQUENCIES) {
 +			struct ieee80211_channel *chan = &mode->channels[i];
-+
+ 
+-			if (ieee80211_regdom == 64 &&
+-			    (chan->freq == 5260 || chan->freq == 5280 ||
+-			     chan->freq == 5300 || chan->freq == 5320)) {
+-				/*
+-				 * IBSS is not allowed on 5.25-5.35 GHz band
+-				 * due to radar detection requirements.
+-				 */
+-				chan->flag &= ~IEEE80211_CHAN_W_IBSS;
 +			if (chan->flag & IEEE80211_CHAN_W_SCAN) {
 +				range->freq[c].i = chan->chan;
 +				range->freq[c].m = chan->freq * 100000;
 +				range->freq[c].e = 1;
 +				c++;
-+			}
+ 			}
+-
+-			break;
 +			i++;
-+		}
-+	}
+ 		}
+ 	}
+-}
+-
+-
+-static int ieee80211_unmask_channels(struct net_device *dev)
+-{
+-	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+-	struct ieee80211_hw_mode *mode;
+-	int c;
+-
+-	list_for_each_entry(mode, &local->modes_list, list) {
+-		for (c = 0; c < mode->num_channels; c++) {
+-			ieee80211_unmask_channel(dev, mode->mode,
+-						 &mode->channels[c]);
+-		}
+-	}
+-	return 0;
+-}
 +	range->num_channels = c;
 +	range->num_frequency = c;
-+
- 	IW_EVENT_CAPA_SET_KERNEL(range->event_capa);
- 	IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWTHRSPY);
- 	IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP);
-@@ -838,6 +863,67 @@ static int ieee80211_ioctl_giwscan(struc
+ 
++	IW_EVENT_CAPA_SET_KERNEL(range->event_capa);
++	IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWTHRSPY);
++	IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP);
++	IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN);
+ 
+-int ieee80211_init_client(struct net_device *dev)
+-{
+-	if (ieee80211_regdom == 0x40)
+-		channel_range = ieee80211_mkk_channels;
+-	ieee80211_unmask_channels(dev);
+ 	return 0;
+ }
+ 
+@@ -838,6 +730,67 @@ static int ieee80211_ioctl_giwscan(struc
  }
  
  
@@ -256,7 +478,7 @@
  static int ieee80211_ioctl_siwrts(struct net_device *dev,
  				  struct iw_request_info *info,
  				  struct iw_param *rts, char *extra)
-@@ -970,118 +1056,6 @@ static int ieee80211_ioctl_giwretry(stru
+@@ -970,118 +923,6 @@ static int ieee80211_ioctl_giwretry(stru
  	return 0;
  }
  
@@ -375,7 +597,7 @@
  static void ieee80211_key_enable_hwaccel(struct ieee80211_local *local,
  					 struct ieee80211_key *key)
  {
-@@ -1205,24 +1179,11 @@ static int ieee80211_ioctl_prism2_param(
+@@ -1205,24 +1046,11 @@ static int ieee80211_ioctl_prism2_param(
  			sdata->ieee802_1x = value;
  		break;
  
@@ -404,7 +626,7 @@
  		break;
  
  	case PRISM2_PARAM_PREAMBLE:
-@@ -1251,10 +1212,6 @@ static int ieee80211_ioctl_prism2_param(
+@@ -1251,10 +1079,6 @@ static int ieee80211_ioctl_prism2_param(
  		local->next_mode = value;
  		break;
  
@@ -415,7 +637,7 @@
  	case PRISM2_PARAM_RADIO_ENABLED:
  		ret = ieee80211_ioctl_set_radio_enabled(dev, value);
  		break;
-@@ -1269,22 +1226,6 @@ static int ieee80211_ioctl_prism2_param(
+@@ -1269,22 +1093,6 @@ static int ieee80211_ioctl_prism2_param(
  		local->sta_antenna_sel = value;
  		break;
  
@@ -438,7 +660,7 @@
  	case PRISM2_PARAM_TX_POWER_REDUCTION:
  		if (value < 0)
  			ret = -EINVAL;
-@@ -1364,20 +1305,8 @@ static int ieee80211_ioctl_get_prism2_pa
+@@ -1364,20 +1172,8 @@ static int ieee80211_ioctl_get_prism2_pa
  		*param = sdata->ieee802_1x;
  		break;
  
@@ -460,7 +682,7 @@
  		break;
  
  	case PRISM2_PARAM_PREAMBLE:
-@@ -1403,14 +1332,6 @@ static int ieee80211_ioctl_get_prism2_pa
+@@ -1403,14 +1199,6 @@ static int ieee80211_ioctl_get_prism2_pa
  		*param = local->sta_antenna_sel;
  		break;
  
@@ -475,7 +697,7 @@
  	case PRISM2_PARAM_TX_POWER_REDUCTION:
  		*param = local->hw.conf.tx_power_reduction;
  		break;
-@@ -1778,8 +1699,8 @@ static const iw_handler ieee80211_handle
+@@ -1778,8 +1566,8 @@ static const iw_handler ieee80211_handle
  	(iw_handler) NULL,				/* SIOCGIWNICKN */
  	(iw_handler) NULL,				/* -- hole -- */
  	(iw_handler) NULL,				/* -- hole -- */
@@ -486,8 +708,194 @@
  	(iw_handler) ieee80211_ioctl_siwrts,		/* SIOCSIWRTS */
  	(iw_handler) ieee80211_ioctl_giwrts,		/* SIOCGIWRTS */
  	(iw_handler) ieee80211_ioctl_siwfrag,		/* SIOCSIWFRAG */
---- linux-2.6.22.noarch/net/mac80211/hostapd_ioctl.h.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/net/mac80211/hostapd_ioctl.h	2007-07-17 15:47:36.000000000 -0400
+--- linux-2.6.22.noarch/net/mac80211/ieee80211_rate.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/mac80211/ieee80211_rate.c	2007-07-20 17:06:56.000000000 -0400
+@@ -24,11 +24,10 @@ int ieee80211_rate_control_register(stru
+ {
+ 	struct rate_control_alg *alg;
+ 
+-	alg = kmalloc(sizeof(*alg), GFP_KERNEL);
++	alg = kzalloc(sizeof(*alg), GFP_KERNEL);
+ 	if (alg == NULL) {
+ 		return -ENOMEM;
+ 	}
+-	memset(alg, 0, sizeof(*alg));
+ 	alg->ops = ops;
+ 
+ 	mutex_lock(&rate_ctrl_mutex);
+--- linux-2.6.22.noarch/net/mac80211/Makefile.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/mac80211/Makefile	2007-07-20 17:06:56.000000000 -0400
+@@ -13,6 +13,7 @@ mac80211-objs := \
+ 	ieee80211_iface.o \
+ 	ieee80211_rate.o \
+ 	michael.o \
++	regdomain.o \
+ 	tkip.o \
+ 	aes_ccm.o \
+ 	wme.o \
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/net/mac80211/regdomain.c	2007-07-20 17:06:56.000000000 -0400
+@@ -0,0 +1,158 @@
++/*
++ * Copyright 2002-2005, Instant802 Networks, Inc.
++ * Copyright 2005-2006, Devicescape Software, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++/*
++ * This regulatory domain control implementation is known to be incomplete
++ * and confusing. mac80211 regulatory domain control will be significantly
++ * reworked in the not-too-distant future.
++ *
++ * For now, drivers wishing to control which channels are and aren't available
++ * are advised as follows:
++ *  - set the IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED flag
++ *  - continue to include *ALL* possible channels in the modes registered
++ *    through ieee80211_register_hwmode()
++ *  - for each allowable ieee80211_channel structure registered in the above
++ *    call, set the flag member to some meaningful value such as
++ *    IEEE80211_CHAN_W_SCAN | IEEE80211_CHAN_W_ACTIVE_SCAN |
++ *    IEEE80211_CHAN_W_IBSS.
++ *  - leave flag as 0 for non-allowable channels
++ *
++ * The usual implementation is for a driver to read a device EEPROM to
++ * determine which regulatory domain it should be operating under, then
++ * looking up the allowable channels in a driver-local table, then performing
++ * the above.
++ */
++
++#include <linux/module.h>
++#include <linux/netdevice.h>
++#include <net/mac80211.h>
++#include "ieee80211_i.h"
++
++static int ieee80211_regdom = 0x10; /* FCC */
++module_param(ieee80211_regdom, int, 0444);
++MODULE_PARM_DESC(ieee80211_regdom, "IEEE 802.11 regulatory domain; 64=MKK");
++
++/*
++ * If firmware is upgraded by the vendor, additional channels can be used based
++ * on the new Japanese regulatory rules. This is indicated by setting
++ * ieee80211_japan_5ghz module parameter to one when loading the 80211 kernel
++ * module.
++ */
++static int ieee80211_japan_5ghz /* = 0 */;
++module_param(ieee80211_japan_5ghz, int, 0444);
++MODULE_PARM_DESC(ieee80211_japan_5ghz, "Vendor-updated firmware for 5 GHz");
++
++
++struct ieee80211_channel_range {
++	short start_freq;
++	short end_freq;
++	unsigned char power_level;
++	unsigned char antenna_max;
++};
++
++static const struct ieee80211_channel_range ieee80211_fcc_channels[] = {
++	{ 2412, 2462, 27, 6 } /* IEEE 802.11b/g, channels 1..11 */,
++	{ 5180, 5240, 17, 6 } /* IEEE 802.11a, channels 36..48 */,
++	{ 5260, 5320, 23, 6 } /* IEEE 802.11a, channels 52..64 */,
++	{ 5745, 5825, 30, 6 } /* IEEE 802.11a, channels 149..165, outdoor */,
++	{ 0 }
++};
++
++static const struct ieee80211_channel_range ieee80211_mkk_channels[] = {
++	{ 2412, 2472, 20, 6 } /* IEEE 802.11b/g, channels 1..13 */,
++	{ 5170, 5240, 20, 6 } /* IEEE 802.11a, channels 34..48 */,
++	{ 5260, 5320, 20, 6 } /* IEEE 802.11a, channels 52..64 */,
++	{ 0 }
++};
++
++
++static const struct ieee80211_channel_range *channel_range =
++	ieee80211_fcc_channels;
++
++
++static void ieee80211_unmask_channel(int mode, struct ieee80211_channel *chan)
++{
++	int i;
++
++	chan->flag = 0;
++
++	if (ieee80211_regdom == 64 &&
++	    (mode == MODE_ATHEROS_TURBO || mode == MODE_ATHEROS_TURBOG)) {
++		/* Do not allow Turbo modes in Japan. */
++		return;
++	}
++
++	for (i = 0; channel_range[i].start_freq; i++) {
++		const struct ieee80211_channel_range *r = &channel_range[i];
++		if (r->start_freq <= chan->freq && r->end_freq >= chan->freq) {
++			if (ieee80211_regdom == 64 && !ieee80211_japan_5ghz &&
++			    chan->freq >= 5260 && chan->freq <= 5320) {
++				/*
++				 * Skip new channels in Japan since the
++				 * firmware was not marked having been upgraded
++				 * by the vendor.
++				 */
++				continue;
++			}
++
++			if (ieee80211_regdom == 0x10 &&
++			    (chan->freq == 5190 || chan->freq == 5210 ||
++			     chan->freq == 5230)) {
++				    /* Skip MKK channels when in FCC domain. */
++				    continue;
++			}
++
++			chan->flag |= IEEE80211_CHAN_W_SCAN |
++				IEEE80211_CHAN_W_ACTIVE_SCAN |
++				IEEE80211_CHAN_W_IBSS;
++			chan->power_level = r->power_level;
++			chan->antenna_max = r->antenna_max;
++
++			if (ieee80211_regdom == 64 &&
++			    (chan->freq == 5170 || chan->freq == 5190 ||
++			     chan->freq == 5210 || chan->freq == 5230)) {
++				/*
++				 * New regulatory rules in Japan have backwards
++				 * compatibility with old channels in 5.15-5.25
++				 * GHz band, but the station is not allowed to
++				 * use active scan on these old channels.
++				 */
++				chan->flag &= ~IEEE80211_CHAN_W_ACTIVE_SCAN;
++			}
++
++			if (ieee80211_regdom == 64 &&
++			    (chan->freq == 5260 || chan->freq == 5280 ||
++			     chan->freq == 5300 || chan->freq == 5320)) {
++				/*
++				 * IBSS is not allowed on 5.25-5.35 GHz band
++				 * due to radar detection requirements.
++				 */
++				chan->flag &= ~IEEE80211_CHAN_W_IBSS;
++			}
++
++			break;
++		}
++	}
++}
++
++
++void ieee80211_set_default_regdomain(struct ieee80211_hw_mode *mode)
++{
++	int c;
++	for (c = 0; c < mode->num_channels; c++)
++		ieee80211_unmask_channel(mode->mode, &mode->channels[c]);
++}
++
++
++void ieee80211_regdomain_init(void)
++{
++	if (ieee80211_regdom == 0x40)
++		channel_range = ieee80211_mkk_channels;
++}
++
+--- linux-2.6.22.noarch/net/mac80211/hostapd_ioctl.h.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/mac80211/hostapd_ioctl.h	2007-07-20 17:06:56.000000000 -0400
 @@ -26,24 +26,16 @@
   * mess shall be deleted completely. */
  enum {
@@ -513,8 +921,8 @@
  	PRISM2_PARAM_TX_POWER_REDUCTION = 1022,
  	PRISM2_PARAM_KEY_TX_RX_THRESHOLD = 1024,
  	PRISM2_PARAM_DEFAULT_WEP_ONLY = 1026,
---- linux-2.6.22.noarch/net/mac80211/ieee80211_common.h.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/net/mac80211/ieee80211_common.h	2007-07-17 15:47:36.000000000 -0400
+--- linux-2.6.22.noarch/net/mac80211/ieee80211_common.h.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/mac80211/ieee80211_common.h	2007-07-20 17:06:56.000000000 -0400
 @@ -47,21 +47,16 @@ enum ieee80211_msg_type {
  	ieee80211_msg_normal = 0,
  	ieee80211_msg_tx_callback_ack = 1,
@@ -539,8 +947,8 @@
  struct ieee80211_msg_key_notification {
  	int tx_rx_count;
  	char ifname[IFNAMSIZ];
---- linux-2.6.22.noarch/net/mac80211/ieee80211.c.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/net/mac80211/ieee80211.c	2007-07-17 15:47:36.000000000 -0400
+--- linux-2.6.22.noarch/net/mac80211/ieee80211.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/mac80211/ieee80211.c	2007-07-20 17:06:56.000000000 -0400
 @@ -24,6 +24,7 @@
  #include <linux/compiler.h>
  #include <linux/bitmap.h>
@@ -1198,14 +1606,31 @@
 +	 * and we need some headroom for passing the frame to monitor
 +	 * interfaces, but never both at the same time.
 +	 */
-+	local->tx_headroom = max(local->hw.extra_tx_headroom,
-+				 sizeof(struct ieee80211_tx_status_rtap_hdr));
++	local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom,
++				   sizeof(struct ieee80211_tx_status_rtap_hdr));
 +
  	debugfs_hw_add(local);
  
  	local->hw.conf.beacon_int = 1000;
---- linux-2.6.22.noarch/net/mac80211/rc80211_simple.c.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/net/mac80211/rc80211_simple.c	2007-07-17 15:47:36.000000000 -0400
+@@ -4818,7 +5095,7 @@ int ieee80211_register_hwmode(struct iee
+ 	}
+ 
+ 	if (!(hw->flags & IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED))
+-		ieee80211_init_client(local->mdev);
++		ieee80211_set_default_regdomain(mode);
+ 
+ 	return 0;
+ }
+@@ -4969,6 +5246,7 @@ static int __init ieee80211_init(void)
+ 	}
+ 
+ 	ieee80211_debugfs_netdev_init();
++	ieee80211_regdomain_init();
+ 
+ 	return 0;
+ }
+--- linux-2.6.22.noarch/net/mac80211/rc80211_simple.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/mac80211/rc80211_simple.c	2007-07-20 17:06:56.000000000 -0400
 @@ -187,9 +187,13 @@ static void rate_control_simple_tx_statu
  		}
  #endif
@@ -1244,8 +1669,8 @@
  	}
  }
  
---- linux-2.6.22.noarch/net/mac80211/ieee80211_i.h.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/net/mac80211/ieee80211_i.h	2007-07-17 15:47:36.000000000 -0400
+--- linux-2.6.22.noarch/net/mac80211/ieee80211_i.h.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/mac80211/ieee80211_i.h	2007-07-20 17:06:56.000000000 -0400
 @@ -99,6 +99,12 @@ struct ieee80211_sta_bss {
  	int probe_resp;
  	unsigned long last_update;
@@ -1309,9 +1734,36 @@
  void ieee80211_if_setup(struct net_device *dev);
  void ieee80211_if_mgmt_setup(struct net_device *dev);
  int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
---- linux-2.6.22.noarch/net/mac80211/ieee80211_sta.c.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/net/mac80211/ieee80211_sta.c	2007-07-17 15:47:36.000000000 -0400
-@@ -76,33 +76,36 @@ static int ieee80211_sta_config_auth(str
+@@ -753,7 +759,6 @@ void ieee80211_update_default_wep_only(s
+ /* ieee80211_ioctl.c */
+ int ieee80211_set_compression(struct ieee80211_local *local,
+ 			      struct net_device *dev, struct sta_info *sta);
+-int ieee80211_init_client(struct net_device *dev);
+ int ieee80211_set_channel(struct ieee80211_local *local, int channel, int freq);
+ /* ieee80211_sta.c */
+ void ieee80211_sta_timer(unsigned long data);
+@@ -792,6 +797,10 @@ void ieee80211_if_sdata_init(struct ieee
+ int ieee80211_if_add_mgmt(struct ieee80211_local *local);
+ void ieee80211_if_del_mgmt(struct ieee80211_local *local);
+ 
++/* regdomain.c */
++void ieee80211_regdomain_init(void);
++void ieee80211_set_default_regdomain(struct ieee80211_hw_mode *mode);
++
+ /* for wiphy privid */
+ extern void *mac80211_wiphy_privid;
+ 
+--- linux-2.6.22.noarch/net/mac80211/ieee80211_sta.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/mac80211/ieee80211_sta.c	2007-07-20 17:06:56.000000000 -0400
+@@ -25,7 +25,6 @@
+ #include <linux/wireless.h>
+ #include <linux/random.h>
+ #include <linux/etherdevice.h>
+-#include <linux/rtnetlink.h>
+ #include <net/iw_handler.h>
+ #include <asm/types.h>
+ 
+@@ -76,33 +75,36 @@ static int ieee80211_sta_config_auth(str
  
  /* Parsed Information Elements */
  struct ieee802_11_elems {
@@ -1361,7 +1813,7 @@
  	u8 wmm_param_len;
  };
  
-@@ -311,6 +314,25 @@ static void ieee80211_sta_wmm_params(str
+@@ -311,6 +313,25 @@ static void ieee80211_sta_wmm_params(str
  }
  
  
@@ -1387,7 +1839,7 @@
  static void ieee80211_sta_send_associnfo(struct net_device *dev,
  					 struct ieee80211_if_sta *ifsta)
  {
-@@ -366,6 +388,7 @@ static void ieee80211_set_associated(str
+@@ -366,6 +387,7 @@ static void ieee80211_set_associated(str
  				     struct ieee80211_if_sta *ifsta, int assoc)
  {
  	union iwreq_data wrqu;
@@ -1395,7 +1847,7 @@
  
  	if (ifsta->associated == assoc)
  		return;
-@@ -374,9 +397,18 @@ static void ieee80211_set_associated(str
+@@ -374,9 +396,18 @@ static void ieee80211_set_associated(str
  
  	if (assoc) {
  		struct ieee80211_sub_if_data *sdata;
@@ -1414,7 +1866,7 @@
  		netif_carrier_on(dev);
  		ifsta->prev_bssid_set = 1;
  		memcpy(ifsta->prev_bssid, sdata->u.sta.bssid, ETH_ALEN);
-@@ -384,6 +416,7 @@ static void ieee80211_set_associated(str
+@@ -384,6 +415,7 @@ static void ieee80211_set_associated(str
  		ieee80211_sta_send_associnfo(dev, ifsta);
  	} else {
  		netif_carrier_off(dev);
@@ -1422,7 +1874,7 @@
  		memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
  	}
  	wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-@@ -1174,6 +1207,18 @@ static void ieee80211_rx_mgmt_assoc_resp
+@@ -1174,6 +1206,18 @@ static void ieee80211_rx_mgmt_assoc_resp
  		return;
  	}
  
@@ -1441,7 +1893,19 @@
  	printk(KERN_DEBUG "%s: associated\n", dev->name);
  	ifsta->aid = aid;
  	ifsta->ap_capab = capab_info;
-@@ -1496,6 +1541,12 @@ static void ieee80211_rx_bss_info(struct
+@@ -1282,10 +1326,9 @@ ieee80211_rx_bss_add(struct net_device *
+ 	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ 	struct ieee80211_sta_bss *bss;
+ 
+-	bss = kmalloc(sizeof(*bss), GFP_ATOMIC);
++	bss = kzalloc(sizeof(*bss), GFP_ATOMIC);
+ 	if (!bss)
+ 		return NULL;
+-	memset(bss, 0, sizeof(*bss));
+ 	atomic_inc(&bss->users);
+ 	atomic_inc(&bss->users);
+ 	memcpy(bss->bssid, bssid, ETH_ALEN);
+@@ -1496,6 +1539,12 @@ static void ieee80211_rx_bss_info(struct
  		return;
  	}
  
@@ -1454,7 +1918,7 @@
  	bss->beacon_int = le16_to_cpu(mgmt->u.beacon.beacon_int);
  	bss->capability = le16_to_cpu(mgmt->u.beacon.capab_info);
  	if (elems.ssid && elems.ssid_len <= IEEE80211_MAX_SSID_LEN) {
-@@ -1611,10 +1662,8 @@ static void ieee80211_rx_mgmt_beacon(str
+@@ -1611,10 +1660,8 @@ static void ieee80211_rx_mgmt_beacon(str
  				     size_t len,
  				     struct ieee80211_rx_status *rx_status)
  {
@@ -1465,7 +1929,7 @@
  	size_t baselen;
  	struct ieee802_11_elems elems;
  
-@@ -1638,23 +1687,8 @@ static void ieee80211_rx_mgmt_beacon(str
+@@ -1638,23 +1685,8 @@ static void ieee80211_rx_mgmt_beacon(str
  				   &elems) == ParseFailed)
  		return;
  
@@ -1491,8 +1955,37 @@
  
  	if (elems.wmm_param && ifsta->wmm_enabled) {
  		ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param,
---- linux-2.6.22.noarch/net/mac80211/debugfs_netdev.c.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/net/mac80211/debugfs_netdev.c	2007-07-17 15:47:36.000000000 -0400
+@@ -2073,12 +2105,9 @@ static int ieee80211_sta_config_auth(str
+ 	struct ieee80211_sta_bss *bss, *selected = NULL;
+ 	int top_rssi = 0, freq;
+ 
+-	rtnl_lock();
+-
+ 	if (!ifsta->auto_channel_sel && !ifsta->auto_bssid_sel &&
+ 	    !ifsta->auto_ssid_sel) {
+ 		ifsta->state = IEEE80211_AUTHENTICATE;
+-		rtnl_unlock();
+ 		ieee80211_sta_reset_auth(dev, ifsta);
+ 		return 0;
+ 	}
+@@ -2121,7 +2150,6 @@ static int ieee80211_sta_config_auth(str
+ 		ieee80211_sta_set_bssid(dev, selected->bssid);
+ 		ieee80211_rx_bss_put(dev, selected);
+ 		ifsta->state = IEEE80211_AUTHENTICATE;
+-		rtnl_unlock();
+ 		ieee80211_sta_reset_auth(dev, ifsta);
+ 		return 0;
+ 	} else {
+@@ -2132,7 +2160,6 @@ static int ieee80211_sta_config_auth(str
+ 		} else
+ 			ifsta->state = IEEE80211_DISABLED;
+ 	}
+-	rtnl_unlock();
+ 	return -1;
+ }
+ 
+--- linux-2.6.22.noarch/net/mac80211/debugfs_netdev.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/net/mac80211/debugfs_netdev.c	2007-07-20 17:06:56.000000000 -0400
 @@ -118,7 +118,7 @@ static ssize_t ieee80211_if_fmt_flags(
  			 sdata->u.sta.authenticated ? "AUTH\n" : "",
  			 sdata->u.sta.associated ? "ASSOC\n" : "",
@@ -1502,16 +1995,40 @@
  }
  __IEEE80211_IF_FILE(flags);
  
+@@ -397,6 +397,8 @@ static int netdev_notify(struct notifier
+ 			 void *ndev)
+ {
+ 	struct net_device *dev = ndev;
++	struct dentry *dir;
++	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ 	char buf[10+IFNAMSIZ];
+ 
+ 	if (state != NETDEV_CHANGENAME)
+@@ -408,10 +410,11 @@ static int netdev_notify(struct notifier
+ 	if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid)
+ 		return 0;
+ 
+-	/* TODO
+ 	sprintf(buf, "netdev:%s", dev->name);
+-	debugfs_rename(IEEE80211_DEV_TO_SUB_IF(dev)->debugfsdir, buf);
+-	*/
++	dir = sdata->debugfsdir;
++	if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
++		printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
++		       "dir to %s\n", buf);
+ 
+ 	return 0;
+ }
 --- linux-2.6.22.noarch/net/wireless/Makefile.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/net/wireless/Makefile	2007-07-17 15:47:36.000000000 -0400
++++ linux-2.6.22.noarch/net/wireless/Makefile	2007-07-20 17:07:18.000000000 -0400
 @@ -1,4 +1,4 @@
  obj-$(CONFIG_WIRELESS_EXT) += wext.o
  obj-$(CONFIG_CFG80211) += cfg80211.o
  
 -cfg80211-y += core.o sysfs.o
 +cfg80211-y += core.o sysfs.o radiotap.o
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/net/wireless/radiotap.c	2007-07-17 15:47:36.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/net/wireless/radiotap.c	2007-07-20 17:07:18.000000000 -0400
 @@ -0,0 +1,257 @@
 +/*
 + * Radiotap parser
@@ -1770,8 +2287,8 @@
 +	return -ENOENT;
 +}
 +EXPORT_SYMBOL(ieee80211_radiotap_iterator_next);
---- linux-2.6.22.noarch/drivers/net/wireless/airo.c.orig	2007-07-17 15:51:33.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/airo.c	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/airo.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/airo.c	2007-07-20 17:06:56.000000000 -0400
 @@ -52,6 +52,8 @@
  
  #include "airo.h"
@@ -2387,8 +2904,8 @@
  			return -EIO;
  		return 0;
  
---- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_chip.c.orig	2007-07-17 15:51:34.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_chip.c	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_chip.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_chip.c	2007-07-20 17:06:56.000000000 -0400
 @@ -49,8 +49,9 @@ void zd_chip_clear(struct zd_chip *chip)
  	ZD_MEMCLEAR(chip, sizeof(*chip));
  }
@@ -2545,7 +3062,13 @@
  	r = read_cal_int_tables(chip);
  	if (r)
  		goto out;
-@@ -1256,7 +1198,7 @@ static int update_channel_integration_an
+@@ -1253,10 +1195,13 @@ static int update_channel_integration_an
+ {
+ 	int r;
+ 
++	if (!zd_rf_should_update_pwr_int(&chip->rf))
++		return 0;
++
  	r = update_pwr_int(chip, channel);
  	if (r)
  		return r;
@@ -2554,8 +3077,17 @@
  		static const struct zd_ioreq16 ioreqs[] = {
  			{ CR69, 0x28 },
  			{},
---- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/Makefile.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/Makefile	2007-07-17 15:48:12.000000000 -0400
+@@ -1283,7 +1228,7 @@ static int patch_cck_gain(struct zd_chip
+ 	int r;
+ 	u32 value;
+ 
+-	if (!chip->patch_cck_gain)
++	if (!chip->patch_cck_gain || !zd_rf_should_patch_cck_gain(&chip->rf))
+ 		return 0;
+ 
+ 	ZD_ASSERT(mutex_is_locked(&chip->mutex));
+--- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/Makefile.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/Makefile	2007-07-20 17:06:56.000000000 -0400
 @@ -3,7 +3,7 @@ obj-$(CONFIG_ZD1211RW) += zd1211rw.o
  zd1211rw-objs := zd_chip.o zd_ieee80211.o \
  		zd_mac.o zd_netdev.o \
@@ -2565,8 +3097,8 @@
  		zd_rf.o zd_usb.o zd_util.o
  
  ifeq ($(CONFIG_ZD1211RW_DEBUG),y)
---- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf.h.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf.h	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf.h.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf.h	2007-07-20 17:06:56.000000000 -0400
 @@ -26,7 +26,7 @@
  #define AL2210_RF			0x7
  #define MAXIM_NEW_RF			0x8
@@ -2576,15 +3108,60 @@
  #define RALINK_RF			0xb
  #define INTERSIL_RF			0xc
  #define RF2959_RF			0xd
-@@ -76,5 +76,6 @@ int zd_rf_generic_patch_6m(struct zd_rf 
+@@ -48,12 +48,26 @@ struct zd_rf {
+ 
+ 	u8 channel;
+ 
++	/* whether channel integration and calibration should be updated
++	 * defaults to 1 (yes) */
++	u8 update_channel_int:1;
++
++	/* whether CR47 should be patched from the EEPROM, if the appropriate
++	 * flag is set in the POD. The vendor driver suggests that this should
++	 * be done for all RF's, but a bug in their code prevents but their
++	 * HW_OverWritePhyRegFromE2P() routine from ever taking effect. */
++	u8 patch_cck_gain:1;
++
++	/* private RF driver data */
++	void *priv;
++
+ 	/* RF-specific functions */
+ 	int (*init_hw)(struct zd_rf *rf);
+ 	int (*set_channel)(struct zd_rf *rf, u8 channel);
+ 	int (*switch_radio_on)(struct zd_rf *rf);
+ 	int (*switch_radio_off)(struct zd_rf *rf);
+ 	int (*patch_6m_band_edge)(struct zd_rf *rf, u8 channel);
++	void (*clear)(struct zd_rf *rf);
+ };
+ 
+ const char *zd_rf_name(u8 type);
+@@ -71,10 +85,24 @@ int zd_switch_radio_off(struct zd_rf *rf
+ int zd_rf_patch_6m_band_edge(struct zd_rf *rf, u8 channel);
+ int zd_rf_generic_patch_6m(struct zd_rf *rf, u8 channel);
+ 
++static inline int zd_rf_should_update_pwr_int(struct zd_rf *rf)
++{
++	return rf->update_channel_int;
++}
++
++static inline int zd_rf_should_patch_cck_gain(struct zd_rf *rf)
++{
++	return rf->patch_cck_gain;
++}
++
++int zd_rf_patch_6m_band_edge(struct zd_rf *rf, u8 channel);
++int zd_rf_generic_patch_6m(struct zd_rf *rf, u8 channel);
++
+ /* Functions for individual RF chips */
+ 
  int zd_rf_init_rf2959(struct zd_rf *rf);
  int zd_rf_init_al2230(struct zd_rf *rf);
  int zd_rf_init_al7230b(struct zd_rf *rf);
 +int zd_rf_init_uw2453(struct zd_rf *rf);
  
  #endif /* _ZD_RF_H */
---- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_chip.h.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_chip.h	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_chip.h.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_chip.h	2007-07-20 17:06:56.000000000 -0400
 @@ -608,6 +608,9 @@ enum {
  #define CR_ZD1211B_TXOP			CTL_REG(0x0b20)
  #define CR_ZD1211B_RETRY_MAX		CTL_REG(0x0b28)
@@ -2638,8 +3215,8 @@
  int zd_write_mac_addr(struct zd_chip *chip, const u8 *mac_addr);
  int zd_chip_switch_radio_on(struct zd_chip *chip);
  int zd_chip_switch_radio_off(struct zd_chip *chip);
---- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_al2230.c.orig	2007-07-17 15:51:34.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_al2230.c	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_al2230.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_al2230.c	2007-07-20 17:06:56.000000000 -0400
 @@ -21,6 +21,8 @@
  #include "zd_usb.h"
  #include "zd_chip.h"
@@ -2694,8 +3271,15 @@
  		rf->init_hw = zd1211b_al2230_init_hw;
  		rf->set_channel = zd1211b_al2230_set_channel;
  		rf->switch_radio_on = zd1211b_al2230_switch_radio_on;
---- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c.orig	2007-07-17 15:51:34.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c	2007-07-17 15:49:45.000000000 -0400
+@@ -432,5 +434,6 @@ int zd_rf_init_al2230(struct zd_rf *rf)
+ 		rf->switch_radio_on = zd1211_al2230_switch_radio_on;
+ 	}
+ 	rf->patch_6m_band_edge = zd_rf_generic_patch_6m;
++	rf->patch_cck_gain = 1;
+ 	return 0;
+ }
+--- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c	2007-07-20 17:06:56.000000000 -0400
 @@ -265,7 +265,7 @@ int zd_rf_init_rf2959(struct zd_rf *rf)
  {
  	struct zd_chip *chip = zd_rf_to_chip(rf);
@@ -2705,8 +3289,8 @@
  		dev_err(zd_chip_dev(chip),
  		       "RF2959 is currently not supported for ZD1211B"
  		       " devices\n");
---- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_usb.h.orig	2007-07-17 15:51:34.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_usb.h	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_usb.h.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_usb.h	2007-07-20 17:06:56.000000000 -0400
 @@ -188,6 +188,7 @@ struct zd_usb {
  	struct zd_usb_rx rx;
  	struct zd_usb_tx tx;
@@ -2724,8 +3308,8 @@
  extern struct workqueue_struct *zd_workqueue;
  
  #endif /* _ZD_USB_H */
---- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf.c.orig	2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf.c	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf.c	2007-07-20 17:06:56.000000000 -0400
 @@ -34,7 +34,7 @@ static const char * const rfs[] = {
  	[AL2210_RF]	= "AL2210_RF",
  	[MAXIM_NEW_RF]	= "MAXIM_NEW_RF",
@@ -2735,7 +3319,22 @@
  	[RALINK_RF]	= "RALINK_RF",
  	[INTERSIL_RF]	= "INTERSIL_RF",
  	[RF2959_RF]	= "RF2959_RF",
-@@ -61,25 +61,24 @@ void zd_rf_clear(struct zd_rf *rf)
+@@ -52,34 +52,39 @@ const char *zd_rf_name(u8 type)
+ void zd_rf_init(struct zd_rf *rf)
+ {
+ 	memset(rf, 0, sizeof(*rf));
++
++	/* default to update channel integration, as almost all RF's do want
++	 * this */
++	rf->update_channel_int = 1;
+ }
+ 
+ void zd_rf_clear(struct zd_rf *rf)
+ {
++	if (rf->clear)
++		rf->clear(rf);
+ 	ZD_MEMCLEAR(rf, sizeof(*rf));
+ }
  
  int zd_rf_init_hw(struct zd_rf *rf, u8 type)
  {
@@ -2767,7 +3366,7 @@
  		break;
  	default:
  		dev_err(zd_chip_dev(chip),
-@@ -88,6 +87,9 @@ int zd_rf_init_hw(struct zd_rf *rf, u8 t
+@@ -88,6 +93,9 @@ int zd_rf_init_hw(struct zd_rf *rf, u8 t
  		return -ENODEV;
  	}
  
@@ -2777,8 +3376,8 @@
  	rf->type = type;
  
  	r = zd_chip_lock_phy_regs(chip);
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c	2007-07-17 15:49:45.000000000 -0400
+--- /dev/null	2007-07-20 08:31:48.355055592 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c	2007-07-20 17:06:56.000000000 -0400
 @@ -0,0 +1,534 @@
 +/* zd_rf_uw2453.c: Functions for the UW2453 RF controller
 + *
@@ -3314,8 +3913,8 @@
 +	return 0;
 +}
 +
---- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_mac.h.orig	2007-07-17 15:51:34.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_mac.h	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_mac.h.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_mac.h	2007-07-20 17:06:56.000000000 -0400
 @@ -189,7 +189,8 @@ int zd_mac_init(struct zd_mac *mac,
  		struct usb_interface *intf);
  void zd_mac_clear(struct zd_mac *mac);
@@ -3326,8 +3925,8 @@
  
  int zd_mac_open(struct net_device *netdev);
  int zd_mac_stop(struct net_device *netdev);
---- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c.orig	2007-07-17 15:51:34.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_rf_al7230b.c	2007-07-20 17:06:56.000000000 -0400
 @@ -473,7 +473,7 @@ int zd_rf_init_al7230b(struct zd_rf *rf)
  {
  	struct zd_chip *chip = zd_rf_to_chip(rf);
@@ -3337,17 +3936,51 @@
  		rf->init_hw = zd1211b_al7230b_init_hw;
  		rf->switch_radio_on = zd1211b_al7230b_switch_radio_on;
  		rf->set_channel = zd1211b_al7230b_set_channel;
---- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_usb.c.orig	2007-07-17 15:51:34.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_usb.c	2007-07-17 15:49:45.000000000 -0400
-@@ -70,6 +70,7 @@ static struct usb_device_id usb_ids[] = 
+@@ -483,6 +483,7 @@ int zd_rf_init_al7230b(struct zd_rf *rf)
+ 		rf->switch_radio_on = zd1211_al7230b_switch_radio_on;
+ 		rf->set_channel = zd1211_al7230b_set_channel;
+ 		rf->patch_6m_band_edge = zd_rf_generic_patch_6m;
++		rf->patch_cck_gain = 1;
+ 	}
+ 
+ 	rf->switch_radio_off = al7230b_switch_radio_off;
+--- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_usb.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_usb.c	2007-07-20 17:06:56.000000000 -0400
+@@ -15,7 +15,6 @@
+  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+  */
+ 
+-#include <asm/unaligned.h>
+ #include <linux/kernel.h>
+ #include <linux/init.h>
+ #include <linux/module.h>
+@@ -26,6 +25,7 @@
+ #include <linux/usb.h>
+ #include <linux/workqueue.h>
+ #include <net/ieee80211.h>
++#include <asm/unaligned.h>
+ 
+ #include "zd_def.h"
+ #include "zd_netdev.h"
+@@ -54,6 +54,7 @@ static struct usb_device_id usb_ids[] = 
+ 	{ USB_DEVICE(0x0586, 0x3401), .driver_info = DEVICE_ZD1211 },
+ 	{ USB_DEVICE(0x14ea, 0xab13), .driver_info = DEVICE_ZD1211 },
+ 	{ USB_DEVICE(0x13b1, 0x001e), .driver_info = DEVICE_ZD1211 },
++	{ USB_DEVICE(0x0586, 0x3407), .driver_info = DEVICE_ZD1211 },
+ 	/* ZD1211B */
+ 	{ USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B },
+ 	{ USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B },
+@@ -70,6 +71,9 @@ static struct usb_device_id usb_ids[] = 
  	{ USB_DEVICE(0x0586, 0x3412), .driver_info = DEVICE_ZD1211B },
  	{ USB_DEVICE(0x0586, 0x3413), .driver_info = DEVICE_ZD1211B },
  	{ USB_DEVICE(0x0053, 0x5301), .driver_info = DEVICE_ZD1211B },
 +	{ USB_DEVICE(0x0411, 0x00da), .driver_info = DEVICE_ZD1211B },
++	{ USB_DEVICE(0x2019, 0x5303), .driver_info = DEVICE_ZD1211B },
++	{ USB_DEVICE(0x129b, 0x1667), .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 },
-@@ -194,26 +195,27 @@ static u16 get_word(const void *data, u1
+@@ -194,26 +198,27 @@ static u16 get_word(const void *data, u1
  	return le16_to_cpu(p[offset]);
  }
  
@@ -3379,7 +4012,7 @@
  		&udev->dev);
  	if (r)
  		goto error;
-@@ -236,11 +238,12 @@ error:
+@@ -236,11 +241,12 @@ error:
  	return r;
  }
  
@@ -3393,7 +4026,7 @@
  	const struct firmware *ub_fw = NULL;
  	const struct firmware *uph_fw = NULL;
  	char fw_name[128];
-@@ -248,7 +251,7 @@ static int upload_firmware(struct usb_de
+@@ -248,7 +254,7 @@ static int upload_firmware(struct usb_de
  	bcdDevice = get_bcdDevice(udev);
  
  	r = request_fw_file(&ub_fw,
@@ -3402,7 +4035,7 @@
  		&udev->dev);
  	if (r)
  		goto error;
-@@ -263,7 +266,7 @@ static int upload_firmware(struct usb_de
+@@ -263,7 +269,7 @@ static int upload_firmware(struct usb_de
  			dev_warn(&udev->dev, "device has old bootcode, please "
  				"report success or failure\n");
  
@@ -3411,7 +4044,7 @@
  		if (r)
  			goto error;
  	} else {
-@@ -274,7 +277,7 @@ static int upload_firmware(struct usb_de
+@@ -274,7 +280,7 @@ static int upload_firmware(struct usb_de
  
  
  	r = request_fw_file(&uph_fw,
@@ -3420,7 +4053,7 @@
  		&udev->dev);
  	if (r)
  		goto error;
-@@ -293,6 +296,30 @@ error:
+@@ -293,6 +299,30 @@ error:
  	return r;
  }
  
@@ -3451,7 +4084,7 @@
  #define urb_dev(urb) (&(urb)->dev->dev)
  
  static inline void handle_regs_int(struct urb *urb)
-@@ -919,9 +946,42 @@ static int eject_installer(struct usb_in
+@@ -919,9 +949,42 @@ static int eject_installer(struct usb_in
  	return 0;
  }
  
@@ -3494,7 +4127,7 @@
  	struct usb_device *udev = interface_to_usbdev(intf);
  	struct net_device *netdev = NULL;
  
-@@ -949,26 +1009,10 @@ static int probe(struct usb_interface *i
+@@ -949,26 +1012,10 @@ static int probe(struct usb_interface *i
  		goto error;
  	}
  
@@ -3524,8 +4157,8 @@
  	if (r) {
  		dev_dbg_f(&intf->dev,
  		         "couldn't initialize mac. Error number %d\n", r);
---- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_mac.c.orig	2007-07-17 15:51:34.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_mac.c	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_mac.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/zd1211rw/zd_mac.c	2007-07-20 17:06:56.000000000 -0400
 @@ -86,38 +86,46 @@ out:
  	return r;
  }
@@ -3638,8 +4271,8 @@
  			packet_length - frag_len : packet_length);
  
  	/*
---- linux-2.6.22.noarch/drivers/net/wireless/libertas/wext.c.orig	2007-07-17 15:51:34.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/libertas/wext.c	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/libertas/wext.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/libertas/wext.c	2007-07-20 17:06:56.000000000 -0400
 @@ -1719,9 +1719,6 @@ static int wlan_set_encodeext(struct net
  			pkey->type = KEY_TYPE_ID_TKIP;
  		} else if (alg == IW_ENCODE_ALG_CCMP) {
@@ -3650,8 +4283,8 @@
  		}
  
  		/* If WPA isn't enabled yet, do that now */
---- linux-2.6.22.noarch/drivers/net/wireless/libertas/rx.c.orig	2007-07-17 15:51:33.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/libertas/rx.c	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/libertas/rx.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/libertas/rx.c	2007-07-20 17:06:56.000000000 -0400
 @@ -439,7 +439,6 @@ static int process_rxed_802_11_packet(wl
  	ret = 0;
  
@@ -3660,8 +4293,18 @@
  	lbs_deb_leave_args(LBS_DEB_RX, "ret %d", ret);
  	return ret;
  }
---- linux-2.6.22.noarch/drivers/net/wireless/libertas/cmd.c.orig	2007-07-17 15:51:35.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/libertas/cmd.c	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/libertas/main.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/libertas/main.c	2007-07-20 17:06:56.000000000 -0400
+@@ -613,6 +613,7 @@ static int wlan_service_main_thread(void
+ 
+ 	init_waitqueue_entry(&wait, current);
+ 
++	set_freezable();
+ 	for (;;) {
+ 		lbs_deb_thread( "main-thread 111: intcounter=%d "
+ 		       "currenttxskb=%p dnld_sent=%d\n",
+--- linux-2.6.22.noarch/drivers/net/wireless/libertas/cmd.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/libertas/cmd.c	2007-07-20 17:06:56.000000000 -0400
 @@ -240,7 +240,7 @@ static int wlan_cmd_802_11_enable_rsn(wl
  		if (*enable)
  			penableRSN->enable = cpu_to_le16(cmd_enable_rsn);
@@ -3671,8 +4314,8 @@
  	}
  
  	lbs_deb_leave(LBS_DEB_CMD);
---- linux-2.6.22.noarch/drivers/net/wireless/ipw2100.c.orig	2007-07-17 15:51:33.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/ipw2100.c	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/ipw2100.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/ipw2100.c	2007-07-20 17:06:56.000000000 -0400
 @@ -1768,7 +1768,8 @@ static int ipw2100_up(struct ipw2100_pri
  
  		if (priv->stop_rf_kill) {
@@ -3712,8 +4355,40 @@
  		goto exit_unlock;
  	}
  
---- linux-2.6.22.noarch/drivers/net/wireless/prism54/isl_ioctl.c.orig	2007-07-17 15:51:35.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/prism54/isl_ioctl.c	2007-07-17 15:49:45.000000000 -0400
+@@ -7865,10 +7868,10 @@ static int ipw2100_wx_set_powermode(stru
+ 		goto done;
+ 	}
+ 
+-	if ((mode < 1) || (mode > POWER_MODES))
++	if ((mode < 0) || (mode > POWER_MODES))
+ 		mode = IPW_POWER_AUTO;
+ 
+-	if (priv->power_mode != mode)
++	if (IPW_POWER_LEVEL(priv->power_mode) != mode)
+ 		err = ipw2100_set_power_mode(priv, mode);
+       done:
+ 	mutex_unlock(&priv->action_mutex);
+@@ -7899,7 +7902,7 @@ static int ipw2100_wx_get_powermode(stru
+ 			break;
+ 		case IPW_POWER_AUTO:
+ 			snprintf(extra, MAX_POWER_STRING,
+-				 "Power save level: %d (Auto)", 0);
++				 "Power save level: %d (Auto)", level);
+ 			break;
+ 		default:
+ 			timeout = timeout_duration[level - 1] / 1000;
+--- linux-2.6.22.noarch/drivers/net/wireless/prism54/islpci_hotplug.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/prism54/islpci_hotplug.c	2007-07-20 17:06:56.000000000 -0400
+@@ -87,7 +87,6 @@ static struct pci_driver prism54_driver 
+ 	.remove = prism54_remove,
+ 	.suspend = prism54_suspend,
+ 	.resume = prism54_resume,
+-	/* .enable_wake ; we don't support this yet */
+ };
+ 
+ /******************************************************************************
+--- linux-2.6.22.noarch/drivers/net/wireless/prism54/isl_ioctl.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/prism54/isl_ioctl.c	2007-07-20 17:06:56.000000000 -0400
 @@ -1853,7 +1853,6 @@ prism54_del_mac(struct net_device *ndev,
  	islpci_private *priv = netdev_priv(ndev);
  	struct islpci_acl *acl = &priv->acl;
@@ -3787,28 +4462,17 @@
  		kfree(bss);
  	}
  }
---- linux-2.6.22.noarch/drivers/net/wireless/rtl8187_rtl8225.c.orig	2007-07-17 15:51:33.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/rtl8187_rtl8225.c	2007-07-17 15:49:45.000000000 -0400
-@@ -67,7 +67,7 @@ static void rtl8225_write_bitbang(struct
- 	msleep(2);
- }
- 
--static void rtl8225_write_8051(struct ieee80211_hw *dev, u8 addr, u16 data)
-+static void rtl8225_write_8051(struct ieee80211_hw *dev, u8 addr, __le16 data)
- {
- 	struct rtl8187_priv *priv = dev->priv;
- 	u16 reg80, reg82, reg84;
-@@ -106,7 +106,7 @@ void rtl8225_write(struct ieee80211_hw *
- 	struct rtl8187_priv *priv = dev->priv;
- 
- 	if (priv->asic_rev)
--		rtl8225_write_8051(dev, addr, data);
-+		rtl8225_write_8051(dev, addr, cpu_to_le16(data));
- 	else
- 		rtl8225_write_bitbang(dev, addr, data);
- }
---- linux-2.6.22.noarch/drivers/net/wireless/ipw2200.c.orig	2007-07-17 15:51:33.000000000 -0400
-+++ linux-2.6.22.noarch/drivers/net/wireless/ipw2200.c	2007-07-17 15:49:45.000000000 -0400
+--- linux-2.6.22.noarch/drivers/net/wireless/ipw2200.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/ipw2200.c	2007-07-20 17:06:56.000000000 -0400
+@@ -70,7 +70,7 @@
+ #define VQ
+ #endif
+ 
+-#define IPW2200_VERSION "1.2.0" VK VD VM VP VR VQ
++#define IPW2200_VERSION "1.2.2" VK VD VM VP VR VQ
+ #define DRV_DESCRIPTION	"Intel(R) PRO/Wireless 2200/2915 Network Driver"
+ #define DRV_COPYRIGHT	"Copyright(c) 2003-2006 Intel Corporation"
+ #define DRV_VERSION     IPW2200_VERSION
 @@ -1751,7 +1751,7 @@ static int ipw_radio_kill_sw(struct ipw_
  			/* Make sure the RF_KILL check timer is running */
  			cancel_delayed_work(&priv->rf_kill);
@@ -3818,6 +4482,15 @@
  		} else
  			queue_work(priv->workqueue, &priv->up);
  	}
+@@ -2506,7 +2506,7 @@ static int ipw_send_power_mode(struct ip
+ 		break;
+ 	}
+ 
+-	param = cpu_to_le32(mode);
++	param = cpu_to_le32(param);
+ 	return ipw_send_cmd_pdu(priv, IPW_CMD_POWER_MODE, sizeof(param),
+ 				&param);
+ }
 @@ -4690,7 +4690,8 @@ static void ipw_rx_notification(struct i
  			else if (priv->config & CFG_BACKGROUND_SCAN
  				 && priv->status & STATUS_ASSOCIATED)
@@ -3828,220 +4501,345 @@
  
  			/* Send an empty event to user space.
  			 * We don't send the received data on the event because
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/Documentation/networking/mac80211-injection.txt	2007-07-17 15:47:36.000000000 -0400
-@@ -0,0 +1,59 @@
-+How to use packet injection with mac80211
-+=========================================
-+
-+mac80211 now allows arbitrary packets to be injected down any Monitor Mode
-+interface from userland.  The packet you inject needs to be composed in the
-+following format:
-+
-+ [ radiotap header  ]
-+ [ ieee80211 header ]
-+ [ payload ]
-+
-+The radiotap format is discussed in
-+./Documentation/networking/radiotap-headers.txt.
-+
-+Despite 13 radiotap argument types are currently defined, most only make sense
-+to appear on received packets.  Currently three kinds of argument are used by
-+the injection code, although it knows to skip any other arguments that are
-+present (facilitating replay of captured radiotap headers directly):
-+
-+ - IEEE80211_RADIOTAP_RATE - u8 arg in 500kbps units (0x02 --> 1Mbps)
-+
-+ - IEEE80211_RADIOTAP_ANTENNA - u8 arg, 0x00 = ant1, 0x01 = ant2
-+
-+ - IEEE80211_RADIOTAP_DBM_TX_POWER - u8 arg, dBm
-+
-+Here is an example valid radiotap header defining these three parameters
-+
-+	0x00, 0x00, // <-- radiotap version
-+	0x0b, 0x00, // <- radiotap header length
-+	0x04, 0x0c, 0x00, 0x00, // <-- bitmap
-+	0x6c, // <-- rate
-+	0x0c, //<-- tx power
-+	0x01 //<-- antenna
-+
-+The ieee80211 header follows immediately afterwards, looking for example like
-+this:
-+
-+	0x08, 0x01, 0x00, 0x00,
-+	0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+	0x13, 0x22, 0x33, 0x44, 0x55, 0x66,
-+	0x13, 0x22, 0x33, 0x44, 0x55, 0x66,
-+	0x10, 0x86
-+
-+Then lastly there is the payload.
-+
-+After composing the packet contents, it is sent by send()-ing it to a logical
-+mac80211 interface that is in Monitor mode.  Libpcap can also be used,
-+(which is easier than doing the work to bind the socket to the right
-+interface), along the following lines:
-+
-+	ppcap = pcap_open_live(szInterfaceName, 800, 1, 20, szErrbuf);
-+...
-+	r = pcap_inject(ppcap, u8aSendBuffer, nLength);
-+
-+You can also find sources for a complete inject test applet here:
-+
-+http://penumbra.warmcat.com/_twk/tiki-index.php?page=packetspammer
-+
-+Andy Green <andy at warmcat.com>
---- /dev/null	2007-07-17 08:12:38.343815931 -0400
-+++ linux-2.6.22.noarch/Documentation/networking/radiotap-headers.txt	2007-07-17 15:47:36.000000000 -0400
-@@ -0,0 +1,152 @@
-+How to use radiotap headers
-+===========================
-+
-+Pointer to the radiotap include file
-+------------------------------------
-+
-+Radiotap headers are variable-length and extensible, you can get most of the
-+information you need to know on them from:
-+
-+./include/net/ieee80211_radiotap.h
-+
-+This document gives an overview and warns on some corner cases.
-+
-+
-+Structure of the header
-+-----------------------
-+
-+There is a fixed portion at the start which contains a u32 bitmap that defines
-+if the possible argument associated with that bit is present or not.  So if b0
-+of the it_present member of ieee80211_radiotap_header is set, it means that
-+the header for argument index 0 (IEEE80211_RADIOTAP_TSFT) is present in the
-+argument area.
-+
-+   < 8-byte ieee80211_radiotap_header >
-+   [ <possible argument bitmap extensions ... > ]
-+   [ <argument> ... ]
-+
-+At the moment there are only 13 possible argument indexes defined, but in case
-+we run out of space in the u32 it_present member, it is defined that b31 set
-+indicates that there is another u32 bitmap following (shown as "possible
-+argument bitmap extensions..." above), and the start of the arguments is moved
-+forward 4 bytes each time.
-+
-+Note also that the it_len member __le16 is set to the total number of bytes
-+covered by the ieee80211_radiotap_header and any arguments following.
-+
-+
-+Requirements for arguments
-+--------------------------
-+
-+After the fixed part of the header, the arguments follow for each argument
-+index whose matching bit is set in the it_present member of
-+ieee80211_radiotap_header.
-+
-+ - the arguments are all stored little-endian!
-+
-+ - the argument payload for a given argument index has a fixed size.  So
-+   IEEE80211_RADIOTAP_TSFT being present always indicates an 8-byte argument is
-+   present.  See the comments in ./include/net/ieee80211_radiotap.h for a nice
-+   breakdown of all the argument sizes
-+
-+ - the arguments must be aligned to a boundary of the argument size using
-+   padding.  So a u16 argument must start on the next u16 boundary if it isn't
-+   already on one, a u32 must start on the next u32 boundary and so on.
-+
-+ - "alignment" is relative to the start of the ieee80211_radiotap_header, ie,
-+   the first byte of the radiotap header.  The absolute alignment of that first
-+   byte isn't defined.  So even if the whole radiotap header is starting at, eg,
-+   address 0x00000003, still the first byte of the radiotap header is treated as
-+   0 for alignment purposes.
-+
-+ - the above point that there may be no absolute alignment for multibyte
-+   entities in the fixed radiotap header or the argument region means that you
-+   have to take special evasive action when trying to access these multibyte
-+   entities.  Some arches like Blackfin cannot deal with an attempt to
-+   dereference, eg, a u16 pointer that is pointing to an odd address.  Instead
-+   you have to use a kernel API get_unaligned() to dereference the pointer,
-+   which will do it bytewise on the arches that require that.
-+
-+ - The arguments for a given argument index can be a compound of multiple types
-+   together.  For example IEEE80211_RADIOTAP_CHANNEL has an argument payload
-+   consisting of two u16s of total length 4.  When this happens, the padding
-+   rule is applied dealing with a u16, NOT dealing with a 4-byte single entity.
-+
-+
-+Example valid radiotap header
-+-----------------------------
-+
-+	0x00, 0x00, // <-- radiotap version + pad byte
-+	0x0b, 0x00, // <- radiotap header length
-+	0x04, 0x0c, 0x00, 0x00, // <-- bitmap
-+	0x6c, // <-- rate (in 500kHz units)
-+	0x0c, //<-- tx power
-+	0x01 //<-- antenna
-+
-+
-+Using the Radiotap Parser
-+-------------------------
-+
-+If you are having to parse a radiotap struct, you can radically simplify the
-+job by using the radiotap parser that lives in net/wireless/radiotap.c and has
-+its prototypes available in include/net/cfg80211.h.  You use it like this:
-+
-+#include <net/cfg80211.h>
-+
-+/* buf points to the start of the radiotap header part */
-+
-+int MyFunction(u8 * buf, int buflen)
-+{
-+	int pkt_rate_100kHz = 0, antenna = 0, pwr = 0;
-+	struct ieee80211_radiotap_iterator iterator;
-+	int ret = ieee80211_radiotap_iterator_init(&iterator, buf, buflen);
-+
-+	while (!ret) {
-+
-+		ret = ieee80211_radiotap_iterator_next(&iterator);
-+
-+		if (ret)
-+			continue;
-+
-+		/* see if this argument is something we can use */
-+
-+		switch (iterator.this_arg_index) {
-+		/*
-+		 * You must take care when dereferencing iterator.this_arg
-+		 * for multibyte types... the pointer is not aligned.  Use
-+		 * get_unaligned((type *)iterator.this_arg) to dereference
-+		 * iterator.this_arg for type "type" safely on all arches.
-+		 */
-+		case IEEE80211_RADIOTAP_RATE:
-+			/* radiotap "rate" u8 is in
-+			 * 500kbps units, eg, 0x02=1Mbps
-+			 */
-+			pkt_rate_100kHz = (*iterator.this_arg) * 5;
-+			break;
-+
-+		case IEEE80211_RADIOTAP_ANTENNA:
-+			/* radiotap uses 0 for 1st ant */
-+			antenna = *iterator.this_arg);
-+			break;
-+
-+		case IEEE80211_RADIOTAP_DBM_TX_POWER:
-+			pwr = *iterator.this_arg;
-+			break;
-+
-+		default:
-+			break;
-+		}
-+	}  /* while more rt headers */
-+
-+	if (ret != -ENOENT)
-+		return TXRX_DROP;
-+
-+	/* discard the radiotap header part */
-+	buf += iterator.max_length;
-+	buflen -= iterator.max_length;
-+
-+	...
-+
-+}
+@@ -9567,6 +9568,7 @@ static int ipw_wx_set_power(struct net_d
+ 		priv->power_mode = IPW_POWER_ENABLED | IPW_POWER_BATTERY;
+ 	else
+ 		priv->power_mode = IPW_POWER_ENABLED | priv->power_mode;
 +
-+Andy Green <andy at warmcat.com>
+ 	err = ipw_send_power_mode(priv, IPW_POWER_LEVEL(priv->power_mode));
+ 	if (err) {
+ 		IPW_DEBUG_WX("failed setting power mode.\n");
+@@ -9603,22 +9605,19 @@ static int ipw_wx_set_powermode(struct n
+ 	struct ipw_priv *priv = ieee80211_priv(dev);
+ 	int mode = *(int *)extra;
+ 	int err;
++
+ 	mutex_lock(&priv->mutex);
+-	if ((mode < 1) || (mode > IPW_POWER_LIMIT)) {
++	if ((mode < 1) || (mode > IPW_POWER_LIMIT))
+ 		mode = IPW_POWER_AC;
+-		priv->power_mode = mode;
+-	} else {
+-		priv->power_mode = IPW_POWER_ENABLED | mode;
+-	}
+ 
+-	if (priv->power_mode != mode) {
++	if (IPW_POWER_LEVEL(priv->power_mode) != mode) {
+ 		err = ipw_send_power_mode(priv, mode);
+-
+ 		if (err) {
+ 			IPW_DEBUG_WX("failed setting power mode.\n");
+ 			mutex_unlock(&priv->mutex);
+ 			return err;
+ 		}
++		priv->power_mode = IPW_POWER_ENABLED | mode;
+ 	}
+ 	mutex_unlock(&priv->mutex);
+ 	return 0;
+@@ -10554,7 +10553,7 @@ static irqreturn_t ipw_isr(int irq, void
+ 	spin_lock(&priv->irq_lock);
+ 
+ 	if (!(priv->status & STATUS_INT_ENABLED)) {
+-		/* Shared IRQ */
++		/* IRQ is disabled */
+ 		goto none;
+ 	}
+ 
+--- linux-2.6.22.noarch/drivers/net/wireless/wl3501_cs.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/wl3501_cs.c	2007-07-20 17:06:56.000000000 -0400
+@@ -1011,7 +1011,7 @@ static inline void wl3501_md_ind_interru
+ 	} else {
+ 		skb->dev = dev;
+ 		skb_reserve(skb, 2); /* IP headers on 16 bytes boundaries */
+-		eth_copy_and_sum(skb, (unsigned char *)&sig.daddr, 12, 0);
++		skb_copy_to_linear_data(skb, (unsigned char *)&sig.daddr, 12);
+ 		wl3501_receive(this, skb->data, pkt_len);
+ 		skb_put(skb, pkt_len);
+ 		skb->protocol	= eth_type_trans(skb, dev);
+--- linux-2.6.22.noarch/drivers/net/wireless/bcm43xx/bcm43xx_phy.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/bcm43xx/bcm43xx_phy.c	2007-07-20 17:06:56.000000000 -0400
+@@ -1638,7 +1638,7 @@ void bcm43xx_phy_set_baseband_attenuatio
+ 		return;
+ 	}
+ 
+-	if (phy->analog > 1) {
++	if (phy->analog == 1) {
+ 		value = bcm43xx_phy_read(bcm, 0x0060) & ~0x003C;
+ 		value |= (baseband_attenuation << 2) & 0x003C;
+ 	} else {
+--- linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_ap.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_ap.c	2007-07-20 17:06:56.000000000 -0400
+@@ -326,7 +326,6 @@ static int ap_control_proc_read(char *pa
+ 	char *p = page;
+ 	struct ap_data *ap = (struct ap_data *) data;
+ 	char *policy_txt;
+-	struct list_head *ptr;
+ 	struct mac_entry *entry;
+ 
+ 	if (off != 0) {
+@@ -352,14 +351,12 @@ static int ap_control_proc_read(char *pa
+ 	p += sprintf(p, "MAC entries: %u\n", ap->mac_restrictions.entries);
+ 	p += sprintf(p, "MAC list:\n");
+ 	spin_lock_bh(&ap->mac_restrictions.lock);
+-	for (ptr = ap->mac_restrictions.mac_list.next;
+-	     ptr != &ap->mac_restrictions.mac_list; ptr = ptr->next) {
++	list_for_each_entry(entry, &ap->mac_restrictions.mac_list, list) {
+ 		if (p - page > PAGE_SIZE - 80) {
+ 			p += sprintf(p, "All entries did not fit one page.\n");
+ 			break;
+ 		}
+ 
+-		entry = list_entry(ptr, struct mac_entry, list);
+ 		p += sprintf(p, MACSTR "\n", MAC2STR(entry->addr));
+ 	}
+ 	spin_unlock_bh(&ap->mac_restrictions.lock);
+@@ -413,7 +410,6 @@ int ap_control_del_mac(struct mac_restri
+ static int ap_control_mac_deny(struct mac_restrictions *mac_restrictions,
+ 			       u8 *mac)
+ {
+-	struct list_head *ptr;
+ 	struct mac_entry *entry;
+ 	int found = 0;
+ 
+@@ -421,10 +417,7 @@ static int ap_control_mac_deny(struct ma
+ 		return 0;
+ 
+ 	spin_lock_bh(&mac_restrictions->lock);
+-	for (ptr = mac_restrictions->mac_list.next;
+-	     ptr != &mac_restrictions->mac_list; ptr = ptr->next) {
+-		entry = list_entry(ptr, struct mac_entry, list);
+-
++	list_for_each_entry(entry, &mac_restrictions->mac_list, list) {
+ 		if (memcmp(entry->addr, mac, ETH_ALEN) == 0) {
+ 			found = 1;
+ 			break;
+@@ -519,7 +512,7 @@ static int prism2_ap_proc_read(char *pag
+ {
+ 	char *p = page;
+ 	struct ap_data *ap = (struct ap_data *) data;
+-	struct list_head *ptr;
++	struct sta_info *sta;
+ 	int i;
+ 
+ 	if (off > PROC_LIMIT) {
+@@ -529,9 +522,7 @@ static int prism2_ap_proc_read(char *pag
+ 
+ 	p += sprintf(p, "# BSSID CHAN SIGNAL NOISE RATE SSID FLAGS\n");
+ 	spin_lock_bh(&ap->sta_table_lock);
+-	for (ptr = ap->sta_list.next; ptr != &ap->sta_list; ptr = ptr->next) {
+-		struct sta_info *sta = (struct sta_info *) ptr;
+-
++	list_for_each_entry(sta, &ap->sta_list, list) {
+ 		if (!sta->ap)
+ 			continue;
+ 
+@@ -861,7 +852,7 @@ void hostap_init_ap_proc(local_info_t *l
+ 
+ void hostap_free_data(struct ap_data *ap)
+ {
+-	struct list_head *n, *ptr;
++	struct sta_info *n, *sta;
+ 
+ 	if (ap == NULL || !ap->initialized) {
+ 		printk(KERN_DEBUG "hostap_free_data: ap has not yet been "
+@@ -875,8 +866,7 @@ void hostap_free_data(struct ap_data *ap
+ 	ap->crypt = ap->crypt_priv = NULL;
+ #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
+ 
+-	list_for_each_safe(ptr, n, &ap->sta_list) {
+-		struct sta_info *sta = list_entry(ptr, struct sta_info, list);
++	list_for_each_entry_safe(sta, n, &ap->sta_list, list) {
+ 		ap_sta_hash_del(ap, sta);
+ 		list_del(&sta->list);
+ 		if ((sta->flags & WLAN_STA_ASSOC) && !sta->ap && sta->local)
+@@ -2704,6 +2694,8 @@ ap_tx_ret hostap_handle_sta_tx(local_inf
+ 
+ 	if (hdr->addr1[0] & 0x01) {
+ 		/* broadcast/multicast frame - no AP related processing */
++		if (local->ap->num_sta <= 0)
++			ret = AP_TX_DROP;
+ 		goto out;
+ 	}
+ 
+@@ -3198,15 +3190,14 @@ int hostap_update_rx_stats(struct ap_dat
+ 
+ void hostap_update_rates(local_info_t *local)
+ {
+-	struct list_head *ptr;
++	struct sta_info *sta;
+ 	struct ap_data *ap = local->ap;
+ 
+ 	if (!ap)
+ 		return;
+ 
+ 	spin_lock_bh(&ap->sta_table_lock);
+-	for (ptr = ap->sta_list.next; ptr != &ap->sta_list; ptr = ptr->next) {
+-		struct sta_info *sta = (struct sta_info *) ptr;
++	list_for_each_entry(sta, &ap->sta_list, list) {
+ 		prism2_check_tx_rates(sta);
+ 	}
+ 	spin_unlock_bh(&ap->sta_table_lock);
+@@ -3242,11 +3233,10 @@ void * ap_crypt_get_ptrs(struct ap_data 
+ void hostap_add_wds_links(local_info_t *local)
+ {
+ 	struct ap_data *ap = local->ap;
+-	struct list_head *ptr;
++	struct sta_info *sta;
+ 
+ 	spin_lock_bh(&ap->sta_table_lock);
+-	list_for_each(ptr, &ap->sta_list) {
+-		struct sta_info *sta = list_entry(ptr, struct sta_info, list);
++	list_for_each_entry(sta, &ap->sta_list, list) {
+ 		if (sta->ap)
+ 			hostap_wds_link_oper(local, sta->addr, WDS_ADD);
+ 	}
+--- linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_config.h.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_config.h	2007-07-20 17:06:56.000000000 -0400
+@@ -1,8 +1,6 @@
+ #ifndef HOSTAP_CONFIG_H
+ #define HOSTAP_CONFIG_H
+ 
+-#define PRISM2_VERSION "0.4.4-kernel"
+-
+ /* In the previous versions of Host AP driver, support for user space version
+  * of IEEE 802.11 management (hostapd) used to be disabled in the default
+  * configuration. From now on, support for hostapd is always included and it is
+--- linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_pci.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_pci.c	2007-07-20 17:06:56.000000000 -0400
+@@ -20,7 +20,6 @@
+ #include "hostap_wlan.h"
+ 
+ 
+-static char *version = PRISM2_VERSION " (Jouni Malinen <j at w1.fi>)";
+ static char *dev_info = "hostap_pci";
+ 
+ 
+@@ -29,7 +28,6 @@ MODULE_DESCRIPTION("Support for Intersil
+ 		   "PCI cards.");
+ MODULE_SUPPORTED_DEVICE("Intersil Prism2.5-based WLAN PCI cards");
+ MODULE_LICENSE("GPL");
+-MODULE_VERSION(PRISM2_VERSION);
+ 
+ 
+ /* struct local_info::hw_priv */
+@@ -455,15 +453,11 @@ static struct pci_driver prism2_pci_drv_
+ 	.suspend	= prism2_pci_suspend,
+ 	.resume		= prism2_pci_resume,
+ #endif /* CONFIG_PM */
+-	/* Linux 2.4.6 added save_state and enable_wake that are not used here
+-	 */
+ };
+ 
+ 
+ static int __init init_prism2_pci(void)
+ {
+-	printk(KERN_INFO "%s: %s\n", dev_info, version);
+-
+ 	return pci_register_driver(&prism2_pci_drv_id);
+ }
+ 
+@@ -471,7 +465,6 @@ static int __init init_prism2_pci(void)
+ static void __exit exit_prism2_pci(void)
+ {
+ 	pci_unregister_driver(&prism2_pci_drv_id);
+-	printk(KERN_INFO "%s: Driver unloaded\n", dev_info);
+ }
+ 
+ 
+--- linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_cs.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_cs.c	2007-07-20 17:06:56.000000000 -0400
+@@ -22,7 +22,6 @@
+ #include "hostap_wlan.h"
+ 
+ 
+-static char *version = PRISM2_VERSION " (Jouni Malinen <j at w1.fi>)";
+ static dev_info_t dev_info = "hostap_cs";
+ 
+ MODULE_AUTHOR("Jouni Malinen");
+@@ -30,7 +29,6 @@ MODULE_DESCRIPTION("Support for Intersil
+ 		   "cards (PC Card).");
+ MODULE_SUPPORTED_DEVICE("Intersil Prism2-based WLAN cards (PC Card)");
+ MODULE_LICENSE("GPL");
+-MODULE_VERSION(PRISM2_VERSION);
+ 
+ 
+ static int ignore_cis_vcc;
+@@ -910,14 +908,12 @@ static struct pcmcia_driver hostap_drive
+ 
+ static int __init init_prism2_pccard(void)
+ {
+-	printk(KERN_INFO "%s: %s\n", dev_info, version);
+ 	return pcmcia_register_driver(&hostap_driver);
+ }
+ 
+ static void __exit exit_prism2_pccard(void)
+ {
+ 	pcmcia_unregister_driver(&hostap_driver);
+-	printk(KERN_INFO "%s: Driver unloaded\n", dev_info);
+ }
+ 
+ 
+--- linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_main.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_main.c	2007-07-20 17:06:56.000000000 -0400
+@@ -37,7 +37,6 @@
+ MODULE_AUTHOR("Jouni Malinen");
+ MODULE_DESCRIPTION("Host AP common routines");
+ MODULE_LICENSE("GPL");
+-MODULE_VERSION(PRISM2_VERSION);
+ 
+ #define TX_TIMEOUT (2 * HZ)
+ 
+--- linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_ioctl.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_ioctl.c	2007-07-20 17:06:56.000000000 -0400
+@@ -3893,8 +3893,6 @@ static void prism2_get_drvinfo(struct ne
+ 	local = iface->local;
+ 
+ 	strncpy(info->driver, "hostap", sizeof(info->driver) - 1);
+-	strncpy(info->version, PRISM2_VERSION,
+-		sizeof(info->version) - 1);
+ 	snprintf(info->fw_version, sizeof(info->fw_version) - 1,
+ 		 "%d.%d.%d", (local->sta_fw_ver >> 16) & 0xff,
+ 		 (local->sta_fw_ver >> 8) & 0xff,
+--- linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_plx.c.orig	2007-07-20 17:06:50.000000000 -0400
++++ linux-2.6.22.noarch/drivers/net/wireless/hostap/hostap_plx.c	2007-07-20 17:06:56.000000000 -0400
+@@ -23,7 +23,6 @@
+ #include "hostap_wlan.h"
+ 
+ 
+-static char *version = PRISM2_VERSION " (Jouni Malinen <j at w1.fi>)";
+ static char *dev_info = "hostap_plx";
+ 
+ 
+@@ -32,7 +31,6 @@ MODULE_DESCRIPTION("Support for Intersil
+ 		   "cards (PLX).");
+ MODULE_SUPPORTED_DEVICE("Intersil Prism2-based WLAN cards (PLX)");
+ MODULE_LICENSE("GPL");
+-MODULE_VERSION(PRISM2_VERSION);
+ 
+ 
+ static int ignore_cis;
+@@ -615,16 +613,11 @@ static struct pci_driver prism2_plx_drv_
+ 	.id_table	= prism2_plx_id_table,
+ 	.probe		= prism2_plx_probe,
+ 	.remove		= prism2_plx_remove,
+-	.suspend	= NULL,
+-	.resume		= NULL,
+-	.enable_wake	= NULL
+ };
+ 
+ 
+ static int __init init_prism2_plx(void)
+ {
+-	printk(KERN_INFO "%s: %s\n", dev_info, version);
+-
+ 	return pci_register_driver(&prism2_plx_drv_id);
+ }
+ 
+@@ -632,7 +625,6 @@ static int __init init_prism2_plx(void)
+ static void __exit exit_prism2_plx(void)
+ {
+ 	pci_unregister_driver(&prism2_plx_drv_id);
+-	printk(KERN_INFO "%s: Driver unloaded\n", dev_info);
+ }
+ 
+ 




More information about the fedora-extras-commits mailing list