net: dsa: read mac address from DT for slave device

Before creating a slave netdevice, get the mac address from DTS and
apply in case it is valid.

Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Xiaofei Shen 2019-03-29 11:04:58 +05:30 committed by David S. Miller
parent f5d547676c
commit a2c7023f70
3 changed files with 6 additions and 1 deletions

View file

@ -140,6 +140,7 @@ struct dsa_port {
unsigned int index;
const char *name;
const struct dsa_port *cpu_dp;
const char *mac;
struct device_node *dn;
unsigned int ageing_time;
u8 stp_state;