2010-11-12 17:14:27 +02:00
|
|
|
--- a/ath/if_ath.c
|
|
|
|
+++ b/ath/if_ath.c
|
2010-07-15 10:37:00 +03:00
|
|
|
@@ -63,6 +63,8 @@
|
|
|
|
#include <linux/rtnetlink.h>
|
|
|
|
#include <linux/time.h>
|
|
|
|
#include <linux/pci.h>
|
|
|
|
+#include <linux/device.h>
|
|
|
|
+#include <linux/ath5k_platform.h>
|
|
|
|
#include <asm/uaccess.h>
|
|
|
|
|
|
|
|
#include "if_ethersubr.h" /* for ETHER_IS_MULTICAST */
|
2010-11-12 17:14:27 +02:00
|
|
|
@@ -587,6 +589,10 @@ ath_attach(u_int16_t devid, struct net_d
|
2010-07-15 10:37:00 +03:00
|
|
|
unsigned int i;
|
|
|
|
int autocreatemode = -1;
|
|
|
|
u_int8_t csz;
|
|
|
|
+#ifdef ATH_PCI
|
|
|
|
+ struct ath5k_platform_data *pdata;
|
|
|
|
+ struct pci_dev *pdev;
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
sc->devid = devid;
|
|
|
|
#ifdef AR_DEBUG
|
2010-11-12 17:14:27 +02:00
|
|
|
@@ -648,6 +654,13 @@ ath_attach(u_int16_t devid, struct net_d
|
2010-07-15 10:37:00 +03:00
|
|
|
}
|
|
|
|
sc->sc_ah = ah;
|
|
|
|
|
|
|
|
+#ifdef ATH_PCI
|
|
|
|
+ /* set MAC from ath_platform_data */
|
|
|
|
+ pdev = (struct pci_dev *)sc->sc_bdev;
|
|
|
|
+ pdata = pdev->dev.platform_data;
|
|
|
|
+ if (pdata && pdata->macaddr)
|
|
|
|
+ ath_hal_setmac(ah, pdata->macaddr);
|
|
|
|
+#endif
|
|
|
|
/* WAR for AR7100 PCI bug */
|
2012-02-10 15:16:50 +02:00
|
|
|
#if defined(CONFIG_ATHEROS_AR71XX) || defined(CONFIG_ATH79)
|
2010-07-15 10:37:00 +03:00
|
|
|
if ((ar_device(sc->devid) >= 5210) && (ar_device(sc->devid) < 5416)) {
|