diff options
author | Luka Perkov <luka.perkov@sartura.hr> | 2016-06-23 13:57:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-23 13:57:21 +0200 |
commit | 282b917e47d9ae5017e1e426face9b75cb7aabd0 (patch) | |
tree | 3284ca2d20d9c8d7a4563c6446675c1ecf3feac2 /target/linux/brcm2708/patches-4.4/0147-Updated-smsc95xx-driver-to-check-for-a-valid-MAC-add.patch | |
parent | 34d432b05312de6d9575c559db8209809489096d (diff) | |
parent | 441a9c879ba6562ea9f431cf33bbb0c0400d5fd0 (diff) | |
download | master-187ad058-282b917e47d9ae5017e1e426face9b75cb7aabd0.tar.gz master-187ad058-282b917e47d9ae5017e1e426face9b75cb7aabd0.tar.bz2 master-187ad058-282b917e47d9ae5017e1e426face9b75cb7aabd0.zip |
Merge pull request #11 from wigyori/master
pull req for 4.4.12, ar71xx/mediatek updates, package upgrades
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0147-Updated-smsc95xx-driver-to-check-for-a-valid-MAC-add.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.4/0147-Updated-smsc95xx-driver-to-check-for-a-valid-MAC-add.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0147-Updated-smsc95xx-driver-to-check-for-a-valid-MAC-add.patch b/target/linux/brcm2708/patches-4.4/0147-Updated-smsc95xx-driver-to-check-for-a-valid-MAC-add.patch new file mode 100644 index 0000000000..145874a7cc --- /dev/null +++ b/target/linux/brcm2708/patches-4.4/0147-Updated-smsc95xx-driver-to-check-for-a-valid-MAC-add.patch @@ -0,0 +1,40 @@ +From 97c4f995a385631934b1d732271997d44fab0c87 Mon Sep 17 00:00:00 2001 +From: Craig Roberts <cjr@craigroberts.net> +Date: Tue, 16 Feb 2016 10:03:42 +0000 +Subject: [PATCH 147/381] Updated smsc95xx driver to check for a valid MAC + address in eeprom before using smsc95xx.macaddr parameter passed on command + line. + +The built-in RPi adaptor will still get a MAC address based on the parameter passed on the command line as the RPi hardware does not have an eeprom, +however usb->ethernet adaptors using the same driver should have an eeprom with MAC address as part of their hardware and therefore will use this +meaning they don't end up with the same MAC address as the built-in RPi adaptor. +--- + drivers/net/usb/smsc95xx.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/drivers/net/usb/smsc95xx.c ++++ b/drivers/net/usb/smsc95xx.c +@@ -817,10 +817,6 @@ static int smsc95xx_is_macaddr_param(str + + static void smsc95xx_init_mac_address(struct usbnet *dev) + { +- /* Check module parameters */ +- if (smsc95xx_is_macaddr_param(dev, dev->net->dev_addr)) +- return; +- + /* try reading mac address from EEPROM */ + if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, + dev->net->dev_addr) == 0) { +@@ -831,7 +827,11 @@ static void smsc95xx_init_mac_address(st + } + } + +- /* no eeprom, or eeprom values are invalid. generate random MAC */ ++ /* Check module parameters */ ++ if (smsc95xx_is_macaddr_param(dev, dev->net->dev_addr)) ++ return; ++ ++ /* no eeprom, or eeprom values are invalid, and no module parameter specified to set MAC. Generate random MAC */ + eth_hw_addr_random(dev->net); + netif_dbg(dev, ifup, dev->net, "MAC address set to eth_random_addr\n"); + } |