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

Commit 6b304948 authored by Suraj Jaiswal's avatar Suraj Jaiswal Committed by Gerrit - the friendly Code Review server
Browse files

emac: Add route to Local table

For Talos as part of early Ethernet we have to add support to
add route in local table instead of main table .On Early Ethernet
Network manager is not available on Talos to add route .Since on
Talos main table is used for route so we need local table.

Change-Id: I062d84b007418a2e27bbfb93f7af0c0fcc6fbc82
parent efe63abb
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -1567,6 +1567,13 @@ int DWC_ETH_QOS_add_ipaddr(struct DWC_ETH_QOS_prv_data *pdata)
	return ret;
}

u32 l3mdev_fib_table1 (const struct net_device *dev)
{
	return RT_TABLE_LOCAL;
}

const struct l3mdev_ops l3mdev_op1 = {.l3mdev_fib_table = l3mdev_fib_table1};

static int DWC_ETH_QOS_configure_netdevice(struct platform_device *pdev)
{
	struct DWC_ETH_QOS_prv_data *pdata = NULL;
@@ -1642,6 +1649,15 @@ static int DWC_ETH_QOS_configure_netdevice(struct platform_device *pdev)
	/* store emac hw version in pdata*/
	pdata->emac_hw_version_type = dwc_eth_qos_res_data.emac_hw_version_type;

#ifdef CONFIG_NET_L3_MASTER_DEV
	if (pdata->res_data->early_eth_en && pdata->emac_hw_version_type == EMAC_HW_v2_3_1) {
		EMACDBG("l3mdev_op1 set \n");
		dev->priv_flags = IFF_L3MDEV_MASTER;
		dev->l3mdev_ops = &l3mdev_op1;
	}
#endif


	/* Scale the clocks to 10Mbps speed */
	if (pdata->res_data->early_eth_en) {
		pdata->speed = SPEED_100;