[package] mac80211: update ath9k patches
authorGabor Juhos <juhosg@openwrt.org>
Fri, 9 Jan 2009 12:38:08 +0000 (12:38 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Fri, 9 Jan 2009 12:38:08 +0000 (12:38 +0000)
SVN-Revision: 13948

15 files changed:
package/mac80211/patches/401-ath9k-convert-to-struct-device.patch
package/mac80211/patches/402-ath9k-convert-to-use-bus-agnostic-DMA-routines.patch
package/mac80211/patches/403-ath9k-introduce-bus-specific-cache-size-routine.patch
package/mac80211/patches/404-ath9k-introduce-bus-specific-cleanup-routine.patch
package/mac80211/patches/405-ath9k-move-PCI-code-into-separate-file.patch
package/mac80211/patches/406-ath9k-introduce-platform-driver-for-AHB-bus-support.patch
package/mac80211/patches/407-ath9k-get-EEPROM-contents-from-platform-data-on-AHB.patch
package/mac80211/patches/408-ath9k-enable-support-for-AR9100.patch [deleted file]
package/mac80211/patches/408-ath9k-remove-u16-casts-from-rtc-register-access.patch [new file with mode: 0644]
package/mac80211/patches/409-ath9k-fix-ar5416Addac_9100-values.patch [new file with mode: 0644]
package/mac80211/patches/409-ath9k-remove-u16-casts-from-rtc-register-access.patch [deleted file]
package/mac80211/patches/410-ath9k-fix-ar5416Addac_9100-values.patch [deleted file]
package/mac80211/patches/410-ath9k-fix-null-pointer-dereference-in-ani-monitor-c.patch [new file with mode: 0644]
package/mac80211/patches/411-ath9k-enable-support-for-AR9100.patch [new file with mode: 0644]
package/mac80211/patches/411-ath9k-fix-null-pointer-dereference-in-ani-monitor-c.patch [deleted file]

index 762a0d78975ad97f3ac26e00fd902bbcf7c4ff87..29ad4e9fe22cf77544a361f8254815395c93fbc1 100644 (file)
@@ -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
 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.
 
 Convert 'struct pci_dev' to 'struct device' to make it usable on the AHB
 bus as well.
index 2a30b610e19e35792659248c44bf236b96d9f878..ac8a51587c2a4212a7f50b9cd6cda491e643682f 100644 (file)
@@ -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
 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.
 
 
 Convert to use bus-agnostic DMA routines to make it usable on AHB bus as well.
 
index 4fd49691a1fbbea35cdc531ba555ff42aef9d3a9..d6b24ebca3c81bb7835440c9af16d78203799cfc 100644 (file)
@@ -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
 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.
 
 The PCI specific bus_read_cachesize routine won't work on the AHB bus,
 we have to replace it with a suitable one later.
index d1b2f3c1f990762bc4f0667165c398a1b14288d5..6076f49ef5110f893201ff008a949a05f614e604 100644 (file)
@@ -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
 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.
 
 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>
 ---
 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
 ---
- drivers/net/wireless/ath9k/core.h |    ++++++
- drivers/net/wireless/ath9k/main.c |   3++++++++++++++++--------------
- 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
 
 --- 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 {
  };
  
  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);
  }
  
        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
  #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 */
                        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);
 -                      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;
                        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 "????";
  }
  
        return "????";
  }
  
@@ -58,13 +89,9 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
 +{
 +      struct pci_dev *pdev = to_pci_dev(sc->dev);
 +
 +{
 +      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);
 +      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 = {
 +}
 +
  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)
  };
  
  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;
  
        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);
 -      pci_release_region(pdev, 0);
 -      pci_disable_device(pdev);
 -      ieee80211_free_hw(hw);
-+      ath_pci_cleanup(sc);
++      ath_cleanup(sc);
  }
  
  #ifdef CONFIG_PM
  }
  
  #ifdef CONFIG_PM
index 0cdf4daf54d990d7f6f951a1e4e35e15f5c7a47c..462d6236244d750bda99cb01f21d58ecccede004 100644 (file)
@@ -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
 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.
 
 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 +
 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
  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>
  #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);
        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);
 +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
  #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");
  
  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_detach(struct ath_softc *sc);
+-static void ath_cleanup(struct ath_softc *sc);
 -
 -/* return bus cachesize in 4B word units */
 -
 -
 -/* 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)
  {
  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);
  }
  
        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;
  {
        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 */
  
  }
  #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;
 -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;
  }
  
        return error;
  }
  
@@ -125,7 +136,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
  {
        struct ieee80211_hw *hw = sc->hw;
        int error = 0;
  {
        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;
  }
  
        return ret;
  }
  
@@ -134,7 +145,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
        .tx                 = ath9k_tx,
        .start              = ath9k_start,
        .stop               = ath9k_stop,
        .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.
   */
  /*
   * 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;
  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.
   */
  /*
   * 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;
  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 "????";
  }
  
        return "????";
  }
  
@@ -160,13 +171,9 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
 -{
 -      struct pci_dev *pdev = to_pci_dev(sc->dev);
 -
 -{
 -      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);
 -      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 = {
 -}
 -
 -static struct ath_bus_ops ath_pci_bus_ops = {
@@ -278,6 +285,8 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
 -              goto bad4;
 -      }
 -
 -              goto bad4;
 -      }
 -
+-      sc->irq = pdev->irq;
+-
 -      ah = sc->sc_ah;
 -      printk(KERN_INFO
 -             "%s: Atheros AR%s MAC/BB Rev:%x "
 -      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;
 -
 -      struct ieee80211_hw *hw = pci_get_drvdata(pdev);
 -      struct ath_softc *sc = hw->priv;
 -
--      ath_pci_cleanup(sc);
+-      ath_cleanup(sc);
 -}
 -
 -#ifdef CONFIG_PM
 -}
 -
 -#ifdef CONFIG_PM
@@ -390,7 +399,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
  {
        int error;
  
  {
        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);
                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
 +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.
 + *
 +/*
 + * 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);
 +
 +{
 +      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);
 +      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 = {
 +}
 +
 +static struct ath_bus_ops ath_pci_bus_ops = {
@@ -607,6 +612,8 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
 +              goto bad4;
 +      }
 +
 +              goto bad4;
 +      }
 +
++      sc->irq = pdev->irq;
++
 +      ah = sc->sc_ah;
 +      printk(KERN_INFO
 +             "%s: Atheros AR%s MAC/BB Rev:%x "
 +      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;
 +
 +      struct ieee80211_hw *hw = pci_get_drvdata(pdev);
 +      struct ath_softc *sc = hw->priv;
 +
-+      ath_pci_cleanup(sc);
++      ath_cleanup(sc);
 +}
 +
 +#ifdef CONFIG_PM
 +}
 +
 +#ifdef CONFIG_PM
index 99eec34ba0f6ccc1e6ff2891a33a0c8ed8b11a6e..02c5632baf922a20153c7ebcd69ae152f1561588 100644 (file)
@@ -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
 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.
 
 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 +
 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 ++
  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
 
 --- 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
  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>
 +/*
 + * 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)
 +{
 +
 +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);
 +      iounmap(sc->mem);
-+      ieee80211_free_hw(hw);
 +}
 +
 +static struct ath_bus_ops ath_ahb_bus_ops  = {
 +}
 +
 +static struct ath_bus_ops ath_ahb_bus_ops  = {
@@ -114,16 +108,6 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
 +              goto err_iounmap;
 +      }
 +
 +              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);
 +
 +      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;
 +
 +      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);
 +      }
 +
 +              platform_set_drvdata(pdev, NULL);
 +      }
 +
@@ -205,19 +186,11 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
 +
 +void ath_ahb_exit(void)
 +{
 +
 +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
 +}
 --- 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
  
  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
  #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;
        }
  
                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:
   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)
  {
  
  static void __exit ath9k_exit(void)
  {
index 2412d8f11b9317fd3624a71b3522e55e7249491e..e866acdc6c6533ae731162b2cb6aa17df6c97187 100644 (file)
@@ -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
 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
 
 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"
  #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)
  }
  
 +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)
  };
  
  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;
  
        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
        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)
  }
  
 +static bool ath_pci_eeprom_read(struct ath_hal *ah, u32 off, u16 *data)
diff --git a/package/mac80211/patches/408-ath9k-enable-support-for-AR9100.patch b/package/mac80211/patches/408-ath9k-enable-support-for-AR9100.patch
deleted file mode 100644 (file)
index 794f22a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-From c09de7514f7020370e256d6739c1c27ecb356542 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
-
-Because we have support for the AR9100 devices now, we can enable them.
-
-Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
-Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
----
- drivers/net/wireless/ath9k/hw.c |    3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
-
---- a/drivers/net/wireless/ath9k/hw.c
-+++ b/drivers/net/wireless/ath9k/hw.c
-@@ -373,6 +373,8 @@ static const char *ath9k_hw_devname(u16 
-               return "Atheros 5418";
-       case AR9160_DEVID_PCI:
-               return "Atheros 9160";
-+      case AR5416_AR9100_DEVID:
-+              return "Atheros 9100";
-       case AR9280_DEVID_PCI:
-       case AR9280_DEVID_PCIE:
-               return "Atheros 9280";
-@@ -1176,6 +1178,7 @@ struct ath_hal *ath9k_hw_attach(u16 devi
-       switch (devid) {
-       case AR5416_DEVID_PCI:
-       case AR5416_DEVID_PCIE:
-+      case AR5416_AR9100_DEVID:
-       case AR9160_DEVID_PCI:
-       case AR9280_DEVID_PCI:
-       case AR9280_DEVID_PCIE:
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
new file mode 100644 (file)
index 0000000..b5910f7
--- /dev/null
@@ -0,0 +1,60 @@
+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 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.
+
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+---
+ drivers/net/wireless/ath9k/hw.c |   14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/wireless/ath9k/hw.c
++++ b/drivers/net/wireless/ath9k/hw.c
+@@ -1008,7 +1008,7 @@ static void ath9k_hw_init_pll(struct ath
+                               pll |= SM(0xb, AR_RTC_PLL_DIV);
+               }
+       }
+-      REG_WRITE(ah, (u16) (AR_RTC_PLL_CONTROL), pll);
++      REG_WRITE(ah, (AR_RTC_PLL_CONTROL), pll);
+       udelay(RTC_PLL_SETTLE_DELAY);
+@@ -1547,11 +1547,11 @@ static bool ath9k_hw_set_reset(struct at
+                       rst_flags |= AR_RTC_RC_MAC_COLD;
+       }
+-      REG_WRITE(ah, (u16) (AR_RTC_RC), rst_flags);
++      REG_WRITE(ah, (AR_RTC_RC), rst_flags);
+       udelay(50);
+-      REG_WRITE(ah, (u16) (AR_RTC_RC), 0);
+-      if (!ath9k_hw_wait(ah, (u16) (AR_RTC_RC), AR_RTC_RC_M, 0)) {
++      REG_WRITE(ah, (AR_RTC_RC), 0);
++      if (!ath9k_hw_wait(ah, (AR_RTC_RC), AR_RTC_RC_M, 0)) {
+               DPRINTF(ah->ah_sc, ATH_DBG_RESET,
+                       "RTC stuck in MAC reset\n");
+               return false;
+@@ -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);
+-      REG_WRITE(ah, (u16) (AR_RTC_RESET), 0);
+-      REG_WRITE(ah, (u16) (AR_RTC_RESET), 1);
++      REG_WRITE(ah, (AR_RTC_RESET), 0);
++      REG_WRITE(ah, (AR_RTC_RESET), 1);
+       if (!ath9k_hw_wait(ah,
+                          AR_RTC_STATUS,
+@@ -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);
+-              REG_CLR_BIT(ah, (u16) (AR_RTC_RESET),
++              REG_CLR_BIT(ah, (AR_RTC_RESET),
+                           AR_RTC_RESET_EN);
+       }
+ }
diff --git a/package/mac80211/patches/409-ath9k-fix-ar5416Addac_9100-values.patch b/package/mac80211/patches/409-ath9k-fix-ar5416Addac_9100-values.patch
new file mode 100644 (file)
index 0000000..2ede51f
--- /dev/null
@@ -0,0 +1,27 @@
+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 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,
+but if i change the register offset according to the 'ar5416Addac' table,
+it works. Additionally there is no reference to the 0x98c4 elsewhere.
+
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+---
+ drivers/net/wireless/ath9k/initvals.h |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+--- a/drivers/net/wireless/ath9k/initvals.h
++++ b/drivers/net/wireless/ath9k/initvals.h
+@@ -658,7 +658,7 @@ static const u32 ar5416Addac_9100[][2] =
+     {0x0000989c,  0x00000000 },
+     {0x0000989c,  0x00000000 },
+     {0x0000989c,  0x00000000 },
+-    {0x000098c4,  0x00000000 },
++    {0x000098cc,  0x00000000 },
+ };
+ static const u32 ar5416Modes[][6] = {
diff --git a/package/mac80211/patches/409-ath9k-remove-u16-casts-from-rtc-register-access.patch b/package/mac80211/patches/409-ath9k-remove-u16-casts-from-rtc-register-access.patch
deleted file mode 100644 (file)
index 7aa2ee3..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-From 491719852fb049d0a65dc05550b645b62d799453 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
-
-The RTC register offsets don't fit into 'u16' on the AR913x, so we have
-to remove the existing casts.
-
-Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
-Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
----
- drivers/net/wireless/ath9k/hw.c |   14 +++++++-------
- 1 files changed, 7 insertions(+), 7 deletions(-)
-
---- 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
-                               pll |= SM(0xb, AR_RTC_PLL_DIV);
-               }
-       }
--      REG_WRITE(ah, (u16) (AR_RTC_PLL_CONTROL), pll);
-+      REG_WRITE(ah, (AR_RTC_PLL_CONTROL), pll);
-       udelay(RTC_PLL_SETTLE_DELAY);
-@@ -1550,11 +1550,11 @@ static bool ath9k_hw_set_reset(struct at
-                       rst_flags |= AR_RTC_RC_MAC_COLD;
-       }
--      REG_WRITE(ah, (u16) (AR_RTC_RC), rst_flags);
-+      REG_WRITE(ah, (AR_RTC_RC), rst_flags);
-       udelay(50);
--      REG_WRITE(ah, (u16) (AR_RTC_RC), 0);
--      if (!ath9k_hw_wait(ah, (u16) (AR_RTC_RC), AR_RTC_RC_M, 0)) {
-+      REG_WRITE(ah, (AR_RTC_RC), 0);
-+      if (!ath9k_hw_wait(ah, (AR_RTC_RC), AR_RTC_RC_M, 0)) {
-               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(
-       REG_WRITE(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN |
-                 AR_RTC_FORCE_WAKE_ON_INT);
--      REG_WRITE(ah, (u16) (AR_RTC_RESET), 0);
--      REG_WRITE(ah, (u16) (AR_RTC_RESET), 1);
-+      REG_WRITE(ah, (AR_RTC_RESET), 0);
-+      REG_WRITE(ah, (AR_RTC_RESET), 1);
-       if (!ath9k_hw_wait(ah,
-                          AR_RTC_STATUS,
-@@ -2602,7 +2602,7 @@ static void ath9k_set_power_sleep(struct
-               if (!AR_SREV_9100(ah))
-                       REG_WRITE(ah, AR_RC, AR_RC_AHB | AR_RC_HOSTIF);
--              REG_CLR_BIT(ah, (u16) (AR_RTC_RESET),
-+              REG_CLR_BIT(ah, (AR_RTC_RESET),
-                           AR_RTC_RESET_EN);
-       }
- }
diff --git a/package/mac80211/patches/410-ath9k-fix-ar5416Addac_9100-values.patch b/package/mac80211/patches/410-ath9k-fix-ar5416Addac_9100-values.patch
deleted file mode 100644 (file)
index 0ac979b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-From 2084ddcc2e2e85d10b210202d8368126b0beaddd 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
-
-Writing the register at offset 0x98c4 causes a deadlock on the AR913x
-SoCs. Although i don't have detailed knowledge about these registers,
-but if i change the register offset according to the 'ar5416Addac' table,
-it works. Additionally there is no reference to the 0x98c4 elsewhere.
-
-Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
-Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
----
- drivers/net/wireless/ath9k/initvals.h |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
---- a/drivers/net/wireless/ath9k/initvals.h
-+++ b/drivers/net/wireless/ath9k/initvals.h
-@@ -658,7 +658,7 @@ static const u32 ar5416Addac_9100[][2] =
-     {0x0000989c,  0x00000000 },
-     {0x0000989c,  0x00000000 },
-     {0x0000989c,  0x00000000 },
--    {0x000098c4,  0x00000000 },
-+    {0x000098cc,  0x00000000 },
- };
- static const u32 ar5416Modes[][6] = {
diff --git a/package/mac80211/patches/410-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
new file mode 100644 (file)
index 0000000..e12f7bc
--- /dev/null
@@ -0,0 +1,38 @@
+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 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
+'ahp->ah_curani' unconditionally, and it will cause a NULL pointer
+dereference on AR9100.
+
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+---
+ drivers/net/wireless/ath9k/ani.c |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/wireless/ath9k/ani.c
++++ b/drivers/net/wireless/ath9k/ani.c
+@@ -551,6 +551,9 @@ void ath9k_hw_ani_monitor(struct ath_hal
+       struct ar5416AniState *aniState;
+       int32_t listenTime;
++      if (!DO_ANI(ah))
++              return;
++
+       aniState = ahp->ah_curani;
+       ahp->ah_stats.ast_nodestats = *stats;
+@@ -610,9 +613,6 @@ void ath9k_hw_ani_monitor(struct ath_hal
+               aniState->cckPhyErrCount = cckPhyErrCnt;
+       }
+-      if (!DO_ANI(ah))
+-              return;
+-
+       if (aniState->listenTime > 5 * ahp->ah_aniPeriod) {
+               if (aniState->ofdmPhyErrCount <= aniState->listenTime *
+                   aniState->ofdmTrigLow / 1000 &&
diff --git a/package/mac80211/patches/411-ath9k-enable-support-for-AR9100.patch b/package/mac80211/patches/411-ath9k-enable-support-for-AR9100.patch
new file mode 100644 (file)
index 0000000..f3cc0c9
--- /dev/null
@@ -0,0 +1,32 @@
+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 v2 11/11] ath9k: enable support for AR9100
+
+Because we have support for the AR9100 devices now, we can enable them.
+
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
+---
+ drivers/net/wireless/ath9k/hw.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+--- a/drivers/net/wireless/ath9k/hw.c
++++ b/drivers/net/wireless/ath9k/hw.c
+@@ -373,6 +373,8 @@ static const char *ath9k_hw_devname(u16 
+               return "Atheros 5418";
+       case AR9160_DEVID_PCI:
+               return "Atheros 9160";
++      case AR5416_AR9100_DEVID:
++              return "Atheros 9100";
+       case AR9280_DEVID_PCI:
+       case AR9280_DEVID_PCIE:
+               return "Atheros 9280";
+@@ -1176,6 +1178,7 @@ struct ath_hal *ath9k_hw_attach(u16 devi
+       switch (devid) {
+       case AR5416_DEVID_PCI:
+       case AR5416_DEVID_PCIE:
++      case AR5416_AR9100_DEVID:
+       case AR9160_DEVID_PCI:
+       case AR9280_DEVID_PCI:
+       case AR9280_DEVID_PCIE:
diff --git a/package/mac80211/patches/411-ath9k-fix-null-pointer-dereference-in-ani-monitor-c.patch b/package/mac80211/patches/411-ath9k-fix-null-pointer-dereference-in-ani-monitor-c.patch
deleted file mode 100644 (file)
index cec2083..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-From 7b647404fb694f250b62a2a363b1298243ea403b 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
-
-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
-'ahp->ah_curani' unconditionally, and it will cause a NULL pointer
-dereference on AR9100.
-
-Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
-Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
----
- drivers/net/wireless/ath9k/ani.c |    6 +++---
- 1 files changed, 3 insertions(+), 3 deletions(-)
-
---- a/drivers/net/wireless/ath9k/ani.c
-+++ b/drivers/net/wireless/ath9k/ani.c
-@@ -551,6 +551,9 @@ void ath9k_hw_ani_monitor(struct ath_hal
-       struct ar5416AniState *aniState;
-       int32_t listenTime;
-+      if (!DO_ANI(ah))
-+              return;
-+
-       aniState = ahp->ah_curani;
-       ahp->ah_stats.ast_nodestats = *stats;
-@@ -610,9 +613,6 @@ void ath9k_hw_ani_monitor(struct ath_hal
-               aniState->cckPhyErrCount = cckPhyErrCnt;
-       }
--      if (!DO_ANI(ah))
--              return;
--
-       if (aniState->listenTime > 5 * ahp->ah_aniPeriod) {
-               if (aniState->ofdmPhyErrCount <= aniState->listenTime *
-                   aniState->ofdmTrigLow / 1000 &&