From f6814dd201057a1d1ab1aefcd692233a08403670 Mon Sep 17 00:00:00 2001 From: juhosg Date: Thu, 15 Jul 2010 07:37:00 +0000 Subject: madwifi: in-flash macs for mach-eap7660d This patch makes madwifi respect (at least) the platform_data supplied MAC address. Signed-off-by: Daniel Golle git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22190 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...470-mac_addresss_from_ath5k_platform_data.patch | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 package/madwifi/patches/470-mac_addresss_from_ath5k_platform_data.patch (limited to 'package/madwifi/patches') diff --git a/package/madwifi/patches/470-mac_addresss_from_ath5k_platform_data.patch b/package/madwifi/patches/470-mac_addresss_from_ath5k_platform_data.patch new file mode 100644 index 000000000..c963403eb --- /dev/null +++ b/package/madwifi/patches/470-mac_addresss_from_ath5k_platform_data.patch @@ -0,0 +1,36 @@ +--- a/ath/if_ath.c 2010-07-13 22:58:23.000000000 +0200 ++++ b/ath/if_ath.c 2010-07-13 23:03:20.000000000 +0200 +@@ -63,6 +63,8 @@ + #include + #include + #include ++#include ++#include + #include + + #include "if_ethersubr.h" /* for ETHER_IS_MULTICAST */ +@@ -587,6 +589,10 @@ + 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 +@@ -648,6 +654,13 @@ + } + 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 */ + #ifdef CONFIG_ATHEROS_AR71XX + if ((ar_device(sc->devid) >= 5210) && (ar_device(sc->devid) < 5416)) { -- cgit v1.2.3