Skip to content

Commit

Permalink
ethernet: 8390/etherh: don't write directly to netdev->dev_addr
Browse files Browse the repository at this point in the history
netdev->dev_addr is const now.

Compile tested rpc_defconfig w/ GCC 8.5.

Fixes: adeef3e ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <[email protected]>
Reviewed-by: Russell King (Oracle) <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
kuba-moo authored and davem330 committed Jan 26, 2022
1 parent 98ef22b commit 5518c52
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/8390/etherh.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
struct ei_device *ei_local;
struct net_device *dev;
struct etherh_priv *eh;
u8 addr[ETH_ALEN];
int ret;

ret = ecard_request_resources(ec);
Expand Down Expand Up @@ -724,12 +725,13 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
spin_lock_init(&ei_local->page_lock);

if (ec->cid.product == PROD_ANT_ETHERM) {
etherm_addr(dev->dev_addr);
etherm_addr(addr);
ei_local->reg_offset = etherm_regoffsets;
} else {
etherh_addr(dev->dev_addr, ec);
etherh_addr(addr, ec);
ei_local->reg_offset = etherh_regoffsets;
}
eth_hw_addr_set(dev, addr);

ei_local->name = dev->name;
ei_local->word16 = 1;
Expand Down

0 comments on commit 5518c52

Please sign in to comment.