Changeset 44420


Ignore:
Timestamp:
2015-02-12T10:17:04+01:00 (3 years ago)
Author:
blogic
Message:

lantiq: fix mac addr assignment inside lantiq_etop

Signed-off-by: John Crispin <blogic@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch

    r44348 r44420  
    3131--- a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h 
    3232+++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h 
    33 @@ -90,5 +90,8 @@ int xrx200_gphy_boot(struct device *dev, 
     33@@ -90,5 +90,8 @@ 
    3434 extern void ltq_pmu_enable(unsigned int module); 
    3535 extern void ltq_pmu_disable(unsigned int module); 
     
    4242--- a/arch/mips/lantiq/xway/Makefile 
    4343+++ b/arch/mips/lantiq/xway/Makefile 
    44 @@ -2,4 +2,7 @@ obj-y := prom.o sysctrl.o clk.o reset.o 
     44@@ -2,4 +2,7 @@ 
    4545  
    4646 obj-y += vmmc.o tffs.o 
     
    591591--- a/drivers/net/ethernet/lantiq_etop.c 
    592592+++ b/drivers/net/ethernet/lantiq_etop.c 
    593 @@ -161,7 +161,7 @@ struct ltq_etop_priv { 
     593@@ -161,7 +161,7 @@ 
    594594        int tx_irq; 
    595595        int rx_irq; 
     
    600600  
    601601        spinlock_t lock; 
    602 @@ -840,7 +840,11 @@ ltq_etop_init(struct net_device *dev) 
     602@@ -840,7 +840,11 @@ 
    603603        if (err) 
    604604                goto err_hw; 
     
    606606-       memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr)); 
    607607+       if (priv->mac) 
    608 +               memcpy(&mac, priv->mac, sizeof(struct sockaddr)); 
     608+               memcpy(&mac.sa_data, priv->mac, ETH_ALEN); 
    609609+       else 
    610 +               memcpy(&mac, ltq_get_eth_mac(), sizeof(struct sockaddr)); 
     610+               memcpy(&mac.sa_data, ltq_get_eth_mac(), ETH_ALEN); 
    611611+ 
    612612        if (!is_valid_ether_addr(mac.sa_data)) { 
Note: See TracChangeset for help on using the changeset viewer.