Overwrite eeprom mac with platform data on rt2800.
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
---
Based on 608-add_platform_data_mac_addr.patch
diff --git a/package/mac80211/patches/624-rt2800_platform_data_mac_addr.patch
b/package/mac80211/patches/624-rt2800_platform_data_mac_addr.patch
new file mode 100644
index 0000000..921b115
--- /dev/null
+++ b/package/mac80211/patches/624-rt2800_platform_data_mac_addr.patch
@@ -0,0 +1,24 @@
+--- a/drivers/net/wireless/rt2x00/rt2800pci.c
++++ b/drivers/net/wireless/rt2x00/rt2800pci.c
+@@ -976,6 +976,9 @@ static irqreturn_t rt2800pci_interrupt(i
+ */
+ static void rt2800pci_read_eeprom(struct rt2x00_dev *rt2x00dev)
+ {
++ u8 *mac;
++ const u8 *pdata_mac;
++
+ if (rt2x00_is_soc(rt2x00dev) ||
+ test_bit(REQUIRE_EEPROM_FILE, &rt2x00dev->cap_flags))
+ rt2800pci_read_eeprom_file(rt2x00dev);
+@@ -983,6 +986,11 @@ static void rt2800pci_read_eeprom(struct
+ rt2800pci_read_eeprom_efuse(rt2x00dev);
+ else
+ rt2800pci_read_eeprom_pci(rt2x00dev);
++
++ pdata_mac = rt2x00lib_get_mac_address(rt2x00dev);
++ mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
++ if (pdata_mac)
++ memcpy(mac, pdata_mac, ETH_ALEN);
+ }
+
+ static const struct ieee80211_ops rt2800pci_mac80211_ops = {
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel