diff --git a/arch/arm64/boot/dts/qcom/qcs405.dtsi b/arch/arm64/boot/dts/qcom/qcs405.dtsi index 45574c4891c6..839d8e80f4a5 100644 --- a/arch/arm64/boot/dts/qcom/qcs405.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs405.dtsi @@ -1642,7 +1642,6 @@ qcom,bus-vector-names = "0", "10", "100", "1000"; snps,tso; snps,pbl = <32>; - mac-address = [00 55 7B B5 7D f7]; clocks = <&clock_gcc GCC_ETH_AXI_CLK>, <&clock_gcc GCC_ETH_SLAVE_AHB_CLK>, <&clock_gcc GCC_ETH_PTP_CLK>, diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index 6486b83d91ab..3e5177bad9c7 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -68,7 +68,7 @@ int stmmac_enable_ipc_low; char tmp_buff[MAX_PROC_SIZE]; static struct qmp_pkt pkt; static char qmp_buf[MAX_QMP_MSG_SIZE + 1] = {0}; -static struct ip_params pparams = {"", "", "", ""}; +static struct ip_params pparams; static void qcom_ethqos_read_iomacro_por_values(struct qcom_ethqos *ethqos) { @@ -2301,8 +2301,9 @@ static void ethqos_is_ipv6_NW_stack_ready(struct work_struct *work) flush_delayed_work(ðqos->ipv6_addr_assign_wq); } -static int ethqos_set_early_eth_param(struct stmmac_priv *priv, - struct qcom_ethqos *ethqos) +static void ethqos_set_early_eth_param( + struct stmmac_priv *priv, + struct qcom_ethqos *ethqos) { int ret = 0; @@ -2329,12 +2330,7 @@ static int ethqos_set_early_eth_param(struct stmmac_priv *priv, schedule_delayed_work(ðqos->ipv6_addr_assign_wq, msecs_to_jiffies(1000)); } - - if (pparams.is_valid_mac_addr) { - ether_addr_copy(dev_addr, pparams.mac_addr); - memcpy(priv->dev->dev_addr, dev_addr, ETH_ALEN); - } - return ret; + return; } bool qcom_ethqos_ipa_enabled(void) @@ -2556,6 +2552,11 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ndev = dev_get_drvdata(ðqos->pdev->dev); priv = netdev_priv(ndev); + if (pparams.is_valid_mac_addr) { + ether_addr_copy(dev_addr, pparams.mac_addr); + memcpy(priv->dev->dev_addr, dev_addr, ETH_ALEN); + } + if (ethqos->early_eth_enabled) { /* Initialize work*/ INIT_WORK(ðqos->early_eth,