Message ID | 20211019150011.1355755-6-kuba@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 83f262babddeca1a7c71477402b778ea0171fa9e |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | ethernet: manual netdev->dev_addr conversions (part 3) | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Series has a cover letter |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 4 of 4 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 1 this patch: 1 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | No Fixes tag |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 16 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 1 this patch: 1 |
netdev/header_inline | success | No static functions without inline keyword in header files |
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c index 3b73a9c55a5a..509c5e9b29df 100644 --- a/drivers/net/ethernet/via/via-rhine.c +++ b/drivers/net/ethernet/via/via-rhine.c @@ -899,6 +899,7 @@ static int rhine_init_one_common(struct device *hwdev, u32 quirks, struct net_device *dev; struct rhine_private *rp; int i, rc, phy_id; + u8 addr[ETH_ALEN]; const char *name; /* this should always be supported */ @@ -933,7 +934,8 @@ static int rhine_init_one_common(struct device *hwdev, u32 quirks, rhine_hw_init(dev, pioaddr); for (i = 0; i < 6; i++) - dev->dev_addr[i] = ioread8(ioaddr + StationAddr + i); + addr[i] = ioread8(ioaddr + StationAddr + i); + eth_hw_addr_set(dev, addr); if (!is_valid_ether_addr(dev->dev_addr)) { /* Report it and use a random ethernet address instead */
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount of VLANs...") introduced a rbtree for faster Ethernet address look up. To maintain netdev->dev_addr in this tree we need to make all the writes to it got through appropriate helpers. Read the address into an array on the stack, then call eth_hw_addr_set(). Signed-off-by: Jakub Kicinski <kuba@kernel.org> --- CC: kevinbrace@bracecomputerlab.com --- drivers/net/ethernet/via/via-rhine.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)