net: stmmac: Add CONFIG_IPV6 check

Add CONFIG_IPV6 check to ipv6 specific early eth code

Change-Id: Ib1b266e6da7243e4a1b2d3507b0d19b119e2ebdc
Signed-off-by: Raihan Haider<rhaider@codeaurora.org>
This commit is contained in:
Raihan Haider 2021-05-28 12:20:19 +05:30 committed by Gerrit - the friendly Code Review server
parent 8e9243189d
commit 24557c6da1

View File

@ -412,6 +412,7 @@ place_marker("M - Etherent Assigned IPv4 address");
return res; return res;
} }
#ifdef CONFIG_IPV6
static int qcom_ethqos_add_ipv6addr(struct ip_params *ip_info, static int qcom_ethqos_add_ipv6addr(struct ip_params *ip_info,
struct net_device *dev) struct net_device *dev)
{ {
@ -459,6 +460,7 @@ static int qcom_ethqos_add_ipv6addr(struct ip_params *ip_info,
} }
return ret; return ret;
} }
#endif
static int rgmii_readl(struct qcom_ethqos *ethqos, unsigned int offset) 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); flush_delayed_work(&ethqos->ipv4_addr_assign_wq);
} }
#ifdef CONFIG_IPV6
static void ethqos_is_ipv6_NW_stack_ready(struct work_struct *work) static void ethqos_is_ipv6_NW_stack_ready(struct work_struct *work)
{ {
struct delayed_work *dwork; 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); cancel_delayed_work_sync(&ethqos->ipv6_addr_assign_wq);
flush_delayed_work(&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, static int ethqos_set_early_eth_param(struct stmmac_priv *priv,
struct qcom_ethqos *ethqos) 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); schedule_delayed_work(&ethqos->ipv4_addr_assign_wq, 0);
} }
#ifdef CONFIG_IPV6
if (pparams.is_valid_ipv6_addr) { if (pparams.is_valid_ipv6_addr) {
INIT_DELAYED_WORK(&ethqos->ipv6_addr_assign_wq, INIT_DELAYED_WORK(&ethqos->ipv6_addr_assign_wq,
ethqos_is_ipv6_NW_stack_ready); 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, schedule_delayed_work(&ethqos->ipv6_addr_assign_wq,
msecs_to_jiffies(1000)); msecs_to_jiffies(1000));
} }
#endif
if (pparams.is_valid_mac_addr) { if (pparams.is_valid_mac_addr) {
ether_addr_copy(dev_addr, pparams.mac_addr); ether_addr_copy(dev_addr, pparams.mac_addr);