mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-15 12:25:20 +02:00
bb03c545e8
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24235 3c298f89-4303-0410-b956-a3cf2f4a3e73
39 lines
1001 B
Diff
39 lines
1001 B
Diff
--- 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 */
|
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
|
@@ -15,6 +15,7 @@
|
|
*/
|
|
|
|
#include <linux/slab.h>
|
|
+#include <linux/ath9k_platform.h>
|
|
|
|
#include "ath9k.h"
|
|
|
|
@@ -521,6 +522,7 @@ static void ath9k_init_misc(struct ath_s
|
|
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;
|
|
@@ -567,6 +569,9 @@ static int ath9k_init_softc(u16 devid, s
|
|
if (ret)
|
|
goto err_hw;
|
|
|
|
+ if (pdata && pdata->macaddr)
|
|
+ memcpy(common->macaddr, pdata->macaddr, ETH_ALEN);
|
|
+
|
|
ret = ath9k_init_debug(ah);
|
|
if (ret) {
|
|
ath_print(common, ATH_DBG_FATAL,
|