@@ -161,7 +161,7 @@ struct ltq_etop_priv {
int tx_irq;
int rx_irq;
- const void *mac;
+ void *mac;
int mii_mode;
spinlock_t lock;
@@ -840,7 +840,11 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_hw;
- memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
+ if (priv->mac)
+ memcpy(&mac, priv->mac, sizeof(struct sockaddr));
+ else
+ memcpy(&mac, ltq_get_eth_mac(), sizeof(struct sockaddr))
+
if (!is_valid_ether_addr(mac.sa_data)) {
pr_warn("etop: invalid MAC, using random\n");
eth_random_addr(mac.sa_data);