simplify and fix adm5120 image building, fix broken FEATURES handling
[openwrt.git] / package / madwifi / patches / 120-soc_fix.patch
1 Index: madwifi-ng-r2568-20070710/ath/if_ath_ahb.c
2 ===================================================================
3 --- madwifi-ng-r2568-20070710.orig/ath/if_ath_ahb.c 2007-07-23 01:48:38.098151260 +0200
4 +++ madwifi-ng-r2568-20070710/ath/if_ath_ahb.c 2007-07-23 01:48:41.998373519 +0200
5 @@ -275,11 +275,10 @@
6
7
8 static int
9 -exit_ath_wmac(u_int16_t wlanNum)
10 +exit_ath_wmac(u_int16_t wlanNum, struct ar531x_config *config)
11 {
12 struct ath_ahb_softc *sc = sclist[wlanNum];
13 struct net_device *dev;
14 - const char *sysType;
15 u_int16_t devid;
16
17 if (sc == NULL)
18 @@ -289,13 +288,17 @@
19 ath_detach(dev);
20 if (dev->irq)
21 free_irq(dev->irq, dev);
22 - sysType = get_system_type();
23 - if (!strcmp(sysType, "Atheros AR5315"))
24 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
25 + devid = sc->aps_sc.devid;
26 + config->tag = (unsigned long) devid;
27 +#else
28 + if (!strcmp(get_system_type(), "Atheros AR5315"))
29 devid = (u_int16_t) (sysRegRead(AR5315_SREV) &
30 (AR5315_REV_MAJ_M | AR5315_REV_MIN_M));
31 else
32 devid = (u_int16_t) ((sysRegRead(AR531X_REV) >> 8) &
33 (AR531X_REV_MAJ | AR531X_REV_MIN));
34 +#endif
35
36 ahb_disable_wmac(devid, wlanNum);
37 free_netdev(dev);
38 @@ -401,7 +404,7 @@
39
40 static int ahb_wmac_remove(struct platform_device *pdev)
41 {
42 - exit_ath_wmac(pdev->id);
43 + exit_ath_wmac(pdev->id, (struct ar531x_config *) pdev->dev.platform_data);
44
45 return 0;
46 }
This page took 0.058401 seconds and 5 git commands to generate.