aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-01-09 12:38:08 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-01-09 12:38:08 +0000
commit62be7d2e9a19565e547e38a155cd8d947bf14fd4 (patch)
tree39de2efd9cf52b75c86b65a9eb063c6db003443a /package/mac80211
parent4be7e5e176f84d2f5bd21416fd92e98bfda135f6 (diff)
downloadupstream-62be7d2e9a19565e547e38a155cd8d947bf14fd4.tar.gz
upstream-62be7d2e9a19565e547e38a155cd8d947bf14fd4.tar.bz2
upstream-62be7d2e9a19565e547e38a155cd8d947bf14fd4.zip
[package] mac80211: update ath9k patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13948 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211')
-rw-r--r--package/mac80211/patches/401-ath9k-convert-to-struct-device.patch2
-rw-r--r--package/mac80211/patches/402-ath9k-convert-to-use-bus-agnostic-DMA-routines.patch2
-rw-r--r--package/mac80211/patches/403-ath9k-introduce-bus-specific-cache-size-routine.patch2
-rw-r--r--package/mac80211/patches/404-ath9k-introduce-bus-specific-cleanup-routine.patch66
-rw-r--r--package/mac80211/patches/405-ath9k-move-PCI-code-into-separate-file.patch59
-rw-r--r--package/mac80211/patches/406-ath9k-introduce-platform-driver-for-AHB-bus-support.patch49
-rw-r--r--package/mac80211/patches/407-ath9k-get-EEPROM-contents-from-platform-data-on-AHB.patch14
-rw-r--r--package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch (renamed from package/mac80211/patches/409-ath9k-remove-u16-casts-from-rtc-register-access.patch)12
-rw-r--r--package/mac80211/patches/409-ath9k-fix-ar5416Addac_9100-values.patch (renamed from package/mac80211/patches/410-ath9k-fix-ar5416Addac_9100-values.patch)4
-rw-r--r--package/mac80211/patches/410-ath9k-fix-null-pointer-dereference-in-ani-monitor-c.patch (renamed from package/mac80211/patches/411-ath9k-fix-null-pointer-dereference-in-ani-monitor-c.patch)4
-rw-r--r--package/mac80211/patches/411-ath9k-enable-support-for-AR9100.patch (renamed from package/mac80211/patches/408-ath9k-enable-support-for-AR9100.patch)4
11 files changed, 117 insertions, 101 deletions
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 762a0d7897..29ad4e9fe2 100644
--- a/package/mac80211/patches/401-ath9k-convert-to-struct-device.patch
+++ b/package/mac80211/patches/401-ath9k-convert-to-struct-device.patch
@@ -1,7 +1,7 @@
From 3ded580cd6f24776395649b301857d075a5121fb Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 5 Jan 2009 10:45:00 +0100
-Subject: [PATCH 01/11] ath9k: convert to struct device
+Subject: [PATCH v2 01/11] ath9k: convert to struct device
Convert 'struct pci_dev' to 'struct device' to make it usable on the AHB
bus as well.
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 2a30b610e1..ac8a51587c 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
@@ -1,7 +1,7 @@
From 57b901b5ceb401006a278bc1ad224f0ac88d4f08 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 5 Jan 2009 10:50:30 +0100
-Subject: [PATCH 02/11] ath9k: convert to use bus-agnostic DMA routines
+Subject: [PATCH v2 02/11] ath9k: convert to use bus-agnostic DMA routines
Convert to use bus-agnostic DMA routines to make it usable on AHB bus as well.
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 4fd49691a1..d6b24ebca3 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
@@ -1,7 +1,7 @@
From 1306e6b6d72b2bc0b91bcdd15b1d982965210bda Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 5 Jan 2009 10:57:42 +0100
-Subject: [PATCH 03/11] ath9k: introduce bus specific cache size routine
+Subject: [PATCH v2 03/11] ath9k: introduce bus specific cache size routine
The PCI specific bus_read_cachesize routine won't work on the AHB bus,
we have to replace it with a suitable one later.
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 d1b2f3c1f9..6076f49ef5 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
@@ -1,7 +1,7 @@
-From 4167fb37cceda6a5ebfbfc4431abc69a1857ce43 Mon Sep 17 00:00:00 2001
+From 7524b77fe24a4464b08a2ac987ec22711a4f2027 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 5 Jan 2009 10:59:29 +0100
-Subject: [PATCH 04/11] ath9k: introduce bus specific cleanup routine
+Subject: [PATCH v2 04/11] ath9k: introduce bus specific cleanup routine
We have left only some PCI specific cleanup code. We have to convert
them as well.
@@ -9,9 +9,9 @@ them as well.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
---
- drivers/net/wireless/ath9k/core.h | 6 ++++++
- drivers/net/wireless/ath9k/main.c | 30 ++++++++++++++++--------------
- 2 files changed, 22 insertions(+), 14 deletions(-)
+ drivers/net/wireless/ath9k/core.h | 7 +++++++
+ drivers/net/wireless/ath9k/main.c | 37 +++++++++++++++++++++++--------------
+ 2 files changed, 30 insertions(+), 14 deletions(-)
--- a/drivers/net/wireless/ath9k/core.h
+++ b/drivers/net/wireless/ath9k/core.h
@@ -23,7 +23,15 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
};
struct ath_softc {
-@@ -760,4 +761,9 @@ static inline void ath_read_cachesize(st
+@@ -704,6 +705,7 @@ struct ath_softc {
+ struct tasklet_struct bcon_tasklet;
+ struct ath_hal *sc_ah;
+ void __iomem *mem;
++ int irq;
+ spinlock_t sc_resetlock;
+ struct mutex mutex;
+
+@@ -760,4 +762,9 @@ static inline void ath_read_cachesize(st
sc->bus_ops->read_cachesize(sc, csz);
}
@@ -35,7 +43,15 @@ 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
-@@ -1267,13 +1267,7 @@ static int ath_start_rfkill_poll(struct
+@@ -39,6 +39,7 @@ static struct pci_device_id ath_pci_id_t
+ };
+
+ static void ath_detach(struct ath_softc *sc);
++static void ath_cleanup(struct ath_softc *sc);
+
+ /* return bus cachesize in 4B word units */
+
+@@ -1267,13 +1268,7 @@ static int ath_start_rfkill_poll(struct
rfkill_free(sc->rf_kill.rfkill);
/* Deinitialize the device */
@@ -46,11 +62,26 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
- pci_release_region(to_pci_dev(sc->dev), 0);
- pci_disable_device(to_pci_dev(sc->dev));
- ieee80211_free_hw(sc->hw);
-+ ath_bus_cleanup(sc);
++ ath_cleanup(sc);
return -EIO;
} else {
sc->sc_flags |= SC_OP_RFKILL_REGISTERED;
-@@ -2529,8 +2523,22 @@ ath_rf_name(u16 rf_version)
+@@ -1284,6 +1279,14 @@ static int ath_start_rfkill_poll(struct
+ }
+ #endif /* CONFIG_RFKILL */
+
++static void ath_cleanup(struct ath_softc *sc)
++{
++ ath_detach(sc);
++ free_irq(sc->irq, sc);
++ ath_bus_cleanup(sc);
++ ieee80211_free_hw(sc->hw);
++}
++
+ static void ath_detach(struct ath_softc *sc)
+ {
+ struct ieee80211_hw *hw = sc->hw;
+@@ -2529,8 +2532,18 @@ ath_rf_name(u16 rf_version)
return "????";
}
@@ -58,13 +89,9 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+{
+ struct pci_dev *pdev = to_pci_dev(sc->dev);
+
-+ ath_detach(sc);
-+ if (pdev->irq)
-+ free_irq(pdev->irq, sc);
+ pci_iounmap(pdev, sc->mem);
+ pci_release_region(pdev, 0);
+ pci_disable_device(pdev);
-+ ieee80211_free_hw(sc->hw);
+}
+
static struct ath_bus_ops ath_pci_bus_ops = {
@@ -73,7 +100,16 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
};
static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
-@@ -2667,13 +2675,7 @@ static void ath_pci_remove(struct pci_de
+@@ -2637,6 +2650,8 @@ static int ath_pci_probe(struct pci_dev
+ goto bad4;
+ }
+
++ sc->irq = pdev->irq;
++
+ 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
struct ieee80211_hw *hw = pci_get_drvdata(pdev);
struct ath_softc *sc = hw->priv;
@@ -84,7 +120,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
- pci_release_region(pdev, 0);
- pci_disable_device(pdev);
- ieee80211_free_hw(hw);
-+ ath_pci_cleanup(sc);
++ ath_cleanup(sc);
}
#ifdef CONFIG_PM
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 0cdf4daf54..462d623624 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
@@ -1,7 +1,7 @@
-From d95e670cd1395ffd8410bed809b6d060f2183d6b Mon Sep 17 00:00:00 2001
+From 39c2811d18b39991f49c16dcd9ed1a81200371ad Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 5 Jan 2009 11:01:09 +0100
-Subject: [PATCH 05/11] ath9k: move PCI code into separate file
+Subject: [PATCH v2 05/11] ath9k: move PCI code into separate file
Now that we have converted all bus specific routines to replaceable, we
can move the PCI specific codes into a separate file.
@@ -10,9 +10,9 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
---
drivers/net/wireless/ath9k/Makefile | 1 +
- drivers/net/wireless/ath9k/core.h | 18 ++-
- drivers/net/wireless/ath9k/main.c | 299 +++--------------------------------
- drivers/net/wireless/ath9k/pci.c | 289 +++++++++++++++++++++++++++++++++
+ drivers/net/wireless/ath9k/core.h | 19 ++-
+ drivers/net/wireless/ath9k/main.c | 300 +++--------------------------------
+ drivers/net/wireless/ath9k/pci.c | 287 +++++++++++++++++++++++++++++++++
4 files changed, 328 insertions(+), 279 deletions(-)
--- a/drivers/net/wireless/ath9k/Makefile
@@ -36,13 +36,14 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
#include <net/mac80211.h>
#include <linux/leds.h>
#include <linux/rfkill.h>
-@@ -766,4 +766,20 @@ static inline void ath_bus_cleanup(struc
+@@ -767,4 +767,21 @@ static inline void ath_bus_cleanup(struc
sc->bus_ops->cleanup(sc);
}
+extern struct ieee80211_ops ath9k_ops;
+
+irqreturn_t ath_isr(int irq, void *dev);
++void ath_cleanup(struct ath_softc *sc);
+int ath_attach(u16 devid, struct ath_softc *sc);
+void ath_detach(struct ath_softc *sc);
+const char *ath_mac_bb_name(u32 mac_bb_version);
@@ -59,7 +60,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
-@@ -28,38 +28,6 @@ MODULE_DESCRIPTION("Support for Atheros
+@@ -28,39 +28,6 @@ MODULE_DESCRIPTION("Support for Atheros
MODULE_SUPPORTED_DEVICE("Atheros 802.11n WLAN cards");
MODULE_LICENSE("Dual BSD/GPL");
@@ -74,6 +75,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
-};
-
-static void ath_detach(struct ath_softc *sc);
+-static void ath_cleanup(struct ath_softc *sc);
-
-/* return bus cachesize in 4B word units */
-
@@ -98,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)
{
-@@ -497,7 +465,7 @@ static void ath9k_tasklet(unsigned long
+@@ -498,7 +465,7 @@ static void ath9k_tasklet(unsigned long
ath9k_hw_set_interrupts(sc->sc_ah, sc->sc_imask);
}
@@ -107,16 +109,25 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
{
struct ath_softc *sc = dev;
struct ath_hal *ah = sc->sc_ah;
-@@ -1278,7 +1246,7 @@ static int ath_start_rfkill_poll(struct
+@@ -1279,7 +1246,7 @@ static int ath_start_rfkill_poll(struct
}
#endif /* CONFIG_RFKILL */
+-static void ath_cleanup(struct ath_softc *sc)
++void ath_cleanup(struct ath_softc *sc)
+ {
+ ath_detach(sc);
+ free_irq(sc->irq, sc);
+@@ -1287,7 +1254,7 @@ static void ath_cleanup(struct ath_softc
+ ieee80211_free_hw(sc->hw);
+ }
+
-static void ath_detach(struct ath_softc *sc)
+void ath_detach(struct ath_softc *sc)
{
struct ieee80211_hw *hw = sc->hw;
int i = 0;
-@@ -1529,7 +1497,7 @@ bad:
+@@ -1538,7 +1505,7 @@ bad:
return error;
}
@@ -125,7 +136,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
{
struct ieee80211_hw *hw = sc->hw;
int error = 0;
-@@ -2448,7 +2416,7 @@ static int ath9k_ampdu_action(struct iee
+@@ -2457,7 +2424,7 @@ static int ath9k_ampdu_action(struct iee
return ret;
}
@@ -134,7 +145,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
.tx = ath9k_tx,
.start = ath9k_start,
.stop = ath9k_stop,
-@@ -2492,7 +2460,7 @@ static struct {
+@@ -2501,7 +2468,7 @@ static struct {
/*
* Return the MAC/BB name. "????" is returned if the MAC/BB is unknown.
*/
@@ -143,7 +154,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
ath_mac_bb_name(u32 mac_bb_version)
{
int i;
-@@ -2509,7 +2477,7 @@ ath_mac_bb_name(u32 mac_bb_version)
+@@ -2518,7 +2485,7 @@ ath_mac_bb_name(u32 mac_bb_version)
/*
* Return the RF name. "????" is returned if the RF is unknown.
*/
@@ -152,7 +163,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
ath_rf_name(u16 rf_version)
{
int i;
-@@ -2523,236 +2491,7 @@ ath_rf_name(u16 rf_version)
+@@ -2532,234 +2499,7 @@ ath_rf_name(u16 rf_version)
return "????";
}
@@ -160,13 +171,9 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
-{
- struct pci_dev *pdev = to_pci_dev(sc->dev);
-
-- ath_detach(sc);
-- if (pdev->irq)
-- free_irq(pdev->irq, sc);
- pci_iounmap(pdev, sc->mem);
- pci_release_region(pdev, 0);
- pci_disable_device(pdev);
-- ieee80211_free_hw(sc->hw);
-}
-
-static struct ath_bus_ops ath_pci_bus_ops = {
@@ -278,6 +285,8 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
- goto bad4;
- }
-
+- sc->irq = pdev->irq;
+-
- ah = sc->sc_ah;
- printk(KERN_INFO
- "%s: Atheros AR%s MAC/BB Rev:%x "
@@ -308,7 +317,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
- struct ieee80211_hw *hw = pci_get_drvdata(pdev);
- struct ath_softc *sc = hw->priv;
-
-- ath_pci_cleanup(sc);
+- ath_cleanup(sc);
-}
-
-#ifdef CONFIG_PM
@@ -390,7 +399,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
{
int error;
-@@ -2764,26 +2503,30 @@ static int __init init_ath_pci(void)
+@@ -2771,26 +2511,30 @@ static int __init init_ath_pci(void)
printk(KERN_ERR
"Unable to register rate control algorithm: %d\n",
error);
@@ -433,7 +442,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+module_exit(ath9k_exit);
--- /dev/null
+++ b/drivers/net/wireless/ath9k/pci.c
-@@ -0,0 +1,289 @@
+@@ -0,0 +1,287 @@
+/*
+ * Copyright (c) 2008 Atheros Communications Inc.
+ *
@@ -489,13 +498,9 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+{
+ struct pci_dev *pdev = to_pci_dev(sc->dev);
+
-+ ath_detach(sc);
-+ if (pdev->irq)
-+ free_irq(pdev->irq, sc);
+ pci_iounmap(pdev, sc->mem);
+ pci_release_region(pdev, 0);
+ pci_disable_device(pdev);
-+ ieee80211_free_hw(sc->hw);
+}
+
+static struct ath_bus_ops ath_pci_bus_ops = {
@@ -607,6 +612,8 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+ goto bad4;
+ }
+
++ sc->irq = pdev->irq;
++
+ ah = sc->sc_ah;
+ printk(KERN_INFO
+ "%s: Atheros AR%s MAC/BB Rev:%x "
@@ -637,7 +644,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+ struct ieee80211_hw *hw = pci_get_drvdata(pdev);
+ struct ath_softc *sc = hw->priv;
+
-+ ath_pci_cleanup(sc);
++ ath_cleanup(sc);
+}
+
+#ifdef CONFIG_PM
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 99eec34ba0..02c5632baf 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
@@ -1,7 +1,7 @@
-From 9b3c1b50a35455e28c5b2fede615a304df42e758 Mon Sep 17 00:00:00 2001
+From ace011bdb2676f594824c81a5a5b5089dc0c3e0b Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 5 Jan 2009 11:03:17 +0100
-Subject: [PATCH 06/11] ath9k: introduce platform driver for AHB bus support
+Subject: [PATCH v2 06/11] ath9k: introduce platform driver for AHB bus support
This patch adds the platform_driver itself, and modifies the main driver
to register it.
@@ -10,10 +10,10 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
---
drivers/net/wireless/ath9k/Makefile | 1 +
- drivers/net/wireless/ath9k/ahb.c | 179 +++++++++++++++++++++++++++++++++++
- drivers/net/wireless/ath9k/core.h | 9 ++
+ drivers/net/wireless/ath9k/ahb.c | 160 +++++++++++++++++++++++++++++++++++
+ drivers/net/wireless/ath9k/core.h | 8 ++
drivers/net/wireless/ath9k/main.c | 10 ++
- 4 files changed, 199 insertions(+), 0 deletions(-)
+ 4 files changed, 179 insertions(+), 0 deletions(-)
--- a/drivers/net/wireless/ath9k/Makefile
+++ b/drivers/net/wireless/ath9k/Makefile
@@ -27,7 +27,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
obj-$(CONFIG_ATH9K) += ath9k.o
--- /dev/null
+++ b/drivers/net/wireless/ath9k/ahb.c
-@@ -0,0 +1,179 @@
+@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2008 Atheros Communications Inc.
+ * Copyright (c) 2009 Gabor Juhos <juhosg@openwrt.org>
@@ -60,13 +60,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+
+static void ath_ahb_cleanup(struct ath_softc *sc)
+{
-+ struct ieee80211_hw *hw = sc->hw;
-+
-+ free_irq(sc->irq, sc);
-+
-+ ath_detach(sc);
+ iounmap(sc->mem);
-+ ieee80211_free_hw(hw);
+}
+
+static struct ath_bus_ops ath_ahb_bus_ops = {
@@ -114,16 +108,6 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+ goto err_iounmap;
+ }
+
-+ hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
-+ IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
-+ IEEE80211_HW_SIGNAL_DBM |
-+ IEEE80211_HW_NOISE_DBM;
-+
-+ hw->wiphy->interface_modes =
-+ BIT(NL80211_IFTYPE_AP) |
-+ BIT(NL80211_IFTYPE_STATION) |
-+ BIT(NL80211_IFTYPE_ADHOC);
-+
+ SET_IEEE80211_DEV(hw, &pdev->dev);
+ platform_set_drvdata(pdev, hw);
+
@@ -179,10 +163,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+ if (hw) {
+ struct ath_softc *sc = hw->priv;
+
-+ free_irq(sc->irq, sc);
-+ ath_detach(sc);
-+ iounmap(sc->mem);
-+ ieee80211_free_hw(hw);
++ ath_cleanup(sc);
+ platform_set_drvdata(pdev, NULL);
+ }
+
@@ -205,19 +186,11 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+
+void ath_ahb_exit(void)
+{
-+ platform_driver_register(&ath_ahb_driver);
++ platform_driver_unregister(&ath_ahb_driver);
+}
--- a/drivers/net/wireless/ath9k/core.h
+++ b/drivers/net/wireless/ath9k/core.h
-@@ -705,6 +705,7 @@ struct ath_softc {
- struct tasklet_struct bcon_tasklet;
- struct ath_hal *sc_ah;
- void __iomem *mem;
-+ int irq;
- spinlock_t sc_resetlock;
- struct mutex mutex;
-
-@@ -782,4 +783,12 @@ static inline int ath_pci_init(void) { r
+@@ -784,4 +784,12 @@ static inline int ath_pci_init(void) { r
static inline void ath_pci_exit(void) {};
#endif
@@ -232,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
-@@ -2514,8 +2514,17 @@ static int __init ath9k_init(void)
+@@ -2522,8 +2522,17 @@ static int __init ath9k_init(void)
goto err_rate_unregister;
}
@@ -250,7 +223,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
err_rate_unregister:
ath_rate_control_unregister();
err_out:
-@@ -2525,6 +2534,7 @@ module_init(ath9k_init);
+@@ -2533,6 +2542,7 @@ module_init(ath9k_init);
static void __exit ath9k_exit(void)
{
diff --git a/package/mac80211/patches/407-ath9k-get-EEPROM-contents-from-platform-data-on-AHB.patch b/package/mac80211/patches/407-ath9k-get-EEPROM-contents-from-platform-data-on-AHB.patch
index 2412d8f11b..e866acdc6c 100644
--- a/package/mac80211/patches/407-ath9k-get-EEPROM-contents-from-platform-data-on-AHB.patch
+++ b/package/mac80211/patches/407-ath9k-get-EEPROM-contents-from-platform-data-on-AHB.patch
@@ -1,7 +1,7 @@
-From d0d8545c85b03c2e7e3c9957a94d0d6fc8168bef Mon Sep 17 00:00:00 2001
+From 317e9ea5007e3ff18b52f973c1b3a3f2c84bcae1 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 5 Jan 2009 11:05:05 +0100
-Subject: [PATCH 07/11] ath9k: get EEPROM contents from platform data on AHB bus
+Subject: [PATCH v2 07/11] ath9k: get EEPROM contents from platform data on AHB bus
On the AR913x SOCs we have to provide EEPROM contents via platform_data,
because accessing the flash via MMIO is not safe. Additionally different
@@ -27,8 +27,8 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
#include "core.h"
#include "reg.h"
#include "hw.h"
-@@ -39,9 +40,29 @@ static void ath_ahb_cleanup(struct ath_s
- ieee80211_free_hw(hw);
+@@ -33,9 +34,29 @@ static void ath_ahb_cleanup(struct ath_s
+ iounmap(sc->mem);
}
+static bool ath_ahb_eeprom_read(struct ath_hal *ah, u32 off, u16 *data)
@@ -57,7 +57,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
};
static int ath_ahb_probe(struct platform_device *pdev)
-@@ -54,6 +75,12 @@ static int ath_ahb_probe(struct platform
+@@ -48,6 +69,12 @@ static int ath_ahb_probe(struct platform
int ret = 0;
struct ath_hal *ah;
@@ -151,8 +151,8 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
else
--- a/drivers/net/wireless/ath9k/pci.c
+++ b/drivers/net/wireless/ath9k/pci.c
-@@ -62,9 +62,27 @@ static void ath_pci_cleanup(struct ath_s
- ieee80211_free_hw(sc->hw);
+@@ -58,9 +58,27 @@ static void ath_pci_cleanup(struct ath_s
+ pci_disable_device(pdev);
}
+static bool ath_pci_eeprom_read(struct ath_hal *ah, u32 off, u16 *data)
diff --git a/package/mac80211/patches/409-ath9k-remove-u16-casts-from-rtc-register-access.patch b/package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch
index 7aa2ee34f5..b5910f7df8 100644
--- a/package/mac80211/patches/409-ath9k-remove-u16-casts-from-rtc-register-access.patch
+++ b/package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch
@@ -1,7 +1,7 @@
-From 491719852fb049d0a65dc05550b645b62d799453 Mon Sep 17 00:00:00 2001
+From 891bd8d155bbdabac3c69486fc854984ee90761c Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 5 Jan 2009 11:11:28 +0100
-Subject: [PATCH 09/11] ath9k: remove (u16) casts from rtc register access
+Subject: [PATCH v2 08/11] ath9k: remove (u16) casts from rtc register access
The RTC register offsets don't fit into 'u16' on the AR913x, so we have
to remove the existing casts.
@@ -14,7 +14,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
--- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c
-@@ -1010,7 +1010,7 @@ static void ath9k_hw_init_pll(struct ath
+@@ -1008,7 +1008,7 @@ static void ath9k_hw_init_pll(struct ath
pll |= SM(0xb, AR_RTC_PLL_DIV);
}
}
@@ -23,7 +23,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
udelay(RTC_PLL_SETTLE_DELAY);
-@@ -1550,11 +1550,11 @@ static bool ath9k_hw_set_reset(struct at
+@@ -1547,11 +1547,11 @@ static bool ath9k_hw_set_reset(struct at
rst_flags |= AR_RTC_RC_MAC_COLD;
}
@@ -38,7 +38,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
DPRINTF(ah->ah_sc, ATH_DBG_RESET,
"RTC stuck in MAC reset\n");
return false;
-@@ -1576,8 +1576,8 @@ static bool ath9k_hw_set_reset_power_on(
+@@ -1573,8 +1573,8 @@ static bool ath9k_hw_set_reset_power_on(
REG_WRITE(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN |
AR_RTC_FORCE_WAKE_ON_INT);
@@ -49,7 +49,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
if (!ath9k_hw_wait(ah,
AR_RTC_STATUS,
-@@ -2602,7 +2602,7 @@ static void ath9k_set_power_sleep(struct
+@@ -2599,7 +2599,7 @@ static void ath9k_set_power_sleep(struct
if (!AR_SREV_9100(ah))
REG_WRITE(ah, AR_RC, AR_RC_AHB | AR_RC_HOSTIF);
diff --git a/package/mac80211/patches/410-ath9k-fix-ar5416Addac_9100-values.patch b/package/mac80211/patches/409-ath9k-fix-ar5416Addac_9100-values.patch
index 0ac979b075..2ede51fb46 100644
--- a/package/mac80211/patches/410-ath9k-fix-ar5416Addac_9100-values.patch
+++ b/package/mac80211/patches/409-ath9k-fix-ar5416Addac_9100-values.patch
@@ -1,7 +1,7 @@
-From 2084ddcc2e2e85d10b210202d8368126b0beaddd Mon Sep 17 00:00:00 2001
+From d1550cd72b9bddd43a355229aaa330b54c28d92e Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 5 Jan 2009 11:13:04 +0100
-Subject: [PATCH 10/11] ath9k: fix ar5416Addac_9100 values
+Subject: [PATCH v2 09/11] ath9k: fix ar5416Addac_9100 values
Writing the register at offset 0x98c4 causes a deadlock on the AR913x
SoCs. Although i don't have detailed knowledge about these registers,
diff --git a/package/mac80211/patches/411-ath9k-fix-null-pointer-dereference-in-ani-monitor-c.patch b/package/mac80211/patches/410-ath9k-fix-null-pointer-dereference-in-ani-monitor-c.patch
index cec20838f0..e12f7bc262 100644
--- a/package/mac80211/patches/411-ath9k-fix-null-pointer-dereference-in-ani-monitor-c.patch
+++ b/package/mac80211/patches/410-ath9k-fix-null-pointer-dereference-in-ani-monitor-c.patch
@@ -1,7 +1,7 @@
-From 7b647404fb694f250b62a2a363b1298243ea403b Mon Sep 17 00:00:00 2001
+From a6411f449091c272ca08146238b91a0835306179 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 5 Jan 2009 11:14:14 +0100
-Subject: [PATCH 11/11] ath9k: fix null pointer dereference in ani monitor code
+Subject: [PATCH v2 10/11] ath9k: fix null pointer dereference in ani monitor code
In 'ath9k_ani_reset' the 'ahp->ah_curani' will be initialized only
if 'DO_ANI(ah)' true. In 'ath9k_hw_ani_monitor' we are using
diff --git a/package/mac80211/patches/408-ath9k-enable-support-for-AR9100.patch b/package/mac80211/patches/411-ath9k-enable-support-for-AR9100.patch
index 794f22ad67..f3cc0c9afb 100644
--- a/package/mac80211/patches/408-ath9k-enable-support-for-AR9100.patch
+++ b/package/mac80211/patches/411-ath9k-enable-support-for-AR9100.patch
@@ -1,7 +1,7 @@
-From c09de7514f7020370e256d6739c1c27ecb356542 Mon Sep 17 00:00:00 2001
+From c4568c6e2a62a95c95c7875643a64a19bc8c1a2f Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 5 Jan 2009 11:10:28 +0100
-Subject: [PATCH 08/11] ath9k: enable support for AR9100
+Subject: [PATCH v2 11/11] ath9k: enable support for AR9100
Because we have support for the AR9100 devices now, we can enable them.