1 diff -urN madwifi-ng-r2377-20070526.old/ath/if_ath_ahb.c madwifi-ng-r2377-20070526.dev/ath/if_ath_ahb.c
2 --- madwifi-ng-r2377-20070526.old/ath/if_ath_ahb.c 2007-02-24 02:33:54.000000000 +0100
3 +++ madwifi-ng-r2377-20070526.dev/ath/if_ath_ahb.c 2007-05-26 18:51:09.112702200 +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;
19 free_irq(dev->irq, dev);
20 sysType = get_system_type();
21 - if (!strcmp(sysType, "Atheros AR5315"))
22 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
23 + devid = (u32) config->tag;
25 + if (!strcmp(get_system_type(), "Atheros AR5315"))
26 devid = (u_int16_t) (sysRegRead(AR5315_SREV) &
27 (AR5315_REV_MAJ_M | AR5315_REV_MIN_M));
29 devid = (u_int16_t) ((sysRegRead(AR531X_REV) >> 8) &
30 (AR531X_REV_MAJ | AR531X_REV_MIN));
33 ahb_disable_wmac(devid, wlanNum);
37 static int ahb_wmac_remove(struct platform_device *pdev)
39 - exit_ath_wmac(pdev->id);
40 + exit_ath_wmac(pdev->id, (struct ar531x_config *) pdev->dev.platform_data);
45 (AR5315_REV_MAJ_M | AR5315_REV_MIN_M));
46 if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) ||
47 ((devid & AR5315_REV_MAJ_M) == AR5317_REV_MAJ))
48 - return init_ath_wmac(devid, 0, &config);
49 + return init_ath_wmac(devid, 0);
52 devid = (u_int16_t) ((sysRegRead(AR531X_REV) >>8) &
54 ar5312BspEepromRead(2 * AR531X_RADIO_MASK_OFF, 2,
56 if ((radioMask & AR531X_RADIO0_MASK) != 0)
57 - if ((ret = init_ath_wmac(devid, 0, &config)) !=0 )
58 + if ((ret = init_ath_wmac(devid, 0)) !=0 )
60 /* XXX: Fall through?! */
61 case AR5212_AR2313_REV8:
62 - if ((ret = init_ath_wmac(devid, 1, &config)) != 0)
63 + if ((ret = init_ath_wmac(devid, 1)) != 0)