mediatek: filogic: enable maxlinear PHY support, refresh config
[openwrt/openwrt.git] / package / kernel / acx-mac80211 / patches / 200-initial-macaddr.patch
1 --- a/cardsetting.c
2 +++ b/cardsetting.c
3 @@ -715,10 +715,25 @@ int acx1xx_get_station_id(acx_device_t *
4 u8 *stationID = adev->ie_cmd_buf;
5 const u8 *paddr;
6 int i, res;
7 + const char *prom_addr;
8 + char *prom_getenv(const char *name);
9
10 res = acx_interrogate(adev, stationID, ACX1xx_IE_DOT11_STATION_ID);
11 paddr = &stationID[4];
12 - for (i = 0; i < ETH_ALEN; i++) {
13 + prom_addr = NULL;
14 +#ifdef CONFIG_VLYNQ
15 + prom_addr = prom_getenv("macwlan");
16 + if (prom_addr == NULL)
17 + prom_addr = prom_getenv("mac_ap");
18 +#endif
19 + if (prom_addr)
20 + sscanf(prom_addr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", adev->dev_addr,
21 + adev->dev_addr + 1,
22 + adev->dev_addr + 2,
23 + adev->dev_addr + 3,
24 + adev->dev_addr + 4,
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 */