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

Commit 7f9de3b9 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "emac: Add route to Local table"

parents a21a3f1f 6b304948
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;