smsc75xx.c (c8f8207ca6311be99ac855691490cd8764a9e31d) smsc75xx.c (5503a6889f72d91c9ad156e6daa9ffcdc726ddc5)
1 /***************************************************************************
2 *
3 * Copyright (C) 2007-2010 SMSC
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.

--- 761 unchanged lines hidden (view full) ---

770
771static void smsc75xx_init_mac_address(struct usbnet *dev)
772{
773 const u8 *mac_addr;
774
775 /* maybe the boot loader passed the MAC address in devicetree */
776 mac_addr = of_get_mac_address(dev->udev->dev.of_node);
777 if (!IS_ERR(mac_addr)) {
1 /***************************************************************************
2 *
3 * Copyright (C) 2007-2010 SMSC
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.

--- 761 unchanged lines hidden (view full) ---

770
771static void smsc75xx_init_mac_address(struct usbnet *dev)
772{
773 const u8 *mac_addr;
774
775 /* maybe the boot loader passed the MAC address in devicetree */
776 mac_addr = of_get_mac_address(dev->udev->dev.of_node);
777 if (!IS_ERR(mac_addr)) {
778 memcpy(dev->net->dev_addr, mac_addr, ETH_ALEN);
778 ether_addr_copy(dev->net->dev_addr, mac_addr);
779 return;
780 }
781
782 /* try reading mac address from EEPROM */
783 if (smsc75xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN,
784 dev->net->dev_addr) == 0) {
785 if (is_valid_ether_addr(dev->net->dev_addr)) {
786 /* eeprom values are valid so use them */

--- 1569 unchanged lines hidden ---
779 return;
780 }
781
782 /* try reading mac address from EEPROM */
783 if (smsc75xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN,
784 dev->net->dev_addr) == 0) {
785 if (is_valid_ether_addr(dev->net->dev_addr)) {
786 /* eeprom values are valid so use them */

--- 1569 unchanged lines hidden ---