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
9 -exit_ath_wmac(u_int16_t wlanNum)
10 +exit_ath_wmac(u_int16_t wlanNum, struct ar531x_config *config)
12 struct ath_ahb_softc *sc = sclist[wlanNum];
13 struct net_device *dev;
14 - const char *sysType;
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;
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));
32 devid = (u_int16_t) ((sysRegRead(AR531X_REV) >> 8) &
33 (AR531X_REV_MAJ | AR531X_REV_MIN));
36 ahb_disable_wmac(devid, wlanNum);
40 static int ahb_wmac_remove(struct platform_device *pdev)
42 - exit_ath_wmac(pdev->id);
43 + exit_ath_wmac(pdev->id, (struct ar531x_config *) pdev->dev.platform_data);