Skip to content

Commit

Permalink
net: vertexcom: mse102x: Fix random MAC address log
Browse files Browse the repository at this point in the history
At the time of MAC address assignment the netdev is not registered yet,
so netdev log functions won't work as expected. While we are at this
downgrade the log level to a warning, because a random MAC address is
not a real error.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240827191000.3244-4-wahrenst@gmx.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Stefan Wahren authored and Jakub Kicinski committed Aug 29, 2024
1 parent 0069716 commit d3a41dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/vertexcom/mse102x.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@ static void mse102x_init_mac(struct mse102x_net *mse, struct device_node *np)

if (ret) {
eth_hw_addr_random(ndev);
netdev_err(ndev, "Using random MAC address: %pM\n",
ndev->dev_addr);
dev_warn(ndev->dev.parent, "Using random MAC address: %pM\n",
ndev->dev_addr);
}
}

Expand Down

0 comments on commit d3a41dc

Please sign in to comment.