fix typo in UnistallDev
[openwrt.git] / package / madwifi / patches / 109-soc_platform.patch
index 2cc338b..d24e262 100644 (file)
@@ -1,6 +1,6 @@
 diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
---- madwifi.old/ath/if_ath_ahb.c       2006-12-22 03:57:28.000000000 +0100
-+++ madwifi.dev/ath/if_ath_ahb.c       2006-12-22 04:09:48.000000000 +0100
+--- madwifi.old/ath/if_ath_ahb.c       2007-02-04 04:07:15.810701232 +0100
++++ madwifi.dev/ath/if_ath_ahb.c       2007-02-04 04:14:02.699844680 +0100
 @@ -17,6 +17,9 @@
  #include <linux/if.h>
  #include <linux/netdevice.h>
@@ -48,7 +48,42 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
                u_int32_t *en = (u_int32_t *) AR5315_AHB_ARB_CTL;
  
                KASSERT(wlanNum == 0, ("invalid wlan # %d", wlanNum) ); 
-@@ -295,7 +303,7 @@
+@@ -265,12 +273,12 @@
+ }
++
+ int
+-exit_ath_wmac(u_int16_t wlanNum)
++exit_ath_wmac(u_int16_t wlanNum, struct ar531x_config *config)
+ {
+       struct ath_ahb_softc *sc = sclist[wlanNum];
+       struct net_device *dev;
+-      const char *sysType;
+       u_int16_t devid;        
+       if (sc == NULL)
+@@ -280,13 +288,17 @@
+       ath_detach(dev);
+       if (dev->irq)
+               free_irq(dev->irq, dev);
+-      sysType = get_system_type();
+-      if (!strcmp(sysType, "Atheros AR5315"))
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
++      devid = (u32) config->tag;
++#else
++      if (!strcmp(get_system_type(), "Atheros AR5315"))
+               devid = (u_int16_t) (sysRegRead(AR5315_SREV) &
+                       (AR5315_REV_MAJ_M | AR5315_REV_MIN_M));
+       else
+               devid = (u_int16_t) ((sysRegRead(AR531X_REV) >> 8) & 
+                       (AR531X_REV_MAJ | AR531X_REV_MIN));
++#endif
+   
+       ahb_disable_wmac(devid, wlanNum);
+       free_netdev(dev);
+@@ -295,7 +307,7 @@
  }
  
  int
@@ -57,7 +92,7 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
  {
        const char *athname;
        struct net_device *dev;
-@@ -329,7 +337,8 @@
+@@ -329,7 +341,8 @@
  
        switch (wlanNum) {
        case AR531X_WLAN0_NUM:
@@ -67,7 +102,7 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
                        dev->irq = AR5315_IRQ_WLAN0_INTRS;
                        dev->mem_start = AR5315_WLAN0;
                } else {
-@@ -352,12 +361,7 @@
+@@ -352,12 +365,7 @@
                goto bad3;
        }
        
@@ -81,7 +116,7 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
                goto bad4;
        athname = ath_hal_probe(ATHEROS_VENDOR_ID, devid);
        printk(KERN_INFO "%s: %s: mem=0x%lx, irq=%d\n",
-@@ -379,24 +383,63 @@
+@@ -379,24 +387,63 @@
        return -ENODEV;
  }
  
@@ -101,7 +136,7 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
 +
 +static int ahb_wmac_remove(struct platform_device *pdev)
 +{
-+      exit_ath_wmac(pdev->id);
++      exit_ath_wmac(pdev->id, (struct ar531x_config *) pdev->dev.platform_data);
 +
 +      return 0;
 +}
@@ -150,7 +185,7 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
        devid = (u_int16_t) ((sysRegRead(AR531X_REV) >>8) &
                (AR531X_REV_MAJ | AR531X_REV_MIN));
        switch (devid) {
-@@ -420,6 +463,7 @@
+@@ -420,6 +467,7 @@
        return 0;
  }
  
@@ -158,7 +193,7 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
  
  /*
   * Module glue.
-@@ -460,13 +504,19 @@
+@@ -460,13 +508,19 @@
  {
        printk(KERN_INFO "%s: %s\n", dev_info, version);
  
@@ -178,13 +213,13 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
        return 0;
  }
  module_init(init_ath_ahb);
-@@ -477,8 +527,13 @@
+@@ -477,8 +531,13 @@
  #ifdef CONFIG_SYSCTL
        ath_sysctl_unregister();
  #endif
 +
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
-+      platform_driver_register(&ahb_wmac_driver);
++      platform_driver_unregister(&ahb_wmac_driver);
 +#else
        exit_ath_wmac(AR531X_WLAN0_NUM);
        exit_ath_wmac(AR531X_WLAN1_NUM);
@@ -193,8 +228,8 @@ diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
        printk(KERN_INFO "%s: driver unloaded\n", dev_info);
  }
 diff -ur madwifi.old/ath/if_ath_ahb.h madwifi.dev/ath/if_ath_ahb.h
---- madwifi.old/ath/if_ath_ahb.h       2006-12-22 03:57:28.000000000 +0100
-+++ madwifi.dev/ath/if_ath_ahb.h       2006-12-22 04:07:47.000000000 +0100
+--- madwifi.old/ath/if_ath_ahb.h       2007-02-04 04:07:15.810701232 +0100
++++ madwifi.dev/ath/if_ath_ahb.h       2007-02-04 04:06:49.070766320 +0100
 @@ -59,6 +59,7 @@
  #define AR5315_SREV           0xb1000014
  
@@ -203,34 +238,3 @@ diff -ur madwifi.old/ath/if_ath_ahb.h madwifi.dev/ath/if_ath_ahb.h
  #define AR5315_REV_MAJ_M      0x00f0
  #define AR5315_REV_MAJ_S      4
  #define AR5315_REV_MIN_M      0x000f
-diff -urN madwifi-0.9.2.old/ath/if_ath.c madwifi-0.9.2.dev/ath/if_ath.c
---- madwifi-0.9.2.old/ath/if_ath.c     2006-08-29 20:38:48.000000000 +0200
-+++ madwifi-0.9.2.dev/ath/if_ath.c     2006-08-29 20:38:48.000000000 +0200
-@@ -658,7 +658,10 @@
-        * 5211 minipci cards.  Users can also manually enable/disable
-        * support with a sysctl.
-        */
--      sc->sc_softled = (devid == AR5212_DEVID_IBM || devid == AR5211_DEVID);
-+      sc->sc_softled = ((devid == AR5212_DEVID_IBM) || (devid == AR5211_DEVID) ||
-+              (devid == AR5212_AR2315_REV6) || (devid == AR5212_AR2315_REV7) ||
-+              (devid == AR5212_AR2317_REV1) || (devid == AR5212_AR2317_REV2));
-+
-       if (sc->sc_softled) {
-               ath_hal_gpioCfgOutput(ah, sc->sc_ledpin);
-               ath_hal_gpioset(ah, sc->sc_ledpin, !sc->sc_ledon);
-diff -urN madwifi-0.9.2.old/hal/ah_devid.h madwifi-0.9.2.dev/hal/ah_devid.h
---- madwifi-0.9.2.old/hal/ah_devid.h   2006-02-11 13:04:39.000000000 +0100
-+++ madwifi-0.9.2.dev/hal/ah_devid.h   2006-08-29 20:38:48.000000000 +0200
-@@ -68,9 +68,10 @@
- #define AR5212_AR5312_REV2      0x0052          /* AR5312 WMAC (AP31) */
- #define AR5212_AR5312_REV7      0x0057          /* AR5312 WMAC (AP30-040) */
- #define AR5212_AR2313_REV8      0x0058          /* AR2313 WMAC (AP43-030) */
--#define AR5212_AR2315_REV6      0x0086          /* AR2315 WMAC (AP51-Light) */
-+#define AR5212_AR2315_REV6      0x0086          /* AR2315 WMAC (AP51-Lite) */
- #define AR5212_AR2315_REV7      0x0087          /* AR2315 WMAC (AP51-Full) */
--#define AR5212_AR2317_REV1      0x0091          /* AR2317 WMAC (AP61) */
-+#define AR5212_AR2317_REV1      0x0090          /* AR2317 WMAC (AP61-Lite) */
-+#define AR5212_AR2317_REV2      0x0091          /* AR2317 WMAC (AP61-Full) */
- /* AR5212 compatible devid's also attach to 5212 */
- #define       AR5212_DEVID_0014       0x0014
This page took 0.029948 seconds and 4 git commands to generate.