2009-11-28 20:01:03 +02:00
|
|
|
--- a/include/linux/ath9k_platform.h
|
|
|
|
+++ b/include/linux/ath9k_platform.h
|
|
|
|
@@ -23,6 +23,7 @@
|
|
|
|
|
|
|
|
struct ath9k_platform_data {
|
|
|
|
u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS];
|
|
|
|
+ u8 *macaddr;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _LINUX_ATH9K_PLATFORM_H */
|
2010-11-19 02:57:35 +02:00
|
|
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
2010-12-04 03:32:04 +02:00
|
|
|
@@ -15,6 +15,7 @@
|
|
|
|
*/
|
2010-11-19 02:57:35 +02:00
|
|
|
|
|
|
|
#include <linux/slab.h>
|
|
|
|
+#include <linux/ath9k_platform.h>
|
|
|
|
|
|
|
|
#include "ath9k.h"
|
|
|
|
|
2010-12-18 04:00:10 +02:00
|
|
|
@@ -526,6 +527,7 @@ static void ath9k_init_misc(struct ath_s
|
2010-11-19 02:57:35 +02:00
|
|
|
static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid,
|
|
|
|
const struct ath_bus_ops *bus_ops)
|
|
|
|
{
|
|
|
|
+ struct ath9k_platform_data *pdata = sc->dev->platform_data;
|
|
|
|
struct ath_hw *ah = NULL;
|
|
|
|
struct ath_common *common;
|
|
|
|
int ret = 0, i;
|
2010-12-18 04:00:10 +02:00
|
|
|
@@ -539,7 +541,7 @@ static int ath9k_init_softc(u16 devid, s
|
2010-12-11 03:45:12 +02:00
|
|
|
ah->hw_version.subsysid = subsysid;
|
|
|
|
sc->sc_ah = ah;
|
|
|
|
|
|
|
|
- if (!sc->dev->platform_data)
|
|
|
|
+ if (!pdata)
|
|
|
|
ah->ah_flags |= AH_USE_EEPROM;
|
|
|
|
|
|
|
|
common = ath9k_hw_common(ah);
|
2010-12-18 04:00:10 +02:00
|
|
|
@@ -572,6 +574,9 @@ static int ath9k_init_softc(u16 devid, s
|
2010-11-19 02:57:35 +02:00
|
|
|
if (ret)
|
|
|
|
goto err_hw;
|
|
|
|
|
|
|
|
+ if (pdata && pdata->macaddr)
|
|
|
|
+ memcpy(common->macaddr, pdata->macaddr, ETH_ALEN);
|
|
|
|
+
|
2010-12-11 03:45:12 +02:00
|
|
|
ret = ath9k_init_queues(sc);
|
|
|
|
if (ret)
|
|
|
|
goto err_queues;
|