Skip to contentSkip to conversation

r8152: sync sa_family with the media type of network device

PATCH Superseded [email protected] 2 participants 3 messages Apr 19, 2019 – Apr 22, 2019

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 r8152: sync sa_family with the media type of network device

From: "Crag.Wang" <[email protected]>

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.

Change-Id Ib48a303730bee81667a2859be32e48cc8a66f277
---
 drivers/net/usb/r8152.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/usb/r8152.c +2 -0
index 4c63b40d5e00..41fb39ce69c9 100644
@@ -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 {
maintainer
#1 lore raw
Quoted 7 lines · On Fri, Apr 19, 2019 at 04:45:46PM +0800, [email protected] wrote:

From: "Crag.Wang" <[email protected]>

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.

Change-Id: Ib48a303730bee81667a2859be32e48cc8a66f277

No need for this line here, I don't think you ran checkpatch.pl on your change before sending it out :(

author
#2 lore raw

Greg KH <[email protected]> 於 2019年4月20日 週六 上午3:37寫道:

Quoted 12 lines · On Fri, Apr 19, 2019 at 04:45:46PM +0800, [email protected] wrote:
Quoted 7 lines

From: "Crag.Wang" <[email protected]>

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.

Change-Id: Ib48a303730bee81667a2859be32e48cc8a66f277

No need for this line here, I don't think you ran checkpatch.pl on your change before sending it out :(

I added param to skip the verification of gerrit change-id, will remove this line in v2 and upload.

Crag