1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /* Copyright (C) 2018 Microchip Technology Inc. */
4 #include <linux/netdevice.h>
5 #include "lan743x_main.h"
6 #include "lan743x_ethtool.h"
7 #include <linux/net_tstamp.h>
12 #define LAN743X_EEPROM_MAGIC (0x74A5)
13 #define LAN743X_OTP_MAGIC (0x74F3)
14 #define EEPROM_INDICATOR_1 (0xA5)
15 #define EEPROM_INDICATOR_2 (0xAA)
16 #define EEPROM_MAC_OFFSET (0x01)
17 #define MAX_EEPROM_SIZE 512
18 #define OTP_INDICATOR_1 (0xF3)
19 #define OTP_INDICATOR_2 (0xF7)
21 static int lan743x_otp_write(struct lan743x_adapter
*adapter
, u32 offset
,
24 unsigned long timeout
;
28 buf
= lan743x_csr_read(adapter
, OTP_PWR_DN
);
30 if (buf
& OTP_PWR_DN_PWRDN_N_
) {
31 /* clear it and wait to be cleared */
32 lan743x_csr_write(adapter
, OTP_PWR_DN
, 0);
34 timeout
= jiffies
+ HZ
;
37 buf
= lan743x_csr_read(adapter
, OTP_PWR_DN
);
38 if (time_after(jiffies
, timeout
)) {
39 netif_warn(adapter
, drv
, adapter
->netdev
,
40 "timeout on OTP_PWR_DN completion\n");
43 } while (buf
& OTP_PWR_DN_PWRDN_N_
);
46 /* set to BYTE program mode */
47 lan743x_csr_write(adapter
, OTP_PRGM_MODE
, OTP_PRGM_MODE_BYTE_
);
49 for (i
= 0; i
< length
; i
++) {
50 lan743x_csr_write(adapter
, OTP_ADDR1
,
52 OTP_ADDR1_15_11_MASK_
);
53 lan743x_csr_write(adapter
, OTP_ADDR2
,
55 OTP_ADDR2_10_3_MASK_
));
56 lan743x_csr_write(adapter
, OTP_PRGM_DATA
, data
[i
]);
57 lan743x_csr_write(adapter
, OTP_TST_CMD
, OTP_TST_CMD_PRGVRFY_
);
58 lan743x_csr_write(adapter
, OTP_CMD_GO
, OTP_CMD_GO_GO_
);
60 timeout
= jiffies
+ HZ
;
63 buf
= lan743x_csr_read(adapter
, OTP_STATUS
);
64 if (time_after(jiffies
, timeout
)) {
65 netif_warn(adapter
, drv
, adapter
->netdev
,
66 "Timeout on OTP_STATUS completion\n");
69 } while (buf
& OTP_STATUS_BUSY_
);
75 static int lan743x_eeprom_wait(struct lan743x_adapter
*adapter
)
77 unsigned long start_time
= jiffies
;
81 val
= lan743x_csr_read(adapter
, E2P_CMD
);
83 if (!(val
& E2P_CMD_EPC_BUSY_
) ||
84 (val
& E2P_CMD_EPC_TIMEOUT_
))
86 usleep_range(40, 100);
87 } while (!time_after(jiffies
, start_time
+ HZ
));
89 if (val
& (E2P_CMD_EPC_TIMEOUT_
| E2P_CMD_EPC_BUSY_
)) {
90 netif_warn(adapter
, drv
, adapter
->netdev
,
91 "EEPROM read operation timeout\n");
98 static int lan743x_eeprom_confirm_not_busy(struct lan743x_adapter
*adapter
)
100 unsigned long start_time
= jiffies
;
104 val
= lan743x_csr_read(adapter
, E2P_CMD
);
106 if (!(val
& E2P_CMD_EPC_BUSY_
))
109 usleep_range(40, 100);
110 } while (!time_after(jiffies
, start_time
+ HZ
));
112 netif_warn(adapter
, drv
, adapter
->netdev
, "EEPROM is busy\n");
116 static int lan743x_eeprom_read(struct lan743x_adapter
*adapter
,
117 u32 offset
, u32 length
, u8
*data
)
123 retval
= lan743x_eeprom_confirm_not_busy(adapter
);
127 for (i
= 0; i
< length
; i
++) {
128 val
= E2P_CMD_EPC_BUSY_
| E2P_CMD_EPC_CMD_READ_
;
129 val
|= (offset
& E2P_CMD_EPC_ADDR_MASK_
);
130 lan743x_csr_write(adapter
, E2P_CMD
, val
);
132 retval
= lan743x_eeprom_wait(adapter
);
136 val
= lan743x_csr_read(adapter
, E2P_DATA
);
137 data
[i
] = val
& 0xFF;
144 static int lan743x_eeprom_write(struct lan743x_adapter
*adapter
,
145 u32 offset
, u32 length
, u8
*data
)
151 retval
= lan743x_eeprom_confirm_not_busy(adapter
);
155 /* Issue write/erase enable command */
156 val
= E2P_CMD_EPC_BUSY_
| E2P_CMD_EPC_CMD_EWEN_
;
157 lan743x_csr_write(adapter
, E2P_CMD
, val
);
159 retval
= lan743x_eeprom_wait(adapter
);
163 for (i
= 0; i
< length
; i
++) {
164 /* Fill data register */
166 lan743x_csr_write(adapter
, E2P_DATA
, val
);
168 /* Send "write" command */
169 val
= E2P_CMD_EPC_BUSY_
| E2P_CMD_EPC_CMD_WRITE_
;
170 val
|= (offset
& E2P_CMD_EPC_ADDR_MASK_
);
171 lan743x_csr_write(adapter
, E2P_CMD
, val
);
173 retval
= lan743x_eeprom_wait(adapter
);
183 static void lan743x_ethtool_get_drvinfo(struct net_device
*netdev
,
184 struct ethtool_drvinfo
*info
)
186 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
188 strlcpy(info
->driver
, DRIVER_NAME
, sizeof(info
->driver
));
189 strlcpy(info
->bus_info
,
190 pci_name(adapter
->pdev
), sizeof(info
->bus_info
));
193 static u32
lan743x_ethtool_get_msglevel(struct net_device
*netdev
)
195 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
197 return adapter
->msg_enable
;
200 static void lan743x_ethtool_set_msglevel(struct net_device
*netdev
,
203 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
205 adapter
->msg_enable
= msglevel
;
208 static int lan743x_ethtool_get_eeprom_len(struct net_device
*netdev
)
210 return MAX_EEPROM_SIZE
;
213 static int lan743x_ethtool_get_eeprom(struct net_device
*netdev
,
214 struct ethtool_eeprom
*ee
, u8
*data
)
216 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
218 return lan743x_eeprom_read(adapter
, ee
->offset
, ee
->len
, data
);
221 static int lan743x_ethtool_set_eeprom(struct net_device
*netdev
,
222 struct ethtool_eeprom
*ee
, u8
*data
)
224 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
227 if (ee
->magic
== LAN743X_EEPROM_MAGIC
)
228 ret
= lan743x_eeprom_write(adapter
, ee
->offset
, ee
->len
,
230 /* Beware! OTP is One Time Programming ONLY!
231 * So do some strict condition check before messing up
233 else if ((ee
->magic
== LAN743X_OTP_MAGIC
) &&
235 (ee
->len
== MAX_EEPROM_SIZE
) &&
236 (data
[0] == OTP_INDICATOR_1
))
237 ret
= lan743x_otp_write(adapter
, ee
->offset
, ee
->len
, data
);
242 static const char lan743x_set0_hw_cnt_strings
[][ETH_GSTRING_LEN
] = {
244 "RX Alignment Errors",
245 "Rx Fragment Errors",
247 "RX Undersize Frame Errors",
248 "RX Oversize Frame Errors",
250 "RX Unicast Byte Count",
251 "RX Broadcast Byte Count",
252 "RX Multicast Byte Count",
254 "RX Broadcast Frames",
255 "RX Multicast Frames",
258 "RX 65 - 127 Byte Frames",
259 "RX 128 - 255 Byte Frames",
260 "RX 256 - 511 Bytes Frames",
261 "RX 512 - 1023 Byte Frames",
262 "RX 1024 - 1518 Byte Frames",
263 "RX Greater 1518 Byte Frames",
266 static const char lan743x_set1_sw_cnt_strings
[][ETH_GSTRING_LEN
] = {
273 static const char lan743x_set2_hw_cnt_strings
[][ETH_GSTRING_LEN
] = {
275 "EEE RX LPI Transitions",
277 "RX Counter Rollover Status",
279 "TX Excess Deferral Errors",
282 "TX Single Collisions",
283 "TX Multiple Collisions",
284 "TX Excessive Collision",
285 "TX Late Collisions",
286 "TX Unicast Byte Count",
287 "TX Broadcast Byte Count",
288 "TX Multicast Byte Count",
290 "TX Broadcast Frames",
291 "TX Multicast Frames",
294 "TX 65 - 127 Byte Frames",
295 "TX 128 - 255 Byte Frames",
296 "TX 256 - 511 Bytes Frames",
297 "TX 512 - 1023 Byte Frames",
298 "TX 1024 - 1518 Byte Frames",
299 "TX Greater 1518 Byte Frames",
301 "EEE TX LPI Transitions",
303 "TX Counter Rollover Status",
306 static const u32 lan743x_set0_hw_cnt_addr
[] = {
308 STAT_RX_ALIGNMENT_ERRORS
,
309 STAT_RX_FRAGMENT_ERRORS
,
310 STAT_RX_JABBER_ERRORS
,
311 STAT_RX_UNDERSIZE_FRAME_ERRORS
,
312 STAT_RX_OVERSIZE_FRAME_ERRORS
,
313 STAT_RX_DROPPED_FRAMES
,
314 STAT_RX_UNICAST_BYTE_COUNT
,
315 STAT_RX_BROADCAST_BYTE_COUNT
,
316 STAT_RX_MULTICAST_BYTE_COUNT
,
317 STAT_RX_UNICAST_FRAMES
,
318 STAT_RX_BROADCAST_FRAMES
,
319 STAT_RX_MULTICAST_FRAMES
,
320 STAT_RX_PAUSE_FRAMES
,
321 STAT_RX_64_BYTE_FRAMES
,
322 STAT_RX_65_127_BYTE_FRAMES
,
323 STAT_RX_128_255_BYTE_FRAMES
,
324 STAT_RX_256_511_BYTES_FRAMES
,
325 STAT_RX_512_1023_BYTE_FRAMES
,
326 STAT_RX_1024_1518_BYTE_FRAMES
,
327 STAT_RX_GREATER_1518_BYTE_FRAMES
,
330 static const u32 lan743x_set2_hw_cnt_addr
[] = {
331 STAT_RX_TOTAL_FRAMES
,
332 STAT_EEE_RX_LPI_TRANSITIONS
,
333 STAT_EEE_RX_LPI_TIME
,
334 STAT_RX_COUNTER_ROLLOVER_STATUS
,
336 STAT_TX_EXCESS_DEFERRAL_ERRORS
,
337 STAT_TX_CARRIER_ERRORS
,
338 STAT_TX_BAD_BYTE_COUNT
,
339 STAT_TX_SINGLE_COLLISIONS
,
340 STAT_TX_MULTIPLE_COLLISIONS
,
341 STAT_TX_EXCESSIVE_COLLISION
,
342 STAT_TX_LATE_COLLISIONS
,
343 STAT_TX_UNICAST_BYTE_COUNT
,
344 STAT_TX_BROADCAST_BYTE_COUNT
,
345 STAT_TX_MULTICAST_BYTE_COUNT
,
346 STAT_TX_UNICAST_FRAMES
,
347 STAT_TX_BROADCAST_FRAMES
,
348 STAT_TX_MULTICAST_FRAMES
,
349 STAT_TX_PAUSE_FRAMES
,
350 STAT_TX_64_BYTE_FRAMES
,
351 STAT_TX_65_127_BYTE_FRAMES
,
352 STAT_TX_128_255_BYTE_FRAMES
,
353 STAT_TX_256_511_BYTES_FRAMES
,
354 STAT_TX_512_1023_BYTE_FRAMES
,
355 STAT_TX_1024_1518_BYTE_FRAMES
,
356 STAT_TX_GREATER_1518_BYTE_FRAMES
,
357 STAT_TX_TOTAL_FRAMES
,
358 STAT_EEE_TX_LPI_TRANSITIONS
,
359 STAT_EEE_TX_LPI_TIME
,
360 STAT_TX_COUNTER_ROLLOVER_STATUS
363 static void lan743x_ethtool_get_strings(struct net_device
*netdev
,
364 u32 stringset
, u8
*data
)
368 memcpy(data
, lan743x_set0_hw_cnt_strings
,
369 sizeof(lan743x_set0_hw_cnt_strings
));
370 memcpy(&data
[sizeof(lan743x_set0_hw_cnt_strings
)],
371 lan743x_set1_sw_cnt_strings
,
372 sizeof(lan743x_set1_sw_cnt_strings
));
373 memcpy(&data
[sizeof(lan743x_set0_hw_cnt_strings
) +
374 sizeof(lan743x_set1_sw_cnt_strings
)],
375 lan743x_set2_hw_cnt_strings
,
376 sizeof(lan743x_set2_hw_cnt_strings
));
381 static void lan743x_ethtool_get_ethtool_stats(struct net_device
*netdev
,
382 struct ethtool_stats
*stats
,
385 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
390 for (i
= 0; i
< ARRAY_SIZE(lan743x_set0_hw_cnt_addr
); i
++) {
391 buf
= lan743x_csr_read(adapter
, lan743x_set0_hw_cnt_addr
[i
]);
392 data
[data_index
++] = (u64
)buf
;
394 for (i
= 0; i
< ARRAY_SIZE(adapter
->rx
); i
++)
395 data
[data_index
++] = (u64
)(adapter
->rx
[i
].frame_count
);
396 for (i
= 0; i
< ARRAY_SIZE(lan743x_set2_hw_cnt_addr
); i
++) {
397 buf
= lan743x_csr_read(adapter
, lan743x_set2_hw_cnt_addr
[i
]);
398 data
[data_index
++] = (u64
)buf
;
402 static int lan743x_ethtool_get_sset_count(struct net_device
*netdev
, int sset
)
409 ret
= ARRAY_SIZE(lan743x_set0_hw_cnt_strings
);
410 ret
+= ARRAY_SIZE(lan743x_set1_sw_cnt_strings
);
411 ret
+= ARRAY_SIZE(lan743x_set2_hw_cnt_strings
);
419 static int lan743x_ethtool_get_rxnfc(struct net_device
*netdev
,
420 struct ethtool_rxnfc
*rxnfc
,
423 switch (rxnfc
->cmd
) {
426 switch (rxnfc
->flow_type
) {
427 case TCP_V4_FLOW
:case UDP_V4_FLOW
:
428 case TCP_V6_FLOW
:case UDP_V6_FLOW
:
429 rxnfc
->data
|= RXH_L4_B_0_1
| RXH_L4_B_2_3
;
431 case IPV4_FLOW
: case IPV6_FLOW
:
432 rxnfc
->data
|= RXH_IP_SRC
| RXH_IP_DST
;
436 case ETHTOOL_GRXRINGS
:
437 rxnfc
->data
= LAN743X_USED_RX_CHANNELS
;
443 static u32
lan743x_ethtool_get_rxfh_key_size(struct net_device
*netdev
)
448 static u32
lan743x_ethtool_get_rxfh_indir_size(struct net_device
*netdev
)
453 static int lan743x_ethtool_get_rxfh(struct net_device
*netdev
,
454 u32
*indir
, u8
*key
, u8
*hfunc
)
456 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
462 for (dw_index
= 0; dw_index
< 32; dw_index
++) {
464 lan743x_csr_read(adapter
, RFE_INDX(dw_index
));
466 byte_index
= dw_index
<< 2;
467 indir
[byte_index
+ 0] =
468 ((four_entries
>> 0) & 0x000000FF);
469 indir
[byte_index
+ 1] =
470 ((four_entries
>> 8) & 0x000000FF);
471 indir
[byte_index
+ 2] =
472 ((four_entries
>> 16) & 0x000000FF);
473 indir
[byte_index
+ 3] =
474 ((four_entries
>> 24) & 0x000000FF);
481 for (dword_index
= 0; dword_index
< 10; dword_index
++) {
483 lan743x_csr_read(adapter
,
484 RFE_HASH_KEY(dword_index
));
486 byte_index
= dword_index
<< 2;
487 key
[byte_index
+ 0] =
488 ((four_entries
>> 0) & 0x000000FF);
489 key
[byte_index
+ 1] =
490 ((four_entries
>> 8) & 0x000000FF);
491 key
[byte_index
+ 2] =
492 ((four_entries
>> 16) & 0x000000FF);
493 key
[byte_index
+ 3] =
494 ((four_entries
>> 24) & 0x000000FF);
498 (*hfunc
) = ETH_RSS_HASH_TOP
;
502 static int lan743x_ethtool_set_rxfh(struct net_device
*netdev
,
503 const u32
*indir
, const u8
*key
,
506 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
508 if (hfunc
!= ETH_RSS_HASH_NO_CHANGE
&& hfunc
!= ETH_RSS_HASH_TOP
)
516 for (dword_index
= 0; dword_index
< 32; dword_index
++) {
517 byte_index
= dword_index
<< 2;
519 (((indir
[byte_index
+ 0] & 0x000000FF) << 0) |
520 ((indir
[byte_index
+ 1] & 0x000000FF) << 8) |
521 ((indir
[byte_index
+ 2] & 0x000000FF) << 16) |
522 ((indir
[byte_index
+ 3] & 0x000000FF) << 24));
523 lan743x_csr_write(adapter
, RFE_INDX(dword_index
),
532 for (dword_index
= 0; dword_index
< 10; dword_index
++) {
533 byte_index
= dword_index
<< 2;
535 ((((u32
)(key
[byte_index
+ 0])) << 0) |
536 (((u32
)(key
[byte_index
+ 1])) << 8) |
537 (((u32
)(key
[byte_index
+ 2])) << 16) |
538 (((u32
)(key
[byte_index
+ 3])) << 24));
539 lan743x_csr_write(adapter
, RFE_HASH_KEY(dword_index
),
546 static int lan743x_ethtool_get_ts_info(struct net_device
*netdev
,
547 struct ethtool_ts_info
*ts_info
)
549 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
551 ts_info
->so_timestamping
= SOF_TIMESTAMPING_TX_SOFTWARE
|
552 SOF_TIMESTAMPING_RX_SOFTWARE
|
553 SOF_TIMESTAMPING_SOFTWARE
|
554 SOF_TIMESTAMPING_TX_HARDWARE
|
555 SOF_TIMESTAMPING_RX_HARDWARE
|
556 SOF_TIMESTAMPING_RAW_HARDWARE
;
558 if (adapter
->ptp
.ptp_clock
)
559 ts_info
->phc_index
= ptp_clock_index(adapter
->ptp
.ptp_clock
);
561 ts_info
->phc_index
= -1;
563 ts_info
->tx_types
= BIT(HWTSTAMP_TX_OFF
) |
564 BIT(HWTSTAMP_TX_ON
) |
565 BIT(HWTSTAMP_TX_ONESTEP_SYNC
);
566 ts_info
->rx_filters
= BIT(HWTSTAMP_FILTER_NONE
) |
567 BIT(HWTSTAMP_FILTER_ALL
);
571 static int lan743x_ethtool_get_eee(struct net_device
*netdev
,
572 struct ethtool_eee
*eee
)
574 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
575 struct phy_device
*phydev
= netdev
->phydev
;
582 netif_err(adapter
, drv
, adapter
->netdev
,
583 "Missing PHY Driver\n");
587 ret
= phy_ethtool_get_eee(phydev
, eee
);
591 buf
= lan743x_csr_read(adapter
, MAC_CR
);
592 if (buf
& MAC_CR_EEE_EN_
) {
593 eee
->eee_enabled
= true;
594 eee
->eee_active
= !!(eee
->advertised
& eee
->lp_advertised
);
595 eee
->tx_lpi_enabled
= true;
596 /* EEE_TX_LPI_REQ_DLY & tx_lpi_timer are same uSec unit */
597 buf
= lan743x_csr_read(adapter
, MAC_EEE_TX_LPI_REQ_DLY_CNT
);
598 eee
->tx_lpi_timer
= buf
;
600 eee
->eee_enabled
= false;
601 eee
->eee_active
= false;
602 eee
->tx_lpi_enabled
= false;
603 eee
->tx_lpi_timer
= 0;
609 static int lan743x_ethtool_set_eee(struct net_device
*netdev
,
610 struct ethtool_eee
*eee
)
612 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
613 struct phy_device
*phydev
= NULL
;
619 adapter
= netdev_priv(netdev
);
622 phydev
= netdev
->phydev
;
626 netif_err(adapter
, drv
, adapter
->netdev
,
627 "Missing PHY Driver\n");
631 if (eee
->eee_enabled
) {
632 ret
= phy_init_eee(phydev
, 0);
634 netif_err(adapter
, drv
, adapter
->netdev
,
635 "EEE initialization failed\n");
639 buf
= (u32
)eee
->tx_lpi_timer
;
640 lan743x_csr_write(adapter
, MAC_EEE_TX_LPI_REQ_DLY_CNT
, buf
);
642 buf
= lan743x_csr_read(adapter
, MAC_CR
);
643 buf
|= MAC_CR_EEE_EN_
;
644 lan743x_csr_write(adapter
, MAC_CR
, buf
);
646 buf
= lan743x_csr_read(adapter
, MAC_CR
);
647 buf
&= ~MAC_CR_EEE_EN_
;
648 lan743x_csr_write(adapter
, MAC_CR
, buf
);
651 return phy_ethtool_set_eee(phydev
, eee
);
655 static void lan743x_ethtool_get_wol(struct net_device
*netdev
,
656 struct ethtool_wolinfo
*wol
)
658 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
662 phy_ethtool_get_wol(netdev
->phydev
, wol
);
664 wol
->supported
|= WAKE_BCAST
| WAKE_UCAST
| WAKE_MCAST
|
665 WAKE_MAGIC
| WAKE_PHY
| WAKE_ARP
;
667 wol
->wolopts
|= adapter
->wolopts
;
670 static int lan743x_ethtool_set_wol(struct net_device
*netdev
,
671 struct ethtool_wolinfo
*wol
)
673 struct lan743x_adapter
*adapter
= netdev_priv(netdev
);
675 adapter
->wolopts
= 0;
676 if (wol
->wolopts
& WAKE_UCAST
)
677 adapter
->wolopts
|= WAKE_UCAST
;
678 if (wol
->wolopts
& WAKE_MCAST
)
679 adapter
->wolopts
|= WAKE_MCAST
;
680 if (wol
->wolopts
& WAKE_BCAST
)
681 adapter
->wolopts
|= WAKE_BCAST
;
682 if (wol
->wolopts
& WAKE_MAGIC
)
683 adapter
->wolopts
|= WAKE_MAGIC
;
684 if (wol
->wolopts
& WAKE_PHY
)
685 adapter
->wolopts
|= WAKE_PHY
;
686 if (wol
->wolopts
& WAKE_ARP
)
687 adapter
->wolopts
|= WAKE_ARP
;
689 device_set_wakeup_enable(&adapter
->pdev
->dev
, (bool)wol
->wolopts
);
691 phy_ethtool_set_wol(netdev
->phydev
, wol
);
695 #endif /* CONFIG_PM */
697 const struct ethtool_ops lan743x_ethtool_ops
= {
698 .get_drvinfo
= lan743x_ethtool_get_drvinfo
,
699 .get_msglevel
= lan743x_ethtool_get_msglevel
,
700 .set_msglevel
= lan743x_ethtool_set_msglevel
,
701 .get_link
= ethtool_op_get_link
,
703 .get_eeprom_len
= lan743x_ethtool_get_eeprom_len
,
704 .get_eeprom
= lan743x_ethtool_get_eeprom
,
705 .set_eeprom
= lan743x_ethtool_set_eeprom
,
706 .get_strings
= lan743x_ethtool_get_strings
,
707 .get_ethtool_stats
= lan743x_ethtool_get_ethtool_stats
,
708 .get_sset_count
= lan743x_ethtool_get_sset_count
,
709 .get_rxnfc
= lan743x_ethtool_get_rxnfc
,
710 .get_rxfh_key_size
= lan743x_ethtool_get_rxfh_key_size
,
711 .get_rxfh_indir_size
= lan743x_ethtool_get_rxfh_indir_size
,
712 .get_rxfh
= lan743x_ethtool_get_rxfh
,
713 .set_rxfh
= lan743x_ethtool_set_rxfh
,
714 .get_ts_info
= lan743x_ethtool_get_ts_info
,
715 .get_eee
= lan743x_ethtool_get_eee
,
716 .set_eee
= lan743x_ethtool_set_eee
,
717 .get_link_ksettings
= phy_ethtool_get_link_ksettings
,
718 .set_link_ksettings
= phy_ethtool_set_link_ksettings
,
720 .get_wol
= lan743x_ethtool_get_wol
,
721 .set_wol
= lan743x_ethtool_set_wol
,