1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2017 - 2019 Pensando Systems, Inc */
4 #include <linux/module.h>
5 #include <linux/netdevice.h>
10 #include "ionic_lif.h"
11 #include "ionic_ethtool.h"
12 #include "ionic_stats.h"
14 static const char ionic_priv_flags_strings[][ETH_GSTRING_LEN] = {
15 #define IONIC_PRIV_F_SW_DBG_STATS BIT(0)
19 #define IONIC_PRIV_FLAGS_COUNT ARRAY_SIZE(ionic_priv_flags_strings)
21 static void ionic_get_stats_strings(struct ionic_lif *lif, u8 *buf)
25 for (i = 0; i < ionic_num_stats_grps; i++)
26 ionic_stats_groups[i].get_strings(lif, &buf);
29 static void ionic_get_stats(struct net_device *netdev,
30 struct ethtool_stats *stats, u64 *buf)
32 struct ionic_lif *lif;
35 lif = netdev_priv(netdev);
37 memset(buf, 0, stats->n_stats * sizeof(*buf));
38 for (i = 0; i < ionic_num_stats_grps; i++)
39 ionic_stats_groups[i].get_values(lif, &buf);
42 static int ionic_get_stats_count(struct ionic_lif *lif)
46 for (i = 0; i < ionic_num_stats_grps; i++)
47 num_stats += ionic_stats_groups[i].get_count(lif);
52 static int ionic_get_sset_count(struct net_device *netdev, int sset)
54 struct ionic_lif *lif = netdev_priv(netdev);
59 count = ionic_get_stats_count(lif);
61 case ETH_SS_PRIV_FLAGS:
62 count = IONIC_PRIV_FLAGS_COUNT;
68 static void ionic_get_strings(struct net_device *netdev,
71 struct ionic_lif *lif = netdev_priv(netdev);
75 ionic_get_stats_strings(lif, buf);
77 case ETH_SS_PRIV_FLAGS:
78 memcpy(buf, ionic_priv_flags_strings,
79 IONIC_PRIV_FLAGS_COUNT * ETH_GSTRING_LEN);
84 static void ionic_get_drvinfo(struct net_device *netdev,
85 struct ethtool_drvinfo *drvinfo)
87 struct ionic_lif *lif = netdev_priv(netdev);
88 struct ionic *ionic = lif->ionic;
90 strlcpy(drvinfo->driver, IONIC_DRV_NAME, sizeof(drvinfo->driver));
91 strlcpy(drvinfo->fw_version, ionic->idev.dev_info.fw_version,
92 sizeof(drvinfo->fw_version));
93 strlcpy(drvinfo->bus_info, ionic_bus_info(ionic),
94 sizeof(drvinfo->bus_info));
97 static int ionic_get_regs_len(struct net_device *netdev)
99 return (IONIC_DEV_INFO_REG_COUNT + IONIC_DEV_CMD_REG_COUNT) * sizeof(u32);
102 static void ionic_get_regs(struct net_device *netdev, struct ethtool_regs *regs,
105 struct ionic_lif *lif = netdev_priv(netdev);
108 regs->version = IONIC_DEV_CMD_REG_VERSION;
110 size = IONIC_DEV_INFO_REG_COUNT * sizeof(u32);
111 memcpy_fromio(p, lif->ionic->idev.dev_info_regs->words, size);
113 size = IONIC_DEV_CMD_REG_COUNT * sizeof(u32);
114 memcpy_fromio(p, lif->ionic->idev.dev_cmd_regs->words, size);
117 static int ionic_get_link_ksettings(struct net_device *netdev,
118 struct ethtool_link_ksettings *ks)
120 struct ionic_lif *lif = netdev_priv(netdev);
121 struct ionic_dev *idev = &lif->ionic->idev;
124 ethtool_link_ksettings_zero_link_mode(ks, supported);
126 /* The port_info data is found in a DMA space that the NIC keeps
127 * up-to-date, so there's no need to request the data from the
128 * NIC, we already have it in our memory space.
131 switch (le16_to_cpu(idev->port_info->status.xcvr.pid)) {
133 case IONIC_XCVR_PID_QSFP_100G_CR4:
134 ethtool_link_ksettings_add_link_mode(ks, supported,
138 case IONIC_XCVR_PID_QSFP_40GBASE_CR4:
139 ethtool_link_ksettings_add_link_mode(ks, supported,
143 case IONIC_XCVR_PID_SFP_25GBASE_CR_S:
144 case IONIC_XCVR_PID_SFP_25GBASE_CR_L:
145 case IONIC_XCVR_PID_SFP_25GBASE_CR_N:
146 ethtool_link_ksettings_add_link_mode(ks, supported,
150 case IONIC_XCVR_PID_SFP_10GBASE_AOC:
151 case IONIC_XCVR_PID_SFP_10GBASE_CU:
152 ethtool_link_ksettings_add_link_mode(ks, supported,
158 case IONIC_XCVR_PID_QSFP_100G_SR4:
159 case IONIC_XCVR_PID_QSFP_100G_AOC:
160 ethtool_link_ksettings_add_link_mode(ks, supported,
163 case IONIC_XCVR_PID_QSFP_100G_CWDM4:
164 case IONIC_XCVR_PID_QSFP_100G_PSM4:
165 case IONIC_XCVR_PID_QSFP_100G_LR4:
166 ethtool_link_ksettings_add_link_mode(ks, supported,
167 100000baseLR4_ER4_Full);
169 case IONIC_XCVR_PID_QSFP_100G_ER4:
170 ethtool_link_ksettings_add_link_mode(ks, supported,
171 100000baseLR4_ER4_Full);
173 case IONIC_XCVR_PID_QSFP_40GBASE_SR4:
174 case IONIC_XCVR_PID_QSFP_40GBASE_AOC:
175 ethtool_link_ksettings_add_link_mode(ks, supported,
178 case IONIC_XCVR_PID_QSFP_40GBASE_LR4:
179 ethtool_link_ksettings_add_link_mode(ks, supported,
182 case IONIC_XCVR_PID_SFP_25GBASE_SR:
183 case IONIC_XCVR_PID_SFP_25GBASE_AOC:
184 case IONIC_XCVR_PID_SFP_25GBASE_ACC:
185 ethtool_link_ksettings_add_link_mode(ks, supported,
188 case IONIC_XCVR_PID_SFP_10GBASE_SR:
189 ethtool_link_ksettings_add_link_mode(ks, supported,
192 case IONIC_XCVR_PID_SFP_10GBASE_LR:
193 ethtool_link_ksettings_add_link_mode(ks, supported,
196 case IONIC_XCVR_PID_SFP_10GBASE_LRM:
197 ethtool_link_ksettings_add_link_mode(ks, supported,
200 case IONIC_XCVR_PID_SFP_10GBASE_ER:
201 ethtool_link_ksettings_add_link_mode(ks, supported,
204 case IONIC_XCVR_PID_UNKNOWN:
205 /* This means there's no module plugged in */
208 dev_info(lif->ionic->dev, "unknown xcvr type pid=%d / 0x%x\n",
209 idev->port_info->status.xcvr.pid,
210 idev->port_info->status.xcvr.pid);
214 bitmap_copy(ks->link_modes.advertising, ks->link_modes.supported,
215 __ETHTOOL_LINK_MODE_MASK_NBITS);
217 ethtool_link_ksettings_add_link_mode(ks, supported, FEC_BASER);
218 ethtool_link_ksettings_add_link_mode(ks, supported, FEC_RS);
219 if (idev->port_info->config.fec_type == IONIC_PORT_FEC_TYPE_FC)
220 ethtool_link_ksettings_add_link_mode(ks, advertising, FEC_BASER);
221 else if (idev->port_info->config.fec_type == IONIC_PORT_FEC_TYPE_RS)
222 ethtool_link_ksettings_add_link_mode(ks, advertising, FEC_RS);
224 ethtool_link_ksettings_add_link_mode(ks, supported, FIBRE);
225 ethtool_link_ksettings_add_link_mode(ks, supported, Pause);
227 if (idev->port_info->status.xcvr.phy == IONIC_PHY_TYPE_COPPER ||
229 ks->base.port = PORT_DA;
230 else if (idev->port_info->status.xcvr.phy == IONIC_PHY_TYPE_FIBER)
231 ks->base.port = PORT_FIBRE;
233 ks->base.port = PORT_NONE;
235 if (ks->base.port != PORT_NONE) {
236 ks->base.speed = le32_to_cpu(lif->info->status.link_speed);
238 if (le16_to_cpu(lif->info->status.link_status))
239 ks->base.duplex = DUPLEX_FULL;
241 ks->base.duplex = DUPLEX_UNKNOWN;
243 ethtool_link_ksettings_add_link_mode(ks, supported, Autoneg);
245 if (idev->port_info->config.an_enable) {
246 ethtool_link_ksettings_add_link_mode(ks, advertising,
248 ks->base.autoneg = AUTONEG_ENABLE;
255 static int ionic_set_link_ksettings(struct net_device *netdev,
256 const struct ethtool_link_ksettings *ks)
258 struct ionic_lif *lif = netdev_priv(netdev);
259 struct ionic *ionic = lif->ionic;
260 struct ionic_dev *idev;
263 idev = &lif->ionic->idev;
266 if (ks->base.autoneg != idev->port_info->config.an_enable) {
267 mutex_lock(&ionic->dev_cmd_lock);
268 ionic_dev_cmd_port_autoneg(idev, ks->base.autoneg);
269 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT);
270 mutex_unlock(&ionic->dev_cmd_lock);
276 if (ks->base.speed != le32_to_cpu(idev->port_info->config.speed)) {
277 mutex_lock(&ionic->dev_cmd_lock);
278 ionic_dev_cmd_port_speed(idev, ks->base.speed);
279 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT);
280 mutex_unlock(&ionic->dev_cmd_lock);
288 static void ionic_get_pauseparam(struct net_device *netdev,
289 struct ethtool_pauseparam *pause)
291 struct ionic_lif *lif = netdev_priv(netdev);
296 pause_type = lif->ionic->idev.port_info->config.pause_type;
298 pause->rx_pause = pause_type & IONIC_PAUSE_F_RX ? 1 : 0;
299 pause->tx_pause = pause_type & IONIC_PAUSE_F_TX ? 1 : 0;
303 static int ionic_set_pauseparam(struct net_device *netdev,
304 struct ethtool_pauseparam *pause)
306 struct ionic_lif *lif = netdev_priv(netdev);
307 struct ionic *ionic = lif->ionic;
314 /* change both at the same time */
315 requested_pause = IONIC_PORT_PAUSE_TYPE_LINK;
317 requested_pause |= IONIC_PAUSE_F_RX;
319 requested_pause |= IONIC_PAUSE_F_TX;
321 if (requested_pause == lif->ionic->idev.port_info->config.pause_type)
324 mutex_lock(&ionic->dev_cmd_lock);
325 ionic_dev_cmd_port_pause(&lif->ionic->idev, requested_pause);
326 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT);
327 mutex_unlock(&ionic->dev_cmd_lock);
334 static int ionic_get_fecparam(struct net_device *netdev,
335 struct ethtool_fecparam *fec)
337 struct ionic_lif *lif = netdev_priv(netdev);
339 switch (lif->ionic->idev.port_info->config.fec_type) {
340 case IONIC_PORT_FEC_TYPE_NONE:
341 fec->active_fec = ETHTOOL_FEC_OFF;
343 case IONIC_PORT_FEC_TYPE_RS:
344 fec->active_fec = ETHTOOL_FEC_RS;
346 case IONIC_PORT_FEC_TYPE_FC:
347 fec->active_fec = ETHTOOL_FEC_BASER;
351 fec->fec = ETHTOOL_FEC_OFF | ETHTOOL_FEC_RS | ETHTOOL_FEC_BASER;
356 static int ionic_set_fecparam(struct net_device *netdev,
357 struct ethtool_fecparam *fec)
359 struct ionic_lif *lif = netdev_priv(netdev);
363 if (lif->ionic->idev.port_info->config.an_enable) {
364 netdev_err(netdev, "FEC request not allowed while autoneg is enabled\n");
369 case ETHTOOL_FEC_NONE:
370 fec_type = IONIC_PORT_FEC_TYPE_NONE;
372 case ETHTOOL_FEC_OFF:
373 fec_type = IONIC_PORT_FEC_TYPE_NONE;
376 fec_type = IONIC_PORT_FEC_TYPE_RS;
378 case ETHTOOL_FEC_BASER:
379 fec_type = IONIC_PORT_FEC_TYPE_FC;
381 case ETHTOOL_FEC_AUTO:
383 netdev_err(netdev, "FEC request 0x%04x not supported\n",
388 if (fec_type != lif->ionic->idev.port_info->config.fec_type) {
389 mutex_lock(&lif->ionic->dev_cmd_lock);
390 ionic_dev_cmd_port_fec(&lif->ionic->idev, fec_type);
391 ret = ionic_dev_cmd_wait(lif->ionic, DEVCMD_TIMEOUT);
392 mutex_unlock(&lif->ionic->dev_cmd_lock);
398 static int ionic_get_coalesce(struct net_device *netdev,
399 struct ethtool_coalesce *coalesce)
401 struct ionic_lif *lif = netdev_priv(netdev);
403 /* Tx uses Rx interrupt */
404 coalesce->tx_coalesce_usecs = lif->rx_coalesce_usecs;
405 coalesce->rx_coalesce_usecs = lif->rx_coalesce_usecs;
410 static int ionic_set_coalesce(struct net_device *netdev,
411 struct ethtool_coalesce *coalesce)
413 struct ionic_lif *lif = netdev_priv(netdev);
414 struct ionic_identity *ident;
415 struct ionic_qcq *qcq;
419 ident = &lif->ionic->ident;
420 if (ident->dev.intr_coal_div == 0) {
421 netdev_warn(netdev, "bad HW value in dev.intr_coal_div = %d\n",
422 ident->dev.intr_coal_div);
426 /* Tx uses Rx interrupt, so only change Rx */
427 if (coalesce->tx_coalesce_usecs != lif->rx_coalesce_usecs) {
428 netdev_warn(netdev, "only the rx-usecs can be changed\n");
432 /* Convert the usec request to a HW useable value. If they asked
433 * for non-zero and it resolved to zero, bump it up
435 coal = ionic_coal_usec_to_hw(lif->ionic, coalesce->rx_coalesce_usecs);
436 if (!coal && coalesce->rx_coalesce_usecs)
439 if (coal > IONIC_INTR_CTRL_COAL_MAX)
442 /* Save the new value */
443 lif->rx_coalesce_usecs = coalesce->rx_coalesce_usecs;
444 if (coal != lif->rx_coalesce_hw) {
445 lif->rx_coalesce_hw = coal;
447 if (test_bit(IONIC_LIF_F_UP, lif->state)) {
448 for (i = 0; i < lif->nxqs; i++) {
449 qcq = lif->rxqcqs[i].qcq;
450 ionic_intr_coal_init(lif->ionic->idev.intr_ctrl,
452 lif->rx_coalesce_hw);
460 static void ionic_get_ringparam(struct net_device *netdev,
461 struct ethtool_ringparam *ring)
463 struct ionic_lif *lif = netdev_priv(netdev);
465 ring->tx_max_pending = IONIC_MAX_TX_DESC;
466 ring->tx_pending = lif->ntxq_descs;
467 ring->rx_max_pending = IONIC_MAX_RX_DESC;
468 ring->rx_pending = lif->nrxq_descs;
471 static int ionic_set_ringparam(struct net_device *netdev,
472 struct ethtool_ringparam *ring)
474 struct ionic_lif *lif = netdev_priv(netdev);
478 if (ring->rx_mini_pending || ring->rx_jumbo_pending) {
479 netdev_info(netdev, "Changing jumbo or mini descriptors not supported\n");
483 if (!is_power_of_2(ring->tx_pending) ||
484 !is_power_of_2(ring->rx_pending)) {
485 netdev_info(netdev, "Descriptor count must be a power of 2\n");
489 /* if nothing to do return success */
490 if (ring->tx_pending == lif->ntxq_descs &&
491 ring->rx_pending == lif->nrxq_descs)
494 err = ionic_wait_for_bit(lif, IONIC_LIF_F_QUEUE_RESET);
498 running = test_bit(IONIC_LIF_F_UP, lif->state);
502 lif->ntxq_descs = ring->tx_pending;
503 lif->nrxq_descs = ring->rx_pending;
507 clear_bit(IONIC_LIF_F_QUEUE_RESET, lif->state);
512 static void ionic_get_channels(struct net_device *netdev,
513 struct ethtool_channels *ch)
515 struct ionic_lif *lif = netdev_priv(netdev);
517 /* report maximum channels */
518 ch->max_combined = lif->ionic->ntxqs_per_lif;
520 /* report current channels */
521 ch->combined_count = lif->nxqs;
524 static int ionic_set_channels(struct net_device *netdev,
525 struct ethtool_channels *ch)
527 struct ionic_lif *lif = netdev_priv(netdev);
531 if (!ch->combined_count || ch->other_count ||
532 ch->rx_count || ch->tx_count)
535 if (ch->combined_count == lif->nxqs)
538 err = ionic_wait_for_bit(lif, IONIC_LIF_F_QUEUE_RESET);
542 running = test_bit(IONIC_LIF_F_UP, lif->state);
546 lif->nxqs = ch->combined_count;
550 clear_bit(IONIC_LIF_F_QUEUE_RESET, lif->state);
555 static u32 ionic_get_priv_flags(struct net_device *netdev)
557 struct ionic_lif *lif = netdev_priv(netdev);
560 if (test_bit(IONIC_LIF_F_SW_DEBUG_STATS, lif->state))
561 priv_flags |= IONIC_PRIV_F_SW_DBG_STATS;
566 static int ionic_set_priv_flags(struct net_device *netdev, u32 priv_flags)
568 struct ionic_lif *lif = netdev_priv(netdev);
570 clear_bit(IONIC_LIF_F_SW_DEBUG_STATS, lif->state);
571 if (priv_flags & IONIC_PRIV_F_SW_DBG_STATS)
572 set_bit(IONIC_LIF_F_SW_DEBUG_STATS, lif->state);
577 static int ionic_get_rxnfc(struct net_device *netdev,
578 struct ethtool_rxnfc *info, u32 *rules)
580 struct ionic_lif *lif = netdev_priv(netdev);
584 case ETHTOOL_GRXRINGS:
585 info->data = lif->nxqs;
588 netdev_err(netdev, "Command parameter %d is not supported\n",
596 static u32 ionic_get_rxfh_indir_size(struct net_device *netdev)
598 struct ionic_lif *lif = netdev_priv(netdev);
600 return le16_to_cpu(lif->ionic->ident.lif.eth.rss_ind_tbl_sz);
603 static u32 ionic_get_rxfh_key_size(struct net_device *netdev)
605 return IONIC_RSS_HASH_KEY_SIZE;
608 static int ionic_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
611 struct ionic_lif *lif = netdev_priv(netdev);
612 unsigned int i, tbl_sz;
615 tbl_sz = le16_to_cpu(lif->ionic->ident.lif.eth.rss_ind_tbl_sz);
616 for (i = 0; i < tbl_sz; i++)
617 indir[i] = lif->rss_ind_tbl[i];
621 memcpy(key, lif->rss_hash_key, IONIC_RSS_HASH_KEY_SIZE);
624 *hfunc = ETH_RSS_HASH_TOP;
629 static int ionic_set_rxfh(struct net_device *netdev, const u32 *indir,
630 const u8 *key, const u8 hfunc)
632 struct ionic_lif *lif = netdev_priv(netdev);
635 if (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP)
638 err = ionic_lif_rss_config(lif, lif->rss_types, key, indir);
645 static int ionic_set_tunable(struct net_device *dev,
646 const struct ethtool_tunable *tuna,
649 struct ionic_lif *lif = netdev_priv(dev);
652 case ETHTOOL_RX_COPYBREAK:
653 lif->rx_copybreak = *(u32 *)data;
662 static int ionic_get_tunable(struct net_device *netdev,
663 const struct ethtool_tunable *tuna, void *data)
665 struct ionic_lif *lif = netdev_priv(netdev);
668 case ETHTOOL_RX_COPYBREAK:
669 *(u32 *)data = lif->rx_copybreak;
678 static int ionic_get_module_info(struct net_device *netdev,
679 struct ethtool_modinfo *modinfo)
682 struct ionic_lif *lif = netdev_priv(netdev);
683 struct ionic_dev *idev = &lif->ionic->idev;
684 struct ionic_xcvr_status *xcvr;
685 struct sfp_eeprom_base *sfp;
687 xcvr = &idev->port_info->status.xcvr;
688 sfp = (struct sfp_eeprom_base *) xcvr->sprom;
690 /* report the module data type and length */
691 switch (sfp->phys_id) {
693 modinfo->type = ETH_MODULE_SFF_8079;
694 modinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN;
696 case SFF8024_ID_QSFP_8436_8636:
697 case SFF8024_ID_QSFP28_8636:
698 modinfo->type = ETH_MODULE_SFF_8436;
699 modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN;
702 netdev_info(netdev, "unknown xcvr type 0x%02x\n",
705 modinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN;
712 static int ionic_get_module_eeprom(struct net_device *netdev,
713 struct ethtool_eeprom *ee,
716 struct ionic_lif *lif = netdev_priv(netdev);
717 struct ionic_dev *idev = &lif->ionic->idev;
718 struct ionic_xcvr_status *xcvr;
719 char tbuf[sizeof(xcvr->sprom)];
723 /* The NIC keeps the module prom up-to-date in the DMA space
724 * so we can simply copy the module bytes into the data buffer.
726 xcvr = &idev->port_info->status.xcvr;
727 len = min_t(u32, sizeof(xcvr->sprom), ee->len);
730 memcpy(data, xcvr->sprom, len);
731 memcpy(tbuf, xcvr->sprom, len);
733 /* Let's make sure we got a consistent copy */
734 if (!memcmp(data, tbuf, len))
745 static int ionic_nway_reset(struct net_device *netdev)
747 struct ionic_lif *lif = netdev_priv(netdev);
748 struct ionic *ionic = lif->ionic;
751 /* flap the link to force auto-negotiation */
753 mutex_lock(&ionic->dev_cmd_lock);
755 ionic_dev_cmd_port_state(&ionic->idev, IONIC_PORT_ADMIN_STATE_DOWN);
756 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT);
759 ionic_dev_cmd_port_state(&ionic->idev, IONIC_PORT_ADMIN_STATE_UP);
760 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT);
763 mutex_unlock(&ionic->dev_cmd_lock);
768 static const struct ethtool_ops ionic_ethtool_ops = {
769 .supported_coalesce_params = ETHTOOL_COALESCE_USECS,
770 .get_drvinfo = ionic_get_drvinfo,
771 .get_regs_len = ionic_get_regs_len,
772 .get_regs = ionic_get_regs,
773 .get_link = ethtool_op_get_link,
774 .get_link_ksettings = ionic_get_link_ksettings,
775 .set_link_ksettings = ionic_set_link_ksettings,
776 .get_coalesce = ionic_get_coalesce,
777 .set_coalesce = ionic_set_coalesce,
778 .get_ringparam = ionic_get_ringparam,
779 .set_ringparam = ionic_set_ringparam,
780 .get_channels = ionic_get_channels,
781 .set_channels = ionic_set_channels,
782 .get_strings = ionic_get_strings,
783 .get_ethtool_stats = ionic_get_stats,
784 .get_sset_count = ionic_get_sset_count,
785 .get_priv_flags = ionic_get_priv_flags,
786 .set_priv_flags = ionic_set_priv_flags,
787 .get_rxnfc = ionic_get_rxnfc,
788 .get_rxfh_indir_size = ionic_get_rxfh_indir_size,
789 .get_rxfh_key_size = ionic_get_rxfh_key_size,
790 .get_rxfh = ionic_get_rxfh,
791 .set_rxfh = ionic_set_rxfh,
792 .get_tunable = ionic_get_tunable,
793 .set_tunable = ionic_set_tunable,
794 .get_module_info = ionic_get_module_info,
795 .get_module_eeprom = ionic_get_module_eeprom,
796 .get_pauseparam = ionic_get_pauseparam,
797 .set_pauseparam = ionic_set_pauseparam,
798 .get_fecparam = ionic_get_fecparam,
799 .set_fecparam = ionic_set_fecparam,
800 .nway_reset = ionic_nway_reset,
803 void ionic_ethtool_set_ops(struct net_device *netdev)
805 netdev->ethtool_ops = &ionic_ethtool_ops;