mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
net: usb: sr9700: use ETH_ALEN instead of magic number
The driver hardcodes the number 6 as the number of bytes to write to the SR_PAR register, which stores the MAC address. Use ETH_ALEN instead to make the code clearer. Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Peter Korsgaard <peter@korsgaard.com> Link: https://patch.msgid.link/20260123070645.56434-1-enelsonmoore@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
6290f7e71b
commit
c2e9988780
|
|
@ -271,7 +271,7 @@ static int sr9700_set_mac_address(struct net_device *netdev, void *p)
|
|||
}
|
||||
|
||||
eth_hw_addr_set(netdev, addr->sa_data);
|
||||
sr_write_async(dev, SR_PAR, 6, netdev->dev_addr);
|
||||
sr_write_async(dev, SR_PAR, ETH_ALEN, netdev->dev_addr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user