2013-01-27 21:15:48 +00:00
|
|
|
--- a/cardsetting.c
|
|
|
|
+++ b/cardsetting.c
|
2014-02-05 20:02:48 +00:00
|
|
|
@@ -715,10 +715,25 @@ int acx1xx_get_station_id(acx_device_t *
|
|
|
|
u8 *stationID = adev->ie_cmd_buf;
|
2012-10-13 17:46:54 +00:00
|
|
|
const u8 *paddr;
|
|
|
|
int i, res;
|
|
|
|
+ const char *prom_addr;
|
|
|
|
+ char *prom_getenv(const char *name);
|
|
|
|
|
2013-10-12 10:50:35 +00:00
|
|
|
res = acx_interrogate(adev, stationID, ACX1xx_IE_DOT11_STATION_ID);
|
2012-10-13 17:46:54 +00:00
|
|
|
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 */
|