Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24557c6d authored by Raihan Haider's avatar Raihan Haider Committed by Gerrit - the friendly Code Review server
Browse files

net: stmmac: Add CONFIG_IPV6 check



Add CONFIG_IPV6 check to ipv6 specific early eth code

Change-Id: Ib1b266e6da7243e4a1b2d3507b0d19b119e2ebdc
Signed-off-by: default avatarRaihan <Haider&lt;rhaider@codeaurora.org>
parent 8e924318
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -412,6 +412,7 @@ place_marker("M - Etherent Assigned IPv4 address");
	return res;
}

#ifdef CONFIG_IPV6
static int qcom_ethqos_add_ipv6addr(struct ip_params *ip_info,
				    struct net_device *dev)
{
@@ -459,6 +460,7 @@ static int qcom_ethqos_add_ipv6addr(struct ip_params *ip_info,
		}
	return ret;
}
#endif

static int rgmii_readl(struct qcom_ethqos *ethqos, unsigned int offset)
{
@@ -1290,6 +1292,7 @@ static void ethqos_is_ipv4_NW_stack_ready(struct work_struct *work)
	flush_delayed_work(&ethqos->ipv4_addr_assign_wq);
}

#ifdef CONFIG_IPV6
static void ethqos_is_ipv6_NW_stack_ready(struct work_struct *work)
{
	struct delayed_work *dwork;
@@ -1319,6 +1322,7 @@ static void ethqos_is_ipv6_NW_stack_ready(struct work_struct *work)
	cancel_delayed_work_sync(&ethqos->ipv6_addr_assign_wq);
	flush_delayed_work(&ethqos->ipv6_addr_assign_wq);
}
#endif

static int ethqos_set_early_eth_param(struct stmmac_priv *priv,
				      struct qcom_ethqos *ethqos)
@@ -1336,6 +1340,7 @@ static int ethqos_set_early_eth_param(struct stmmac_priv *priv,
		schedule_delayed_work(&ethqos->ipv4_addr_assign_wq, 0);
	}

#ifdef CONFIG_IPV6
	if (pparams.is_valid_ipv6_addr) {
		INIT_DELAYED_WORK(&ethqos->ipv6_addr_assign_wq,
				  ethqos_is_ipv6_NW_stack_ready);
@@ -1344,6 +1349,7 @@ static int ethqos_set_early_eth_param(struct stmmac_priv *priv,
			schedule_delayed_work(&ethqos->ipv6_addr_assign_wq,
					      msecs_to_jiffies(1000));
	}
#endif

	if (pparams.is_valid_mac_addr) {
		ether_addr_copy(dev_addr, pparams.mac_addr);