Skip to contentSkip to conversation

net: qcom/emac: add ethtool support

PATCH Superseded Timur Tabi 2 participants 2 messages Dec 20, 2016 – Dec 21, 2016

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH 1/1 net: qcom/emac: add ethtool support

Add support for some ethtool methods: get/set link settings, get/set message level, get statistics, get link status, and restart autonegotiation.

---
 drivers/net/ethernet/qualcomm/emac/Makefile       |   2 +-
 drivers/net/ethernet/qualcomm/emac/emac-ethtool.c | 156 ++++++++++++++++++++++
 drivers/net/ethernet/qualcomm/emac/emac.c         |  51 ++++---
 drivers/net/ethernet/qualcomm/emac/emac.h         |   3 +
 4 files changed, 191 insertions(+), 21 deletions(-)
 create mode 100644 drivers/net/ethernet/qualcomm/emac/emac-ethtool.c
drivers/net/ethernet/qualcomm/emac/Makefile +1 -1
index 7a66879..fc57ced 100644
@@ -4,6 +4,6 @@
 
 obj-$(CONFIG_QCOM_EMAC) += qcom-emac.o
 
-qcom-emac-objs := emac.o emac-mac.o emac-phy.o emac-sgmii.o \
+qcom-emac-objs := emac.o emac-mac.o emac-phy.o emac-sgmii.o emac-ethtool.o \
 		  emac-sgmii-fsm9900.o emac-sgmii-qdf2432.o \
 		  emac-sgmii-qdf2400.o
drivers/net/ethernet/qualcomm/emac/emac-ethtool.c new file +156 -0

156 lines not on this page · raw message

drivers/net/ethernet/qualcomm/emac/emac.c +31 -20

82 lines not on this page · raw message

drivers/net/ethernet/qualcomm/emac/emac.h +3 -0
index 0c76e6c..4b8483c 100644
@@ -332,4 +332,7 @@ struct emac_adapter {
 void emac_reg_update32(void __iomem *addr, u32 mask, u32 val);
 irqreturn_t emac_isr(int irq, void *data);
 
+void emac_set_ethtool_ops(struct net_device *netdev);
+void emac_update_hw_stats(struct emac_adapter *adpt);
+
 #endif /* _EMAC_H_ */
Signature · 3 lines
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc.  Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
maintainer
#1 lore raw

From: Timur Tabi <[email protected]>
Date: Tue, 20 Dec 2016 16:32:09 -0600

Quoted 5 lines

Add support for some ethtool methods: get/set link settings, get/set message level, get statistics, get link status, and restart autonegotiation.

Please resubmit when net-next opens back up, thanks.