summaryrefslogtreecommitdiff
path: root/libre/linux-libre-64/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch
diff options
context:
space:
mode:
Diffstat (limited to 'libre/linux-libre-64/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch')
-rw-r--r--libre/linux-libre-64/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch22
1 files changed, 11 insertions, 11 deletions
diff --git a/libre/linux-libre-64/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch b/libre/linux-libre-64/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch
index 8f0910992..3d4d0c9a3 100644
--- a/libre/linux-libre-64/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch
+++ b/libre/linux-libre-64/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch
@@ -1,4 +1,4 @@
-From c285820634d24268a6ecc330fbcfe3fc325d481d Mon Sep 17 00:00:00 2001
+From 5387243844440a0d05f4b75216588a68526aa4c9 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Tue, 18 Feb 2014 01:43:50 -0300
Subject: [PATCH 5/9] net/smsc95xx: Allow mac address to be set as a parameter
@@ -8,18 +8,18 @@ Subject: [PATCH 5/9] net/smsc95xx: Allow mac address to be set as a parameter
1 file changed, 56 insertions(+)
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
-index 355be77f4241..c94a7193e0b9 100644
+index ea0d5f04dc3a..88ebceb84193 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
-@@ -48,6 +48,7 @@
+@@ -50,6 +50,7 @@
#define SUSPEND_SUSPEND3 (0x08)
#define SUSPEND_ALLMODES (SUSPEND_SUSPEND0 | SUSPEND_SUSPEND1 | \
SUSPEND_SUSPEND2 | SUSPEND_SUSPEND3)
+#define MAC_ADDR_LEN (6)
- #define CARRIER_CHECK_DELAY (2 * HZ)
-
-@@ -70,6 +71,10 @@ static bool turbo_mode = true;
+ struct smsc95xx_priv {
+ u32 mac_cr;
+@@ -67,6 +68,10 @@ static bool turbo_mode = true;
module_param(turbo_mode, bool, 0644);
MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction");
@@ -30,8 +30,8 @@ index 355be77f4241..c94a7193e0b9 100644
static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index,
u32 *data, int in_pm)
{
-@@ -899,8 +904,59 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
- return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL);
+@@ -753,8 +758,59 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
+ return phy_mii_ioctl(netdev->phydev, rq, cmd);
}
+/* Check the macaddr module parameter for a MAC address */
@@ -87,9 +87,9 @@ index 355be77f4241..c94a7193e0b9 100644
+ if (smsc95xx_is_macaddr_param(dev, dev->net->dev_addr))
+ return;
+
- const u8 *mac_addr;
-
/* maybe the boot loader passed the MAC address in devicetree */
+ if (!eth_platform_get_mac_address(&dev->udev->dev,
+ dev->net->dev_addr)) {
--
-2.26.1
+2.30.0