diff options
author | Mathias Kresin <dev@kresin.me> | 2016-08-26 10:16:53 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-11-09 04:28:31 +0300 |
commit | 9766cb709089fc460fda66c06a3da756af4a2930 (patch) | |
tree | b4514e31182048818e12940bffcd45de161b31b3 /drivers/net/wireless/ralink/rt2x00/rt2500pci.c | |
parent | b9824cb8912fee343bc36ba61fdc4afcd37d7fb1 (diff) | |
download | linux-9766cb709089fc460fda66c06a3da756af4a2930.tar.xz |
rt2x00: add support for mac addr from device tree
On some devices the EEPROMs of Ralink Wi-Fi chips have a default Ralink
MAC address set (RT3062F: 00:0C:43:30:62:00, RT3060F:
00:0C:43:30:60:00). Using multiple of these devices in the same network
can cause nasty issues.
Allow to override the MAC in the EEPROM with (a known good) one set in
the device tree to bypass the issue.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ralink/rt2x00/rt2500pci.c')
-rw-r--r-- | drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c index 2553cdd74066..9832fd50c793 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c @@ -1585,10 +1585,7 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) * Start validation of the data that has been read. */ mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); - if (!is_valid_ether_addr(mac)) { - eth_random_addr(mac); - rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); - } + rt2x00lib_set_mac_address(rt2x00dev, mac); rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); if (word == 0xffff) { |