diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-19 20:12:38 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-20 20:33:58 +0300 |
commit | 3928f64b1e473ec951cfbeac42634ff51d4f7f33 (patch) | |
tree | 2d20e99dde0d92d80559f50c064c84b44ef4180a /drivers/staging/wlan-ng | |
parent | 349f631da4e1bdcb1b4a2a3ee630d689bfe6724d (diff) | |
download | linux-3928f64b1e473ec951cfbeac42634ff51d4f7f33.tar.xz |
staging: use eth_hw_addr_set() for dev->addr_len cases
Convert all staging drivers from memcpy(... dev->addr_len)
to eth_hw_addr_set():
@@
expression dev, np;
@@
- memcpy(dev->dev_addr, np, dev->addr_len)
+ eth_hw_addr_set(dev, np)
Manually confirmed these are all etherdevices.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20211019171243.1412240-4-kuba@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r-- | drivers/staging/wlan-ng/p80211netdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 07ed6c4cfdcc..255500448ad3 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -616,7 +616,7 @@ static int p80211knetdev_set_mac_address(struct net_device *dev, void *addr) result = -EADDRNOTAVAIL; } else { /* everything's ok, change the addr in netdev */ - memcpy(dev->dev_addr, new_addr->sa_data, dev->addr_len); + eth_hw_addr_set(dev, new_addr->sa_data); } return result; |