Changeset 13948


Ignore:
Timestamp:
2009-01-09T13:38:08+01:00 (9 years ago)
Author:
juhosg
Message:

[package] mac80211: update ath9k patches

Location:
trunk/package/mac80211/patches
Files:
4 added
4 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/mac80211/patches/401-ath9k-convert-to-struct-device.patch

    r13925 r13948  
    22From: Gabor Juhos <juhosg@openwrt.org> 
    33Date: Mon, 5 Jan 2009 10:45:00 +0100 
    4 Subject: [PATCH 01/11] ath9k: convert to struct device 
     4Subject: [PATCH v2 01/11] ath9k: convert to struct device 
    55 
    66Convert 'struct pci_dev' to 'struct device' to make it usable on the AHB 
  • trunk/package/mac80211/patches/402-ath9k-convert-to-use-bus-agnostic-DMA-routines.patch

    r13925 r13948  
    22From: Gabor Juhos <juhosg@openwrt.org> 
    33Date: Mon, 5 Jan 2009 10:50:30 +0100 
    4 Subject: [PATCH 02/11] ath9k: convert to use bus-agnostic DMA routines 
     4Subject: [PATCH v2 02/11] ath9k: convert to use bus-agnostic DMA routines 
    55 
    66Convert to use bus-agnostic DMA routines to make it usable on AHB bus as well. 
  • trunk/package/mac80211/patches/403-ath9k-introduce-bus-specific-cache-size-routine.patch

    r13926 r13948  
    22From: Gabor Juhos <juhosg@openwrt.org> 
    33Date: Mon, 5 Jan 2009 10:57:42 +0100 
    4 Subject: [PATCH 03/11] ath9k: introduce bus specific cache size routine 
     4Subject: [PATCH v2 03/11] ath9k: introduce bus specific cache size routine 
    55 
    66The PCI specific bus_read_cachesize routine won't work on the AHB bus, 
  • trunk/package/mac80211/patches/404-ath9k-introduce-bus-specific-cleanup-routine.patch

    r13926 r13948  
    1 From 4167fb37cceda6a5ebfbfc4431abc69a1857ce43 Mon Sep 17 00:00:00 2001 
     1From 7524b77fe24a4464b08a2ac987ec22711a4f2027 Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    33Date: Mon, 5 Jan 2009 10:59:29 +0100 
    4 Subject: [PATCH 04/11] ath9k: introduce bus specific cleanup routine 
     4Subject: [PATCH v2 04/11] ath9k: introduce bus specific cleanup routine 
    55 
    66We have left only some PCI specific cleanup code. We have to convert 
     
    1010Signed-off-by: Imre Kaloz <kaloz@openwrt.org> 
    1111--- 
    12  drivers/net/wireless/ath9k/core.h |    6 ++++++ 
    13  drivers/net/wireless/ath9k/main.c |   30 ++++++++++++++++-------------- 
    14  2 files changed, 22 insertions(+), 14 deletions(-) 
     12 drivers/net/wireless/ath9k/core.h |    7 +++++++ 
     13 drivers/net/wireless/ath9k/main.c |   37 +++++++++++++++++++++++-------------- 
     14 2 files changed, 30 insertions(+), 14 deletions(-) 
    1515 
    1616--- a/drivers/net/wireless/ath9k/core.h 
     
    2424  
    2525 struct ath_softc { 
    26 @@ -760,4 +761,9 @@ static inline void ath_read_cachesize(st 
     26@@ -704,6 +705,7 @@ struct ath_softc { 
     27        struct tasklet_struct bcon_tasklet; 
     28        struct ath_hal *sc_ah; 
     29        void __iomem *mem; 
     30+       int irq; 
     31        spinlock_t sc_resetlock; 
     32        struct mutex mutex; 
     33  
     34@@ -760,4 +762,9 @@ static inline void ath_read_cachesize(st 
    2735        sc->bus_ops->read_cachesize(sc, csz); 
    2836 } 
     
    3644--- a/drivers/net/wireless/ath9k/main.c 
    3745+++ b/drivers/net/wireless/ath9k/main.c 
    38 @@ -1267,13 +1267,7 @@ static int ath_start_rfkill_poll(struct  
     46@@ -39,6 +39,7 @@ static struct pci_device_id ath_pci_id_t 
     47 }; 
     48  
     49 static void ath_detach(struct ath_softc *sc); 
     50+static void ath_cleanup(struct ath_softc *sc); 
     51  
     52 /* return bus cachesize in 4B word units */ 
     53  
     54@@ -1267,13 +1268,7 @@ static int ath_start_rfkill_poll(struct  
    3955                        rfkill_free(sc->rf_kill.rfkill); 
    4056  
     
    4763-                       pci_disable_device(to_pci_dev(sc->dev)); 
    4864-                       ieee80211_free_hw(sc->hw); 
    49 +                       ath_bus_cleanup(sc); 
     65+                       ath_cleanup(sc); 
    5066                        return -EIO; 
    5167                } else { 
    5268                        sc->sc_flags |= SC_OP_RFKILL_REGISTERED; 
    53 @@ -2529,8 +2523,22 @@ ath_rf_name(u16 rf_version) 
     69@@ -1284,6 +1279,14 @@ static int ath_start_rfkill_poll(struct  
     70 } 
     71 #endif /* CONFIG_RFKILL */ 
     72  
     73+static void ath_cleanup(struct ath_softc *sc) 
     74+{ 
     75+       ath_detach(sc); 
     76+       free_irq(sc->irq, sc); 
     77+       ath_bus_cleanup(sc); 
     78+       ieee80211_free_hw(sc->hw); 
     79+} 
     80+ 
     81 static void ath_detach(struct ath_softc *sc) 
     82 { 
     83        struct ieee80211_hw *hw = sc->hw; 
     84@@ -2529,8 +2532,18 @@ ath_rf_name(u16 rf_version) 
    5485        return "????"; 
    5586 } 
     
    5990+       struct pci_dev *pdev = to_pci_dev(sc->dev); 
    6091+ 
    61 +       ath_detach(sc); 
    62 +       if (pdev->irq) 
    63 +               free_irq(pdev->irq, sc); 
    6492+       pci_iounmap(pdev, sc->mem); 
    6593+       pci_release_region(pdev, 0); 
    6694+       pci_disable_device(pdev); 
    67 +       ieee80211_free_hw(sc->hw); 
    6895+} 
    6996+ 
     
    74101  
    75102 static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) 
    76 @@ -2667,13 +2675,7 @@ static void ath_pci_remove(struct pci_de 
     103@@ -2637,6 +2650,8 @@ static int ath_pci_probe(struct pci_dev  
     104                goto bad4; 
     105        } 
     106  
     107+       sc->irq = pdev->irq; 
     108+ 
     109        ah = sc->sc_ah; 
     110        printk(KERN_INFO 
     111               "%s: Atheros AR%s MAC/BB Rev:%x " 
     112@@ -2667,13 +2682,7 @@ static void ath_pci_remove(struct pci_de 
    77113        struct ieee80211_hw *hw = pci_get_drvdata(pdev); 
    78114        struct ath_softc *sc = hw->priv; 
     
    85121-       pci_disable_device(pdev); 
    86122-       ieee80211_free_hw(hw); 
    87 +       ath_pci_cleanup(sc); 
     123+       ath_cleanup(sc); 
    88124 } 
    89125  
  • trunk/package/mac80211/patches/405-ath9k-move-PCI-code-into-separate-file.patch

    r13926 r13948  
    1 From d95e670cd1395ffd8410bed809b6d060f2183d6b Mon Sep 17 00:00:00 2001 
     1From 39c2811d18b39991f49c16dcd9ed1a81200371ad Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    33Date: Mon, 5 Jan 2009 11:01:09 +0100 
    4 Subject: [PATCH 05/11] ath9k: move PCI code into separate file 
     4Subject: [PATCH v2 05/11] ath9k: move PCI code into separate file 
    55 
    66Now that we have converted all bus specific routines to replaceable, we 
     
    1111--- 
    1212 drivers/net/wireless/ath9k/Makefile |    1 + 
    13  drivers/net/wireless/ath9k/core.h   |   18 ++- 
    14  drivers/net/wireless/ath9k/main.c   |  299 +++-------------------------------- 
    15  drivers/net/wireless/ath9k/pci.c    |  289 +++++++++++++++++++++++++++++++++ 
     13 drivers/net/wireless/ath9k/core.h   |   19 ++- 
     14 drivers/net/wireless/ath9k/main.c   |  300 +++-------------------------------- 
     15 drivers/net/wireless/ath9k/pci.c    |  287 +++++++++++++++++++++++++++++++++ 
    1616 4 files changed, 328 insertions(+), 279 deletions(-) 
    1717 
     
    3737 #include <linux/leds.h> 
    3838 #include <linux/rfkill.h> 
    39 @@ -766,4 +766,20 @@ static inline void ath_bus_cleanup(struc 
     39@@ -767,4 +767,21 @@ static inline void ath_bus_cleanup(struc 
    4040        sc->bus_ops->cleanup(sc); 
    4141 } 
     
    4444+ 
    4545+irqreturn_t ath_isr(int irq, void *dev); 
     46+void ath_cleanup(struct ath_softc *sc); 
    4647+int ath_attach(u16 devid, struct ath_softc *sc); 
    4748+void ath_detach(struct ath_softc *sc); 
     
    6061--- a/drivers/net/wireless/ath9k/main.c 
    6162+++ b/drivers/net/wireless/ath9k/main.c 
    62 @@ -28,38 +28,6 @@ MODULE_DESCRIPTION("Support for Atheros  
     63@@ -28,39 +28,6 @@ MODULE_DESCRIPTION("Support for Atheros  
    6364 MODULE_SUPPORTED_DEVICE("Atheros 802.11n WLAN cards"); 
    6465 MODULE_LICENSE("Dual BSD/GPL"); 
     
    7576- 
    7677-static void ath_detach(struct ath_softc *sc); 
     78-static void ath_cleanup(struct ath_softc *sc); 
    7779- 
    7880-/* return bus cachesize in 4B word units */ 
     
    99101                                struct ieee80211_conf *conf) 
    100102 { 
    101 @@ -497,7 +465,7 @@ static void ath9k_tasklet(unsigned long  
     103@@ -498,7 +465,7 @@ static void ath9k_tasklet(unsigned long  
    102104        ath9k_hw_set_interrupts(sc->sc_ah, sc->sc_imask); 
    103105 } 
     
    108110        struct ath_softc *sc = dev; 
    109111        struct ath_hal *ah = sc->sc_ah; 
    110 @@ -1278,7 +1246,7 @@ static int ath_start_rfkill_poll(struct  
     112@@ -1279,7 +1246,7 @@ static int ath_start_rfkill_poll(struct  
    111113 } 
    112114 #endif /* CONFIG_RFKILL */ 
     115  
     116-static void ath_cleanup(struct ath_softc *sc) 
     117+void ath_cleanup(struct ath_softc *sc) 
     118 { 
     119        ath_detach(sc); 
     120        free_irq(sc->irq, sc); 
     121@@ -1287,7 +1254,7 @@ static void ath_cleanup(struct ath_softc 
     122        ieee80211_free_hw(sc->hw); 
     123 } 
    113124  
    114125-static void ath_detach(struct ath_softc *sc) 
     
    117128        struct ieee80211_hw *hw = sc->hw; 
    118129        int i = 0; 
    119 @@ -1529,7 +1497,7 @@ bad: 
     130@@ -1538,7 +1505,7 @@ bad: 
    120131        return error; 
    121132 } 
     
    126137        struct ieee80211_hw *hw = sc->hw; 
    127138        int error = 0; 
    128 @@ -2448,7 +2416,7 @@ static int ath9k_ampdu_action(struct iee 
     139@@ -2457,7 +2424,7 @@ static int ath9k_ampdu_action(struct iee 
    129140        return ret; 
    130141 } 
     
    135146        .start              = ath9k_start, 
    136147        .stop               = ath9k_stop, 
    137 @@ -2492,7 +2460,7 @@ static struct { 
     148@@ -2501,7 +2468,7 @@ static struct { 
    138149 /* 
    139150  * Return the MAC/BB name. "????" is returned if the MAC/BB is unknown. 
     
    144155 { 
    145156        int i; 
    146 @@ -2509,7 +2477,7 @@ ath_mac_bb_name(u32 mac_bb_version) 
     157@@ -2518,7 +2485,7 @@ ath_mac_bb_name(u32 mac_bb_version) 
    147158 /* 
    148159  * Return the RF name. "????" is returned if the RF is unknown. 
     
    153164 { 
    154165        int i; 
    155 @@ -2523,236 +2491,7 @@ ath_rf_name(u16 rf_version) 
     166@@ -2532,234 +2499,7 @@ ath_rf_name(u16 rf_version) 
    156167        return "????"; 
    157168 } 
     
    161172-       struct pci_dev *pdev = to_pci_dev(sc->dev); 
    162173- 
    163 -       ath_detach(sc); 
    164 -       if (pdev->irq) 
    165 -               free_irq(pdev->irq, sc); 
    166174-       pci_iounmap(pdev, sc->mem); 
    167175-       pci_release_region(pdev, 0); 
    168176-       pci_disable_device(pdev); 
    169 -       ieee80211_free_hw(sc->hw); 
    170177-} 
    171178- 
     
    279286-       } 
    280287- 
     288-       sc->irq = pdev->irq; 
     289- 
    281290-       ah = sc->sc_ah; 
    282291-       printk(KERN_INFO 
     
    309318-       struct ath_softc *sc = hw->priv; 
    310319- 
    311 -       ath_pci_cleanup(sc); 
     320-       ath_cleanup(sc); 
    312321-} 
    313322- 
     
    391400        int error; 
    392401  
    393 @@ -2764,26 +2503,30 @@ static int __init init_ath_pci(void) 
     402@@ -2771,26 +2511,30 @@ static int __init init_ath_pci(void) 
    394403                printk(KERN_ERR 
    395404                        "Unable to register rate control algorithm: %d\n", 
     
    434443--- /dev/null 
    435444+++ b/drivers/net/wireless/ath9k/pci.c 
    436 @@ -0,0 +1,289 @@ 
     445@@ -0,0 +1,287 @@ 
    437446+/* 
    438447+ * Copyright (c) 2008 Atheros Communications Inc. 
     
    490499+       struct pci_dev *pdev = to_pci_dev(sc->dev); 
    491500+ 
    492 +       ath_detach(sc); 
    493 +       if (pdev->irq) 
    494 +               free_irq(pdev->irq, sc); 
    495501+       pci_iounmap(pdev, sc->mem); 
    496502+       pci_release_region(pdev, 0); 
    497503+       pci_disable_device(pdev); 
    498 +       ieee80211_free_hw(sc->hw); 
    499504+} 
    500505+ 
     
    608613+       } 
    609614+ 
     615+       sc->irq = pdev->irq; 
     616+ 
    610617+       ah = sc->sc_ah; 
    611618+       printk(KERN_INFO 
     
    638645+       struct ath_softc *sc = hw->priv; 
    639646+ 
    640 +       ath_pci_cleanup(sc); 
     647+       ath_cleanup(sc); 
    641648+} 
    642649+ 
  • trunk/package/mac80211/patches/406-ath9k-introduce-platform-driver-for-AHB-bus-support.patch

    r13925 r13948  
    1 From 9b3c1b50a35455e28c5b2fede615a304df42e758 Mon Sep 17 00:00:00 2001 
     1From ace011bdb2676f594824c81a5a5b5089dc0c3e0b Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    33Date: Mon, 5 Jan 2009 11:03:17 +0100 
    4 Subject: [PATCH 06/11] ath9k: introduce platform driver for AHB bus support 
     4Subject: [PATCH v2 06/11] ath9k: introduce platform driver for AHB bus support 
    55 
    66This patch adds the platform_driver itself, and modifies the main driver 
     
    1111--- 
    1212 drivers/net/wireless/ath9k/Makefile |    1 + 
    13  drivers/net/wireless/ath9k/ahb.c    |  179 +++++++++++++++++++++++++++++++++++ 
    14  drivers/net/wireless/ath9k/core.h   |    9 ++ 
     13 drivers/net/wireless/ath9k/ahb.c    |  160 +++++++++++++++++++++++++++++++++++ 
     14 drivers/net/wireless/ath9k/core.h   |    8 ++ 
    1515 drivers/net/wireless/ath9k/main.c   |   10 ++ 
    16  4 files changed, 199 insertions(+), 0 deletions(-) 
     16 4 files changed, 179 insertions(+), 0 deletions(-) 
    1717 
    1818--- a/drivers/net/wireless/ath9k/Makefile 
     
    2828--- /dev/null 
    2929+++ b/drivers/net/wireless/ath9k/ahb.c 
    30 @@ -0,0 +1,179 @@ 
     30@@ -0,0 +1,160 @@ 
    3131+/* 
    3232+ * Copyright (c) 2008 Atheros Communications Inc. 
     
    6161+static void ath_ahb_cleanup(struct ath_softc *sc) 
    6262+{ 
    63 +       struct ieee80211_hw *hw = sc->hw; 
    64 + 
    65 +       free_irq(sc->irq, sc); 
    66 + 
    67 +       ath_detach(sc); 
    6863+       iounmap(sc->mem); 
    69 +       ieee80211_free_hw(hw); 
    7064+} 
    7165+ 
     
    114108+               goto err_iounmap; 
    115109+       } 
    116 + 
    117 +       hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | 
    118 +               IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | 
    119 +               IEEE80211_HW_SIGNAL_DBM | 
    120 +               IEEE80211_HW_NOISE_DBM; 
    121 + 
    122 +       hw->wiphy->interface_modes = 
    123 +               BIT(NL80211_IFTYPE_AP) | 
    124 +               BIT(NL80211_IFTYPE_STATION) | 
    125 +               BIT(NL80211_IFTYPE_ADHOC); 
    126110+ 
    127111+       SET_IEEE80211_DEV(hw, &pdev->dev); 
     
    180164+               struct ath_softc *sc = hw->priv; 
    181165+ 
    182 +               free_irq(sc->irq, sc); 
    183 +               ath_detach(sc); 
    184 +               iounmap(sc->mem); 
    185 +               ieee80211_free_hw(hw); 
     166+               ath_cleanup(sc); 
    186167+               platform_set_drvdata(pdev, NULL); 
    187168+       } 
     
    206187+void ath_ahb_exit(void) 
    207188+{ 
    208 +       platform_driver_register(&ath_ahb_driver); 
     189+       platform_driver_unregister(&ath_ahb_driver); 
    209190+} 
    210191--- a/drivers/net/wireless/ath9k/core.h 
    211192+++ b/drivers/net/wireless/ath9k/core.h 
    212 @@ -705,6 +705,7 @@ struct ath_softc { 
    213         struct tasklet_struct bcon_tasklet; 
    214         struct ath_hal *sc_ah; 
    215         void __iomem *mem; 
    216 +       int irq; 
    217         spinlock_t sc_resetlock; 
    218         struct mutex mutex; 
    219   
    220 @@ -782,4 +783,12 @@ static inline int ath_pci_init(void) { r 
     193@@ -784,4 +784,12 @@ static inline int ath_pci_init(void) { r 
    221194 static inline void ath_pci_exit(void) {}; 
    222195 #endif 
     
    233206--- a/drivers/net/wireless/ath9k/main.c 
    234207+++ b/drivers/net/wireless/ath9k/main.c 
    235 @@ -2514,8 +2514,17 @@ static int __init ath9k_init(void) 
     208@@ -2522,8 +2522,17 @@ static int __init ath9k_init(void) 
    236209                goto err_rate_unregister; 
    237210        } 
     
    251224        ath_rate_control_unregister(); 
    252225  err_out: 
    253 @@ -2525,6 +2534,7 @@ module_init(ath9k_init); 
     226@@ -2533,6 +2542,7 @@ module_init(ath9k_init); 
    254227  
    255228 static void __exit ath9k_exit(void) 
  • trunk/package/mac80211/patches/407-ath9k-get-EEPROM-contents-from-platform-data-on-AHB.patch

    r13925 r13948  
    1 From d0d8545c85b03c2e7e3c9957a94d0d6fc8168bef Mon Sep 17 00:00:00 2001 
     1From 317e9ea5007e3ff18b52f973c1b3a3f2c84bcae1 Mon Sep 17 00:00:00 2001 
    22From: Gabor Juhos <juhosg@openwrt.org> 
    33Date: Mon, 5 Jan 2009 11:05:05 +0100 
    4 Subject: [PATCH 07/11] ath9k: get EEPROM contents from platform data on AHB bus 
     4Subject: [PATCH v2 07/11] ath9k: get EEPROM contents from platform data on AHB bus 
    55 
    66On the AR913x SOCs we have to provide EEPROM contents via platform_data, 
     
    2828 #include "reg.h" 
    2929 #include "hw.h" 
    30 @@ -39,9 +40,29 @@ static void ath_ahb_cleanup(struct ath_s 
    31         ieee80211_free_hw(hw); 
     30@@ -33,9 +34,29 @@ static void ath_ahb_cleanup(struct ath_s 
     31        iounmap(sc->mem); 
    3232 } 
    3333  
     
    5858  
    5959 static int ath_ahb_probe(struct platform_device *pdev) 
    60 @@ -54,6 +75,12 @@ static int ath_ahb_probe(struct platform 
     60@@ -48,6 +69,12 @@ static int ath_ahb_probe(struct platform 
    6161        int ret = 0; 
    6262        struct ath_hal *ah; 
     
    152152--- a/drivers/net/wireless/ath9k/pci.c 
    153153+++ b/drivers/net/wireless/ath9k/pci.c 
    154 @@ -62,9 +62,27 @@ static void ath_pci_cleanup(struct ath_s 
    155         ieee80211_free_hw(sc->hw); 
     154@@ -58,9 +58,27 @@ static void ath_pci_cleanup(struct ath_s 
     155        pci_disable_device(pdev); 
    156156 } 
    157157  
Note: See TracChangeset for help on using the changeset viewer.