提交 a6cbcb77 编写于 作者: C Crag.Wang 提交者: David S. Miller

r8152: sync sa_family with the media type of network device

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.

Fixes: 25766271 ("r8152: Refresh MAC address during USBDEVFS_RESET")
Signed-off-by: NCrag.Wang <crag.wang@dell.com>
Reviewed-by: NJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-By: NMario Limonciello <mario.limonciello@dell.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6f97955f
无相关合并请求
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部