nvethernet: MAC loopback support

When MAC HW loopback is enabled, MAC receives
back all the packets that is being sent by it.
Packets which were sent are looped inside the
MAC itself.

Bug 200512681

Change-Id: Ifb29dcdbfbf2c1b3baab438bf5b98c0fb362e6d8
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2088984
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Narayan Reddy
2019-04-03 22:00:27 +05:30
committed by Revanth Kumar Uppala
parent 0975ee4989
commit 3fa01bcd71
4 changed files with 171 additions and 1 deletions

View File

@@ -133,7 +133,12 @@ struct ether_priv_data {
int tx_irqs[ETHER_MAX_IRQS];
int rx_irqs[ETHER_MAX_IRQS];
unsigned long long dma_mask;
/* for MAC loopback */
unsigned int mac_loopback_mode;
};
void ether_set_ethtool_ops(struct net_device *ndev);
int ether_sysfs_register(struct device *dev);
void ether_sysfs_unregister(struct device *dev);
#endif /* ETHER_LINUX_H */