1 diff -ur madwifi.old/ath/if_ath_ahb.c madwifi.dev/ath/if_ath_ahb.c
2 --- madwifi.old/ath/if_ath_ahb.c 2007-05-30 03:41:18.000000000 +0200
3 +++ madwifi.dev/ath/if_ath_ahb.c 2007-06-01 12:04:02.887273960 +0200
8 -exit_ath_wmac(u_int16_t wlanNum)
9 +exit_ath_wmac(u_int16_t wlanNum, struct ar531x_config *config)
11 struct ath_ahb_softc *sc = sclist[wlanNum];
12 struct net_device *dev;
13 - const char *sysType;
20 free_irq(dev->irq, dev);
21 - sysType = get_system_type();
22 - if (!strcmp(sysType, "Atheros AR5315"))
23 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
24 + devid = (u32) config->tag;
26 + if (!strcmp(get_system_type(), "Atheros AR5315"))
27 devid = (u_int16_t) (sysRegRead(AR5315_SREV) &
28 (AR5315_REV_MAJ_M | AR5315_REV_MIN_M));
30 devid = (u_int16_t) ((sysRegRead(AR531X_REV) >> 8) &
31 (AR531X_REV_MAJ | AR531X_REV_MIN));
34 ahb_disable_wmac(devid, wlanNum);
38 static int ahb_wmac_remove(struct platform_device *pdev)
40 - exit_ath_wmac(pdev->id);
41 + exit_ath_wmac(pdev->id, (struct ar531x_config *) pdev->dev.platform_data);
46 (AR5315_REV_MAJ_M | AR5315_REV_MIN_M));
47 if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) ||
48 ((devid & AR5315_REV_MAJ_M) == AR5317_REV_MAJ))
49 - return init_ath_wmac(devid, 0, &config);
50 + return init_ath_wmac(devid, 0);
53 devid = (u_int16_t) ((sysRegRead(AR531X_REV) >>8) &
55 ar5312BspEepromRead(2 * AR531X_RADIO_MASK_OFF, 2,
57 if ((radioMask & AR531X_RADIO0_MASK) != 0)
58 - if ((ret = init_ath_wmac(devid, 0, &config)) !=0 )
59 + if ((ret = init_ath_wmac(devid, 0)) !=0 )
61 /* XXX: Fall through?! */
62 case AR5212_AR2313_REV8:
63 - if ((ret = init_ath_wmac(devid, 1, &config)) != 0)
64 + if ((ret = init_ath_wmac(devid, 1)) != 0)