3 @@ -710,10 +710,25 @@ static int acx1xx_get_station_id(acx_dev
4 u8 *stationID = adev->ie_cmd_buf;;
7 + const char *prom_addr;
8 + char *prom_getenv(const char *name);
10 res = acx_interrogate(adev, stationID, ACX1xx_IE_DOT11_STATION_ID);
11 paddr = &stationID[4];
12 - for (i = 0; i < ETH_ALEN; i++) {
15 + prom_addr = prom_getenv("macwlan");
16 + if (prom_addr == NULL)
17 + prom_addr = prom_getenv("mac_ap");
20 + sscanf(prom_addr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", adev->dev_addr,
25 + adev->dev_addr + 5);
26 + else for (i = 0; i < ETH_ALEN; i++) {
27 /* we copy the MAC address (reversed in the card) to
28 * the netdevice's MAC address, and on ifup it will be
29 * copied into iwadev->dev_addr */