rpms/kernel/F-8 kernel.spec, 1.288, 1.289 linux-2.6-ath5k.patch, 1.7, 1.8 linux-2.6-rtl8180.patch, 1.1, 1.2 linux-2.6-wireless-pending.patch, 1.17, 1.18 linux-2.6-b43-rev-d.patch, 1.2, NONE linux-2.6-zd1211rw-mac80211.patch, 1.5, NONE
John W. Linville (linville)
fedora-extras-commits at redhat.com
Wed Dec 5 16:23:54 UTC 2007
Author: linville
Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20966
Modified Files:
kernel.spec linux-2.6-ath5k.patch linux-2.6-rtl8180.patch
linux-2.6-wireless-pending.patch
Removed Files:
linux-2.6-b43-rev-d.patch linux-2.6-zd1211rw-mac80211.patch
Log Message:
Some wireless driver bits headed for 2.6.25
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.288
retrieving revision 1.289
diff -u -r1.288 -r1.289
--- kernel.spec 4 Dec 2007 21:36:51 -0000 1.288
+++ kernel.spec 5 Dec 2007 16:23:14 -0000 1.289
@@ -682,10 +682,8 @@
Patch681: linux-2.6-wireless-pending.patch
Patch690: linux-2.6-at76.patch
Patch691: linux-2.6-ath5k.patch
-Patch692: linux-2.6-zd1211rw-mac80211.patch
-Patch693: linux-2.6-rtl8180.patch
-Patch694: linux-2.6-b43-rev-d.patch
-Patch695: linux-2.6-ath5k-use-soft-wep.patch
+Patch692: linux-2.6-rtl8180.patch
+Patch693: linux-2.6-ath5k-use-soft-wep.patch
Patch700: linux-2.6-cfg80211-extras.patch
Patch710: linux-2.6-netdev-e1000e-01.patch
Patch711: linux-2.6-netdev-e1000e-02.patch
@@ -1294,11 +1292,8 @@
# Add misc wireless bits from upstream wireless tree
ApplyPatch linux-2.6-at76.patch
ApplyPatch linux-2.6-ath5k.patch
-ApplyPatch linux-2.6-zd1211rw-mac80211.patch
ApplyPatch linux-2.6-rtl8180.patch
-# Add support for "rev 13" cores in b43
-ApplyPatch linux-2.6-b43-rev-d.patch
# Make ath5k use software WEP
ApplyPatch linux-2.6-ath5k-use-soft-wep.patch
@@ -2000,6 +1995,9 @@
%changelog
+* Wed Dec 05 2007 John W. Linville <linville at redhat.com>
+- Some wireless driver bits headed for 2.6.25
+
* Tue Dec 04 2007 Chuck Ebbert <cebbert at redhat.com>
- libata: fix ATAPI tape drives (#394961)
- libata: allow short SCSI commands for ATAPI devices
linux-2.6-ath5k.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.7 -r 1.8 linux-2.6-ath5k.patch
Index: linux-2.6-ath5k.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/linux-2.6-ath5k.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- linux-2.6-ath5k.patch 16 Nov 2007 04:00:40 -0000 1.7
+++ linux-2.6-ath5k.patch 5 Dec 2007 16:23:14 -0000 1.8
@@ -1,49 +1,13 @@
-diff -up linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig linux-2.6.23.noarch/drivers/net/wireless/Kconfig
---- linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig 2007-11-15 12:47:29.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/Kconfig 2007-11-15 13:14:13.000000000 -0500
-@@ -598,6 +598,24 @@ config P54_PCI
- tristate "Prism54 PCI support"
- depends on P54_COMMON && PCI
-
-+config ATH5K
-+ tristate "Atheros 5xxx wireless cards support"
-+ depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
-+ default m
-+ ---help---
-+ This module adds support for wireless adapters based on
-+ Atheros 5xxx chipset.
-+
-+ Currently the following chip versions are supported:
-+
-+ MAC: AR5211 AR5212
-+ PHY: RF5111/2111 RF5112/2112 RF5413/2413
-+
-+ This driver uses the kernel's mac80211 subsystem.
-+
-+ If you choose to build a module, it'll be called ath5k. Say M if
-+ unsure.
-+
- source "drivers/net/wireless/hostap/Kconfig"
- source "drivers/net/wireless/bcm43xx/Kconfig"
- source "drivers/net/wireless/b43/Kconfig"
-diff -up linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig linux-2.6.23.noarch/drivers/net/wireless/Makefile
---- linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig 2007-11-15 12:47:29.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/Makefile 2007-11-15 13:13:38.000000000 -0500
-@@ -62,3 +62,5 @@ obj-$(CONFIG_RT2X00) += rt2x00/
- obj-$(CONFIG_P54_COMMON) += p54common.o
- obj-$(CONFIG_P54_USB) += p54usb.o
- obj-$(CONFIG_P54_PCI) += p54pci.o
-+
-+obj-$(CONFIG_ATH5K) += ath5k/
-diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/ath5k/initvals.c
---- /dev/null 2007-11-12 23:12:46.917997680 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/ath5k/initvals.c 2007-11-15 13:13:38.000000000 -0500
-@@ -0,0 +1,1332 @@
-+/*
-+ * Initial register settings functions
-+ *
-+ * Copyright (c) 2004, 2005, 2006, 2007 Reyk Floeter <reyk at openbsd.org>
-+ * Copyright (c) 2006, 2007 Nick Kossifidis <mickflemm at gmail.com>
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/ath5k/hw.c
+--- /dev/null 2007-12-05 09:05:26.573020786 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/ath5k/hw.c 2007-12-05 11:07:42.000000000 -0500
+@@ -0,0 +1,4279 @@
++ /*
++ * Copyright (c) 2004-2007 Reyk Floeter <reyk at openbsd.org>
++ * Copyright (c) 2006-2007 Nick Kossifidis <mickflemm at gmail.com>
++ * Copyright (c) 2007 Matthew W. S. Bell <mentor at madwifi.org>
++ * Copyright (c) 2007 Luis Rodriguez <mcgrof at winlab.rutgers.edu>
++ * Copyright (c) 2007 Pavel Roskin <proski at gnu.org>
+ * Copyright (c) 2007 Jiri Slaby <jirislaby at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
@@ -60,1439 +24,103 @@
+ *
+ */
+
-+#include "ath5k.h"
++/*
++ * HW related functions for Atheros Wireless LAN devices.
++ */
++
++#include <linux/pci.h>
++#include <linux/delay.h>
++
+#include "reg.h"
++#include "base.h"
++#include "debug.h"
++
++/*Rate tables*/
++static const struct ath5k_rate_table ath5k_rt_11a = AR5K_RATES_11A;
++static const struct ath5k_rate_table ath5k_rt_11b = AR5K_RATES_11B;
++static const struct ath5k_rate_table ath5k_rt_11g = AR5K_RATES_11G;
++static const struct ath5k_rate_table ath5k_rt_turbo = AR5K_RATES_TURBO;
++static const struct ath5k_rate_table ath5k_rt_xr = AR5K_RATES_XR;
++
++/*Prototypes*/
++static int ath5k_hw_nic_reset(struct ath5k_hw *, u32);
++static int ath5k_hw_nic_wakeup(struct ath5k_hw *, int, bool);
++static int ath5k_hw_setup_4word_tx_desc(struct ath5k_hw *, struct ath5k_desc *,
++ unsigned int, unsigned int, enum ath5k_pkt_type, unsigned int,
++ unsigned int, unsigned int, unsigned int, unsigned int, unsigned int,
++ unsigned int, unsigned int);
++static bool ath5k_hw_setup_xr_tx_desc(struct ath5k_hw *, struct ath5k_desc *,
++ unsigned int, unsigned int, unsigned int, unsigned int, unsigned int,
++ unsigned int);
++static int ath5k_hw_proc_4word_tx_status(struct ath5k_hw *, struct ath5k_desc *);
++static int ath5k_hw_setup_2word_tx_desc(struct ath5k_hw *, struct ath5k_desc *,
++ unsigned int, unsigned int, enum ath5k_pkt_type, unsigned int,
++ unsigned int, unsigned int, unsigned int, unsigned int, unsigned int,
++ unsigned int, unsigned int);
++static int ath5k_hw_proc_2word_tx_status(struct ath5k_hw *, struct ath5k_desc *);
++static int ath5k_hw_proc_new_rx_status(struct ath5k_hw *, struct ath5k_desc *);
++static int ath5k_hw_proc_old_rx_status(struct ath5k_hw *, struct ath5k_desc *);
++static int ath5k_hw_get_capabilities(struct ath5k_hw *);
++
++static int ath5k_eeprom_init(struct ath5k_hw *);
++static int ath5k_eeprom_read_mac(struct ath5k_hw *, u8 *);
++
++static int ath5k_hw_enable_pspoll(struct ath5k_hw *, u8 *, u16);
++static int ath5k_hw_disable_pspoll(struct ath5k_hw *);
+
+/*
-+ * MAC/PHY REGISTERS
++ * Enable to overwrite the country code (use "00" for debug)
+ */
++#if 0
++#define COUNTRYCODE "00"
++#endif
+
++/*******************\
++ General Functions
++\*******************/
+
+/*
-+ * Mode-independent initial register writes
++ * Functions used internaly
+ */
+
-+struct ath5k_ini {
-+ u16 ini_register;
-+ u32 ini_value;
++static inline unsigned int ath5k_hw_htoclock(unsigned int usec, bool turbo)
++{
++ return turbo == true ? (usec * 80) : (usec * 40);
++}
+
-+ enum {
-+ AR5K_INI_WRITE = 0, /* Default */
-+ AR5K_INI_READ = 1, /* Cleared on read */
-+ } ini_mode;
-+};
++static inline unsigned int ath5k_hw_clocktoh(unsigned int clock, bool turbo)
++{
++ return turbo == true ? (clock / 80) : (clock / 40);
++}
+
+/*
-+ * Mode specific initial register values
++ * Check if a register write has been completed
+ */
++int ath5k_hw_register_timeout(struct ath5k_hw *ah, u32 reg, u32 flag, u32 val,
++ bool is_set)
++{
++ int i;
++ u32 data;
+
-+struct ath5k_ini_mode {
-+ u16 mode_register;
-+ u32 mode_value[5];
-+};
++ for (i = AR5K_TUNE_REGISTER_TIMEOUT; i > 0; i--) {
++ data = ath5k_hw_reg_read(ah, reg);
++ if ((is_set == true) && (data & flag))
++ break;
++ else if ((data & flag) == val)
++ break;
++ udelay(15);
++ }
+
-+/* Initial register settings for AR5210 */
-+static const struct ath5k_ini ar5210_ini[] = {
-+ /* PCU and MAC registers */
-+ { AR5K_NOQCU_TXDP0, 0 },
-+ { AR5K_NOQCU_TXDP1, 0 },
-+ { AR5K_RXDP, 0 },
-+ { AR5K_CR, 0 },
-+ { AR5K_ISR, 0, AR5K_INI_READ },
-+ { AR5K_IMR, 0 },
-+ { AR5K_IER, AR5K_IER_DISABLE },
-+ { AR5K_BSR, 0, AR5K_INI_READ },
-+ { AR5K_TXCFG, AR5K_DMASIZE_128B },
-+ { AR5K_RXCFG, AR5K_DMASIZE_128B },
-+ { AR5K_CFG, AR5K_INIT_CFG },
-+ { AR5K_TOPS, AR5K_INIT_TOPS },
-+ { AR5K_RXNOFRM, AR5K_INIT_RXNOFRM },
-+ { AR5K_RPGTO, AR5K_INIT_RPGTO },
-+ { AR5K_TXNOFRM, AR5K_INIT_TXNOFRM },
-+ { AR5K_SFR, 0 },
-+ { AR5K_MIBC, 0 },
-+ { AR5K_MISC, 0 },
-+ { AR5K_RX_FILTER_5210, 0 },
-+ { AR5K_MCAST_FILTER0_5210, 0 },
-+ { AR5K_MCAST_FILTER1_5210, 0 },
-+ { AR5K_TX_MASK0, 0 },
[...12803 lines suppressed...]
++ * THE POSSIBILITY OF SUCH DAMAGES.
++ */
++
++#ifndef _ATH5K_DEBUG_H
++#define _ATH5K_DEBUG_H
++
++/* set this to 1 for debugging output */
++#ifndef ATH5K_DEBUG
++#define ATH5K_DEBUG 0
++#endif
++
++struct ath5k_softc;
++struct ath5k_hw;
++struct ieee80211_hw_mode;
++struct sk_buff;
++struct ath5k_buf;
++
++struct ath5k_dbg_info {
++ unsigned int level; /* debug level */
++ /* debugfs entries */
++ struct dentry *debugfs_phydir;
++ struct dentry *debugfs_debug;
++};
++
++/**
++ * enum ath5k_debug_level - ath5k debug level
++ *
++ * @ATH5K_DEBUG_RESET: reset processing
++ * @ATH5K_DEBUG_INTR: interrupt handling
++ * @ATH5K_DEBUG_MODE: mode init/setup
++ * @ATH5K_DEBUG_XMIT: basic xmit operation
++ * @ATH5K_DEBUG_BEACON: beacon handling
++ * @ATH5K_DEBUG_BEACON_PROC: beacon ISR proc
++ * @ATH5K_DEBUG_CALIBRATE: periodic calibration
++ * @ATH5K_DEBUG_TXPOWER: transmit power setting
++ * @ATH5K_DEBUG_LED: led management
++ * @ATH5K_DEBUG_DUMP_RX: print received skb content
++ * @ATH5K_DEBUG_DUMP_TX: print transmit skb content
++ * @ATH5K_DEBUG_DUMPMODES: dump modes
++ * @ATH5K_DEBUG_TRACE: trace function calls
++ * @ATH5K_DEBUG_FATAL: fatal errors
++ * @ATH5K_DEBUG_ANY: show at any debug level
++ *
++ * The debug level is used to control the amount and type of debugging output
++ * we want to see. The debug level is given in calls to ATH5K_DBG to specify
++ * where the message should appear, and the user can control the debugging
++ * messages he wants to see, either by the module parameter 'debug' on module
++ * load, or dynamically by using debugfs 'ath5k/phyX/debug'. these levels can
++ * be combined together by bitwise OR.
++ */
++enum ath5k_debug_level {
++ ATH5K_DEBUG_RESET = 0x00000001,
++ ATH5K_DEBUG_INTR = 0x00000002,
++ ATH5K_DEBUG_MODE = 0x00000004,
++ ATH5K_DEBUG_XMIT = 0x00000008,
++ ATH5K_DEBUG_BEACON = 0x00000010,
++ ATH5K_DEBUG_BEACON_PROC = 0x00000020,
++ ATH5K_DEBUG_CALIBRATE = 0x00000100,
++ ATH5K_DEBUG_TXPOWER = 0x00000200,
++ ATH5K_DEBUG_LED = 0x00000400,
++ ATH5K_DEBUG_DUMP_RX = 0x00001000,
++ ATH5K_DEBUG_DUMP_TX = 0x00002000,
++ ATH5K_DEBUG_DUMPMODES = 0x00004000,
++ ATH5K_DEBUG_TRACE = 0x00010000,
++ ATH5K_DEBUG_FATAL = 0x80000000,
++ ATH5K_DEBUG_ANY = 0xffffffff
++};
++
++#if ATH5K_DEBUG
++
++#define ATH5K_TRACE(_sc) do { \
++ if (unlikely((_sc)->debug.level & ATH5K_DEBUG_TRACE)) \
++ printk(KERN_DEBUG "ath5k trace %s:%d\n", __func__, __LINE__); \
++ } while (0)
++
++#define ATH5K_DBG(_sc, _m, _fmt, ...) do { \
++ if (unlikely((_sc)->debug.level & (_m) && net_ratelimit())) \
++ ATH5K_PRINTK(_sc, KERN_DEBUG, "(%s:%d): " _fmt, \
++ __func__, __LINE__, ##__VA_ARGS__); \
++ } while (0)
++
++#define ATH5K_DBG_UNLIMIT(_sc, _m, _fmt, ...) do { \
++ if (unlikely((_sc)->debug.level & (_m))) \
++ ATH5K_PRINTK(_sc, KERN_DEBUG, "(%s:%d): " _fmt, \
++ __func__, __LINE__, ##__VA_ARGS__); \
++ } while (0)
++
++void
++ath5k_debug_init(void);
++
++void
++ath5k_debug_init_device(struct ath5k_softc *sc);
++
++void
++ath5k_debug_finish(void);
++
++void
++ath5k_debug_finish_device(struct ath5k_softc *sc);
++
++void
++ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah);
++
++void
++ath5k_debug_dump_modes(struct ath5k_softc *sc,
++ struct ieee80211_hw_mode *modes);
++
++void
++ath5k_debug_dump_skb(struct ath5k_softc *sc,
++ struct sk_buff *skb, const char *prefix, int tx);
++
++void
++ath5k_debug_printtxbuf(struct ath5k_softc *sc,
++ struct ath5k_buf *bf, int done);
++
++#else /* no debugging */
++
++#define ATH5K_TRACE(_sc) /* empty */
++
++static inline void __attribute__ ((format (printf, 3, 4)))
++ATH5K_DBG(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...) {}
++
++static inline void __attribute__ ((format (printf, 3, 4)))
++ATH5K_DBG_UNLIMIT(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...)
++{}
++
++static inline void
++ath5k_debug_init(void) {}
++
++static inline void
++ath5k_debug_init_device(struct ath5k_softc *sc) {}
++
++static inline void
++ath5k_debug_finish(void) {}
++
++static inline void
++ath5k_debug_finish_device(struct ath5k_softc *sc) {}
++
++static inline void
++ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah) {}
++
++static inline void
++ath5k_debug_dump_modes(struct ath5k_softc *sc,
++ struct ieee80211_hw_mode *modes) {}
++
++static inline void
++ath5k_debug_dump_skb(struct ath5k_softc *sc,
++ struct sk_buff *skb, const char *prefix, int tx) {}
++
++static inline void
++ath5k_debug_printtxbuf(struct ath5k_softc *sc,
++ struct ath5k_buf *bf, int done) {}
++
++#endif /* if ATH5K_DEBUG */
++
++#endif /* ifndef _ATH5K_DEBUG_H */
+diff -up linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig linux-2.6.23.noarch/drivers/net/wireless/Kconfig
+--- linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig 2007-12-05 11:07:10.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/Kconfig 2007-12-05 11:08:23.000000000 -0500
+@@ -598,6 +598,24 @@ config P54_PCI
+ tristate "Prism54 PCI support"
+ depends on P54_COMMON && PCI
+
++config ATH5K
++ tristate "Atheros 5xxx wireless cards support"
++ depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
++ default m
++ ---help---
++ This module adds support for wireless adapters based on
++ Atheros 5xxx chipset.
++
++ Currently the following chip versions are supported:
++
++ MAC: AR5211 AR5212
++ PHY: RF5111/2111 RF5112/2112 RF5413/2413
++
++ This driver uses the kernel's mac80211 subsystem.
++
++ If you choose to build a module, it'll be called ath5k. Say M if
++ unsure.
++
+ source "drivers/net/wireless/hostap/Kconfig"
+ source "drivers/net/wireless/bcm43xx/Kconfig"
+ source "drivers/net/wireless/b43/Kconfig"
+diff -up linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig linux-2.6.23.noarch/drivers/net/wireless/Makefile
+--- linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig 2007-12-05 11:07:10.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/Makefile 2007-12-05 11:07:42.000000000 -0500
+@@ -62,3 +62,5 @@ obj-$(CONFIG_RT2X00) += rt2x00/
+ obj-$(CONFIG_P54_COMMON) += p54common.o
+ obj-$(CONFIG_P54_USB) += p54usb.o
+ obj-$(CONFIG_P54_PCI) += p54pci.o
++
++obj-$(CONFIG_ATH5K) += ath5k/
diff -up linux-2.6.23.noarch/MAINTAINERS.orig linux-2.6.23.noarch/MAINTAINERS
---- linux-2.6.23.noarch/MAINTAINERS.orig 2007-11-15 12:47:29.000000000 -0500
-+++ linux-2.6.23.noarch/MAINTAINERS 2007-11-15 13:13:38.000000000 -0500
+--- linux-2.6.23.noarch/MAINTAINERS.orig 2007-12-05 11:07:10.000000000 -0500
++++ linux-2.6.23.noarch/MAINTAINERS 2007-12-05 11:07:42.000000000 -0500
@@ -642,6 +642,17 @@ M: ecashin at coraid.com
W: http://www.coraid.com/support/linux
S: Supported
linux-2.6-rtl8180.patch:
Index: linux-2.6-rtl8180.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/linux-2.6-rtl8180.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-rtl8180.patch 16 Nov 2007 04:00:40 -0000 1.1
+++ linux-2.6-rtl8180.patch 5 Dec 2007 16:23:14 -0000 1.2
@@ -1,36 +1,7 @@
-diff -up linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig linux-2.6.23.noarch/drivers/net/wireless/Kconfig
---- linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig 2007-11-15 14:01:43.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/Kconfig 2007-11-15 14:08:21.000000000 -0500
-@@ -546,6 +546,11 @@ config USB_ZD1201
- To compile this driver as a module, choose M here: the
- module will be called zd1201.
-
-+config RTL8180
-+ tristate "Realtek 8185 PCI support"
-+ depends on MAC80211 && PCI && WLAN_80211 && EXPERIMENTAL
-+ select EEPROM_93CX6
-+
- config RTL8187
- tristate "Realtek 8187 USB support"
- depends on MAC80211 && USB && WLAN_80211 && EXPERIMENTAL
-diff -up linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig linux-2.6.23.noarch/drivers/net/wireless/Makefile
---- linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig 2007-11-15 14:01:43.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/Makefile 2007-11-15 14:08:21.000000000 -0500
-@@ -50,7 +50,10 @@ obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs
- obj-$(CONFIG_USB_ZD1201) += zd1201.o
- obj-$(CONFIG_LIBERTAS) += libertas/
-
-+rtl8180-objs := rtl8180_dev.o rtl8180_rtl8225.o
- rtl8187-objs := rtl8187_dev.o rtl8187_rtl8225.o
-+
-+obj-$(CONFIG_RTL8180) += rtl8180.o
- obj-$(CONFIG_RTL8187) += rtl8187.o
-
- obj-$(CONFIG_ADM8211) += adm8211.o
diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/rtl8180_dev.c
---- /dev/null 2007-11-12 23:12:46.917997680 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/rtl8180_dev.c 2007-11-15 14:08:31.000000000 -0500
-@@ -0,0 +1,1018 @@
+--- /dev/null 2007-12-05 09:05:26.573020786 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/rtl8180_dev.c 2007-12-05 11:16:39.000000000 -0500
+@@ -0,0 +1,1053 @@
+
+/*
+ * Linux device driver for RTL8180 / RTL8185
@@ -57,6 +28,8 @@
+
+#include "rtl8180.h"
+#include "rtl8180_rtl8225.h"
++#include "rtl8180_sa2400.h"
++#include "rtl8180_max2820.h"
+
+MODULE_AUTHOR("Michael Wu <flamingice at sourmilk.net>");
+MODULE_AUTHOR("Andrea Merello <andreamrl at tiscali.it>");
@@ -64,7 +37,14 @@
+MODULE_LICENSE("GPL");
+
+static struct pci_device_id rtl8180_table[] __devinitdata = {
++ /* rtl8185 */
+ { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8185) },
++
++ /* rtl8180 */
++ { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8180) },
++ { PCI_DEVICE(0x1799, 0x6001) },
++ { PCI_DEVICE(0x1799, 0x6020) },
++ { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x3300) },
+ { }
+};
+
@@ -256,10 +236,21 @@
+ spin_lock_irqsave(&priv->lock, flags);
+ idx = (ring->idx + skb_queue_len(&ring->queue)) % ring->entries;
+ entry = &ring->desc[idx];
-+ /* TODO: calculate PLCP length - needed for rtl8180 */
++
+ if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS)
+ entry->rts_duration =
+ ieee80211_rts_duration(dev, priv->if_id, skb->len, control);
++
++ if (!priv->r8185) {
++ unsigned int remainder;
++
++ entry->plcp_len =
++ DIV_ROUND_UP(16 * (skb->len + 4), (control->rate->rate * 2) / 10);
++ remainder = (16 * (skb->len + 4)) % ((control->rate->rate * 2) / 10);
++ if (remainder > 0 && remainder <= 6)
++ entry->plcp_len |= 1 << 15;
++ }
++
+ entry->tx_buf = cpu_to_le32(mapping);
+ entry->frame_len = cpu_to_le32(skb->len);
+ entry->flags2 = control->alt_retry_rate != -1 ?
@@ -276,6 +267,20 @@
+ return 0;
+}
+
++void rtl8180_set_anaparam(struct rtl8180_priv *priv, u32 anaparam)
++{
++ u8 reg;
++
++ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG);
++ reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
++ rtl818x_iowrite8(priv, &priv->map->CONFIG3,
++ reg | RTL818X_CONFIG3_ANAPARAM_WRITE);
++ rtl818x_iowrite32(priv, &priv->map->ANAPARAM, anaparam);
++ rtl818x_iowrite8(priv, &priv->map->CONFIG3,
++ reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE);
++ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
++}
++
+static int rtl8180_init_hw(struct ieee80211_hw *dev)
+{
+ struct rtl8180_priv *priv = dev->priv;
@@ -318,16 +323,8 @@
+
+ rtl818x_iowrite8(priv, &priv->map->MSR, 0);
+
-+ if (!priv->r8185) {
-+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG);
-+ reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
-+ rtl818x_iowrite8(priv, &priv->map->CONFIG3,
-+ reg | RTL818X_CONFIG3_ANAPARAM_WRITE);
-+ rtl818x_iowrite32(priv, &priv->map->ANAPARAM, priv->anaparam);
-+ rtl818x_iowrite8(priv, &priv->map->CONFIG3,
-+ reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE);
-+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
-+ }
++ if (!priv->r8185)
++ rtl8180_set_anaparam(priv, priv->anaparam);
+
+ rtl818x_iowrite32(priv, &priv->map->RDSAR, priv->rx_ring_dma);
+ rtl818x_iowrite32(priv, &priv->map->TBDA, priv->tx_ring[3].dma);
@@ -355,12 +352,9 @@
+ rtl818x_iowrite8(priv, &priv->map->WPA_CONF, 0);
+ rtl818x_iowrite8(priv, &priv->map->RATE_FALLBACK, 0x81);
+ rtl818x_iowrite8(priv, &priv->map->RESP_RATE, (8 << 4) | 0);
-+ }
+
-+ /* TODO: fix for rtl8180 */
-+ rtl818x_iowrite16(priv, &priv->map->BRSR, 0x01F3);
++ rtl818x_iowrite16(priv, &priv->map->BRSR, 0x01F3);
+
-+ if (priv->r8185) {
+ /* TODO: set ClkRun enable? necessary? */
+ reg = rtl818x_ioread8(priv, &priv->map->GP_ENABLE);
+ rtl818x_iowrite8(priv, &priv->map->GP_ENABLE, reg & ~(1 << 6));
@@ -368,6 +362,12 @@
+ reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
+ rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg | (1 << 2));
+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
++ } else {
++ rtl818x_iowrite16(priv, &priv->map->BRSR, 0x1);
++ rtl818x_iowrite8(priv, &priv->map->SECURITY, 0);
++
++ rtl818x_iowrite8(priv, &priv->map->PHY_DELAY, 0x6);
++ rtl818x_iowrite8(priv, &priv->map->CARRIER_SENSE_COUNTER, 0x4C);
+ }
+
+ priv->rf_init(dev);
@@ -894,23 +894,29 @@
+ break;
+ case 3:
+ rf_name = "Philips";
++ priv->rf_init = sa2400_rf_init;
++ priv->rf_stop = sa2400_rf_stop;
++ priv->rf_set_chan = sa2400_rf_set_channel;
+ break;
+ case 4:
+ rf_name = "Maxim";
++ priv->rf_init = max2820_rf_init;
++ priv->rf_stop = max2820_rf_stop;
++ priv->rf_set_chan = max2820_rf_set_channel;
+ break;
+ case 5:
+ rf_name = "GCT";
+ break;
+ case 9:
-+ if (rtl8225_is_z2(dev)) {
++ if (rtl8180_rtl8225_is_z2(dev)) {
+ rf_name = "RTL8225z2";
-+ priv->rf_init = rtl8225z2_rf_init;
++ priv->rf_init = rtl8180_rtl8225z2_rf_init;
+ } else {
+ rf_name = "RTL8225";
-+ priv->rf_init = rtl8225_rf_init;
++ priv->rf_init = rtl8180_rtl8225_rf_init;
+ }
-+ priv->rf_stop = rtl8225_rf_stop;
-+ priv->rf_set_chan = rtl8225_rf_set_channel;
++ priv->rf_stop = rtl8180_rtl8225_rf_stop;
++ priv->rf_set_chan = rtl8180_rtl8225_rf_set_channel;
+ break;
+ case 10:
+ rf_name = "RTL8255";
@@ -927,13 +933,13 @@
+ goto err_iounmap;
+ }
+
-+ eeprom_93cx6_read(&eeprom, 0x19, &priv->rfparam);
+ eeprom_93cx6_read(&eeprom, 0x17, &eeprom_val);
+ priv->csthreshold = eeprom_val >> 8;
+ if (!priv->r8185) {
+ __le32 anaparam;
+ eeprom_93cx6_multiread(&eeprom, 0xD, (__le16 *)&anaparam, 2);
+ priv->anaparam = le32_to_cpu(anaparam);
++ eeprom_93cx6_read(&eeprom, 0x19, &priv->rfparam);
+ }
+
+ eeprom_93cx6_multiread(&eeprom, 0x7, (__le16 *)dev->wiphy->perm_addr, 3);
@@ -1050,8 +1056,8 @@
+module_init(rtl8180_init);
+module_exit(rtl8180_exit);
diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/rtl8180_rtl8225.h
---- /dev/null 2007-11-12 23:12:46.917997680 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/rtl8180_rtl8225.h 2007-11-15 14:08:21.000000000 -0500
+--- /dev/null 2007-12-05 09:05:26.573020786 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/rtl8180_rtl8225.h 2007-12-05 11:15:07.000000000 -0500
@@ -0,0 +1,28 @@
+#ifndef RTL8180_RTL8225_H
+#define RTL8180_RTL8225_H
@@ -1061,95 +1067,30 @@
+#define RTL8225_ANAPARAM_OFF 0xa00beb59
+#define RTL8225_ANAPARAM2_OFF 0x840dec11
+
-+int rtl8225_is_z2(struct ieee80211_hw *dev);
++int rtl8180_rtl8225_is_z2(struct ieee80211_hw *dev);
+
-+void rtl8225_rf_init(struct ieee80211_hw *);
-+void rtl8225z2_rf_init(struct ieee80211_hw *);
-+void rtl8225_rf_stop(struct ieee80211_hw *);
-+void rtl8225_rf_set_channel(struct ieee80211_hw *, struct ieee80211_conf *);
++void rtl8180_rtl8225_rf_init(struct ieee80211_hw *);
++void rtl8180_rtl8225z2_rf_init(struct ieee80211_hw *);
++void rtl8180_rtl8225_rf_stop(struct ieee80211_hw *);
++void rtl8180_rtl8225_rf_set_channel(struct ieee80211_hw *, struct ieee80211_conf *);
+
-+static inline void rtl8225_write_phy_ofdm(struct ieee80211_hw *dev,
++static inline void rtl8180_rtl8225_write_phy_ofdm(struct ieee80211_hw *dev,
+ u8 addr, u8 data)
+{
+ rtl8180_write_phy(dev, addr, data);
+}
+
-+static inline void rtl8225_write_phy_cck(struct ieee80211_hw *dev,
++static inline void rtl8180_rtl8225_write_phy_cck(struct ieee80211_hw *dev,
+ u8 addr, u8 data)
+{
+ rtl8180_write_phy(dev, addr, data | 0x10000);
+}
+
+#endif /* RTL8180_RTL8225_H */
-diff -up linux-2.6.23.noarch/drivers/net/wireless/rtl818x.h.orig linux-2.6.23.noarch/drivers/net/wireless/rtl818x.h
---- linux-2.6.23.noarch/drivers/net/wireless/rtl818x.h.orig 2007-11-15 14:01:39.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/rtl818x.h 2007-11-15 14:08:21.000000000 -0500
-@@ -58,13 +58,17 @@ struct rtl818x_csr {
- #define RTL818X_INT_TX_FO (1 << 15)
- __le32 TX_CONF;
- #define RTL818X_TX_CONF_LOOPBACK_MAC (1 << 17)
-+#define RTL818X_TX_CONF_LOOPBACK_CONT (3 << 17)
- #define RTL818X_TX_CONF_NO_ICV (1 << 19)
- #define RTL818X_TX_CONF_DISCW (1 << 20)
-+#define RTL818X_TX_CONF_SAT_HWPLCP (1 << 24)
- #define RTL818X_TX_CONF_R8180_ABCD (2 << 25)
- #define RTL818X_TX_CONF_R8180_F (3 << 25)
- #define RTL818X_TX_CONF_R8185_ABC (4 << 25)
- #define RTL818X_TX_CONF_R8185_D (5 << 25)
- #define RTL818X_TX_CONF_HWVER_MASK (7 << 25)
-+#define RTL818X_TX_CONF_PROBE_DTS (1 << 29)
-+#define RTL818X_TX_CONF_HW_SEQNUM (1 << 30)
- #define RTL818X_TX_CONF_CW_MIN (1 << 31)
- __le32 RX_CONF;
- #define RTL818X_RX_CONF_MONITOR (1 << 0)
-@@ -75,8 +79,12 @@ struct rtl818x_csr {
- #define RTL818X_RX_CONF_DATA (1 << 18)
- #define RTL818X_RX_CONF_CTRL (1 << 19)
- #define RTL818X_RX_CONF_MGMT (1 << 20)
-+#define RTL818X_RX_CONF_ADDR3 (1 << 21)
-+#define RTL818X_RX_CONF_PM (1 << 22)
- #define RTL818X_RX_CONF_BSSID (1 << 23)
- #define RTL818X_RX_CONF_RX_AUTORESETPHY (1 << 28)
-+#define RTL818X_RX_CONF_CSDM1 (1 << 29)
-+#define RTL818X_RX_CONF_CSDM2 (1 << 30)
- #define RTL818X_RX_CONF_ONLYERLPKT (1 << 31)
- __le32 INT_TIMEOUT;
- __le32 TBDA;
-@@ -92,6 +100,7 @@ struct rtl818x_csr {
- u8 CONFIG0;
- u8 CONFIG1;
- u8 CONFIG2;
-+#define RTL818X_CONFIG2_ANTENNA_DIV (1 << 6)
- __le32 ANAPARAM;
- u8 MSR;
- #define RTL818X_MSR_NO_LINK (0 << 2)
-@@ -111,7 +120,8 @@ struct rtl818x_csr {
- __le16 ATIM_WND;
- __le16 BEACON_INTERVAL_TIME;
- __le16 ATIMTR_INTERVAL;
-- u8 reserved_11[4];
-+ __le16 PHY_DELAY;
-+ u8 reserved_11[2];
- u8 PHY[4];
- __le16 RFPinsOutput;
- __le16 RFPinsEnable;
-@@ -149,8 +159,10 @@ struct rtl818x_csr {
- u8 RETRY_CTR;
- u8 reserved_18[5];
- __le32 RDSAR;
-- u8 reserved_19[18];
-- u16 TALLY_CNT;
-+ u8 reserved_19[12];
-+ __le16 FEMR;
-+ u8 reserved_20[4];
-+ __le16 TALLY_CNT;
- u8 TALLY_SEL;
- } __attribute__((packed));
-
diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/rtl8180_rtl8225.c
---- /dev/null 2007-11-12 23:12:46.917997680 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/rtl8180_rtl8225.c 2007-11-15 14:08:21.000000000 -0500
-@@ -0,0 +1,777 @@
+--- /dev/null 2007-12-05 09:05:26.573020786 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/rtl8180_rtl8225.c 2007-12-05 11:15:07.000000000 -0500
+@@ -0,0 +1,765 @@
+
+/*
+ * Radio tuning for RTL8225 on RTL8180
@@ -1175,7 +1116,7 @@
+#include "rtl8180.h"
+#include "rtl8180_rtl8225.h"
+
-+static void rtl8225_write(struct ieee80211_hw *dev, u8 addr, u16 data)
++static void rtl8180_rtl8225_write(struct ieee80211_hw *dev, u8 addr, u16 data)
+{
+ struct rtl8180_priv *priv = dev->priv;
+ u16 reg80, reg84, reg82;
@@ -1223,7 +1164,7 @@
+ rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF);
+}
+
-+static u16 rtl8225_read(struct ieee80211_hw *dev, u8 addr)
++static u16 rtl8180_rtl8225_read(struct ieee80211_hw *dev, u8 addr)
+{
+ struct rtl8180_priv *priv = dev->priv;
+ u16 reg80, reg82, reg84, out;
@@ -1326,7 +1267,7 @@
+ return out;
+}
+
-+static const u16 rtl8225bcd_rxgain[] = {
++static const u16 rtl8180_rtl8225bcd_rxgain[] = {
+ 0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0408, 0x0409,
+ 0x040a, 0x040b, 0x0502, 0x0503, 0x0504, 0x0505, 0x0540, 0x0541,
+ 0x0542, 0x0543, 0x0544, 0x0545, 0x0580, 0x0581, 0x0582, 0x0583,
@@ -1341,7 +1282,7 @@
+ 0x07b4, 0x07b5, 0x07b8, 0x07b9, 0x07ba, 0x07bb, 0x07bb
+};
+
-+static const u8 rtl8225_agc[] = {
++static const u8 rtl8180_rtl8225_agc[] = {
+ 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9e, 0x9e,
+ 0x9d, 0x9c, 0x9b, 0x9a, 0x99, 0x98, 0x97, 0x96,
+ 0x95, 0x94, 0x93, 0x92, 0x91, 0x90, 0x8f, 0x8e,
@@ -1360,7 +1301,7 @@
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01
+};
+
-+static const u8 rtl8225_gain[] = {
++static const u8 rtl8180_rtl8225_gain[] = {
+ 0x23, 0x88, 0x7c, 0xa5, /* -82dbm */
+ 0x23, 0x88, 0x7c, 0xb5, /* -82dbm */
+ 0x23, 0x88, 0x7c, 0xc5, /* -82dbm */
@@ -1370,15 +1311,15 @@
+ 0x63, 0x58, 0x70, 0xc5, /* -66dbm */
+};
+
-+static const u8 rtl8225_threshold[] = {
++static const u8 rtl8180_rtl8225_threshold[] = {
+ 0x8d, 0x8d, 0x8d, 0x8d, 0x9d, 0xad, 0xbd
+};
+
-+static const u8 rtl8225_tx_gain_cck_ofdm[] = {
++static const u8 rtl8180_rtl8225_tx_gain_cck_ofdm[] = {
+ 0x02, 0x06, 0x0e, 0x1e, 0x3e, 0x7e
+};
+
-+static const u8 rtl8225_tx_power_cck[] = {
++static const u8 rtl8180_rtl8225_tx_power_cck[] = {
+ 0x18, 0x17, 0x15, 0x11, 0x0c, 0x08, 0x04, 0x02,
+ 0x1b, 0x1a, 0x17, 0x13, 0x0e, 0x09, 0x04, 0x02,
+ 0x1f, 0x1e, 0x1a, 0x15, 0x10, 0x0a, 0x05, 0x02,
@@ -1387,7 +1328,7 @@
+ 0x2b, 0x2a, 0x25, 0x1e, 0x16, 0x0e, 0x07, 0x03
+};
+
-+static const u8 rtl8225_tx_power_cck_ch14[] = {
++static const u8 rtl8180_rtl8225_tx_power_cck_ch14[] = {
+ 0x18, 0x17, 0x15, 0x0c, 0x00, 0x00, 0x00, 0x00,
+ 0x1b, 0x1a, 0x17, 0x0e, 0x00, 0x00, 0x00, 0x00,
+ 0x1f, 0x1e, 0x1a, 0x0f, 0x00, 0x00, 0x00, 0x00,
@@ -1396,16 +1337,16 @@
+ 0x2b, 0x2a, 0x25, 0x15, 0x00, 0x00, 0x00, 0x00
+};
+
-+static const u8 rtl8225_tx_power_ofdm[] = {
++static const u8 rtl8180_rtl8225_tx_power_ofdm[] = {
+ 0x80, 0x90, 0xa2, 0xb5, 0xcb, 0xe4
+};
+
-+static const u32 rtl8225_chan[] = {
++static const u32 rtl8180_rtl8225_chan[] = {
+ 0x085c, 0x08dc, 0x095c, 0x09dc, 0x0a5c, 0x0adc, 0x0b5c,
+ 0x0bdc, 0x0c5c, 0x0cdc, 0x0d5c, 0x0ddc, 0x0e5c, 0x0f72
+};
+
-+static void rtl8225_rf_set_tx_power(struct ieee80211_hw *dev, int channel)
++static void rtl8180_rtl8225_rf_set_tx_power(struct ieee80211_hw *dev, int channel)
+{
+ struct rtl8180_priv *priv = dev->priv;
+ u8 cck_power, ofdm_power;
@@ -1413,22 +1354,22 @@
+ u32 reg;
+ int i;
+
-+ cck_power = priv->channels[channel - 1].val & 0xF;
-+ ofdm_power = priv->channels[channel - 1].val >> 4;
++ cck_power = priv->channels[channel - 1].val & 0xFF;
++ ofdm_power = priv->channels[channel - 1].val >> 8;
+
+ cck_power = min(cck_power, (u8)35);
+ ofdm_power = min(ofdm_power, (u8)35);
+
+ rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK,
-+ rtl8225_tx_gain_cck_ofdm[cck_power / 6] >> 1);
++ rtl8180_rtl8225_tx_gain_cck_ofdm[cck_power / 6] >> 1);
+
+ if (channel == 14)
-+ tmp = &rtl8225_tx_power_cck_ch14[(cck_power % 6) * 8];
++ tmp = &rtl8180_rtl8225_tx_power_cck_ch14[(cck_power % 6) * 8];
+ else
-+ tmp = &rtl8225_tx_power_cck[(cck_power % 6) * 8];
++ tmp = &rtl8180_rtl8225_tx_power_cck[(cck_power % 6) * 8];
+
+ for (i = 0; i < 8; i++)
-+ rtl8225_write_phy_cck(dev, 0x44 + i, *tmp++);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x44 + i, *tmp++);
+
+ msleep(1); /* FIXME: optional? */
+
@@ -1440,48 +1381,42 @@
+ rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE);
+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
+
-+ rtl8225_write_phy_ofdm(dev, 2, 0x42);
-+ rtl8225_write_phy_ofdm(dev, 6, 0x00);
-+ rtl8225_write_phy_ofdm(dev, 8, 0x00);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 2, 0x42);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 6, 0x00);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 8, 0x00);
+
+ rtl818x_iowrite8(priv, &priv->map->TX_GAIN_OFDM,
-+ rtl8225_tx_gain_cck_ofdm[ofdm_power/6] >> 1);
++ rtl8180_rtl8225_tx_gain_cck_ofdm[ofdm_power/6] >> 1);
+
-+ tmp = &rtl8225_tx_power_ofdm[ofdm_power % 6];
++ tmp = &rtl8180_rtl8225_tx_power_ofdm[ofdm_power % 6];
+
-+ rtl8225_write_phy_ofdm(dev, 5, *tmp);
-+ rtl8225_write_phy_ofdm(dev, 7, *tmp);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 5, *tmp);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 7, *tmp);
+
+ msleep(1);
+}
+
-+int rtl8225_is_z2(struct ieee80211_hw *dev)
++int rtl8180_rtl8225_is_z2(struct ieee80211_hw *dev)
+{
+ int z2 = 0;
+
-+ rtl8225_write(dev, 0, 0x1B7);
-+ rtl8225_read(dev, 0);
++ rtl8180_rtl8225_write(dev, 0, 0x1B7);
++ rtl8180_rtl8225_read(dev, 0);
+
-+ if (rtl8225_read(dev, 8) == 0x588 && rtl8225_read(dev, 9) == 0x700)
++ if (rtl8180_rtl8225_read(dev, 8) == 0x588 && rtl8180_rtl8225_read(dev, 9) == 0x700)
+ z2 = 1;
+
-+ rtl8225_write(dev, 0, 0x0B7);
++ rtl8180_rtl8225_write(dev, 0, 0x0B7);
+
+ return z2;
+}
+
-+void rtl8225_rf_init(struct ieee80211_hw *dev)
++void rtl8180_rtl8225_rf_init(struct ieee80211_hw *dev)
+{
+ struct rtl8180_priv *priv = dev->priv;
+ int i;
-+ u8 reg;
+
-+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG);
-+ reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
-+ rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg | RTL818X_CONFIG3_ANAPARAM_WRITE);
-+ rtl818x_iowrite32(priv, &priv->map->ANAPARAM, RTL8225_ANAPARAM_ON);
-+ rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE);
-+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
++ rtl8180_set_anaparam(priv, RTL8225_ANAPARAM_ON);
+
+ /* host_pci_init */
+ rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, 0x0480);
@@ -1502,123 +1437,123 @@
+ rtl818x_iowrite8(priv, &priv->map->CONFIG3, 0x44);
+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
+
-+ rtl8225_write(dev, 0x0, 0x067);
-+ rtl8225_write(dev, 0x1, 0xFE0);
-+ rtl8225_write(dev, 0x2, 0x44D);
-+ rtl8225_write(dev, 0x3, 0x441);
-+ rtl8225_write(dev, 0x4, 0x8BE);
-+ rtl8225_write(dev, 0x5, 0xBF0); /* TODO: minipci */
-+ rtl8225_write(dev, 0x6, 0xAE6);
-+ rtl8225_write(dev, 0x7, rtl8225_chan[0]);
-+ rtl8225_write(dev, 0x8, 0x01F);
-+ rtl8225_write(dev, 0x9, 0x334);
-+ rtl8225_write(dev, 0xA, 0xFD4);
-+ rtl8225_write(dev, 0xB, 0x391);
-+ rtl8225_write(dev, 0xC, 0x050);
-+ rtl8225_write(dev, 0xD, 0x6DB);
-+ rtl8225_write(dev, 0xE, 0x029);
-+ rtl8225_write(dev, 0xF, 0x914); msleep(1);
-+
-+ rtl8225_write(dev, 0x2, 0xC4D); msleep(100);
-+
-+ rtl8225_write(dev, 0x0, 0x127);
-+
-+ for (i = 0; i < ARRAY_SIZE(rtl8225bcd_rxgain); i++) {
-+ rtl8225_write(dev, 0x1, i + 1);
-+ rtl8225_write(dev, 0x2, rtl8225bcd_rxgain[i]);
++ rtl8180_rtl8225_write(dev, 0x0, 0x067);
++ rtl8180_rtl8225_write(dev, 0x1, 0xFE0);
++ rtl8180_rtl8225_write(dev, 0x2, 0x44D);
++ rtl8180_rtl8225_write(dev, 0x3, 0x441);
++ rtl8180_rtl8225_write(dev, 0x4, 0x8BE);
++ rtl8180_rtl8225_write(dev, 0x5, 0xBF0); /* TODO: minipci */
++ rtl8180_rtl8225_write(dev, 0x6, 0xAE6);
++ rtl8180_rtl8225_write(dev, 0x7, rtl8180_rtl8225_chan[0]);
++ rtl8180_rtl8225_write(dev, 0x8, 0x01F);
++ rtl8180_rtl8225_write(dev, 0x9, 0x334);
++ rtl8180_rtl8225_write(dev, 0xA, 0xFD4);
++ rtl8180_rtl8225_write(dev, 0xB, 0x391);
++ rtl8180_rtl8225_write(dev, 0xC, 0x050);
++ rtl8180_rtl8225_write(dev, 0xD, 0x6DB);
++ rtl8180_rtl8225_write(dev, 0xE, 0x029);
++ rtl8180_rtl8225_write(dev, 0xF, 0x914); msleep(1);
++
++ rtl8180_rtl8225_write(dev, 0x2, 0xC4D); msleep(100);
++
++ rtl8180_rtl8225_write(dev, 0x0, 0x127);
++
++ for (i = 0; i < ARRAY_SIZE(rtl8180_rtl8225bcd_rxgain); i++) {
++ rtl8180_rtl8225_write(dev, 0x1, i + 1);
++ rtl8180_rtl8225_write(dev, 0x2, rtl8180_rtl8225bcd_rxgain[i]);
+ }
+
-+ rtl8225_write(dev, 0x0, 0x027);
-+ rtl8225_write(dev, 0x0, 0x22F);
++ rtl8180_rtl8225_write(dev, 0x0, 0x027);
++ rtl8180_rtl8225_write(dev, 0x0, 0x22F);
+ rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF);
+
-+ for (i = 0; i < ARRAY_SIZE(rtl8225_agc); i++) {
-+ rtl8225_write_phy_ofdm(dev, 0xB, rtl8225_agc[i]);
++ for (i = 0; i < ARRAY_SIZE(rtl8180_rtl8225_agc); i++) {
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0xB, rtl8180_rtl8225_agc[i]);
+ msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0xA, 0x80 + i);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0xA, 0x80 + i);
+ msleep(1);
+ }
+
+ msleep(1);
+
-+ rtl8225_write_phy_ofdm(dev, 0x00, 0x01); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x01, 0x02); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x02, 0x62); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x03, 0x00); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x04, 0x00); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x05, 0x00); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x06, 0x40); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x07, 0x00); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x08, 0x40); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x09, 0xfe); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x0a, 0x09); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x0b, 0x80); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x0c, 0x01); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x0e, 0xd3); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x0f, 0x38); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x10, 0x84); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x11, 0x06); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x12, 0x20); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x13, 0x20); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x14, 0x00); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x15, 0x40); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x16, 0x00); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x17, 0x40); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x18, 0xef); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x19, 0x19); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x1a, 0x20); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x1b, 0x76); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x1c, 0x04); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x1e, 0x95); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x1f, 0x75); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x20, 0x1f); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x21, 0x27); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x22, 0x16); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x24, 0x46); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x25, 0x20); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x26, 0x90); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x27, 0x88); msleep(1);
-+
-+ rtl8225_write_phy_ofdm(dev, 0x0d, rtl8225_gain[1 * 4]);
-+ rtl8225_write_phy_ofdm(dev, 0x1b, rtl8225_gain[1 * 4 + 2]);
-+ rtl8225_write_phy_ofdm(dev, 0x1d, rtl8225_gain[1 * 4 + 3]);
-+ rtl8225_write_phy_ofdm(dev, 0x23, rtl8225_gain[1 * 4 + 1]);
-+
-+ rtl8225_write_phy_cck(dev, 0x00, 0x98); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x03, 0x20); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x04, 0x7e); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x05, 0x12); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x06, 0xfc); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x07, 0x78); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x08, 0x2e); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x10, 0x93); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x11, 0x88); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x12, 0x47); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x13, 0xd0);
-+ rtl8225_write_phy_cck(dev, 0x19, 0x00);
-+ rtl8225_write_phy_cck(dev, 0x1a, 0xa0);
-+ rtl8225_write_phy_cck(dev, 0x1b, 0x08);
-+ rtl8225_write_phy_cck(dev, 0x40, 0x86);
-+ rtl8225_write_phy_cck(dev, 0x41, 0x8d); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x42, 0x15); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x43, 0x18); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x44, 0x1f); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x45, 0x1e); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x46, 0x1a); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x47, 0x15); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x48, 0x10); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x49, 0x0a); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x4a, 0x05); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x4b, 0x02); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x4c, 0x05); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x00, 0x01); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x01, 0x02); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x02, 0x62); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x03, 0x00); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x04, 0x00); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x05, 0x00); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x06, 0x40); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x07, 0x00); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x08, 0x40); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x09, 0xfe); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0a, 0x09); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0b, 0x80); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0c, 0x01); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0e, 0xd3); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0f, 0x38); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x10, 0x84); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x11, 0x06); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x12, 0x20); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x13, 0x20); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x14, 0x00); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x15, 0x40); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x16, 0x00); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x17, 0x40); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x18, 0xef); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x19, 0x19); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1a, 0x20); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1b, 0x76); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1c, 0x04); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1e, 0x95); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1f, 0x75); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x20, 0x1f); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x21, 0x27); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x22, 0x16); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x24, 0x46); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x25, 0x20); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x26, 0x90); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x27, 0x88); msleep(1);
++
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0d, rtl8180_rtl8225_gain[1 * 4]);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1b, rtl8180_rtl8225_gain[1 * 4 + 2]);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1d, rtl8180_rtl8225_gain[1 * 4 + 3]);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x23, rtl8180_rtl8225_gain[1 * 4 + 1]);
++
++ rtl8180_rtl8225_write_phy_cck(dev, 0x00, 0x98); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x03, 0x20); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x04, 0x7e); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x05, 0x12); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x06, 0xfc); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x07, 0x78); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x08, 0x2e); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x10, 0x93); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x11, 0x88); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x12, 0x47); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x13, 0xd0);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x19, 0x00);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x1a, 0xa0);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x1b, 0x08);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x40, 0x86);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x41, 0x8d); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x42, 0x15); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x43, 0x18); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x44, 0x1f); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x45, 0x1e); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x46, 0x1a); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x47, 0x15); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x48, 0x10); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x49, 0x0a); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x4a, 0x05); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x4b, 0x02); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x4c, 0x05); msleep(1);
+
+ rtl818x_iowrite8(priv, &priv->map->TESTR, 0x0D); msleep(1);
+
-+ rtl8225_rf_set_tx_power(dev, 1);
++ rtl8180_rtl8225_rf_set_tx_power(dev, 1);
+
+ /* RX antenna default to A */
-+ rtl8225_write_phy_cck(dev, 0x10, 0x9b); msleep(1); /* B: 0xDB */
-+ rtl8225_write_phy_ofdm(dev, 0x26, 0x90); msleep(1); /* B: 0x10 */
++ rtl8180_rtl8225_write_phy_cck(dev, 0x10, 0x9b); msleep(1); /* B: 0xDB */
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x26, 0x90); msleep(1); /* B: 0x10 */
+
+ rtl818x_iowrite8(priv, &priv->map->TX_ANTENNA, 0x03); /* B: 0x00 */
+ msleep(1);
@@ -1626,51 +1561,51 @@
+ rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF);
+
+ /* set sensitivity */
-+ rtl8225_write(dev, 0x0c, 0x50);
-+ rtl8225_write_phy_ofdm(dev, 0x0d, rtl8225_gain[1 * 4]);
-+ rtl8225_write_phy_ofdm(dev, 0x1b, rtl8225_gain[1 * 4 + 2]);
-+ rtl8225_write_phy_ofdm(dev, 0x1d, rtl8225_gain[1 * 4 + 3]);
-+ rtl8225_write_phy_ofdm(dev, 0x23, rtl8225_gain[1 * 4 + 1]);
-+ rtl8225_write_phy_cck(dev, 0x41, rtl8225_threshold[2]);
++ rtl8180_rtl8225_write(dev, 0x0c, 0x50);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0d, rtl8180_rtl8225_gain[1 * 4]);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1b, rtl8180_rtl8225_gain[1 * 4 + 2]);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1d, rtl8180_rtl8225_gain[1 * 4 + 3]);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x23, rtl8180_rtl8225_gain[1 * 4 + 1]);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x41, rtl8180_rtl8225_threshold[2]);
+}
+
-+static const u8 rtl8225z2_tx_power_cck_ch14[] = {
++static const u8 rtl8180_rtl8225z2_tx_power_cck_ch14[] = {
+ 0x36, 0x35, 0x2e, 0x1b, 0x00, 0x00, 0x00, 0x00
+};
+
-+static const u8 rtl8225z2_tx_power_cck_B[] = {
++static const u8 rtl8180_rtl8225z2_tx_power_cck_B[] = {
+ 0x30, 0x2f, 0x29, 0x21, 0x19, 0x10, 0x08, 0x04
+};
+
-+static const u8 rtl8225z2_tx_power_cck_A[] = {
++static const u8 rtl8180_rtl8225z2_tx_power_cck_A[] = {
+ 0x33, 0x32, 0x2b, 0x23, 0x1a, 0x11, 0x08, 0x04
+};
+
-+static const u8 rtl8225z2_tx_power_cck[] = {
++static const u8 rtl8180_rtl8225z2_tx_power_cck[] = {
+ 0x36, 0x35, 0x2e, 0x25, 0x1c, 0x12, 0x09, 0x04
+};
+
-+static void rtl8225z2_rf_set_tx_power(struct ieee80211_hw *dev, int channel)
++static void rtl8180_rtl8225z2_rf_set_tx_power(struct ieee80211_hw *dev, int channel)
+{
+ struct rtl8180_priv *priv = dev->priv;
+ u8 cck_power, ofdm_power;
+ const u8 *tmp;
+ int i;
+
-+ cck_power = priv->channels[channel - 1].val & 0xF;
-+ ofdm_power = priv->channels[channel - 1].val >> 4;
++ cck_power = priv->channels[channel - 1].val & 0xFF;
++ ofdm_power = priv->channels[channel - 1].val >> 8;
+
+ if (channel == 14)
-+ tmp = rtl8225z2_tx_power_cck_ch14;
++ tmp = rtl8180_rtl8225z2_tx_power_cck_ch14;
+ else if (cck_power == 12)
-+ tmp = rtl8225z2_tx_power_cck_B;
++ tmp = rtl8180_rtl8225z2_tx_power_cck_B;
+ else if (cck_power == 13)
-+ tmp = rtl8225z2_tx_power_cck_A;
++ tmp = rtl8180_rtl8225z2_tx_power_cck_A;
+ else
-+ tmp = rtl8225z2_tx_power_cck;
++ tmp = rtl8180_rtl8225z2_tx_power_cck;
+
+ for (i = 0; i < 8; i++)
-+ rtl8225_write_phy_cck(dev, 0x44 + i, *tmp++);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x44 + i, *tmp++);
+
+ cck_power = min(cck_power, (u8)35);
+ if (cck_power == 13 || cck_power == 14)
@@ -1685,16 +1620,16 @@
+ ofdm_power = min(ofdm_power, (u8)35);
+ rtl818x_iowrite8(priv, &priv->map->TX_GAIN_OFDM, ofdm_power);
+
-+ rtl8225_write_phy_ofdm(dev, 2, 0x42);
-+ rtl8225_write_phy_ofdm(dev, 5, 0x00);
-+ rtl8225_write_phy_ofdm(dev, 6, 0x40);
-+ rtl8225_write_phy_ofdm(dev, 7, 0x00);
-+ rtl8225_write_phy_ofdm(dev, 8, 0x40);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 2, 0x42);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 5, 0x00);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 6, 0x40);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 7, 0x00);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 8, 0x40);
+
+ msleep(1);
+}
+
-+static const u16 rtl8225z2_rxgain[] = {
++static const u16 rtl8180_rtl8225z2_rxgain[] = {
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0008, 0x0009,
+ 0x000a, 0x000b, 0x0102, 0x0103, 0x0104, 0x0105, 0x0140, 0x0141,
+ 0x0142, 0x0143, 0x0144, 0x0145, 0x0180, 0x0181, 0x0182, 0x0183,
@@ -1709,18 +1644,12 @@
+ 0x03b4, 0x03b5, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bb
+};
+
-+void rtl8225z2_rf_init(struct ieee80211_hw *dev)
++void rtl8180_rtl8225z2_rf_init(struct ieee80211_hw *dev)
+{
+ struct rtl8180_priv *priv = dev->priv;
+ int i;
-+ u8 reg;
+
-+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG);
-+ reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
-+ rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg | RTL818X_CONFIG3_ANAPARAM_WRITE);
-+ rtl818x_iowrite32(priv, &priv->map->ANAPARAM, RTL8225_ANAPARAM_ON);
-+ rtl818x_iowrite8(priv, &priv->map->CONFIG3, reg & ~RTL818X_CONFIG3_ANAPARAM_WRITE);
-+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
++ rtl8180_set_anaparam(priv, RTL8225_ANAPARAM_ON);
+
+ /* host_pci_init */
+ rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, 0x0480);
@@ -1743,140 +1672,140 @@
+
+ rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF);
+
-+ rtl8225_write(dev, 0x0, 0x0B7); msleep(1);
-+ rtl8225_write(dev, 0x1, 0xEE0); msleep(1);
-+ rtl8225_write(dev, 0x2, 0x44D); msleep(1);
-+ rtl8225_write(dev, 0x3, 0x441); msleep(1);
-+ rtl8225_write(dev, 0x4, 0x8C3); msleep(1);
-+ rtl8225_write(dev, 0x5, 0xC72); msleep(1);
-+ rtl8225_write(dev, 0x6, 0x0E6); msleep(1);
-+ rtl8225_write(dev, 0x7, 0x82A); msleep(1);
-+ rtl8225_write(dev, 0x8, 0x03F); msleep(1);
-+ rtl8225_write(dev, 0x9, 0x335); msleep(1);
-+ rtl8225_write(dev, 0xa, 0x9D4); msleep(1);
-+ rtl8225_write(dev, 0xb, 0x7BB); msleep(1);
-+ rtl8225_write(dev, 0xc, 0x850); msleep(1);
-+ rtl8225_write(dev, 0xd, 0xCDF); msleep(1);
-+ rtl8225_write(dev, 0xe, 0x02B); msleep(1);
-+ rtl8225_write(dev, 0xf, 0x114); msleep(100);
++ rtl8180_rtl8225_write(dev, 0x0, 0x0B7); msleep(1);
++ rtl8180_rtl8225_write(dev, 0x1, 0xEE0); msleep(1);
++ rtl8180_rtl8225_write(dev, 0x2, 0x44D); msleep(1);
++ rtl8180_rtl8225_write(dev, 0x3, 0x441); msleep(1);
++ rtl8180_rtl8225_write(dev, 0x4, 0x8C3); msleep(1);
++ rtl8180_rtl8225_write(dev, 0x5, 0xC72); msleep(1);
++ rtl8180_rtl8225_write(dev, 0x6, 0x0E6); msleep(1);
++ rtl8180_rtl8225_write(dev, 0x7, 0x82A); msleep(1);
++ rtl8180_rtl8225_write(dev, 0x8, 0x03F); msleep(1);
++ rtl8180_rtl8225_write(dev, 0x9, 0x335); msleep(1);
++ rtl8180_rtl8225_write(dev, 0xa, 0x9D4); msleep(1);
++ rtl8180_rtl8225_write(dev, 0xb, 0x7BB); msleep(1);
++ rtl8180_rtl8225_write(dev, 0xc, 0x850); msleep(1);
++ rtl8180_rtl8225_write(dev, 0xd, 0xCDF); msleep(1);
++ rtl8180_rtl8225_write(dev, 0xe, 0x02B); msleep(1);
++ rtl8180_rtl8225_write(dev, 0xf, 0x114); msleep(100);
+
-+ if (!(rtl8225_read(dev, 6) & (1 << 7))) {
-+ rtl8225_write(dev, 0x02, 0x0C4D);
++ if (!(rtl8180_rtl8225_read(dev, 6) & (1 << 7))) {
++ rtl8180_rtl8225_write(dev, 0x02, 0x0C4D);
+ msleep(200);
-+ rtl8225_write(dev, 0x02, 0x044D);
++ rtl8180_rtl8225_write(dev, 0x02, 0x044D);
+ msleep(100);
-+ if (!(rtl8225_read(dev, 6) & (1 << 7)))
++ if (!(rtl8180_rtl8225_read(dev, 6) & (1 << 7)))
+ printk(KERN_WARNING "%s: RF Calibration Failed! %x\n",
-+ wiphy_name(dev->wiphy), rtl8225_read(dev, 6));
++ wiphy_name(dev->wiphy), rtl8180_rtl8225_read(dev, 6));
+ }
+
-+ rtl8225_write(dev, 0x0, 0x1B7);
-+ rtl8225_write(dev, 0x3, 0x002);
-+ rtl8225_write(dev, 0x5, 0x004);
++ rtl8180_rtl8225_write(dev, 0x0, 0x1B7);
++ rtl8180_rtl8225_write(dev, 0x3, 0x002);
++ rtl8180_rtl8225_write(dev, 0x5, 0x004);
+
-+ for (i = 0; i < ARRAY_SIZE(rtl8225z2_rxgain); i++) {
-+ rtl8225_write(dev, 0x1, i + 1);
-+ rtl8225_write(dev, 0x2, rtl8225z2_rxgain[i]);
++ for (i = 0; i < ARRAY_SIZE(rtl8180_rtl8225z2_rxgain); i++) {
++ rtl8180_rtl8225_write(dev, 0x1, i + 1);
++ rtl8180_rtl8225_write(dev, 0x2, rtl8180_rtl8225z2_rxgain[i]);
+ }
+
-+ rtl8225_write(dev, 0x0, 0x0B7); msleep(100);
-+ rtl8225_write(dev, 0x2, 0xC4D);
++ rtl8180_rtl8225_write(dev, 0x0, 0x0B7); msleep(100);
++ rtl8180_rtl8225_write(dev, 0x2, 0xC4D);
+
+ msleep(200);
-+ rtl8225_write(dev, 0x2, 0x44D);
++ rtl8180_rtl8225_write(dev, 0x2, 0x44D);
+ msleep(100);
+
-+ rtl8225_write(dev, 0x00, 0x2BF);
-+ rtl8225_write(dev, 0xFF, 0xFFFF);
++ rtl8180_rtl8225_write(dev, 0x00, 0x2BF);
++ rtl8180_rtl8225_write(dev, 0xFF, 0xFFFF);
+
+ rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF);
+
-+ for (i = 0; i < ARRAY_SIZE(rtl8225_agc); i++) {
-+ rtl8225_write_phy_ofdm(dev, 0xB, rtl8225_agc[i]);
++ for (i = 0; i < ARRAY_SIZE(rtl8180_rtl8225_agc); i++) {
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0xB, rtl8180_rtl8225_agc[i]);
+ msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0xA, 0x80 + i);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0xA, 0x80 + i);
+ msleep(1);
+ }
+
+ msleep(1);
+
-+ rtl8225_write_phy_ofdm(dev, 0x00, 0x01); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x01, 0x02); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x02, 0x62); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x03, 0x00); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x04, 0x00); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x05, 0x00); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x06, 0x40); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x07, 0x00); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x08, 0x40); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x09, 0xfe); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x0a, 0x09); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x18, 0xef); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x0b, 0x80); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x0c, 0x01); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x0d, 0x43);
-+ rtl8225_write_phy_ofdm(dev, 0x0e, 0xd3); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x0f, 0x38); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x10, 0x84); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x11, 0x06); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x12, 0x20); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x13, 0x20); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x14, 0x00); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x15, 0x40); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x16, 0x00); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x17, 0x40); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x18, 0xef); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x19, 0x19); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x1a, 0x20); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x1b, 0x11); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x1c, 0x04); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x1d, 0xc5); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x1e, 0xb3); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x1f, 0x75); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x20, 0x1f); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x21, 0x27); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x22, 0x16); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x23, 0x80); msleep(1); /* FIXME: not needed? */
-+ rtl8225_write_phy_ofdm(dev, 0x24, 0x46); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x25, 0x20); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x26, 0x90); msleep(1);
-+ rtl8225_write_phy_ofdm(dev, 0x27, 0x88); msleep(1);
-+
-+ rtl8225_write_phy_cck(dev, 0x00, 0x98); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x03, 0x20); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x04, 0x7e); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x05, 0x12); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x06, 0xfc); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x07, 0x78); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x08, 0x2e); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x10, 0x93); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x11, 0x88); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x12, 0x47); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x13, 0xd0);
-+ rtl8225_write_phy_cck(dev, 0x19, 0x00);
-+ rtl8225_write_phy_cck(dev, 0x1a, 0xa0);
-+ rtl8225_write_phy_cck(dev, 0x1b, 0x08);
-+ rtl8225_write_phy_cck(dev, 0x40, 0x86);
-+ rtl8225_write_phy_cck(dev, 0x41, 0x8a); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x42, 0x15); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x43, 0x18); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x44, 0x36); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x45, 0x35); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x46, 0x2e); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x47, 0x25); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x48, 0x1c); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x49, 0x12); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x4a, 0x09); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x4b, 0x04); msleep(1);
-+ rtl8225_write_phy_cck(dev, 0x4c, 0x05); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x00, 0x01); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x01, 0x02); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x02, 0x62); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x03, 0x00); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x04, 0x00); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x05, 0x00); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x06, 0x40); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x07, 0x00); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x08, 0x40); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x09, 0xfe); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0a, 0x09); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x18, 0xef); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0b, 0x80); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0c, 0x01); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0d, 0x43);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0e, 0xd3); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x0f, 0x38); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x10, 0x84); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x11, 0x06); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x12, 0x20); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x13, 0x20); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x14, 0x00); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x15, 0x40); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x16, 0x00); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x17, 0x40); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x18, 0xef); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x19, 0x19); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1a, 0x20); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1b, 0x11); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1c, 0x04); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1d, 0xc5); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1e, 0xb3); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x1f, 0x75); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x20, 0x1f); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x21, 0x27); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x22, 0x16); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x23, 0x80); msleep(1); /* FIXME: not needed? */
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x24, 0x46); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x25, 0x20); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x26, 0x90); msleep(1);
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x27, 0x88); msleep(1);
++
++ rtl8180_rtl8225_write_phy_cck(dev, 0x00, 0x98); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x03, 0x20); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x04, 0x7e); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x05, 0x12); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x06, 0xfc); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x07, 0x78); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x08, 0x2e); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x10, 0x93); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x11, 0x88); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x12, 0x47); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x13, 0xd0);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x19, 0x00);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x1a, 0xa0);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x1b, 0x08);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x40, 0x86);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x41, 0x8a); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x42, 0x15); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x43, 0x18); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x44, 0x36); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x45, 0x35); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x46, 0x2e); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x47, 0x25); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x48, 0x1c); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x49, 0x12); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x4a, 0x09); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x4b, 0x04); msleep(1);
++ rtl8180_rtl8225_write_phy_cck(dev, 0x4c, 0x05); msleep(1);
+
+ rtl818x_iowrite8(priv, (u8 __iomem *)((void __iomem *)priv->map + 0x5B), 0x0D); msleep(1);
+
-+ rtl8225z2_rf_set_tx_power(dev, 1);
++ rtl8180_rtl8225z2_rf_set_tx_power(dev, 1);
+
+ /* RX antenna default to A */
-+ rtl8225_write_phy_cck(dev, 0x10, 0x9b); msleep(1); /* B: 0xDB */
-+ rtl8225_write_phy_ofdm(dev, 0x26, 0x90); msleep(1); /* B: 0x10 */
++ rtl8180_rtl8225_write_phy_cck(dev, 0x10, 0x9b); msleep(1); /* B: 0xDB */
++ rtl8180_rtl8225_write_phy_ofdm(dev, 0x26, 0x90); msleep(1); /* B: 0x10 */
+
+ rtl818x_iowrite8(priv, &priv->map->TX_ANTENNA, 0x03); /* B: 0x00 */
+ msleep(1);
@@ -1884,12 +1813,12 @@
+ rtl818x_iowrite16(priv, &priv->map->RFPinsEnable, 0x1FFF);
+}
+
-+void rtl8225_rf_stop(struct ieee80211_hw *dev)
++void rtl8180_rtl8225_rf_stop(struct ieee80211_hw *dev)
+{
+ struct rtl8180_priv *priv = dev->priv;
+ u8 reg;
+
-+ rtl8225_write(dev, 0x4, 0x1f); msleep(1);
++ rtl8180_rtl8225_write(dev, 0x4, 0x1f); msleep(1);
+
+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_CONFIG);
+ reg = rtl818x_ioread8(priv, &priv->map->CONFIG3);
@@ -1900,17 +1829,17 @@
+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
+}
+
-+void rtl8225_rf_set_channel(struct ieee80211_hw *dev,
++void rtl8180_rtl8225_rf_set_channel(struct ieee80211_hw *dev,
+ struct ieee80211_conf *conf)
+{
+ struct rtl8180_priv *priv = dev->priv;
+
-+ if (priv->rf_init == rtl8225_rf_init)
-+ rtl8225_rf_set_tx_power(dev, conf->channel);
++ if (priv->rf_init == rtl8180_rtl8225_rf_init)
++ rtl8180_rtl8225_rf_set_tx_power(dev, conf->channel);
+ else
-+ rtl8225z2_rf_set_tx_power(dev, conf->channel);
++ rtl8180_rtl8225z2_rf_set_tx_power(dev, conf->channel);
+
-+ rtl8225_write(dev, 0x7, rtl8225_chan[conf->channel - 1]);
++ rtl8180_rtl8225_write(dev, 0x7, rtl8180_rtl8225_chan[conf->channel - 1]);
+ msleep(10);
+
+ if (conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME) {
@@ -1928,9 +1857,9 @@
+ }
+}
diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/rtl8180.h
---- /dev/null 2007-11-12 23:12:46.917997680 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/rtl8180.h 2007-11-15 14:08:21.000000000 -0500
-@@ -0,0 +1,138 @@
+--- /dev/null 2007-12-05 09:05:26.573020786 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/rtl8180.h 2007-12-05 11:15:07.000000000 -0500
+@@ -0,0 +1,153 @@
+#ifndef RTL8180_H
+#define RTL8180_H
+
@@ -1938,11 +1867,25 @@
+
+#define MAX_RX_SIZE IEEE80211_MAX_RTS_THRESHOLD
+
-+#define RF_PARAM_DIGPHY (1 << 0)
++#define RF_PARAM_ANALOGPHY (1 << 0)
+#define RF_PARAM_ANTBDEFAULT (1 << 1)
+#define RF_PARAM_CARRIERSENSE1 (1 << 2)
+#define RF_PARAM_CARRIERSENSE2 (1 << 3)
+
++#define BB_ANTATTEN_CHAN14 0x0C
++#define BB_ANTENNA_B 0x40
++
++#define BB_HOST_BANG (1 << 30)
++#define BB_HOST_BANG_EN (1 << 2)
++#define BB_HOST_BANG_CLK (1 << 1)
++#define BB_HOST_BANG_DATA 1
++
++#define ANAPARAM_TXDACOFF_SHIFT 27
++#define ANAPARAM_PWR0_SHIFT 28
++#define ANAPARAM_PWR0_MASK (0x07 << ANAPARAM_PWR0_SHIFT)
++#define ANAPARAM_PWR1_SHIFT 20
++#define ANAPARAM_PWR1_MASK (0x7F << ANAPARAM_PWR1_SHIFT)
++
+enum rtl8180_tx_desc_flags {
+ RTL8180_TX_DESC_FLAG_NO_ENC = (1 << 15),
+ RTL8180_TX_DESC_FLAG_TX_OK = (1 << 15),
@@ -2034,6 +1977,7 @@
+};
+
+void rtl8180_write_phy(struct ieee80211_hw *dev, u8 addr, u32 data);
++void rtl8180_set_anaparam(struct rtl8180_priv *priv, u32 anaparam);
+
+static inline u8 rtl818x_ioread8(struct rtl8180_priv *priv, u8 __iomem *addr)
+{
@@ -2069,3 +2013,562 @@
+}
+
+#endif /* RTL8180_H */
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/rtl8180_sa2400.h
+--- /dev/null 2007-12-05 09:05:26.573020786 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/rtl8180_sa2400.h 2007-12-05 11:15:07.000000000 -0500
+@@ -0,0 +1,38 @@
++#ifndef RTL8180_SA2400_H
++#define RTL8180_SA2400_H
++
++/*
++ * Radio tuning for Philips SA2400 on RTL8180
++ *
++ * Copyright 2007 Andrea Merello <andreamrl at tiscali.it>
++ *
++ * Code from the BSD driver and the rtl8181 project have been
++ * very useful to understand certain things
++ *
++ * I want to thanks the Authors of such projects and the Ndiswrapper
++ * project Authors.
++ *
++ * A special Big Thanks also is for all people who donated me cards,
++ * making possible the creation of the original rtl8180 driver
++ * from which this code is derived!
++ *
++ * 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.
++ */
++
++#define SA2400_ANTENNA 0x91
++#define SA2400_DIG_ANAPARAM_PWR1_ON 0x8
++#define SA2400_ANA_ANAPARAM_PWR1_ON 0x28
++#define SA2400_ANAPARAM_PWR0_ON 0x3
++
++/* RX sensitivity in dbm */
++#define SA2400_MAX_SENS 85
++
++#define SA2400_REG4_FIRDAC_SHIFT 7
++
++void sa2400_rf_init(struct ieee80211_hw *);
++void sa2400_rf_stop(struct ieee80211_hw *);
++void sa2400_rf_set_channel(struct ieee80211_hw *, struct ieee80211_conf *);
++
++#endif /* RTL8180_SA2400_H */
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/rtl8180_max2820.h
+--- /dev/null 2007-12-05 09:05:26.573020786 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/rtl8180_max2820.h 2007-12-05 11:15:07.000000000 -0500
+@@ -0,0 +1,30 @@
++#ifndef RTL8180_MAX2820_H
++#define RTL8180_MAX2820_H
++
++/*
++ * Radio tuning for Maxim max2820 on RTL8180
++ *
++ * Copyright 2007 Andrea Merello <andreamrl at tiscali.it>
++ *
++ * Code from the BSD driver and the rtl8181 project have been
++ * very useful to understand certain things
++ *
++ * I want to thanks the Authors of such projects and the Ndiswrapper
++ * project Authors.
++ *
++ * A special Big Thanks also is for all people who donated me cards,
++ * making possible the creation of the original rtl8180 driver
++ * from which this code is derived!
++ *
++ * 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.
++ */
++
++#define MAXIM_ANTENNA 0xb3
++
++void max2820_rf_init(struct ieee80211_hw *);
++void max2820_rf_stop(struct ieee80211_hw *);
++void max2820_rf_set_channel(struct ieee80211_hw *, struct ieee80211_conf *);
++
++#endif /* RTL8180_MAX2820_H */
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/rtl8180_max2820.c
+--- /dev/null 2007-12-05 09:05:26.573020786 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/rtl8180_max2820.c 2007-12-05 11:15:07.000000000 -0500
+@@ -0,0 +1,142 @@
++/*
++ * Radio tuning for Maxim max2820 on RTL8180
++ *
++ * Copyright 2007 Andrea Merello <andreamrl at tiscali.it>
++ *
++ * Code from the BSD driver and the rtl8181 project have been
++ * very useful to understand certain things
++ *
++ * I want to thanks the Authors of such projects and the Ndiswrapper
++ * project Authors.
++ *
++ * A special Big Thanks also is for all people who donated me cards,
++ * making possible the creation of the original rtl8180 driver
++ * from which this code is derived!
++ *
++ * 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.
++ */
++
++#include <linux/init.h>
++#include <linux/pci.h>
++#include <linux/delay.h>
++#include <net/mac80211.h>
++
++#include "rtl8180.h"
++#include "rtl8180_max2820.h"
++
++u32 max2820_chan[] = {
++ 12, /* CH 1 */
++ 17,
++ 22,
++ 27,
++ 32,
++ 37,
++ 42,
++ 47,
++ 52,
++ 57,
++ 62,
++ 67,
++ 72,
++ 84, /* CH 14 */
++};
++
++static void write_max2820(struct ieee80211_hw *dev, u8 addr, u32 data)
++{
++ struct rtl8180_priv *priv = dev->priv;
++ u32 phy_config;
++
++ phy_config = 0x90 + (data & 0xf);
++ phy_config <<= 16;
++ phy_config += addr;
++ phy_config <<= 8;
++ phy_config += (data >> 4) & 0xff;
++
++ rtl818x_iowrite32(priv,
++ (__le32 __iomem *) &priv->map->RFPinsOutput, phy_config);
++
++ msleep(1);
++}
++
++static void max2820_write_phy_antenna(struct ieee80211_hw *dev, short chan)
++{
++ struct rtl8180_priv *priv = dev->priv;
++ u8 ant;
++
++ ant = MAXIM_ANTENNA;
++ if (priv->rfparam & RF_PARAM_ANTBDEFAULT)
++ ant |= BB_ANTENNA_B;
++ if (chan == 14)
++ ant |= BB_ANTATTEN_CHAN14;
++
++ rtl8180_write_phy(dev, 0x10, ant);
++}
++
++void max2820_rf_set_channel(struct ieee80211_hw *dev, struct ieee80211_conf *conf)
++{
++ struct rtl8180_priv *priv = dev->priv;
++ unsigned int chan_idx = conf ? conf->channel - 1 : 0;
++ u32 txpw = priv->channels[chan_idx].val & 0xFF;
++ u32 chan = max2820_chan[chan_idx];
++
++ /* While philips SA2400 drive the PA bias from
++ * sa2400, for MAXIM we do this directly from BB */
++ rtl8180_write_phy(dev, 3, txpw);
++
++ max2820_write_phy_antenna(dev, chan);
++ write_max2820(dev, 3, chan);
++}
++
++void max2820_rf_stop(struct ieee80211_hw *dev)
++{
++ rtl8180_write_phy(dev, 3, 0x8);
++ write_max2820(dev, 1, 0);
++}
++
++
++void max2820_rf_init(struct ieee80211_hw *dev)
++{
++ struct rtl8180_priv *priv = dev->priv;
++
++ /* MAXIM from netbsd driver */
++ write_max2820(dev, 0, 0x007); /* test mode as indicated in datasheet */
++ write_max2820(dev, 1, 0x01e); /* enable register */
++ write_max2820(dev, 2, 0x001); /* synt register */
++
++ max2820_rf_set_channel(dev, NULL);
++
++ write_max2820(dev, 4, 0x313); /* rx register */
++
++ /* PA is driven directly by the BB, we keep the MAXIM bias
++ * at the highest value in case that setting it to lower
++ * values may introduce some further attenuation somewhere..
++ */
++ write_max2820(dev, 5, 0x00f);
++
++ /* baseband configuration */
++ rtl8180_write_phy(dev, 0, 0x88); /* sys1 */
++ rtl8180_write_phy(dev, 3, 0x08); /* txagc */
++ rtl8180_write_phy(dev, 4, 0xf8); /* lnadet */
++ rtl8180_write_phy(dev, 5, 0x90); /* ifagcinit */
++ rtl8180_write_phy(dev, 6, 0x1a); /* ifagclimit */
++ rtl8180_write_phy(dev, 7, 0x64); /* ifagcdet */
++
++ max2820_write_phy_antenna(dev, 1);
++
++ rtl8180_write_phy(dev, 0x11, 0x88); /* trl */
++
++ if (rtl818x_ioread8(priv, &priv->map->CONFIG2) &
++ RTL818X_CONFIG2_ANTENNA_DIV)
++ rtl8180_write_phy(dev, 0x12, 0xc7);
++ else
++ rtl8180_write_phy(dev, 0x12, 0x47);
++
++ rtl8180_write_phy(dev, 0x13, 0x9b);
++
++ rtl8180_write_phy(dev, 0x19, 0x0); /* CHESTLIM */
++ rtl8180_write_phy(dev, 0x1a, 0x9f); /* CHSQLIM */
++
++ max2820_rf_set_channel(dev, NULL);
++}
+diff -up linux-2.6.23.noarch/drivers/net/wireless/rtl8187_dev.c.orig linux-2.6.23.noarch/drivers/net/wireless/rtl8187_dev.c
+--- linux-2.6.23.noarch/drivers/net/wireless/rtl8187_dev.c.orig 2007-12-05 11:15:01.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/rtl8187_dev.c 2007-12-05 11:15:07.000000000 -0500
+@@ -395,12 +395,12 @@ static int rtl8187_init_hw(struct ieee80
+ priv->rf_init(dev);
+
+ rtl818x_iowrite16(priv, &priv->map->BRSR, 0x01F3);
+- reg = rtl818x_ioread16(priv, &priv->map->PGSELECT) & 0xfffe;
+- rtl818x_iowrite16(priv, &priv->map->PGSELECT, reg | 0x1);
++ reg = rtl818x_ioread8(priv, &priv->map->PGSELECT) & ~1;
++ rtl818x_iowrite8(priv, &priv->map->PGSELECT, reg | 1);
+ rtl818x_iowrite16(priv, (__le16 *)0xFFFE, 0x10);
+ rtl818x_iowrite8(priv, &priv->map->TALLY_SEL, 0x80);
+ rtl818x_iowrite8(priv, (u8 *)0xFFFF, 0x60);
+- rtl818x_iowrite16(priv, &priv->map->PGSELECT, reg);
++ rtl818x_iowrite8(priv, &priv->map->PGSELECT, reg);
+
+ return 0;
+ }
+@@ -751,13 +751,13 @@ static int __devinit rtl8187_probe(struc
+ eeprom_93cx6_read(&eeprom, RTL8187_EEPROM_TXPWR_BASE,
+ &priv->txpwr_base);
+
+- reg = rtl818x_ioread16(priv, &priv->map->PGSELECT) & ~1;
+- rtl818x_iowrite16(priv, &priv->map->PGSELECT, reg | 1);
++ reg = rtl818x_ioread8(priv, &priv->map->PGSELECT) & ~1;
++ rtl818x_iowrite8(priv, &priv->map->PGSELECT, reg | 1);
+ /* 0 means asic B-cut, we should use SW 3 wire
+ * bit-by-bit banging for radio. 1 means we can use
+ * USB specific request to write radio registers */
+ priv->asic_rev = rtl818x_ioread8(priv, (u8 *)0xFFFE) & 0x3;
+- rtl818x_iowrite16(priv, &priv->map->PGSELECT, reg);
++ rtl818x_iowrite8(priv, &priv->map->PGSELECT, reg);
+ rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
+
+ rtl8225_write(dev, 0, 0x1B7);
+diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/rtl8180_sa2400.c
+--- /dev/null 2007-12-05 09:05:26.573020786 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/rtl8180_sa2400.c 2007-12-05 11:15:07.000000000 -0500
+@@ -0,0 +1,193 @@
++
++/*
++ * Radio tuning for Philips SA2400 on RTL8180
++ *
++ * Copyright 2007 Andrea Merello <andreamrl at tiscali.it>
++ *
++ * Code from the BSD driver and the rtl8181 project have been
++ * very useful to understand certain things
++ *
++ * I want to thanks the Authors of such projects and the Ndiswrapper
++ * project Authors.
++ *
++ * A special Big Thanks also is for all people who donated me cards,
++ * making possible the creation of the original rtl8180 driver
++ * from which this code is derived!
++ *
++ * 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.
++ */
++
++#include <linux/init.h>
++#include <linux/pci.h>
++#include <linux/delay.h>
++#include <net/mac80211.h>
++
++#include "rtl8180.h"
++#include "rtl8180_sa2400.h"
++
++static const u32 sa2400_chan[] = {
++ 0x00096c, /* ch1 */
++ 0x080970,
++ 0x100974,
++ 0x180978,
++ 0x000980,
++ 0x080984,
++ 0x100988,
++ 0x18098c,
++ 0x000994,
++ 0x080998,
++ 0x10099c,
++ 0x1809a0,
++ 0x0009a8,
++ 0x0009b4, /* ch 14 */
++};
++
++static void write_sa2400(struct ieee80211_hw *dev, u8 addr, u32 data)
++{
++ struct rtl8180_priv *priv = dev->priv;
++ u32 phy_config;
++
++ /* MAC will bang bits to the sa2400. sw 3-wire is NOT used */
++ phy_config = 0xb0000000;
++
++ phy_config |= ((u32)(addr & 0xf)) << 24;
++ phy_config |= data & 0xffffff;
++
++ rtl818x_iowrite32(priv,
++ (__le32 __iomem *) &priv->map->RFPinsOutput, phy_config);
++
++ msleep(3);
++}
++
++static void sa2400_write_phy_antenna(struct ieee80211_hw *dev, short chan)
++{
++ struct rtl8180_priv *priv = dev->priv;
++ u8 ant = SA2400_ANTENNA;
++
++ if (priv->rfparam & RF_PARAM_ANTBDEFAULT)
++ ant |= BB_ANTENNA_B;
++
++ if (chan == 14)
++ ant |= BB_ANTATTEN_CHAN14;
++
++ rtl8180_write_phy(dev, 0x10, ant);
++
++}
++
++void sa2400_rf_set_channel(struct ieee80211_hw *dev, struct ieee80211_conf *conf)
++{
++ struct rtl8180_priv *priv = dev->priv;
++ u32 txpw = priv->channels[conf->channel - 1].val & 0xFF;
++ u32 chan = sa2400_chan[conf->channel - 1];
++
++ write_sa2400(dev, 7, txpw);
++
++ sa2400_write_phy_antenna(dev, chan);
++
++ write_sa2400(dev, 0, chan);
++ write_sa2400(dev, 1, 0xbb50);
++ write_sa2400(dev, 2, 0x80);
++ write_sa2400(dev, 3, 0);
++}
++
++void sa2400_rf_stop(struct ieee80211_hw *dev)
++{
++ write_sa2400(dev, 4, 0);
++}
++
++void sa2400_rf_init(struct ieee80211_hw *dev)
++{
++ struct rtl8180_priv *priv = dev->priv;
++ u32 anaparam, txconf;
++ u8 firdac;
++ int analogphy = priv->rfparam & RF_PARAM_ANALOGPHY;
++
++ anaparam = priv->anaparam;
++ anaparam &= ~(1 << ANAPARAM_TXDACOFF_SHIFT);
++ anaparam &= ~ANAPARAM_PWR1_MASK;
++ anaparam &= ~ANAPARAM_PWR0_MASK;
++
++ if (analogphy) {
++ anaparam |= SA2400_ANA_ANAPARAM_PWR1_ON << ANAPARAM_PWR1_SHIFT;
++ firdac = 0;
++ } else {
++ anaparam |= (SA2400_DIG_ANAPARAM_PWR1_ON << ANAPARAM_PWR1_SHIFT);
++ anaparam |= (SA2400_ANAPARAM_PWR0_ON << ANAPARAM_PWR0_SHIFT);
++ firdac = 1 << SA2400_REG4_FIRDAC_SHIFT;
++ }
++
++ rtl8180_set_anaparam(priv, anaparam);
++
++ write_sa2400(dev, 0, sa2400_chan[0]);
++ write_sa2400(dev, 1, 0xbb50);
++ write_sa2400(dev, 2, 0x80);
++ write_sa2400(dev, 3, 0);
++ write_sa2400(dev, 4, 0x19340 | firdac);
++ write_sa2400(dev, 5, 0x1dfb | (SA2400_MAX_SENS - 54) << 15);
++ write_sa2400(dev, 4, 0x19348 | firdac); /* calibrate VCO */
++
++ if (!analogphy)
++ write_sa2400(dev, 4, 0x1938c); /*???*/
++
++ write_sa2400(dev, 4, 0x19340 | firdac);
++
++ write_sa2400(dev, 0, sa2400_chan[0]);
++ write_sa2400(dev, 1, 0xbb50);
++ write_sa2400(dev, 2, 0x80);
++ write_sa2400(dev, 3, 0);
++ write_sa2400(dev, 4, 0x19344 | firdac); /* calibrate filter */
++
++ /* new from rtl8180 embedded driver (rtl8181 project) */
++ write_sa2400(dev, 6, 0x13ff | (1 << 23)); /* MANRX */
++ write_sa2400(dev, 8, 0); /* VCO */
++
++ if (analogphy) {
++ rtl8180_set_anaparam(priv, anaparam |
++ (1 << ANAPARAM_TXDACOFF_SHIFT));
++
++ txconf = rtl818x_ioread32(priv, &priv->map->TX_CONF);
++ rtl818x_iowrite32(priv, &priv->map->TX_CONF,
++ txconf | RTL818X_TX_CONF_LOOPBACK_CONT);
++
++ write_sa2400(dev, 4, 0x19341); /* calibrates DC */
++
++ /* a 5us sleep is required here,
++ * we rely on the 3ms delay introduced in write_sa2400 */
++ write_sa2400(dev, 4, 0x19345);
++
++ /* a 20us sleep is required here,
++ * we rely on the 3ms delay introduced in write_sa2400 */
++
++ rtl818x_iowrite32(priv, &priv->map->TX_CONF, txconf);
++
++ rtl8180_set_anaparam(priv, anaparam);
++ }
++ /* end new code */
++
++ write_sa2400(dev, 4, 0x19341 | firdac); /* RTX MODE */
++
++ /* baseband configuration */
++ rtl8180_write_phy(dev, 0, 0x98);
++ rtl8180_write_phy(dev, 3, 0x38);
++ rtl8180_write_phy(dev, 4, 0xe0);
++ rtl8180_write_phy(dev, 5, 0x90);
++ rtl8180_write_phy(dev, 6, 0x1a);
++ rtl8180_write_phy(dev, 7, 0x64);
++
++ sa2400_write_phy_antenna(dev, 1);
++
++ rtl8180_write_phy(dev, 0x11, 0x80);
++
++ if (rtl818x_ioread8(priv, &priv->map->CONFIG2) &
++ RTL818X_CONFIG2_ANTENNA_DIV)
++ rtl8180_write_phy(dev, 0x12, 0xc7); /* enable ant diversity */
++ else
++ rtl8180_write_phy(dev, 0x12, 0x47); /* disable ant diversity */
++
++ rtl8180_write_phy(dev, 0x13, 0x90 | priv->csthreshold);
++
++ rtl8180_write_phy(dev, 0x19, 0x0);
++ rtl8180_write_phy(dev, 0x1a, 0xa0);
++}
+diff -up linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig linux-2.6.23.noarch/drivers/net/wireless/Kconfig
+--- linux-2.6.23.noarch/drivers/net/wireless/Kconfig.orig 2007-12-05 11:15:01.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/Kconfig 2007-12-05 11:15:07.000000000 -0500
+@@ -546,6 +546,11 @@ config USB_ZD1201
+ To compile this driver as a module, choose M here: the
+ module will be called zd1201.
+
++config RTL8180
++ tristate "Realtek 8185 PCI support"
++ depends on MAC80211 && PCI && WLAN_80211 && EXPERIMENTAL
++ select EEPROM_93CX6
++
+ config RTL8187
+ tristate "Realtek 8187 USB support"
+ depends on MAC80211 && USB && WLAN_80211 && EXPERIMENTAL
+diff -up linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig linux-2.6.23.noarch/drivers/net/wireless/Makefile
+--- linux-2.6.23.noarch/drivers/net/wireless/Makefile.orig 2007-12-05 11:15:01.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/Makefile 2007-12-05 11:15:07.000000000 -0500
+@@ -49,7 +49,10 @@ obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs
+ obj-$(CONFIG_USB_ZD1201) += zd1201.o
+ obj-$(CONFIG_LIBERTAS) += libertas/
+
++rtl8180-objs := rtl8180_dev.o rtl8180_rtl8225.o rtl8180_sa2400.o rtl8180_max2820.o
+ rtl8187-objs := rtl8187_dev.o rtl8187_rtl8225.o
++
++obj-$(CONFIG_RTL8180) += rtl8180.o
+ obj-$(CONFIG_RTL8187) += rtl8187.o
+
+ obj-$(CONFIG_ADM8211) += adm8211.o
+diff -up linux-2.6.23.noarch/drivers/net/wireless/rtl818x.h.orig linux-2.6.23.noarch/drivers/net/wireless/rtl818x.h
+--- linux-2.6.23.noarch/drivers/net/wireless/rtl818x.h.orig 2007-12-05 11:15:01.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/rtl818x.h 2007-12-05 11:15:07.000000000 -0500
+@@ -58,13 +58,17 @@ struct rtl818x_csr {
+ #define RTL818X_INT_TX_FO (1 << 15)
+ __le32 TX_CONF;
+ #define RTL818X_TX_CONF_LOOPBACK_MAC (1 << 17)
++#define RTL818X_TX_CONF_LOOPBACK_CONT (3 << 17)
+ #define RTL818X_TX_CONF_NO_ICV (1 << 19)
+ #define RTL818X_TX_CONF_DISCW (1 << 20)
++#define RTL818X_TX_CONF_SAT_HWPLCP (1 << 24)
+ #define RTL818X_TX_CONF_R8180_ABCD (2 << 25)
+ #define RTL818X_TX_CONF_R8180_F (3 << 25)
+ #define RTL818X_TX_CONF_R8185_ABC (4 << 25)
+ #define RTL818X_TX_CONF_R8185_D (5 << 25)
+ #define RTL818X_TX_CONF_HWVER_MASK (7 << 25)
++#define RTL818X_TX_CONF_PROBE_DTS (1 << 29)
++#define RTL818X_TX_CONF_HW_SEQNUM (1 << 30)
+ #define RTL818X_TX_CONF_CW_MIN (1 << 31)
+ __le32 RX_CONF;
+ #define RTL818X_RX_CONF_MONITOR (1 << 0)
+@@ -75,8 +79,12 @@ struct rtl818x_csr {
+ #define RTL818X_RX_CONF_DATA (1 << 18)
+ #define RTL818X_RX_CONF_CTRL (1 << 19)
+ #define RTL818X_RX_CONF_MGMT (1 << 20)
++#define RTL818X_RX_CONF_ADDR3 (1 << 21)
++#define RTL818X_RX_CONF_PM (1 << 22)
+ #define RTL818X_RX_CONF_BSSID (1 << 23)
+ #define RTL818X_RX_CONF_RX_AUTORESETPHY (1 << 28)
++#define RTL818X_RX_CONF_CSDM1 (1 << 29)
++#define RTL818X_RX_CONF_CSDM2 (1 << 30)
+ #define RTL818X_RX_CONF_ONLYERLPKT (1 << 31)
+ __le32 INT_TIMEOUT;
+ __le32 TBDA;
+@@ -92,6 +100,7 @@ struct rtl818x_csr {
+ u8 CONFIG0;
+ u8 CONFIG1;
+ u8 CONFIG2;
++#define RTL818X_CONFIG2_ANTENNA_DIV (1 << 6)
+ __le32 ANAPARAM;
+ u8 MSR;
+ #define RTL818X_MSR_NO_LINK (0 << 2)
+@@ -104,14 +113,17 @@ struct rtl818x_csr {
+ #define RTL818X_CONFIG4_VCOOFF (1 << 7)
+ u8 TESTR;
+ u8 reserved_9[2];
+- __le16 PGSELECT;
++ u8 PGSELECT;
++ u8 SECURITY;
+ __le32 ANAPARAM2;
+ u8 reserved_10[12];
+ __le16 BEACON_INTERVAL;
+ __le16 ATIM_WND;
+ __le16 BEACON_INTERVAL_TIME;
+ __le16 ATIMTR_INTERVAL;
+- u8 reserved_11[4];
++ u8 PHY_DELAY;
++ u8 CARRIER_SENSE_COUNTER;
++ u8 reserved_11[2];
+ u8 PHY[4];
+ __le16 RFPinsOutput;
+ __le16 RFPinsEnable;
+@@ -149,8 +161,10 @@ struct rtl818x_csr {
+ u8 RETRY_CTR;
+ u8 reserved_18[5];
+ __le32 RDSAR;
+- u8 reserved_19[18];
+- u16 TALLY_CNT;
++ u8 reserved_19[12];
++ __le16 FEMR;
++ u8 reserved_20[4];
++ __le16 TALLY_CNT;
+ u8 TALLY_SEL;
+ } __attribute__((packed));
+
linux-2.6-wireless-pending.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.17 -r 1.18 linux-2.6-wireless-pending.patch
Index: linux-2.6-wireless-pending.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/linux-2.6-wireless-pending.patch,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- linux-2.6-wireless-pending.patch 1 Dec 2007 19:44:21 -0000 1.17
+++ linux-2.6-wireless-pending.patch 5 Dec 2007 16:23:14 -0000 1.18
@@ -1,6 +1,31 @@
+diff -up linux-2.6.23.noarch/drivers/net/wireless/rtl8187_rtl8225.c.orig linux-2.6.23.noarch/drivers/net/wireless/rtl8187_rtl8225.c
+--- linux-2.6.23.noarch/drivers/net/wireless/rtl8187_rtl8225.c.orig 2007-10-09 16:31:38.000000000 -0400
++++ linux-2.6.23.noarch/drivers/net/wireless/rtl8187_rtl8225.c 2007-12-05 10:54:06.000000000 -0500
+@@ -283,8 +283,8 @@ static void rtl8225_rf_set_tx_power(stru
+ u32 reg;
+ int i;
+
+- cck_power = priv->channels[channel - 1].val & 0xF;
+- ofdm_power = priv->channels[channel - 1].val >> 4;
++ cck_power = priv->channels[channel - 1].val & 0xFF;
++ ofdm_power = priv->channels[channel - 1].val >> 8;
+
+ cck_power = min(cck_power, (u8)11);
+ ofdm_power = min(ofdm_power, (u8)35);
+@@ -500,8 +500,8 @@ static void rtl8225z2_rf_set_tx_power(st
+ u32 reg;
+ int i;
+
+- cck_power = priv->channels[channel - 1].val & 0xF;
+- ofdm_power = priv->channels[channel - 1].val >> 4;
++ cck_power = priv->channels[channel - 1].val & 0xFF;
++ ofdm_power = priv->channels[channel - 1].val >> 8;
+
+ cck_power = min(cck_power, (u8)15);
+ cck_power += priv->txpwr_base & 0xF;
diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/b43legacy/rfkill.h
---- /dev/null 2007-12-01 09:44:05.571105098 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/rfkill.h 2007-12-01 14:02:43.000000000 -0500
+--- /dev/null 2007-12-05 09:05:26.573020786 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/rfkill.h 2007-12-05 10:52:43.000000000 -0500
@@ -0,0 +1,59 @@
+#ifndef B43legacy_RFKILL_H_
+#define B43legacy_RFKILL_H_
@@ -62,8 +87,8 @@
+
+#endif /* B43legacy_RFKILL_H_ */
diff -up linux-2.6.23.noarch/drivers/net/wireless/b43legacy/leds.h.orig linux-2.6.23.noarch/drivers/net/wireless/b43legacy/leds.h
---- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/leds.h.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/leds.h 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/leds.h.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/leds.h 2007-12-05 10:52:43.000000000 -0500
@@ -1,30 +1,33 @@
#ifndef B43legacy_LEDS_H_
#define B43legacy_LEDS_H_
@@ -150,9 +175,21 @@
+#endif /* CONFIG_B43LEGACY_LEDS */
#endif /* B43legacy_LEDS_H_ */
+diff -up linux-2.6.23.noarch/drivers/net/wireless/b43legacy/debugfs.c.orig linux-2.6.23.noarch/drivers/net/wireless/b43legacy/debugfs.c
+--- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/debugfs.c.orig 2007-12-05 10:50:56.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/debugfs.c 2007-12-05 10:54:04.000000000 -0500
+@@ -209,7 +209,7 @@ static ssize_t b43legacy_debugfs_read(st
+ struct b43legacy_wldev *dev;
+ struct b43legacy_debugfs_fops *dfops;
+ struct b43legacy_dfs_file *dfile;
+- ssize_t ret = 0;
++ ssize_t uninitialized_var(ret);
+ char *buf;
+ const size_t bufsize = 1024 * 128;
+ const size_t buforder = get_order(bufsize);
diff -up linux-2.6.23.noarch/drivers/net/wireless/b43legacy/main.h.orig linux-2.6.23.noarch/drivers/net/wireless/b43legacy/main.h
---- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/main.h.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/main.h 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/main.h.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/main.h 2007-12-05 10:52:43.000000000 -0500
@@ -3,7 +3,7 @@
Broadcom B43legacy wireless driver
@@ -163,8 +200,8 @@
Copyright (c) 2005 Danny van Dyk <kugelfang at gentoo.org>
Copyright (c) 2005 Andreas Jaggi <andreas.jaggi at waterwave.ch>
diff -up linux-2.6.23.noarch/drivers/net/wireless/b43legacy/phy.c.orig linux-2.6.23.noarch/drivers/net/wireless/b43legacy/phy.c
---- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/phy.c.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/phy.c 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/phy.c.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/phy.c 2007-12-05 10:52:43.000000000 -0500
@@ -3,7 +3,7 @@
Broadcom B43legacy wireless driver
@@ -305,8 +342,8 @@
phy->idle_tssi = 62;
dyn_tssi2dbm = kmalloc(64, GFP_KERNEL);
diff -up linux-2.6.23.noarch/drivers/net/wireless/b43legacy/leds.c.orig linux-2.6.23.noarch/drivers/net/wireless/b43legacy/leds.c
---- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/leds.c.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/leds.c 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/leds.c.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/leds.c 2007-12-05 10:52:43.000000000 -0500
@@ -1,13 +1,13 @@
/*
@@ -773,8 +810,8 @@
+ b43legacy_unregister_led(&dev->led_assoc);
}
diff -up linux-2.6.23.noarch/drivers/net/wireless/b43legacy/radio.h.orig linux-2.6.23.noarch/drivers/net/wireless/b43legacy/radio.h
---- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/radio.h.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/radio.h 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/radio.h.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/radio.h 2007-12-05 10:52:43.000000000 -0500
@@ -3,7 +3,7 @@
Broadcom B43legacy wireless driver
@@ -794,8 +831,8 @@
int b43legacy_radio_selectchannel(struct b43legacy_wldev *dev, u8 channel,
int synthetic_pu_workaround);
diff -up /dev/null linux-2.6.23.noarch/drivers/net/wireless/b43legacy/rfkill.c
---- /dev/null 2007-12-01 09:44:05.571105098 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/rfkill.c 2007-12-01 14:02:43.000000000 -0500
+--- /dev/null 2007-12-05 09:05:26.573020786 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/rfkill.c 2007-12-05 10:52:43.000000000 -0500
@@ -0,0 +1,189 @@
+/*
+
@@ -987,8 +1024,8 @@
+ rfk->rfkill = NULL;
+}
diff -up linux-2.6.23.noarch/drivers/net/wireless/b43legacy/ilt.c.orig linux-2.6.23.noarch/drivers/net/wireless/b43legacy/ilt.c
---- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/ilt.c.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/ilt.c 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/ilt.c.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/ilt.c 2007-12-05 10:52:43.000000000 -0500
@@ -3,7 +3,7 @@
Broadcom B43legacy wireless driver
@@ -999,8 +1036,8 @@
Danny van Dyk <kugelfang at gentoo.org>
Andreas Jaggi <andreas.jaggi at waterwave.ch>
diff -up linux-2.6.23.noarch/drivers/net/wireless/b43legacy/phy.h.orig linux-2.6.23.noarch/drivers/net/wireless/b43legacy/phy.h
---- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/phy.h.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/phy.h 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/phy.h.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/phy.h 2007-12-05 10:52:43.000000000 -0500
@@ -3,7 +3,7 @@
Broadcom B43legacy wireless driver
@@ -1011,8 +1048,8 @@
Danny van Dyk <kugelfang at gentoo.org>
Andreas Jaggi <andreas.jaggi at waterwave.ch>
diff -up linux-2.6.23.noarch/drivers/net/wireless/b43legacy/Kconfig.orig linux-2.6.23.noarch/drivers/net/wireless/b43legacy/Kconfig
---- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/Kconfig.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/Kconfig 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/Kconfig.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/Kconfig 2007-12-05 10:52:43.000000000 -0500
@@ -34,6 +34,22 @@ config B43LEGACY_PCICORE_AUTOSELECT
select SSB_DRIVER_PCICORE
default y
@@ -1037,8 +1074,8 @@
bool "Broadcom 43xx-legacy debugging"
depends on B43LEGACY
diff -up linux-2.6.23.noarch/drivers/net/wireless/b43legacy/b43legacy.h.orig linux-2.6.23.noarch/drivers/net/wireless/b43legacy/b43legacy.h
---- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/b43legacy.h.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/b43legacy.h 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/drivers/net/wireless/b43legacy/b43legacy.h.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/drivers/net/wireless/b43legacy/b43legacy.h 2007-12-05 10:54:04.000000000 -0500
@@ -19,6 +19,7 @@
#include "debugfs.h"
@@ -1047,7 +1084,26 @@
#include "phy.h"
-@@ -592,6 +593,9 @@ struct b43legacy_wl {
+@@ -275,6 +276,8 @@
+ #define B43legacy_DEFAULT_SHORT_RETRY_LIMIT 7
+ #define B43legacy_DEFAULT_LONG_RETRY_LIMIT 4
+
++#define B43legacy_PHY_TX_BADNESS_LIMIT 1000
++
+ /* Max size of a security key */
+ #define B43legacy_SEC_KEYSIZE 16
+ /* Security algorithms. */
+@@ -510,6 +513,9 @@ struct b43legacy_phy {
+ u16 lofcal;
+
+ u16 initval;
++
++ /* PHY TX errors counter. */
++ atomic_t txerr_cnt;
+ };
+
+ /* Data structures for DMA transmission, per 80211 core. */
+@@ -592,9 +598,14 @@ struct b43legacy_wl {
u8 rng_initialized;
char rng_name[30 + 1];
@@ -1057,7 +1113,12 @@
/* List of all wireless devices on this chip */
struct list_head devlist;
u8 nr_devs;
-@@ -663,8 +667,11 @@ struct b43legacy_wldev {
++
++ bool radiotap_enabled;
[...37293 lines suppressed...]
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4321) },
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4324) },
@@ -47150,8 +59736,8 @@
};
MODULE_DEVICE_TABLE(pci, b43_pci_bridge_tbl);
diff -up linux-2.6.23.noarch/drivers/ssb/main.c.orig linux-2.6.23.noarch/drivers/ssb/main.c
---- linux-2.6.23.noarch/drivers/ssb/main.c.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/drivers/ssb/main.c 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/drivers/ssb/main.c.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/drivers/ssb/main.c 2007-12-05 10:52:44.000000000 -0500
@@ -877,14 +877,22 @@ EXPORT_SYMBOL(ssb_clockspeed);
static u32 ssb_tmslow_reject_bitmask(struct ssb_device *dev)
@@ -47177,8 +59763,8 @@
}
return (SSB_TMSLOW_REJECT_22 | SSB_TMSLOW_REJECT_23);
diff -up linux-2.6.23.noarch/net/ieee80211/Kconfig.orig linux-2.6.23.noarch/net/ieee80211/Kconfig
---- linux-2.6.23.noarch/net/ieee80211/Kconfig.orig 2007-10-09 16:31:38.000000000 -0400
-+++ linux-2.6.23.noarch/net/ieee80211/Kconfig 2007-12-01 14:03:55.000000000 -0500
+--- linux-2.6.23.noarch/net/ieee80211/Kconfig.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/net/ieee80211/Kconfig 2007-12-05 10:52:44.000000000 -0500
@@ -1,8 +1,9 @@
config IEEE80211
- tristate "Generic IEEE 802.11 Networking Stack"
@@ -47192,8 +59778,8 @@
config IEEE80211_DEBUG
bool "Enable full debugging output"
diff -up linux-2.6.23.noarch/net/ieee80211/ieee80211_wx.c.orig linux-2.6.23.noarch/net/ieee80211/ieee80211_wx.c
---- linux-2.6.23.noarch/net/ieee80211/ieee80211_wx.c.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/net/ieee80211/ieee80211_wx.c 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/net/ieee80211/ieee80211_wx.c.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/net/ieee80211/ieee80211_wx.c 2007-12-05 10:52:44.000000000 -0500
@@ -708,7 +708,7 @@ int ieee80211_wx_get_encodeext(struct ie
} else
idx = ieee->tx_keyidx;
@@ -47204,8 +59790,8 @@
if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA)
return -EINVAL;
diff -up linux-2.6.23.noarch/net/mac80211/rx.c.orig linux-2.6.23.noarch/net/mac80211/rx.c
---- linux-2.6.23.noarch/net/mac80211/rx.c.orig 2007-12-01 14:01:47.000000000 -0500
-+++ linux-2.6.23.noarch/net/mac80211/rx.c 2007-12-01 14:24:28.000000000 -0500
+--- linux-2.6.23.noarch/net/mac80211/rx.c.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/net/mac80211/rx.c 2007-12-05 10:52:44.000000000 -0500
@@ -243,6 +243,10 @@ ieee80211_rx_h_parse_qos(struct ieee8021
u8 *qc = data + ieee80211_get_hdrlen(rx->fc) - QOS_CONTROL_LEN;
/* frame has qos control */
@@ -47615,8 +60201,8 @@
if (__ieee80211_invoke_rx_handlers(local, local->rx_pre_handlers, &rx,
diff -up linux-2.6.23.noarch/net/mac80211/ieee80211_ioctl.c.orig linux-2.6.23.noarch/net/mac80211/ieee80211_ioctl.c
---- linux-2.6.23.noarch/net/mac80211/ieee80211_ioctl.c.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/net/mac80211/ieee80211_ioctl.c 2007-12-01 14:03:55.000000000 -0500
+--- linux-2.6.23.noarch/net/mac80211/ieee80211_ioctl.c.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/net/mac80211/ieee80211_ioctl.c 2007-12-05 10:52:44.000000000 -0500
@@ -314,7 +314,7 @@ int ieee80211_set_channel(struct ieee802
}
@@ -47722,8 +60308,8 @@
if (sdata->type != IEEE80211_IF_TYPE_STA)
ret = -EINVAL;
diff -up linux-2.6.23.noarch/net/mac80211/tx.c.orig linux-2.6.23.noarch/net/mac80211/tx.c
---- linux-2.6.23.noarch/net/mac80211/tx.c.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/net/mac80211/tx.c 2007-12-01 14:03:55.000000000 -0500
+--- linux-2.6.23.noarch/net/mac80211/tx.c.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/net/mac80211/tx.c 2007-12-05 10:52:44.000000000 -0500
@@ -223,7 +223,7 @@ ieee80211_tx_h_check_assoc(struct ieee80
if (unlikely(tx->flags & IEEE80211_TXRXD_TX_INJECTED))
return TXRX_CONTINUE;
@@ -47836,8 +60422,8 @@
void ieee80211_clear_tx_pending(struct ieee80211_local *local)
diff -up linux-2.6.23.noarch/net/mac80211/util.c.orig linux-2.6.23.noarch/net/mac80211/util.c
---- linux-2.6.23.noarch/net/mac80211/util.c.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/net/mac80211/util.c 2007-12-01 14:03:55.000000000 -0500
+--- linux-2.6.23.noarch/net/mac80211/util.c.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/net/mac80211/util.c 2007-12-05 10:52:44.000000000 -0500
@@ -21,6 +21,7 @@
#include <linux/wireless.h>
#include <linux/bitmap.h>
@@ -47909,8 +60495,8 @@
+}
+EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces);
diff -up linux-2.6.23.noarch/net/mac80211/ieee80211.c.orig linux-2.6.23.noarch/net/mac80211/ieee80211.c
---- linux-2.6.23.noarch/net/mac80211/ieee80211.c.orig 2007-12-01 14:01:47.000000000 -0500
-+++ linux-2.6.23.noarch/net/mac80211/ieee80211.c 2007-12-01 14:03:55.000000000 -0500
+--- linux-2.6.23.noarch/net/mac80211/ieee80211.c.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/net/mac80211/ieee80211.c 2007-12-05 10:52:44.000000000 -0500
@@ -33,6 +33,8 @@
#include "debugfs.h"
#include "debugfs_netdev.h"
@@ -48005,8 +60591,8 @@
{
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
diff -up linux-2.6.23.noarch/net/mac80211/ieee80211_i.h.orig linux-2.6.23.noarch/net/mac80211/ieee80211_i.h
---- linux-2.6.23.noarch/net/mac80211/ieee80211_i.h.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/net/mac80211/ieee80211_i.h 2007-12-01 14:03:55.000000000 -0500
+--- linux-2.6.23.noarch/net/mac80211/ieee80211_i.h.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/net/mac80211/ieee80211_i.h 2007-12-05 10:52:44.000000000 -0500
@@ -91,6 +91,8 @@ struct ieee80211_sta_bss {
size_t rsn_ie_len;
u8 *wmm_ie;
@@ -48088,8 +60674,8 @@
int rate, int erp, int short_preamble);
void mac80211_ev_michael_mic_failure(struct net_device *dev, int keyidx,
diff -up linux-2.6.23.noarch/net/mac80211/sta_info.h.orig linux-2.6.23.noarch/net/mac80211/sta_info.h
---- linux-2.6.23.noarch/net/mac80211/sta_info.h.orig 2007-12-01 14:01:47.000000000 -0500
-+++ linux-2.6.23.noarch/net/mac80211/sta_info.h 2007-12-01 14:03:55.000000000 -0500
+--- linux-2.6.23.noarch/net/mac80211/sta_info.h.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/net/mac80211/sta_info.h 2007-12-05 10:52:44.000000000 -0500
@@ -99,6 +99,9 @@ struct sta_info {
u16 listen_interval;
@@ -48101,8 +60687,8 @@
struct sta_info_debugfsdentries {
struct dentry *dir;
diff -up linux-2.6.23.noarch/net/mac80211/Kconfig.orig linux-2.6.23.noarch/net/mac80211/Kconfig
---- linux-2.6.23.noarch/net/mac80211/Kconfig.orig 2007-12-01 14:01:47.000000000 -0500
-+++ linux-2.6.23.noarch/net/mac80211/Kconfig 2007-12-01 14:03:55.000000000 -0500
+--- linux-2.6.23.noarch/net/mac80211/Kconfig.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/net/mac80211/Kconfig 2007-12-05 10:52:44.000000000 -0500
@@ -51,6 +51,16 @@ config MAC80211_DEBUG
If you are not trying to debug or develop the ieee80211
subsystem, you most likely want to say N here.
@@ -48121,8 +60707,8 @@
bool "Verbose debugging output"
depends on MAC80211_DEBUG
diff -up linux-2.6.23.noarch/net/mac80211/ieee80211_sta.c.orig linux-2.6.23.noarch/net/mac80211/ieee80211_sta.c
---- linux-2.6.23.noarch/net/mac80211/ieee80211_sta.c.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/net/mac80211/ieee80211_sta.c 2007-12-01 14:03:55.000000000 -0500
+--- linux-2.6.23.noarch/net/mac80211/ieee80211_sta.c.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/net/mac80211/ieee80211_sta.c 2007-12-05 10:52:44.000000000 -0500
@@ -57,6 +57,13 @@
#define ERP_INFO_USE_PROTECTION BIT(1)
@@ -48692,8 +61278,8 @@
}
diff -up linux-2.6.23.noarch/Documentation/feature-removal-schedule.txt.orig linux-2.6.23.noarch/Documentation/feature-removal-schedule.txt
---- linux-2.6.23.noarch/Documentation/feature-removal-schedule.txt.orig 2007-12-01 14:01:47.000000000 -0500
-+++ linux-2.6.23.noarch/Documentation/feature-removal-schedule.txt 2007-12-01 14:03:55.000000000 -0500
+--- linux-2.6.23.noarch/Documentation/feature-removal-schedule.txt.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/Documentation/feature-removal-schedule.txt 2007-12-05 10:52:44.000000000 -0500
@@ -316,3 +316,20 @@ Why: powermac supports proper generic pm
Who: Johannes Berg <johannes at sipsolutions.net>
@@ -48716,8 +61302,8 @@
+
+---------------------------
diff -up linux-2.6.23.noarch/MAINTAINERS.orig linux-2.6.23.noarch/MAINTAINERS
---- linux-2.6.23.noarch/MAINTAINERS.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/MAINTAINERS 2007-12-01 14:03:55.000000000 -0500
+--- linux-2.6.23.noarch/MAINTAINERS.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/MAINTAINERS 2007-12-05 10:52:44.000000000 -0500
@@ -820,7 +820,7 @@ P: Stefano Brivio
M: stefano.brivio at polimi.it
L: linux-wireless at vger.kernel.org
@@ -48765,8 +61351,8 @@
L: ipw3945-devel at lists.sourceforge.net
W: http://intellinuxwireless.org
diff -up linux-2.6.23.noarch/include/net/mac80211.h.orig linux-2.6.23.noarch/include/net/mac80211.h
---- linux-2.6.23.noarch/include/net/mac80211.h.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/include/net/mac80211.h 2007-12-01 14:03:55.000000000 -0500
+--- linux-2.6.23.noarch/include/net/mac80211.h.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/include/net/mac80211.h 2007-12-05 10:52:44.000000000 -0500
@@ -139,17 +139,54 @@ enum ieee80211_phymode {
};
@@ -48906,8 +61492,8 @@
+
#endif /* MAC80211_H */
diff -up linux-2.6.23.noarch/include/linux/ieee80211.h.orig linux-2.6.23.noarch/include/linux/ieee80211.h
---- linux-2.6.23.noarch/include/linux/ieee80211.h.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/include/linux/ieee80211.h 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/include/linux/ieee80211.h.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/include/linux/ieee80211.h 2007-12-05 10:52:44.000000000 -0500
@@ -54,6 +54,8 @@
#define IEEE80211_STYPE_ACTION 0x00D0
@@ -49125,8 +61711,8 @@
#define WLAN_CIPHER_SUITE_USE_GROUP 0x000FAC00
#define WLAN_CIPHER_SUITE_WEP40 0x000FAC01
diff -up linux-2.6.23.noarch/include/linux/ssb/ssb_regs.h.orig linux-2.6.23.noarch/include/linux/ssb/ssb_regs.h
---- linux-2.6.23.noarch/include/linux/ssb/ssb_regs.h.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/include/linux/ssb/ssb_regs.h 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/include/linux/ssb/ssb_regs.h.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/include/linux/ssb/ssb_regs.h 2007-12-05 10:52:44.000000000 -0500
@@ -147,6 +147,10 @@
#define SSB_IDLOW_SSBREV 0xF0000000 /* Sonics Backplane Revision code */
#define SSB_IDLOW_SSBREV_22 0x00000000 /* <= 2.2 */
@@ -49227,8 +61813,8 @@
enum {
SSB_SPROM1CCODE_WORLD = 0,
diff -up linux-2.6.23.noarch/include/linux/ssb/ssb.h.orig linux-2.6.23.noarch/include/linux/ssb/ssb.h
---- linux-2.6.23.noarch/include/linux/ssb/ssb.h.orig 2007-12-01 14:02:29.000000000 -0500
-+++ linux-2.6.23.noarch/include/linux/ssb/ssb.h 2007-12-01 14:02:43.000000000 -0500
+--- linux-2.6.23.noarch/include/linux/ssb/ssb.h.orig 2007-12-05 10:52:38.000000000 -0500
++++ linux-2.6.23.noarch/include/linux/ssb/ssb.h 2007-12-05 10:52:44.000000000 -0500
@@ -15,22 +15,14 @@ struct pcmcia_device;
struct ssb_bus;
struct ssb_driver;
--- linux-2.6-b43-rev-d.patch DELETED ---
--- linux-2.6-zd1211rw-mac80211.patch DELETED ---
More information about the scm-commits
mailing list