diff --git a/eeprom.c b/eeprom.c index f4d7659f..1aa080bb 100644 --- a/eeprom.c +++ b/eeprom.c @@ -11,6 +11,7 @@ * GNU General Public License for more details. */ #include +#include #include #include #include @@ -77,6 +78,7 @@ mt76_eeprom_override(struct mt76_dev *dev) #ifdef CONFIG_OF struct device_node *np = dev->dev->of_node; const __be32 *val; + const u8 *mac; int size; if (!np) @@ -89,6 +91,10 @@ mt76_eeprom_override(struct mt76_dev *dev) val = of_get_property(np, "mediatek,5ghz", &size); if (val) dev->cap.has_5ghz = be32_to_cpup(val); + + mac = of_get_mac_address(np); + if (mac) + memcpy(dev->macaddr, mac, ETH_ALEN); #endif if (!is_valid_ether_addr(dev->macaddr)) {