aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/acx-mac80211/patches/200-initial-macaddr.patch
diff options
context:
space:
mode:
authorJames <>2015-11-04 11:49:21 +0000
committerJames <>2015-11-04 11:49:21 +0000
commit716ca530e1c4515d8683c9d5be3d56b301758b66 (patch)
tree700eb5bcc1a462a5f21dcec15ce7c97ecfefa772 /package/kernel/acx-mac80211/patches/200-initial-macaddr.patch
downloadtrunk-47381-master.tar.gz
trunk-47381-master.tar.bz2
trunk-47381-master.zip
trunk-47381HEADmaster
Diffstat (limited to 'package/kernel/acx-mac80211/patches/200-initial-macaddr.patch')
-rw-r--r--package/kernel/acx-mac80211/patches/200-initial-macaddr.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/package/kernel/acx-mac80211/patches/200-initial-macaddr.patch b/package/kernel/acx-mac80211/patches/200-initial-macaddr.patch
new file mode 100644
index 0000000..c0fdd43
--- /dev/null
+++ b/package/kernel/acx-mac80211/patches/200-initial-macaddr.patch
@@ -0,0 +1,29 @@
+--- a/cardsetting.c
++++ b/cardsetting.c
+@@ -715,10 +715,25 @@ int acx1xx_get_station_id(acx_device_t *
+ u8 *stationID = adev->ie_cmd_buf;
+ 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 */