Changeset 44740


Ignore:
Timestamp:
2015-03-13T09:38:01+01:00 (3 years ago)
Author:
blogic
Message:

ralink: use random generate mac address instead of default one.

Signed-off-by: michael lee <igvtee@…>

Location:
trunk/target/linux/ramips/files/drivers/net/ethernet/ralink
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c

    r44401 r44740  
    12291229 
    12301230        of_get_mac_address_mtd(priv->device->of_node, dev->dev_addr); 
    1231         /*If the mac address is invalid, use default mac address  */ 
    1232         if (!is_valid_ether_addr(dev->dev_addr)) 
    1233                 memcpy(dev->dev_addr, priv->soc->mac, ETH_ALEN); 
     1231        /*If the mac address is invalid, use random mac address  */ 
     1232        if (!is_valid_ether_addr(dev->dev_addr)) { 
     1233                random_ether_addr(dev->dev_addr); 
     1234                dev_err(priv->device, "generated random MAC address %pM\n", 
     1235                                dev->dev_addr); 
     1236        } 
    12341237 
    12351238        err = fe_mdio_init(priv); 
  • trunk/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h

    r44371 r44740  
    387387struct fe_soc_data 
    388388{ 
    389         unsigned char mac[6]; 
    390389        const u32 *reg_table; 
    391390 
  • trunk/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c

    r44371 r44740  
    230230 
    231231static struct fe_soc_data mt7620_data = { 
    232         .mac = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }, 
    233232        .init_data = mt7620_init_data, 
    234233        .reset_fe = mt7620_fe_reset, 
     
    252251 
    253252static struct fe_soc_data mt7621_data = { 
    254         .mac = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }, 
    255253        .init_data = mt7621_init_data, 
    256254        .reset_fe = mt7621_fe_reset, 
  • trunk/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt2880.c

    r44371 r44740  
    5858 
    5959struct fe_soc_data rt2880_data = { 
    60         .mac = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }, 
    6160        .init_data = rt2880_init_data, 
    6261        .reset_fe = rt2880_fe_reset, 
  • trunk/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt305x.c

    r44371 r44740  
    126126 
    127127static struct fe_soc_data rt3050_data = { 
    128         .mac = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }, 
    129128        .init_data = rt305x_init_data, 
    130129        .reset_fe = rt305x_fe_reset, 
     
    138137 
    139138static struct fe_soc_data rt5350_data = { 
    140         .mac = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }, 
    141139        .init_data = rt5350_init_data, 
    142140        .reg_table = rt5350_reg_table, 
  • trunk/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3883.c

    r44371 r44740  
    5757 
    5858static struct fe_soc_data rt3883_data = { 
    59         .mac = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 }, 
    6059        .init_data = rt3883_init_data, 
    6160        .reset_fe = rt3883_fe_reset, 
Note: See TracChangeset for help on using the changeset viewer.