Skip to content

Commit

Permalink
drivers: ethernet: stm32: Add missing net_if_set_link_addr() call
Browse files Browse the repository at this point in the history
When setting the MAC address, the ethernet driver has to call
net_if_set_link_addr() with the updated address. This was missing and is
added now.
See e.g.
#28874

Signed-off-by: Christian Taedcke <[email protected]>
  • Loading branch information
chrta authored and jukkar committed Nov 6, 2020
1 parent d40fad4 commit 8910d1c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/ethernet/eth_stm32_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,9 @@ static int eth_stm32_hal_set_config(const struct device *dev,
(dev_data->mac_addr[2] << 16) |
(dev_data->mac_addr[1] << 8) |
dev_data->mac_addr[0];
net_if_set_link_addr(dev_data->iface, dev_data->mac_addr,
sizeof(dev_data->mac_addr),
NET_LINK_ETHERNET);
return 0;
default:
break;
Expand Down

0 comments on commit 8910d1c

Please sign in to comment.