diff --git a/eeprom.c b/eeprom.c index cc74c372..3873b6a9 100644 --- a/eeprom.c +++ b/eeprom.c @@ -91,15 +91,9 @@ mt76_eeprom_override(struct mt76_phy *phy) { struct mt76_dev *dev = phy->dev; -#ifdef CONFIG_OF struct device_node *np = dev->dev->of_node; - const u8 *mac = NULL; - if (np) - mac = of_get_mac_address(np); - if (!IS_ERR_OR_NULL(mac)) - ether_addr_copy(phy->macaddr, mac); -#endif + of_get_mac_address(np, phy->macaddr); if (!is_valid_ether_addr(phy->macaddr)) { eth_random_addr(phy->macaddr);