diff options
author | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-10-14 15:41:16 +0000 |
---|---|---|
committer | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-10-14 15:41:16 +0000 |
commit | 7fc94810d3cbe8770b2edbcb8a3c59a9dcf9ad83 (patch) | |
tree | 0b8837896cc1662e7873ce0cee2413140ddd38a3 /package/acx-mac80211/patches/200-initial-macaddr.patch | |
parent | 8110efa0d3f3a5f1794fe19457de34b1084849d1 (diff) | |
download | openwrt-7fc94810d3cbe8770b2edbcb8a3c59a9dcf9ad83.tar.gz openwrt-7fc94810d3cbe8770b2edbcb8a3c59a9dcf9ad83.zip |
attitude_adjustment: backport ar7 changes r33744 to r33756 changes
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33764 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/acx-mac80211/patches/200-initial-macaddr.patch')
-rw-r--r-- | package/acx-mac80211/patches/200-initial-macaddr.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/package/acx-mac80211/patches/200-initial-macaddr.patch b/package/acx-mac80211/patches/200-initial-macaddr.patch new file mode 100644 index 000000000..498c72dd8 --- /dev/null +++ b/package/acx-mac80211/patches/200-initial-macaddr.patch @@ -0,0 +1,31 @@ +--- a/cardsetting.c 2012-07-03 16:21:25.934102662 -0700 ++++ b/cardsetting.c 2012-07-03 16:49:26.910438174 -0700 +@@ -710,12 +710,27 @@ + u8 stationID[4 + acx_ie_descs[ACX1xx_IE_DOT11_STATION_ID].len]; + const u8 *paddr; + int i, res; ++ const char *prom_addr; ++ char *prom_getenv(const char *name); + + + + res = acx_interrogate(adev, &stationID, ACX1xx_IE_DOT11_STATION_ID); + paddr = &stationID[4]; +- for (i = 0; i < ETH_ALEN; i++) { ++ prom_addr = NULL; ++#ifdef CONFIG_VLYNQ ++ prom_addr = prom_getenv("macwlan"); ++ if (prom_addr == NULL) ++ prom_addr = prom_getenv("mac_ap"); ++#endif ++ if (prom_addr) ++ sscanf(prom_addr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", adev->dev_addr, ++ adev->dev_addr + 1, ++ adev->dev_addr + 2, ++ adev->dev_addr + 3, ++ adev->dev_addr + 4, ++ adev->dev_addr + 5); ++ else for (i = 0; i < ETH_ALEN; i++) { + /* we copy the MAC address (reversed in the card) to + * the netdevice's MAC address, and on ifup it will be + * copied into iwadev->dev_addr */ |