]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: move stmmac_check_ether_addr() to driver probe
authorVinod Koul <vkoul@kernel.org>
Mon, 22 Apr 2019 09:45:32 +0000 (15:15 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Apr 2019 04:52:18 +0000 (21:52 -0700)
commit7fc00e5c2521d278820d3432a518a0dfa29884a6
treed8aa4d9c1928a47d30b51bb50190d3e8428d6a50
parent1903900d7d3fddb58c0b3882977c8b02f700ecb9
net: stmmac: move stmmac_check_ether_addr() to driver probe

stmmac_check_ether_addr() checks the MAC address and assigns one in
driver open(). In many cases when we create slave netdevice, the dev
addr is inherited from master but the master dev addr maybe NULL at
that time, so move this call to driver probe so that address is
always valid.

Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>
Tested-by: Xiaofei Shen <xiaofeis@codeaurora.org>
Signed-off-by: Sneh Shah <snehshah@codeaurora.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c