summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-07-15 07:37:00 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-07-15 07:37:00 +0000
commit84df6b372879382521317310eee0c28edef946a1 (patch)
tree0d4b2cc9db2d29c9060f0041c0ba41a63676f575
parent4bb11f9a395243219c8a8318b5c05df8ef801e02 (diff)
downloadmtk-20170518-84df6b372879382521317310eee0c28edef946a1.zip
mtk-20170518-84df6b372879382521317310eee0c28edef946a1.tar.gz
mtk-20170518-84df6b372879382521317310eee0c28edef946a1.tar.bz2
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 <daniel.golle@gmail.com> SVN-Revision: 22190
-rw-r--r--package/madwifi/Makefile2
-rw-r--r--package/madwifi/patches/470-mac_addresss_from_ath5k_platform_data.patch36
2 files changed, 37 insertions, 1 deletions
diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile
index 2fe2f91..f28254f 100644
--- a/package/madwifi/Makefile
+++ b/package/madwifi/Makefile
@@ -12,7 +12,7 @@ PKG_NAME:=madwifi
PKG_REV:=3314
PKG_VERSION:=r$(PKG_REV)
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE_PROTO:=svn
PKG_SOURCE_VERSION:=$(PKG_REV)
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 0000000..c963403
--- /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 <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 */
+@@ -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)) {