summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-01-10 19:23:09 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-01-10 19:23:09 +0000
commit5e29bec1cd7de71eb6368adeb147e2432d782295 (patch)
tree143454660e0a75c8ba9e2e8a000275b8089e4ae2 /package
parentbba8a047d1ac4f0e3f3e97b09c117fab55aa8ea0 (diff)
[package] mac80211: update compat-wireless to 2009-01-10
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13961 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/mac80211/Makefile4
-rw-r--r--package/mac80211/patches/301-rt2x00-Implement-support-for-802.11n.patch (renamed from package/mac80211/patches/310-rt2x00_implement_support_for_802.11n.patch)185
-rw-r--r--package/mac80211/patches/302-rt2x00-Implement-support-for-rt2800pci.patch (renamed from package/mac80211/patches/311-rt2x00_implement_support_for_rt2800pci.patch)131
-rw-r--r--package/mac80211/patches/303-rt2x00-Implement-support-for-rt2800usb.patch (renamed from package/mac80211/patches/312-rt2x00_implement_support_for_rt2800usb.patch)80
-rw-r--r--package/mac80211/patches/320-enable_rt2800.patch15
-rw-r--r--package/mac80211/patches/401-ath9k-convert-to-struct-device.patch12
-rw-r--r--package/mac80211/patches/402-ath9k-convert-to-use-bus-agnostic-DMA-routines.patch8
-rw-r--r--package/mac80211/patches/403-ath9k-introduce-bus-specific-cache-size-routine.patch6
-rw-r--r--package/mac80211/patches/404-ath9k-introduce-bus-specific-cleanup-routine.patch10
-rw-r--r--package/mac80211/patches/405-ath9k-move-PCI-code-into-separate-file.patch18
-rw-r--r--package/mac80211/patches/406-ath9k-introduce-platform-driver-for-AHB-bus-support.patch4
-rw-r--r--package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch2
12 files changed, 316 insertions, 159 deletions
diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile
index b8962186f..d25488def 100644
--- a/package/mac80211/Makefile
+++ b/package/mac80211/Makefile
@@ -12,11 +12,11 @@ PKG_NAME:=mac80211
PKG_RELEASE:=1
ifneq ($(CONFIG_LINUX_2_6_27)$(CONFIG_LINUX_2_6_28),)
- PKG_VERSION:=2009-01-07
+ PKG_VERSION:=2009-01-10
PKG_SOURCE_URL:= \
http://www.orbit-lab.org/kernel/compat-wireless-2.6/2009/01 \
http://wireless.kernel.org/download/compat-wireless-2.6
- PKG_MD5SUM:=2788149d630d48686f7ca79131cdbe8c
+ PKG_MD5SUM:=6edd60f6b5ee600aec28e148bc8e2a05
else
PKG_VERSION:=2008-08-06
PKG_SOURCE_URL:=http://www.orbit-lab.org/kernel/compat-wireless-2.6/2008/08
diff --git a/package/mac80211/patches/310-rt2x00_implement_support_for_802.11n.patch b/package/mac80211/patches/301-rt2x00-Implement-support-for-802.11n.patch
index f82144824..a6e76bce3 100644
--- a/package/mac80211/patches/310-rt2x00_implement_support_for_802.11n.patch
+++ b/package/mac80211/patches/301-rt2x00-Implement-support-for-802.11n.patch
@@ -1,9 +1,7 @@
+From 42d5399c2743dbd1ddaaadc8cb04adbfc65cc970 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
-Date: Sun, 28 Dec 2008 12:48:46 +0000 (+0100)
-Subject: rt2x00: Implement support for 802.11n
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fivd%2Frt2x00.git;a=commitdiff_plain;h=1ddf4bdad5f51a799ee580e125dda19dd18daa39
-
-rt2x00: Implement support for 802.11n
+Date: Sat, 10 Jan 2009 11:01:10 +0100
+Subject: [PATCH] rt2x00: Implement support for 802.11n
Extend rt2x00lib capabilities to support 802.11n,
it still lacks aggregation support, but that can
@@ -11,6 +9,17 @@ be added in the future.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
+ drivers/net/wireless/rt2x00/Kconfig | 3 +
+ drivers/net/wireless/rt2x00/Makefile | 1 +
+ drivers/net/wireless/rt2x00/rt2x00.h | 5 ++
+ drivers/net/wireless/rt2x00/rt2x00config.c | 5 ++
+ drivers/net/wireless/rt2x00/rt2x00dev.c | 91 ++++++++++++++++++++-------
+ drivers/net/wireless/rt2x00/rt2x00ht.c | 69 +++++++++++++++++++++
+ drivers/net/wireless/rt2x00/rt2x00lib.h | 24 +++++++
+ drivers/net/wireless/rt2x00/rt2x00queue.c | 1 +
+ drivers/net/wireless/rt2x00/rt2x00queue.h | 26 +++++++-
+ 9 files changed, 197 insertions(+), 28 deletions(-)
+ create mode 100644 drivers/net/wireless/rt2x00/rt2x00ht.c
--- a/drivers/net/wireless/rt2x00/Makefile
+++ b/drivers/net/wireless/rt2x00/Makefile
@@ -24,7 +33,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
obj-$(CONFIG_RT2X00_LIB_PCI) += rt2x00pci.o
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
-@@ -107,6 +107,7 @@
+@@ -108,6 +108,7 @@
*/
#define ACK_SIZE 14
#define IEEE80211_HEADER 24
@@ -32,7 +41,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
#define PLCP 48
#define BEACON 100
#define PREAMBLE 144
-@@ -356,6 +357,7 @@ static inline struct rt2x00_intf* vif_to
+@@ -357,6 +358,7 @@ static inline struct rt2x00_intf* vif_to
* for @tx_power_a, @tx_power_bg and @channels.
* @channels: Device/chipset specific channel values (See &struct rf_channel).
* @channels_info: Additional information for channels (See &struct channel_info).
@@ -40,7 +49,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
*/
struct hw_mode_spec {
unsigned int supported_bands;
-@@ -369,6 +371,8 @@ struct hw_mode_spec {
+@@ -370,6 +372,8 @@ struct hw_mode_spec {
unsigned int num_channels;
const struct rf_channel *channels;
const struct channel_info *channels_info;
@@ -49,7 +58,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
};
/*
-@@ -603,6 +607,7 @@ enum rt2x00_flags {
+@@ -604,6 +608,7 @@ enum rt2x00_flags {
CONFIG_EXTERNAL_LNA_BG,
CONFIG_DOUBLE_ANTENNA,
CONFIG_DISABLE_LINK_TUNING,
@@ -59,12 +68,11 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
/*
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
-@@ -173,6 +173,12 @@ void rt2x00lib_config(struct rt2x00_dev
+@@ -173,6 +173,11 @@ void rt2x00lib_config(struct rt2x00_dev
libconf.conf = conf;
if (ieee80211_flags & IEEE80211_CONF_CHANGE_CHANNEL) {
-+ if ((conf->ht.channel_type == NL80211_CHAN_HT40MINUS) ||
-+ (conf->ht.channel_type == NL80211_CHAN_HT40PLUS))
++ if (conf_is_ht40(conf))
+ __set_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags);
+ else
+ __clear_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags);
@@ -74,18 +82,113 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
sizeof(libconf.rf));
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
-@@ -384,7 +384,9 @@ void rt2x00lib_rxdone(struct rt2x00_dev
- if (((rxdesc.dev_flags & RXDONE_SIGNAL_PLCP) &&
- (rate->plcp == rxdesc.signal)) ||
- ((rxdesc.dev_flags & RXDONE_SIGNAL_BITRATE) &&
+@@ -315,18 +315,54 @@ void rt2x00lib_txdone(struct queue_entry
+ }
+ EXPORT_SYMBOL_GPL(rt2x00lib_txdone);
+
++static int rt2x00lib_rxdone_read_signal(struct rt2x00_dev *rt2x00dev,
++ struct rxdone_entry_desc *rxdesc)
++{
++ struct ieee80211_supported_band *sband;
++ const struct rt2x00_rate *rate;
++ unsigned int i;
++ int signal;
++ int type;
++
++ /*
++ * For non-HT rates the MCS value needs to contain the
++ * actually used rate modulation (CCK or OFDM).
++ */
++ if (rxdesc->dev_flags & RXDONE_SIGNAL_MCS)
++ signal = RATE_MCS(rxdesc->rate_mode, rxdesc->signal);
++ else
++ signal = rxdesc->signal;
++
++ type = (rxdesc->dev_flags & RXDONE_SIGNAL_MASK);
++
++ sband = &rt2x00dev->bands[rt2x00dev->curr_band];
++ for (i = 0; i < sband->n_bitrates; i++) {
++ rate = rt2x00_get_rate(sband->bitrates[i].hw_value);
++
++ if (((type == RXDONE_SIGNAL_PLCP) &&
++ (rate->plcp == signal)) ||
++ ((type == RXDONE_SIGNAL_BITRATE) &&
++ (rate->bitrate == signal)) ||
++ ((type == RXDONE_SIGNAL_MCS) &&
++ (rate->mcs == signal))) {
++ return i;
++ }
++ }
++
++ WARNING(rt2x00dev, "Frame received with unrecognized signal, "
++ "signal=0x%.4x, type=%d.\n", signal, type);
++ return 0;
++}
++
+ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev,
+ struct queue_entry *entry)
+ {
+ struct rxdone_entry_desc rxdesc;
+ struct sk_buff *skb;
+ struct ieee80211_rx_status *rx_status = &rt2x00dev->rx_status;
+- struct ieee80211_supported_band *sband;
+- const struct rt2x00_rate *rate;
+ unsigned int header_length;
+ unsigned int align;
+- unsigned int i;
+- int idx = -1;
++ int rate_idx;
+
+ /*
+ * Allocate a new sk_buffer. If no new buffer available, drop the
+@@ -375,26 +411,17 @@ void rt2x00lib_rxdone(struct rt2x00_dev
+ skb_trim(entry->skb, rxdesc.size);
+
+ /*
+- * Update RX statistics.
+- */
+- sband = &rt2x00dev->bands[rt2x00dev->curr_band];
+- for (i = 0; i < sband->n_bitrates; i++) {
+- rate = rt2x00_get_rate(sband->bitrates[i].hw_value);
+-
+- if (((rxdesc.dev_flags & RXDONE_SIGNAL_PLCP) &&
+- (rate->plcp == rxdesc.signal)) ||
+- ((rxdesc.dev_flags & RXDONE_SIGNAL_BITRATE) &&
- (rate->bitrate == rxdesc.signal))) {
-+ (rate->bitrate == rxdesc.signal)) ||
-+ ((rxdesc.dev_flags & RXDONE_SIGNAL_MCS) &&
-+ (rate->mcs == rxdesc.signal))) {
- idx = i;
- break;
- }
-@@ -439,72 +441,84 @@ const struct rt2x00_rate rt2x00_supporte
+- idx = i;
+- break;
+- }
+- }
+-
+- if (idx < 0) {
+- WARNING(rt2x00dev, "Frame received with unrecognized signal,"
+- "signal=0x%.2x, type=%d.\n", rxdesc.signal,
+- (rxdesc.dev_flags & RXDONE_SIGNAL_MASK));
+- idx = 0;
++ * Check if the frame was received using HT. In that case,
++ * the rate is the MCS index and should be passed to mac80211
++ * directly. Otherwise we need to translate the signal to
++ * the correct bitrate index.
++ */
++ if (rxdesc.rate_mode == RATE_MODE_CCK ||
++ rxdesc.rate_mode == RATE_MODE_OFDM) {
++ rate_idx = rt2x00lib_rxdone_read_signal(rt2x00dev, &rxdesc);
++ } else {
++ rxdesc.flags |= RX_FLAG_HT;
++ rate_idx = rxdesc.signal;
+ }
+
+ /*
+@@ -404,7 +431,7 @@ void rt2x00lib_rxdone(struct rt2x00_dev
+ rt2x00debug_update_crypto(rt2x00dev, &rxdesc);
+
+ rx_status->mactime = rxdesc.timestamp;
+- rx_status->rate_idx = idx;
++ rx_status->rate_idx = rate_idx;
+ rx_status->qual = rt2x00link_calculate_signal(rt2x00dev, rxdesc.rssi);
+ rx_status->signal = rxdesc.rssi;
+ rx_status->noise = rxdesc.noise;
+@@ -439,72 +466,84 @@ const struct rt2x00_rate rt2x00_supporte
.bitrate = 10,
.ratemask = BIT(0),
.plcp = 0x00,
@@ -170,7 +273,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
},
};
-@@ -582,6 +596,8 @@ static int rt2x00lib_probe_hw_modes(stru
+@@ -580,6 +619,8 @@ static int rt2x00lib_probe_hw_modes(stru
rt2x00dev->bands[IEEE80211_BAND_2GHZ].bitrates = rates;
hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
&rt2x00dev->bands[IEEE80211_BAND_2GHZ];
@@ -179,7 +282,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
}
/*
-@@ -598,6 +614,8 @@ static int rt2x00lib_probe_hw_modes(stru
+@@ -596,6 +637,8 @@ static int rt2x00lib_probe_hw_modes(stru
rt2x00dev->bands[IEEE80211_BAND_5GHZ].bitrates = &rates[4];
hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
&rt2x00dev->bands[IEEE80211_BAND_5GHZ];
@@ -239,7 +342,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ txdesc->stbc = 0; /* FIXME: What value is needed? */
+
+ txdesc->mcs = rt2x00_get_rate_mcs(hwrate->mcs);
-+ if (rt2x00_get_rate_preamble(rate->hw_value))
++ if (rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
+ txdesc->mcs |= 0x08;
+
+ /*
@@ -270,8 +373,8 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
};
extern const struct rt2x00_rate rt2x00_supported_rates[12];
-@@ -68,6 +69,14 @@ static inline int rt2x00_get_rate_preamb
- return (hw_value & 0xff00);
+@@ -57,6 +58,14 @@ static inline const struct rt2x00_rate *
+ return &rt2x00_supported_rates[hw_value & 0xff];
}
+#define RATE_MCS(__mode, __mcs) \
@@ -285,7 +388,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
/*
* Radio control handlers.
*/
-@@ -341,6 +350,21 @@ static inline void rt2x00crypto_rx_inser
+@@ -330,6 +339,21 @@ static inline void rt2x00crypto_rx_inser
#endif /* CONFIG_RT2X00_LIB_CRYPTO */
/*
@@ -350,7 +453,23 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
/**
* struct rxdone_entry_desc: RX Entry descriptor
-@@ -243,6 +245,9 @@ struct txdone_entry_desc {
+@@ -177,6 +179,7 @@ enum rxdone_entry_desc_flags {
+ * @size: Data size of the received frame.
+ * @flags: MAC80211 receive flags (See &enum mac80211_rx_flags).
+ * @dev_flags: Ralink receive flags (See &enum rxdone_entry_desc_flags).
++ * @rate_mode: Rate mode (See @enum rate_modulation).
+ * @cipher: Cipher type used during decryption.
+ * @cipher_status: Decryption status.
+ * @iv: IV/EIV data used during decryption.
+@@ -190,6 +193,7 @@ struct rxdone_entry_desc {
+ int size;
+ int flags;
+ int dev_flags;
++ u16 rate_mode;
+ u8 cipher;
+ u8 cipher_status;
+
+@@ -243,6 +247,9 @@ struct txdone_entry_desc {
* @ENTRY_TXD_ENCRYPT_PAIRWISE: Use pairwise key table (instead of shared).
* @ENTRY_TXD_ENCRYPT_IV: Generate IV/EIV in hardware.
* @ENTRY_TXD_ENCRYPT_MMIC: Generate MIC in hardware.
@@ -360,7 +479,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
*/
enum txentry_desc_flags {
ENTRY_TXD_RTS_FRAME,
-@@ -258,6 +263,9 @@ enum txentry_desc_flags {
+@@ -258,6 +265,9 @@ enum txentry_desc_flags {
ENTRY_TXD_ENCRYPT_PAIRWISE,
ENTRY_TXD_ENCRYPT_IV,
ENTRY_TXD_ENCRYPT_MMIC,
@@ -370,7 +489,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
};
/**
-@@ -271,7 +279,11 @@ enum txentry_desc_flags {
+@@ -271,7 +281,11 @@ enum txentry_desc_flags {
* @length_low: PLCP length low word.
* @signal: PLCP signal.
* @service: PLCP service.
@@ -382,7 +501,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
* @retry_limit: Max number of retries.
* @aifs: AIFS value.
* @ifs: IFS value.
-@@ -291,7 +303,11 @@ struct txentry_desc {
+@@ -291,7 +305,11 @@ struct txentry_desc {
u16 signal;
u16 service;
diff --git a/package/mac80211/patches/311-rt2x00_implement_support_for_rt2800pci.patch b/package/mac80211/patches/302-rt2x00-Implement-support-for-rt2800pci.patch
index 6f425535f..6df88d1df 100644
--- a/package/mac80211/patches/311-rt2x00_implement_support_for_rt2800pci.patch
+++ b/package/mac80211/patches/302-rt2x00-Implement-support-for-rt2800pci.patch
@@ -1,9 +1,7 @@
+From dda25991ee4dc0a2ebe2e3b50857971fe1d878c4 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
-Date: Sun, 28 Dec 2008 12:48:53 +0000 (+0100)
-Subject: rt2x00: Implement support for rt2800pci
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fivd%2Frt2x00.git;a=commitdiff_plain;h=0be1744a47e7513f862554273216a8d37d2760e8
-
-rt2x00: Implement support for rt2800pci
+Date: Sat, 10 Jan 2009 11:03:23 +0100
+Subject: [PATCH] rt2x00: Implement support for rt2800pci
Add support for the rt2800pci chipset.
@@ -14,7 +12,14 @@ Signed-off-by: Mark Asselstine <asselsm@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
-
+ drivers/net/wireless/rt2x00/Kconfig | 15 +
+ drivers/net/wireless/rt2x00/Makefile | 1 +
+ drivers/net/wireless/rt2x00/rt2800pci.c | 2707 +++++++++++++++++++++++++++++++
+ drivers/net/wireless/rt2x00/rt2800pci.h | 1879 +++++++++++++++++++++
+ drivers/net/wireless/rt2x00/rt2x00.h | 4 +
+ 5 files changed, 4606 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/net/wireless/rt2x00/rt2800pci.c
+ create mode 100644 drivers/net/wireless/rt2x00/rt2800pci.h
--- a/drivers/net/wireless/rt2x00/Makefile
+++ b/drivers/net/wireless/rt2x00/Makefile
@@ -16,5 +16,6 @@ obj-$(CONFIG_RT2X00_LIB_USB) += rt2x00u
@@ -26,7 +31,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
obj-$(CONFIG_RT73USB) += rt73usb.o
--- /dev/null
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
-@@ -0,0 +1,2693 @@
+@@ -0,0 +1,2707 @@
+/*
+ Copyright (C) 2004 - 2008 rt2x00 SourceForge Project
+ <http://rt2x00.serialmonkey.com>
@@ -1044,6 +1049,9 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ return -EBUSY;
+ }
+
++ rt2x00pci_register_write(rt2x00dev, PWR_PIN_CFG, 0x00000002);
++ rt2x00pci_register_write(rt2x00dev, AUTOWAKEUP_CFG, 0x00000000);
++
+ /*
+ * Disable DMA, will be reenabled later when enabling
+ * the radio.
@@ -1056,10 +1064,6 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ rt2x00_set_field32(&reg, WPDMA_GLO_CFG_TX_WRITEBACK_DONE, 1);
+ rt2x00pci_register_write(rt2x00dev, WPDMA_GLO_CFG, reg);
+
-+ rt2x00pci_register_write(rt2x00dev, WPDMA_RST_IDX, ~0);
-+ rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, 0x0e1f);
-+ rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, 0x0e00);
-+
+ /*
+ * enable Host program ram write selection
+ */
@@ -1092,6 +1096,11 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ }
+
+ /*
++ * Disable interrupts
++ */
++ rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_RADIO_IRQ_OFF);
++
++ /*
+ * Initialize BBP R/W access agent
+ */
+ rt2x00pci_register_write(rt2x00dev, H2M_BBP_AGENT, 0);
@@ -1203,13 +1212,17 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ rt2x00pci_register_write(rt2x00dev, WPDMA_RST_IDX, reg);
+
+ rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00000e1f);
-+ rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00000000);
++ rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00000e00);
++
++ rt2x00pci_register_write(rt2x00dev, PWR_PIN_CFG, 0x00000003);
+
+ rt2x00pci_register_read(rt2x00dev, MAC_SYS_CTRL, &reg);
+ rt2x00_set_field32(&reg, MAC_SYS_CTRL_RESET_CSR, 1);
+ rt2x00_set_field32(&reg, MAC_SYS_CTRL_RESET_BBP, 1);
+ rt2x00pci_register_write(rt2x00dev, MAC_SYS_CTRL, reg);
+
++ rt2x00pci_register_write(rt2x00dev, MAC_SYS_CTRL, 0x00000000);
++
+ rt2x00pci_register_read(rt2x00dev, BCN_OFFSET0, &reg);
+ rt2x00_set_field32(&reg, BCN_OFFSET0_BCN0, 0xe0); /* 0x3800 */
+ rt2x00_set_field32(&reg, BCN_OFFSET0_BCN1, 0xe8); /* 0x3a00 */
@@ -1465,6 +1478,14 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ unsigned int i;
+ u8 value;
+
++ /*
++ * BBP was enabled after firmware was loaded,
++ * but we need to reactivate it now.
++ */
++ rt2x00pci_register_write(rt2x00dev, H2M_BBP_AGENT, 0x00000000);
++ rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_CSR, 0x00000000);
++ msleep(1);
++
+ for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
+ rt2800pci_bbp_read(rt2x00dev, 0, &value);
+ if ((value != 0xff) && (value != 0x00))
@@ -1564,6 +1585,12 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ rt2x00_set_field32(&reg, INT_MASK_CSR_HCCA_DMA_DONE, mask);
+ rt2x00_set_field32(&reg, INT_MASK_CSR_MGMT_DMA_DONE, mask);
+ rt2x00_set_field32(&reg, INT_MASK_CSR_MCU_COMMAND, mask);
++ rt2x00_set_field32(&reg, INT_MASK_CSR_RXTX_COHERENT, mask);
++ rt2x00_set_field32(&reg, INT_MASK_CSR_TBTT, mask);
++ rt2x00_set_field32(&reg, INT_MASK_CSR_PRE_TBTT, mask);
++ rt2x00_set_field32(&reg, INT_MASK_CSR_TX_FIFO_STATUS, mask);
++ rt2x00_set_field32(&reg, INT_MASK_CSR_AUTO_WAKEUP, mask);
++ rt2x00_set_field32(&reg, INT_MASK_CSR_GPTIMER, mask);
+ rt2x00_set_field32(&reg, INT_MASK_CSR_RX_COHERENT, mask);
+ rt2x00_set_field32(&reg, INT_MASK_CSR_TX_COHERENT, mask);
+ rt2x00pci_register_write(rt2x00dev, INT_MASK_CSR, reg);
@@ -1601,7 +1628,10 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ rt2800pci_init_bbp(rt2x00dev)))
+ return -EIO;
+
-+ rt2x00pci_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00001a80);
++ /*
++ * Send signal to firmware during boot time.
++ */
++ rt2800pci_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0xff, 0, 0);
+
+ /* Wait for DMA, ignore error */
+ rt2800pci_wait_wpdma_ready(rt2x00dev);
@@ -1612,6 +1642,8 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ rt2x00pci_register_read(rt2x00dev, WPDMA_GLO_CFG, &reg);
+ rt2x00_set_field32(&reg, WPDMA_GLO_CFG_ENABLE_TX_DMA, 1);
+ rt2x00_set_field32(&reg, WPDMA_GLO_CFG_ENABLE_RX_DMA, 1);
++ rt2x00_set_field32(&reg, WPDMA_GLO_CFG_WP_DMA_BURST_SIZE, 2);
++ rt2x00_set_field32(&reg, WPDMA_GLO_CFG_TX_WRITEBACK_DONE, 1);
+ rt2x00pci_register_write(rt2x00dev, WPDMA_GLO_CFG, reg);
+
+ rt2x00pci_register_read(rt2x00dev, MAC_SYS_CTRL, &reg);
@@ -1634,14 +1666,6 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ rt2800pci_mcu_request(rt2x00dev, MCU_LED_3, 0xff,
+ word & 0xff, (word >> 8) & 0xff);
+
-+ rt2x00pci_register_write(rt2x00dev, H2M_BBP_AGENT, 0);
-+ rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_CSR, 0);
-+
-+ /*
-+ * Send signal to firmware during boot time.
-+ */
-+ rt2800pci_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0xff, 0, 0);
-+
+ return 0;
+}
+
@@ -1651,7 +1675,10 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+
+ rt2x00pci_register_read(rt2x00dev, WPDMA_GLO_CFG, &reg);
+ rt2x00_set_field32(&reg, WPDMA_GLO_CFG_ENABLE_TX_DMA, 0);
++ rt2x00_set_field32(&reg, WPDMA_GLO_CFG_TX_DMA_BUSY, 0);
+ rt2x00_set_field32(&reg, WPDMA_GLO_CFG_ENABLE_RX_DMA, 0);
++ rt2x00_set_field32(&reg, WPDMA_GLO_CFG_RX_DMA_BUSY, 0);
++ rt2x00_set_field32(&reg, WPDMA_GLO_CFG_TX_WRITEBACK_DONE, 1);
+ rt2x00pci_register_write(rt2x00dev, WPDMA_GLO_CFG, reg);
+
+ rt2x00pci_register_write(rt2x00dev, MAC_SYS_CTRL, 0);
@@ -1768,8 +1795,8 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ rt2x00_desc_read(txwi, 1, &word);
+ rt2x00_set_field32(&word, TXWI_W1_ACK,
+ test_bit(ENTRY_TXD_ACK, &txdesc->flags));
-+ rt2x00_set_field32(&word, TXWI_W1_ACK,
-+ test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags));
++ rt2x00_set_field32(&word, TXWI_W1_NSEQ,
++ test_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags));
+ rt2x00_set_field32(&word, TXWI_W1_BW_WIN_SIZE, txdesc->ba_size);
+ rt2x00_set_field32(&word, TXWI_W1_WIRELESS_CLI_ID,
+ skbdesc->entry->entry_idx);
@@ -1943,26 +1970,18 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ if (rt2x00_get_field32(rxwi1, RXWI_W1_BW))
+ rxdesc->flags |= RX_FLAG_40MHZ;
+
-+ switch (rt2x00_get_field32(rxwi1, RXWI_W1_PHYMODE)) {
-+ case RATE_MODE_CCK:
-+ /*
-+ * Mask of 0x8 bit to remove the short preamble flag.
-+ */
-+ rxdesc->signal =
-+ (RATE_MODE_CCK << 8) |
-+ (rt2x00_get_field32(rxwi1, RXWI_W1_MCS) & ~0x8);
-+ break;
-+ case RATE_MODE_OFDM:
-+ rxdesc->signal =
-+ (RATE_MODE_OFDM << 8) |
-+ rt2x00_get_field32(rxwi1, RXWI_W1_MCS);
-+ break;
-+ case RATE_MODE_HT_MIX:
-+ case RATE_MODE_HT_GREENFIELD:
-+ rxdesc->signal = rt2x00_get_field32(rxwi1, RXWI_W1_MCS);
-+ rxdesc->flags |= RX_FLAG_HT;
-+ break;
-+ }
++ /*
++ * Detect RX rate, always use MCS as signal type.
++ */
++ rxdesc->dev_flags |= RXDONE_SIGNAL_MCS;
++ rxdesc->rate_mode = rt2x00_get_field32(rxwi1, RXWI_W1_PHYMODE);
++ rxdesc->signal = rt2x00_get_field32(rxwi1, RXWI_W1_MCS);
++
++ /*
++ * Mask of 0x8 bit to remove the short preamble flag.
++ */
++ if (rxdesc->dev_flags == RATE_MODE_CCK)
++ rxdesc->signal &= ~0x8;
+
+ rxdesc->rssi =
+ (rt2x00_get_field32(rxwi2, RXWI_W2_RSSI0) +
@@ -2722,7 +2741,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+module_exit(rt2800pci_exit);
--- /dev/null
+++ b/drivers/net/wireless/rt2x00/rt2800pci.h
-@@ -0,0 +1,1873 @@
+@@ -0,0 +1,1879 @@
+/*
+ Copyright (C) 2004 - 2008 rt2x00 SourceForge Project
+ <http://rt2x00.serialmonkey.com>
@@ -2816,13 +2835,13 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ * LOAD_STATUS: 1:loading, 0:done.
+ */
+#define E2PROM_CSR 0x0004
-+#define E2PROM_CSR_RELOAD FIELD32(0x00000001)
-+#define E2PROM_CSR_DATA_CLOCK FIELD32(0x00000002)
-+#define E2PROM_CSR_CHIP_SELECT FIELD32(0x00000004)
-+#define E2PROM_CSR_DATA_IN FIELD32(0x00000008)
-+#define E2PROM_CSR_DATA_OUT FIELD32(0x00000010)
++#define E2PROM_CSR_DATA_CLOCK FIELD32(0x00000001)
++#define E2PROM_CSR_CHIP_SELECT FIELD32(0x00000002)
++#define E2PROM_CSR_DATA_IN FIELD32(0x00000004)
++#define E2PROM_CSR_DATA_OUT FIELD32(0x00000008)
+#define E2PROM_CSR_TYPE_93C46 FIELD32(0x00000020)
+#define E2PROM_CSR_LOAD_STATUS FIELD32(0x00000040)
++#define E2PROM_CSR_RELOAD FIELD32(0x00000080)
+
+/*
+ * HOST-MCU shared memory
@@ -2869,8 +2888,14 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+#define INT_MASK_CSR_HCCA_DMA_DONE FIELD32(0x00000080)
+#define INT_MASK_CSR_MGMT_DMA_DONE FIELD32(0x00000100)
+#define INT_MASK_CSR_MCU_COMMAND FIELD32(0x00000200)
-+#define INT_MASK_CSR_RX_COHERENT FIELD32(0x40000000)
-+#define INT_MASK_CSR_TX_COHERENT FIELD32(0x80000000)
++#define INT_MASK_CSR_RXTX_COHERENT FIELD32(0x00000400)
++#define INT_MASK_CSR_TBTT FIELD32(0x00000800)
++#define INT_MASK_CSR_PRE_TBTT FIELD32(0x00001000)
++#define INT_MASK_CSR_TX_FIFO_STATUS FIELD32(0x00002000)
++#define INT_MASK_CSR_AUTO_WAKEUP FIELD32(0x00004000)
++#define INT_MASK_CSR_GPTIMER FIELD32(0x00008000)
++#define INT_MASK_CSR_RX_COHERENT FIELD32(0x00010000)
++#define INT_MASK_CSR_TX_COHERENT FIELD32(0x00020000)
+
+/*
+ * WPDMA_GLO_CFG
@@ -4242,7 +4267,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+#define EEPROM_MAC_ADDR_0 0x0002
+#define EEPROM_MAC_ADDR_BYTE0 FIELD16(0x00ff)
+#define EEPROM_MAC_ADDR_BYTE1 FIELD16(0xff00)
-+#define EEPROM_MAC_ADDR1 0x0003
++#define EEPROM_MAC_ADDR_1 0x0003
+#define EEPROM_MAC_ADDR_BYTE2 FIELD16(0x00ff)
+#define EEPROM_MAC_ADDR_BYTE3 FIELD16(0xff00)
+#define EEPROM_MAC_ADDR_2 0x0004
@@ -4598,7 +4623,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+#endif /* RT2800PCI_H */
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
-@@ -138,6 +138,10 @@ struct rt2x00_chip {
+@@ -139,6 +139,10 @@ struct rt2x00_chip {
#define RT2561 0x0302
#define RT2661 0x0401
#define RT2571 0x1300
diff --git a/package/mac80211/patches/312-rt2x00_implement_support_for_rt2800usb.patch b/package/mac80211/patches/303-rt2x00-Implement-support-for-rt2800usb.patch
index c44b5246f..5b878ab01 100644
--- a/package/mac80211/patches/312-rt2x00_implement_support_for_rt2800usb.patch
+++ b/package/mac80211/patches/303-rt2x00-Implement-support-for-rt2800usb.patch
@@ -1,9 +1,7 @@
+From 22592b5df5bef2754f56e165ee0828777a95fdfd Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
-Date: Sun, 28 Dec 2008 12:48:56 +0000 (+0100)
-Subject: rt2x00: Implement support for rt2800usb
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fivd%2Frt2x00.git;a=commitdiff_plain;h=e0af839d714d1d04af044d00858ce4113ebd602b
-
-rt2x00: Implement support for rt2800usb
+Date: Sat, 10 Jan 2009 11:05:41 +0100
+Subject: [PATCH] rt2x00: Implement support for rt2800usb
Add support for the rt2800usb chipset.
@@ -13,6 +11,14 @@ Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
+ drivers/net/wireless/rt2x00/Kconfig | 14 +
+ drivers/net/wireless/rt2x00/Makefile | 1 +
+ drivers/net/wireless/rt2x00/rt2800usb.c | 2540 +++++++++++++++++++++++++++++++
+ drivers/net/wireless/rt2x00/rt2800usb.h | 1892 +++++++++++++++++++++++
+ drivers/net/wireless/rt2x00/rt2x00.h | 1 +
+ 5 files changed, 4448 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/net/wireless/rt2x00/rt2800usb.c
+ create mode 100644 drivers/net/wireless/rt2x00/rt2800usb.h
--- a/drivers/net/wireless/rt2x00/Makefile
+++ b/drivers/net/wireless/rt2x00/Makefile
@@ -23,7 +29,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+obj-$(CONFIG_RT2800USB) += rt2800usb.o
--- /dev/null
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
-@@ -0,0 +1,2548 @@
+@@ -0,0 +1,2540 @@
+/*
+ Copyright (C) 2004 - 2008 rt2x00 SourceForge Project
+ <http://rt2x00.serialmonkey.com>
@@ -1516,6 +1522,11 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ rt2x00usb_register_write(rt2x00dev, MAC_SYS_CTRL, reg);
+
+ /*
++ * Send signal to firmware during boot time.
++ */
++ rt2800usb_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0xff, 0, 0);
++
++ /*
+ * Initialize LED control
+ */
+ rt2x00_eeprom_read(rt2x00dev, EEPROM_LED1, &word);
@@ -1530,11 +1541,6 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ rt2800usb_mcu_request(rt2x00dev, MCU_LED_3, 0xff,
+ word & 0xff, (word >> 8) & 0xff);
+
-+ /*
-+ * Send signal to firmware during boot time.
-+ */
-+ rt2800usb_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0xff, 0, 0);
-+
+ return 0;
+}
+
@@ -1661,8 +1667,8 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ rt2x00_desc_read(txwi, 1, &word);
+ rt2x00_set_field32(&word, TXWI_W1_ACK,
+ test_bit(ENTRY_TXD_ACK, &txdesc->flags));
-+ rt2x00_set_field32(&word, TXWI_W1_ACK,
-+ test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags));
++ rt2x00_set_field32(&word, TXWI_W1_NSEQ,
++ test_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags));
+ rt2x00_set_field32(&word, TXWI_W1_BW_WIN_SIZE, txdesc->ba_size);
+ rt2x00_set_field32(&word, TXWI_W1_WIRELESS_CLI_ID, 0xff);
+ rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT, skb->len);
@@ -1851,26 +1857,18 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+ if (rt2x00_get_field32(rxwi1, RXWI_W1_BW))
+ rxdesc->flags |= RX_FLAG_40MHZ;
+
-+ switch (rt2x00_get_field32(rxwi1, RXWI_W1_PHYMODE)) {
-+ case RATE_MODE_CCK:
-+ /*
-+ * Mask of 0x8 bit to remove the short preamble flag.
-+ */
-+ rxdesc->signal =
-+ (RATE_MODE_CCK << 8) |
-+ (rt2x00_get_field32(rxwi1, RXWI_W1_MCS) & ~0x8);
-+ break;
-+ case RATE_MODE_OFDM:
-+ rxdesc->signal =
-+ (RATE_MODE_OFDM << 8) |
-+ rt2x00_get_field32(rxwi1, RXWI_W1_MCS);
-+ break;
-+ case RATE_MODE_HT_MIX:
-+ case RATE_MODE_HT_GREENFIELD:
-+ rxdesc->signal = rt2x00_get_field32(rxwi1, RXWI_W1_MCS);
-+ rxdesc->flags |= RX_FLAG_HT;
-+ break;
-+ }
++ /*
++ * Detect RX rate, always use MCS as signal type.
++ */
++ rxdesc->dev_flags |= RXDONE_SIGNAL_MCS;
++ rxdesc->rate_mode = rt2x00_get_field32(rxwi1, RXWI_W1_PHYMODE);
++ rxdesc->signal = rt2x00_get_field32(rxwi1, RXWI_W1_MCS);
++
++ /*
++ * Mask of 0x8 bit to remove the short preamble flag.
++ */
++ if (rxdesc->dev_flags == RATE_MODE_CCK)
++ rxdesc->signal &= ~0x8;
+
+ rxdesc->rssi =
+ (rt2x00_get_field32(rxwi2, RXWI_W2_RSSI0) +
@@ -2574,7 +2572,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+module_exit(rt2800usb_exit);
--- /dev/null
+++ b/drivers/net/wireless/rt2x00/rt2800usb.h
-@@ -0,0 +1,1886 @@
+@@ -0,0 +1,1892 @@
+/*
+ Copyright (C) 2004 - 2008 rt2x00 SourceForge Project
+ <http://rt2x00.serialmonkey.com>
@@ -2700,8 +2698,14 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+#define INT_MASK_CSR_HCCA_DMA_DONE FIELD32(0x00000080)
+#define INT_MASK_CSR_MGMT_DMA_DONE FIELD32(0x00000100)
+#define INT_MASK_CSR_MCU_COMMAND FIELD32(0x00000200)
-+#define INT_MASK_CSR_RX_COHERENT FIELD32(0x40000000)
-+#define INT_MASK_CSR_TX_COHERENT FIELD32(0x80000000)
++#define INT_MASK_CSR_RXTX_COHERENT FIELD32(0x00000400)
++#define INT_MASK_CSR_TBTT FIELD32(0x00000800)
++#define INT_MASK_CSR_PRE_TBTT FIELD32(0x00001000)
++#define INT_MASK_CSR_TX_FIFO_STATUS FIELD32(0x00002000)
++#define INT_MASK_CSR_AUTO_WAKEUP FIELD32(0x00004000)
++#define INT_MASK_CSR_GPTIMER FIELD32(0x00008000)
++#define INT_MASK_CSR_RX_COHERENT FIELD32(0x00010000)
++#define INT_MASK_CSR_TX_COHERENT FIELD32(0x00020000)
+
+/*
+ * WPDMA_GLO_CFG
@@ -4097,7 +4101,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+#define EEPROM_MAC_ADDR_0 0x0002
+#define EEPROM_MAC_ADDR_BYTE0 FIELD16(0x00ff)
+#define EEPROM_MAC_ADDR_BYTE1 FIELD16(0xff00)
-+#define EEPROM_MAC_ADDR1 0x0003
++#define EEPROM_MAC_ADDR_1 0x0003
+#define EEPROM_MAC_ADDR_BYTE2 FIELD16(0x00ff)
+#define EEPROM_MAC_ADDR_BYTE3 FIELD16(0xff00)
+#define EEPROM_MAC_ADDR_2 0x0004
@@ -4463,7 +4467,7 @@ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
+#endif /* RT2800USB_H */
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
-@@ -142,6 +142,7 @@ struct rt2x00_chip {
+@@ -143,6 +143,7 @@ struct rt2x00_chip {
#define RT2860D 0x0681 /* 2.4GHz, 5GHz PCI/CB */
#define RT2890 0x0701 /* 2.4GHz PCIe */
#define RT2890D 0x0781 /* 2.4GHz, 5GHz PCIe */
diff --git a/package/mac80211/patches/320-enable_rt2800.patch b/package/mac80211/patches/320-enable_rt2800.patch
index 4b406de3b..818063948 100644
--- a/package/mac80211/patches/320-enable_rt2800.patch
+++ b/package/mac80211/patches/320-enable_rt2800.patch
@@ -1,15 +1,14 @@
--- a/config.mk
+++ b/config.mk
-@@ -156,6 +156,8 @@ CONFIG_ADM8211=m
+@@ -156,6 +156,7 @@ CONFIG_ADM8211=m
CONFIG_RT2X00_LIB_PCI=m
CONFIG_RT2400PCI=m
CONFIG_RT2500PCI=m
+CONFIG_RT2800PCI=m
-+CONFIG_RT2800USB=m
NEED_RT2X00=y
# Two rt2x00 drivers require firmware: rt61pci and rt73usb. They depend on
-@@ -197,6 +199,8 @@ CONFIG_RTL8187=m
+@@ -197,6 +198,8 @@ CONFIG_RTL8187=m
# RT2500USB does not require firmware
CONFIG_RT2500USB=m
CONFIG_RT2X00_LIB_USB=m
@@ -18,3 +17,13 @@
NEED_RT2X00=y
# RT73USB requires firmware
ifneq ($(CONFIG_CRC_ITU_T),)
+@@ -204,6 +207,9 @@ CONFIG_RT73USB=m
+ NEED_RT2X00_FIRMWARE=y
+ endif
+
++# RT2800USB support
++CONFIG_RT2800USB=m
++
+ endif # end of USB driver list
+
+ # Common rt2x00 requirements
diff --git a/package/mac80211/patches/401-ath9k-convert-to-struct-device.patch b/package/mac80211/patches/401-ath9k-convert-to-struct-device.patch
index 29ad4e9fe..e71df0eb3 100644
--- a/package/mac80211/patches/401-ath9k-convert-to-struct-device.patch
+++ b/package/mac80211/patches/401-ath9k-convert-to-struct-device.patch
@@ -97,7 +97,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
*csz = (int)u8tmp;
/*
-@@ -1267,11 +1268,11 @@ static int ath_start_rfkill_poll(struct
+@@ -1269,11 +1270,11 @@ static int ath_start_rfkill_poll(struct
/* Deinitialize the device */
ath_detach(sc);
@@ -114,7 +114,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
ieee80211_free_hw(sc->hw);
return -EIO;
} else {
-@@ -1708,7 +1709,7 @@ int ath_descdma_setup(struct ath_softc *
+@@ -1716,7 +1717,7 @@ int ath_descdma_setup(struct ath_softc *
}
/* allocate descriptors */
@@ -123,7 +123,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
dd->dd_desc_len,
&dd->dd_desc_paddr);
if (dd->dd_desc == NULL) {
-@@ -1756,7 +1757,7 @@ int ath_descdma_setup(struct ath_softc *
+@@ -1764,7 +1765,7 @@ int ath_descdma_setup(struct ath_softc *
}
return 0;
fail2:
@@ -132,7 +132,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
dd->dd_desc_len, dd->dd_desc, dd->dd_desc_paddr);
fail:
memset(dd, 0, sizeof(*dd));
-@@ -1770,7 +1771,7 @@ void ath_descdma_cleanup(struct ath_soft
+@@ -1778,7 +1779,7 @@ void ath_descdma_cleanup(struct ath_soft
struct ath_descdma *dd,
struct list_head *head)
{
@@ -141,7 +141,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
dd->dd_desc_len, dd->dd_desc, dd->dd_desc_paddr);
INIT_LIST_HEAD(head);
-@@ -2615,7 +2616,7 @@ static int ath_pci_probe(struct pci_dev
+@@ -2624,7 +2625,7 @@ static int ath_pci_probe(struct pci_dev
sc = hw->priv;
sc->hw = hw;
@@ -185,7 +185,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
sc->rx.bufsize,
PCI_DMA_FROMDEVICE);
-@@ -599,10 +601,11 @@ int ath_rx_tasklet(struct ath_softc *sc,
+@@ -605,10 +607,11 @@ int ath_rx_tasklet(struct ath_softc *sc,
/* We will now give hardware our shiny new allocated skb */
bf->bf_mpdu = requeue_skb;
diff --git a/package/mac80211/patches/402-ath9k-convert-to-use-bus-agnostic-DMA-routines.patch b/package/mac80211/patches/402-ath9k-convert-to-use-bus-agnostic-DMA-routines.patch
index ac8a51587..808c1116c 100644
--- a/package/mac80211/patches/402-ath9k-convert-to-use-bus-agnostic-DMA-routines.patch
+++ b/package/mac80211/patches/402-ath9k-convert-to-use-bus-agnostic-DMA-routines.patch
@@ -95,7 +95,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
}
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
-@@ -1709,9 +1709,8 @@ int ath_descdma_setup(struct ath_softc *
+@@ -1717,9 +1717,8 @@ int ath_descdma_setup(struct ath_softc *
}
/* allocate descriptors */
@@ -107,7 +107,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
if (dd->dd_desc == NULL) {
error = -ENOMEM;
goto fail;
-@@ -1757,8 +1756,8 @@ int ath_descdma_setup(struct ath_softc *
+@@ -1765,8 +1764,8 @@ int ath_descdma_setup(struct ath_softc *
}
return 0;
fail2:
@@ -118,7 +118,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
fail:
memset(dd, 0, sizeof(*dd));
return error;
-@@ -1771,8 +1770,8 @@ void ath_descdma_cleanup(struct ath_soft
+@@ -1779,8 +1778,8 @@ void ath_descdma_cleanup(struct ath_soft
struct ath_descdma *dd,
struct list_head *head)
{
@@ -177,7 +177,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
skb_put(skb, ds->ds_rxstat.rs_datalen);
skb->protocol = cpu_to_be16(ETH_P_CONTROL);
-@@ -601,16 +599,15 @@ int ath_rx_tasklet(struct ath_softc *sc,
+@@ -607,16 +605,15 @@ int ath_rx_tasklet(struct ath_softc *sc,
/* We will now give hardware our shiny new allocated skb */
bf->bf_mpdu = requeue_skb;
diff --git a/package/mac80211/patches/403-ath9k-introduce-bus-specific-cache-size-routine.patch b/package/mac80211/patches/403-ath9k-introduce-bus-specific-cache-size-routine.patch
index d6b24ebca..f6fcbd6b5 100644
--- a/package/mac80211/patches/403-ath9k-introduce-bus-specific-cache-size-routine.patch
+++ b/package/mac80211/patches/403-ath9k-introduce-bus-specific-cache-size-routine.patch
@@ -55,7 +55,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
{
u8 u8tmp;
-@@ -1338,7 +1338,7 @@ static int ath_init(u16 devid, struct at
+@@ -1340,7 +1340,7 @@ static int ath_init(u16 devid, struct at
* Cache line size is used to size and align various
* structures used to communicate with the hardware.
*/
@@ -64,7 +64,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
/* XXX assert csz is non-zero */
sc->sc_cachelsz = csz << 2; /* convert to bytes */
-@@ -2529,6 +2529,10 @@ ath_rf_name(u16 rf_version)
+@@ -2538,6 +2538,10 @@ ath_rf_name(u16 rf_version)
return "????";
}
@@ -75,7 +75,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
void __iomem *mem;
-@@ -2617,6 +2621,7 @@ static int ath_pci_probe(struct pci_dev
+@@ -2626,6 +2630,7 @@ static int ath_pci_probe(struct pci_dev
sc->hw = hw;
sc->dev = &pdev->dev;
sc->mem = mem;
diff --git a/package/mac80211/patches/404-ath9k-introduce-bus-specific-cleanup-routine.patch b/package/mac80211/patches/404-ath9k-introduce-bus-specific-cleanup-routine.patch
index 6076f49ef..663d60877 100644
--- a/package/mac80211/patches/404-ath9k-introduce-bus-specific-cleanup-routine.patch
+++ b/package/mac80211/patches/404-ath9k-introduce-bus-specific-cleanup-routine.patch
@@ -51,7 +51,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
/* return bus cachesize in 4B word units */
-@@ -1267,13 +1268,7 @@ static int ath_start_rfkill_poll(struct
+@@ -1269,13 +1270,7 @@ static int ath_start_rfkill_poll(struct
rfkill_free(sc->rf_kill.rfkill);
/* Deinitialize the device */
@@ -66,7 +66,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
return -EIO;
} else {
sc->sc_flags |= SC_OP_RFKILL_REGISTERED;
-@@ -1284,6 +1279,14 @@ static int ath_start_rfkill_poll(struct
+@@ -1286,6 +1281,14 @@ static int ath_start_rfkill_poll(struct
}
#endif /* CONFIG_RFKILL */
@@ -81,7 +81,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
static void ath_detach(struct ath_softc *sc)
{
struct ieee80211_hw *hw = sc->hw;
-@@ -2529,8 +2532,18 @@ ath_rf_name(u16 rf_version)
+@@ -2538,8 +2541,18 @@ ath_rf_name(u16 rf_version)
return "????";
}
@@ -100,7 +100,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
};
static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
-@@ -2637,6 +2650,8 @@ static int ath_pci_probe(struct pci_dev
+@@ -2646,6 +2659,8 @@ static int ath_pci_probe(struct pci_dev
goto bad4;
}
@@ -109,7 +109,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
ah = sc->sc_ah;
printk(KERN_INFO
"%s: Atheros AR%s MAC/BB Rev:%x "
-@@ -2667,13 +2682,7 @@ static void ath_pci_remove(struct pci_de
+@@ -2676,13 +2691,7 @@ static void ath_pci_remove(struct pci_de
struct ieee80211_hw *hw = pci_get_drvdata(pdev);
struct ath_softc *sc = hw->priv;
diff --git a/package/mac80211/patches/405-ath9k-move-PCI-code-into-separate-file.patch b/package/mac80211/patches/405-ath9k-move-PCI-code-into-separate-file.patch
index 462d62362..49453886f 100644
--- a/package/mac80211/patches/405-ath9k-move-PCI-code-into-separate-file.patch
+++ b/package/mac80211/patches/405-ath9k-move-PCI-code-into-separate-file.patch
@@ -100,7 +100,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
static void ath_cache_conf_rate(struct ath_softc *sc,
struct ieee80211_conf *conf)
{
-@@ -498,7 +465,7 @@ static void ath9k_tasklet(unsigned long
+@@ -500,7 +467,7 @@ static void ath9k_tasklet(unsigned long
ath9k_hw_set_interrupts(sc->sc_ah, sc->sc_imask);
}
@@ -109,7 +109,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
{
struct ath_softc *sc = dev;
struct ath_hal *ah = sc->sc_ah;
-@@ -1279,7 +1246,7 @@ static int ath_start_rfkill_poll(struct
+@@ -1281,7 +1248,7 @@ static int ath_start_rfkill_poll(struct
}
#endif /* CONFIG_RFKILL */
@@ -118,7 +118,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
{
ath_detach(sc);
free_irq(sc->irq, sc);
-@@ -1287,7 +1254,7 @@ static void ath_cleanup(struct ath_softc
+@@ -1289,7 +1256,7 @@ static void ath_cleanup(struct ath_softc
ieee80211_free_hw(sc->hw);
}
@@ -127,7 +127,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
{
struct ieee80211_hw *hw = sc->hw;
int i = 0;
-@@ -1538,7 +1505,7 @@ bad:
+@@ -1543,7 +1510,7 @@ bad:
return error;
}
@@ -136,7 +136,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
{
struct ieee80211_hw *hw = sc->hw;
int error = 0;
-@@ -2457,7 +2424,7 @@ static int ath9k_ampdu_action(struct iee
+@@ -2466,7 +2433,7 @@ static int ath9k_ampdu_action(struct iee
return ret;
}
@@ -145,7 +145,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
.tx = ath9k_tx,
.start = ath9k_start,
.stop = ath9k_stop,
-@@ -2501,7 +2468,7 @@ static struct {
+@@ -2510,7 +2477,7 @@ static struct {
/*
* Return the MAC/BB name. "????" is returned if the MAC/BB is unknown.
*/
@@ -154,7 +154,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
ath_mac_bb_name(u32 mac_bb_version)
{
int i;
-@@ -2518,7 +2485,7 @@ ath_mac_bb_name(u32 mac_bb_version)
+@@ -2527,7 +2494,7 @@ ath_mac_bb_name(u32 mac_bb_version)
/*
* Return the RF name. "????" is returned if the RF is unknown.
*/
@@ -163,7 +163,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
ath_rf_name(u16 rf_version)
{
int i;
-@@ -2532,234 +2499,7 @@ ath_rf_name(u16 rf_version)
+@@ -2541,234 +2508,7 @@ ath_rf_name(u16 rf_version)
return "????";
}
@@ -399,7 +399,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
{
int error;
-@@ -2771,26 +2511,30 @@ static int __init init_ath_pci(void)
+@@ -2780,26 +2520,30 @@ static int __init init_ath_pci(void)
printk(KERN_ERR
"Unable to register rate control algorithm: %d\n",
error);
diff --git a/package/mac80211/patches/406-ath9k-introduce-platform-driver-for-AHB-bus-support.patch b/package/mac80211/patches/406-ath9k-introduce-platform-driver-for-AHB-bus-support.patch
index 02c5632ba..ae42bda1b 100644
--- a/package/mac80211/patches/406-ath9k-introduce-platform-driver-for-AHB-bus-support.patch
+++ b/package/mac80211/patches/406-ath9k-introduce-platform-driver-for-AHB-bus-support.patch
@@ -205,7 +205,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
#endif /* CORE_H */
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
-@@ -2522,8 +2522,17 @@ static int __init ath9k_init(void)
+@@ -2531,8 +2531,17 @@ static int __init ath9k_init(void)
goto err_rate_unregister;
}
@@ -223,7 +223,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
err_rate_unregister:
ath_rate_control_unregister();
err_out:
-@@ -2533,6 +2542,7 @@ module_init(ath9k_init);
+@@ -2542,6 +2551,7 @@ module_init(ath9k_init);
static void __exit ath9k_exit(void)
{
diff --git a/package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch b/package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch
index b5910f7df..a767c8227 100644
--- a/package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch
+++ b/package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch
@@ -49,7 +49,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
if (!ath9k_hw_wait(ah,
AR_RTC_STATUS,
-@@ -2599,7 +2599,7 @@ static void ath9k_set_power_sleep(struct
+@@ -2616,7 +2616,7 @@ static void ath9k_set_power_sleep(struct
if (!AR_SREV_9100(ah))
REG_WRITE(ah, AR_RC, AR_RC_AHB | AR_RC_HOSTIF);