diff mbox series

[v2,1/1] r8152: sync sa_family with the media type of network device

Message ID 20190422022307.19616-1-crag0715@gmail.com (mailing list archive)
State Superseded
Headers show
Series [v2,1/1] r8152: sync sa_family with the media type of network device | expand

Commit Message

Crag Wang April 22, 2019, 2:23 a.m. UTC
From: "Crag.Wang" <crag.wang@dell.com>

Without this patch the socket address family sporadically gets wrong
value ends up the dev_set_mac_address() fails to set the desired MAC
address.

Signed-off-by: Crag.Wang <crag.wang@dell.com>
---
 drivers/net/usb/r8152.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

David Miller April 22, 2019, 2:44 a.m. UTC | #1
Networking driver patches not sent to netdev@vger.kernel.org are very unlikely
to be integrated.

Thank you.
Crag Wang April 22, 2019, 3:17 a.m. UTC | #2
On Mon, Apr 22, 2019 at 10:44 AM David Miller <davem@davemloft.net> wrote:
>
>
> Networking driver patches not sent to netdev@vger.kernel.org are very unlikely
> to be integrated.
>
> Thank you.

Adding netdev@vger.kernel.org to this email, sorry about missing the
recipient in the first place.

Thanks,
Crag
David Miller April 22, 2019, 4:48 a.m. UTC | #3
From: Crag Wang <crag0715@gmail.com>
Date: Mon, 22 Apr 2019 11:17:49 +0800

> On Mon, Apr 22, 2019 at 10:44 AM David Miller <davem@davemloft.net> wrote:
>>
>>
>> Networking driver patches not sent to netdev@vger.kernel.org are very unlikely
>> to be integrated.
>>
>> Thank you.
> 
> Adding netdev@vger.kernel.org to this email, sorry about missing the
> recipient in the first place.

This does not get the patch queued up in patchwork, nor allow other readers of
netdev to see the patch so that it can be properly reviewed.

You must make a new, fresh, posting of your patch.
diff mbox series

Patch

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 4c63b40d5e00..41fb39ce69c9 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1225,6 +1225,8 @@  static int determine_ethernet_addr(struct r8152 *tp, struct sockaddr *sa)
 	struct net_device *dev = tp->netdev;
 	int ret;
 
+	sa->sa_family = dev->type;
+
 	if (tp->version == RTL_VER_01) {
 		ret = pla_ocp_read(tp, PLA_IDR, 8, sa->sa_data);
 	} else {