18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright (c) 2013 Johannes Berg <johannes@sipsolutions.net>
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci *  This file is free software: you may copy, redistribute and/or modify it
58c2ecf20Sopenharmony_ci *  under the terms of the GNU General Public License as published by the
68c2ecf20Sopenharmony_ci *  Free Software Foundation, either version 2 of the License, or (at your
78c2ecf20Sopenharmony_ci *  option) any later version.
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci *  This file is distributed in the hope that it will be useful, but
108c2ecf20Sopenharmony_ci *  WITHOUT ANY WARRANTY; without even the implied warranty of
118c2ecf20Sopenharmony_ci *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
128c2ecf20Sopenharmony_ci *  General Public License for more details.
138c2ecf20Sopenharmony_ci *
148c2ecf20Sopenharmony_ci *  You should have received a copy of the GNU General Public License
158c2ecf20Sopenharmony_ci *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
168c2ecf20Sopenharmony_ci *
178c2ecf20Sopenharmony_ci * This file incorporates work covered by the following copyright and
188c2ecf20Sopenharmony_ci * permission notice:
198c2ecf20Sopenharmony_ci *
208c2ecf20Sopenharmony_ci * Copyright (c) 2012 Qualcomm Atheros, Inc.
218c2ecf20Sopenharmony_ci *
228c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any
238c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above
248c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies.
258c2ecf20Sopenharmony_ci *
268c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
278c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
288c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
298c2ecf20Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
308c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
318c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
328c2ecf20Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
338c2ecf20Sopenharmony_ci */
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#include <linux/pci.h>
368c2ecf20Sopenharmony_ci#include <linux/ip.h>
378c2ecf20Sopenharmony_ci#include <linux/tcp.h>
388c2ecf20Sopenharmony_ci#include <linux/netdevice.h>
398c2ecf20Sopenharmony_ci#include <linux/etherdevice.h>
408c2ecf20Sopenharmony_ci#include <linux/ethtool.h>
418c2ecf20Sopenharmony_ci#include <linux/mdio.h>
428c2ecf20Sopenharmony_ci#include <linux/interrupt.h>
438c2ecf20Sopenharmony_ci#include <asm/byteorder.h>
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci#include "alx.h"
468c2ecf20Sopenharmony_ci#include "reg.h"
478c2ecf20Sopenharmony_ci#include "hw.h"
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci/* The order of these strings must match the order of the fields in
508c2ecf20Sopenharmony_ci * struct alx_hw_stats
518c2ecf20Sopenharmony_ci * See hw.h
528c2ecf20Sopenharmony_ci */
538c2ecf20Sopenharmony_cistatic const char alx_gstrings_stats[][ETH_GSTRING_LEN] = {
548c2ecf20Sopenharmony_ci	"rx_packets",
558c2ecf20Sopenharmony_ci	"rx_bcast_packets",
568c2ecf20Sopenharmony_ci	"rx_mcast_packets",
578c2ecf20Sopenharmony_ci	"rx_pause_packets",
588c2ecf20Sopenharmony_ci	"rx_ctrl_packets",
598c2ecf20Sopenharmony_ci	"rx_fcs_errors",
608c2ecf20Sopenharmony_ci	"rx_length_errors",
618c2ecf20Sopenharmony_ci	"rx_bytes",
628c2ecf20Sopenharmony_ci	"rx_runt_packets",
638c2ecf20Sopenharmony_ci	"rx_fragments",
648c2ecf20Sopenharmony_ci	"rx_64B_or_less_packets",
658c2ecf20Sopenharmony_ci	"rx_65B_to_127B_packets",
668c2ecf20Sopenharmony_ci	"rx_128B_to_255B_packets",
678c2ecf20Sopenharmony_ci	"rx_256B_to_511B_packets",
688c2ecf20Sopenharmony_ci	"rx_512B_to_1023B_packets",
698c2ecf20Sopenharmony_ci	"rx_1024B_to_1518B_packets",
708c2ecf20Sopenharmony_ci	"rx_1519B_to_mtu_packets",
718c2ecf20Sopenharmony_ci	"rx_oversize_packets",
728c2ecf20Sopenharmony_ci	"rx_rxf_ov_drop_packets",
738c2ecf20Sopenharmony_ci	"rx_rrd_ov_drop_packets",
748c2ecf20Sopenharmony_ci	"rx_align_errors",
758c2ecf20Sopenharmony_ci	"rx_bcast_bytes",
768c2ecf20Sopenharmony_ci	"rx_mcast_bytes",
778c2ecf20Sopenharmony_ci	"rx_address_errors",
788c2ecf20Sopenharmony_ci	"tx_packets",
798c2ecf20Sopenharmony_ci	"tx_bcast_packets",
808c2ecf20Sopenharmony_ci	"tx_mcast_packets",
818c2ecf20Sopenharmony_ci	"tx_pause_packets",
828c2ecf20Sopenharmony_ci	"tx_exc_defer_packets",
838c2ecf20Sopenharmony_ci	"tx_ctrl_packets",
848c2ecf20Sopenharmony_ci	"tx_defer_packets",
858c2ecf20Sopenharmony_ci	"tx_bytes",
868c2ecf20Sopenharmony_ci	"tx_64B_or_less_packets",
878c2ecf20Sopenharmony_ci	"tx_65B_to_127B_packets",
888c2ecf20Sopenharmony_ci	"tx_128B_to_255B_packets",
898c2ecf20Sopenharmony_ci	"tx_256B_to_511B_packets",
908c2ecf20Sopenharmony_ci	"tx_512B_to_1023B_packets",
918c2ecf20Sopenharmony_ci	"tx_1024B_to_1518B_packets",
928c2ecf20Sopenharmony_ci	"tx_1519B_to_mtu_packets",
938c2ecf20Sopenharmony_ci	"tx_single_collision",
948c2ecf20Sopenharmony_ci	"tx_multiple_collisions",
958c2ecf20Sopenharmony_ci	"tx_late_collision",
968c2ecf20Sopenharmony_ci	"tx_abort_collision",
978c2ecf20Sopenharmony_ci	"tx_underrun",
988c2ecf20Sopenharmony_ci	"tx_trd_eop",
998c2ecf20Sopenharmony_ci	"tx_length_errors",
1008c2ecf20Sopenharmony_ci	"tx_trunc_packets",
1018c2ecf20Sopenharmony_ci	"tx_bcast_bytes",
1028c2ecf20Sopenharmony_ci	"tx_mcast_bytes",
1038c2ecf20Sopenharmony_ci	"tx_update",
1048c2ecf20Sopenharmony_ci};
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ci#define ALX_NUM_STATS ARRAY_SIZE(alx_gstrings_stats)
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_cistatic u32 alx_get_supported_speeds(struct alx_hw *hw)
1108c2ecf20Sopenharmony_ci{
1118c2ecf20Sopenharmony_ci	u32 supported = SUPPORTED_10baseT_Half |
1128c2ecf20Sopenharmony_ci			SUPPORTED_10baseT_Full |
1138c2ecf20Sopenharmony_ci			SUPPORTED_100baseT_Half |
1148c2ecf20Sopenharmony_ci			SUPPORTED_100baseT_Full;
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ci	if (alx_hw_giga(hw))
1178c2ecf20Sopenharmony_ci		supported |= SUPPORTED_1000baseT_Full;
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ci	BUILD_BUG_ON(SUPPORTED_10baseT_Half != ADVERTISED_10baseT_Half);
1208c2ecf20Sopenharmony_ci	BUILD_BUG_ON(SUPPORTED_10baseT_Full != ADVERTISED_10baseT_Full);
1218c2ecf20Sopenharmony_ci	BUILD_BUG_ON(SUPPORTED_100baseT_Half != ADVERTISED_100baseT_Half);
1228c2ecf20Sopenharmony_ci	BUILD_BUG_ON(SUPPORTED_100baseT_Full != ADVERTISED_100baseT_Full);
1238c2ecf20Sopenharmony_ci	BUILD_BUG_ON(SUPPORTED_1000baseT_Full != ADVERTISED_1000baseT_Full);
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ci	return supported;
1268c2ecf20Sopenharmony_ci}
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_cistatic int alx_get_link_ksettings(struct net_device *netdev,
1298c2ecf20Sopenharmony_ci				  struct ethtool_link_ksettings *cmd)
1308c2ecf20Sopenharmony_ci{
1318c2ecf20Sopenharmony_ci	struct alx_priv *alx = netdev_priv(netdev);
1328c2ecf20Sopenharmony_ci	struct alx_hw *hw = &alx->hw;
1338c2ecf20Sopenharmony_ci	u32 supported, advertising;
1348c2ecf20Sopenharmony_ci
1358c2ecf20Sopenharmony_ci	supported = SUPPORTED_Autoneg |
1368c2ecf20Sopenharmony_ci			  SUPPORTED_TP |
1378c2ecf20Sopenharmony_ci			  SUPPORTED_Pause |
1388c2ecf20Sopenharmony_ci			  SUPPORTED_Asym_Pause;
1398c2ecf20Sopenharmony_ci	if (alx_hw_giga(hw))
1408c2ecf20Sopenharmony_ci		supported |= SUPPORTED_1000baseT_Full;
1418c2ecf20Sopenharmony_ci	supported |= alx_get_supported_speeds(hw);
1428c2ecf20Sopenharmony_ci
1438c2ecf20Sopenharmony_ci	advertising = ADVERTISED_TP;
1448c2ecf20Sopenharmony_ci	if (hw->adv_cfg & ADVERTISED_Autoneg)
1458c2ecf20Sopenharmony_ci		advertising |= hw->adv_cfg;
1468c2ecf20Sopenharmony_ci
1478c2ecf20Sopenharmony_ci	cmd->base.port = PORT_TP;
1488c2ecf20Sopenharmony_ci	cmd->base.phy_address = 0;
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_ci	if (hw->adv_cfg & ADVERTISED_Autoneg)
1518c2ecf20Sopenharmony_ci		cmd->base.autoneg = AUTONEG_ENABLE;
1528c2ecf20Sopenharmony_ci	else
1538c2ecf20Sopenharmony_ci		cmd->base.autoneg = AUTONEG_DISABLE;
1548c2ecf20Sopenharmony_ci
1558c2ecf20Sopenharmony_ci	if (hw->flowctrl & ALX_FC_ANEG && hw->adv_cfg & ADVERTISED_Autoneg) {
1568c2ecf20Sopenharmony_ci		if (hw->flowctrl & ALX_FC_RX) {
1578c2ecf20Sopenharmony_ci			advertising |= ADVERTISED_Pause;
1588c2ecf20Sopenharmony_ci
1598c2ecf20Sopenharmony_ci			if (!(hw->flowctrl & ALX_FC_TX))
1608c2ecf20Sopenharmony_ci				advertising |= ADVERTISED_Asym_Pause;
1618c2ecf20Sopenharmony_ci		} else if (hw->flowctrl & ALX_FC_TX) {
1628c2ecf20Sopenharmony_ci			advertising |= ADVERTISED_Asym_Pause;
1638c2ecf20Sopenharmony_ci		}
1648c2ecf20Sopenharmony_ci	}
1658c2ecf20Sopenharmony_ci
1668c2ecf20Sopenharmony_ci	cmd->base.speed = hw->link_speed;
1678c2ecf20Sopenharmony_ci	cmd->base.duplex = hw->duplex;
1688c2ecf20Sopenharmony_ci
1698c2ecf20Sopenharmony_ci	ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
1708c2ecf20Sopenharmony_ci						supported);
1718c2ecf20Sopenharmony_ci	ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising,
1728c2ecf20Sopenharmony_ci						advertising);
1738c2ecf20Sopenharmony_ci
1748c2ecf20Sopenharmony_ci	return 0;
1758c2ecf20Sopenharmony_ci}
1768c2ecf20Sopenharmony_ci
1778c2ecf20Sopenharmony_cistatic int alx_set_link_ksettings(struct net_device *netdev,
1788c2ecf20Sopenharmony_ci				  const struct ethtool_link_ksettings *cmd)
1798c2ecf20Sopenharmony_ci{
1808c2ecf20Sopenharmony_ci	struct alx_priv *alx = netdev_priv(netdev);
1818c2ecf20Sopenharmony_ci	struct alx_hw *hw = &alx->hw;
1828c2ecf20Sopenharmony_ci	u32 adv_cfg;
1838c2ecf20Sopenharmony_ci	u32 advertising;
1848c2ecf20Sopenharmony_ci
1858c2ecf20Sopenharmony_ci	ASSERT_RTNL();
1868c2ecf20Sopenharmony_ci
1878c2ecf20Sopenharmony_ci	ethtool_convert_link_mode_to_legacy_u32(&advertising,
1888c2ecf20Sopenharmony_ci						cmd->link_modes.advertising);
1898c2ecf20Sopenharmony_ci
1908c2ecf20Sopenharmony_ci	if (cmd->base.autoneg == AUTONEG_ENABLE) {
1918c2ecf20Sopenharmony_ci		if (advertising & ~alx_get_supported_speeds(hw))
1928c2ecf20Sopenharmony_ci			return -EINVAL;
1938c2ecf20Sopenharmony_ci		adv_cfg = advertising | ADVERTISED_Autoneg;
1948c2ecf20Sopenharmony_ci	} else {
1958c2ecf20Sopenharmony_ci		adv_cfg = alx_speed_to_ethadv(cmd->base.speed,
1968c2ecf20Sopenharmony_ci					      cmd->base.duplex);
1978c2ecf20Sopenharmony_ci
1988c2ecf20Sopenharmony_ci		if (!adv_cfg || adv_cfg == ADVERTISED_1000baseT_Full)
1998c2ecf20Sopenharmony_ci			return -EINVAL;
2008c2ecf20Sopenharmony_ci	}
2018c2ecf20Sopenharmony_ci
2028c2ecf20Sopenharmony_ci	hw->adv_cfg = adv_cfg;
2038c2ecf20Sopenharmony_ci	return alx_setup_speed_duplex(hw, adv_cfg, hw->flowctrl);
2048c2ecf20Sopenharmony_ci}
2058c2ecf20Sopenharmony_ci
2068c2ecf20Sopenharmony_cistatic void alx_get_pauseparam(struct net_device *netdev,
2078c2ecf20Sopenharmony_ci			       struct ethtool_pauseparam *pause)
2088c2ecf20Sopenharmony_ci{
2098c2ecf20Sopenharmony_ci	struct alx_priv *alx = netdev_priv(netdev);
2108c2ecf20Sopenharmony_ci	struct alx_hw *hw = &alx->hw;
2118c2ecf20Sopenharmony_ci
2128c2ecf20Sopenharmony_ci	pause->autoneg = !!(hw->flowctrl & ALX_FC_ANEG &&
2138c2ecf20Sopenharmony_ci			    hw->adv_cfg & ADVERTISED_Autoneg);
2148c2ecf20Sopenharmony_ci	pause->tx_pause = !!(hw->flowctrl & ALX_FC_TX);
2158c2ecf20Sopenharmony_ci	pause->rx_pause = !!(hw->flowctrl & ALX_FC_RX);
2168c2ecf20Sopenharmony_ci}
2178c2ecf20Sopenharmony_ci
2188c2ecf20Sopenharmony_ci
2198c2ecf20Sopenharmony_cistatic int alx_set_pauseparam(struct net_device *netdev,
2208c2ecf20Sopenharmony_ci			      struct ethtool_pauseparam *pause)
2218c2ecf20Sopenharmony_ci{
2228c2ecf20Sopenharmony_ci	struct alx_priv *alx = netdev_priv(netdev);
2238c2ecf20Sopenharmony_ci	struct alx_hw *hw = &alx->hw;
2248c2ecf20Sopenharmony_ci	int err = 0;
2258c2ecf20Sopenharmony_ci	bool reconfig_phy = false;
2268c2ecf20Sopenharmony_ci	u8 fc = 0;
2278c2ecf20Sopenharmony_ci
2288c2ecf20Sopenharmony_ci	if (pause->tx_pause)
2298c2ecf20Sopenharmony_ci		fc |= ALX_FC_TX;
2308c2ecf20Sopenharmony_ci	if (pause->rx_pause)
2318c2ecf20Sopenharmony_ci		fc |= ALX_FC_RX;
2328c2ecf20Sopenharmony_ci	if (pause->autoneg)
2338c2ecf20Sopenharmony_ci		fc |= ALX_FC_ANEG;
2348c2ecf20Sopenharmony_ci
2358c2ecf20Sopenharmony_ci	ASSERT_RTNL();
2368c2ecf20Sopenharmony_ci
2378c2ecf20Sopenharmony_ci	/* restart auto-neg for auto-mode */
2388c2ecf20Sopenharmony_ci	if (hw->adv_cfg & ADVERTISED_Autoneg) {
2398c2ecf20Sopenharmony_ci		if (!((fc ^ hw->flowctrl) & ALX_FC_ANEG))
2408c2ecf20Sopenharmony_ci			reconfig_phy = true;
2418c2ecf20Sopenharmony_ci		if (fc & hw->flowctrl & ALX_FC_ANEG &&
2428c2ecf20Sopenharmony_ci		    (fc ^ hw->flowctrl) & (ALX_FC_RX | ALX_FC_TX))
2438c2ecf20Sopenharmony_ci			reconfig_phy = true;
2448c2ecf20Sopenharmony_ci	}
2458c2ecf20Sopenharmony_ci
2468c2ecf20Sopenharmony_ci	if (reconfig_phy) {
2478c2ecf20Sopenharmony_ci		err = alx_setup_speed_duplex(hw, hw->adv_cfg, fc);
2488c2ecf20Sopenharmony_ci		if (err)
2498c2ecf20Sopenharmony_ci			return err;
2508c2ecf20Sopenharmony_ci	}
2518c2ecf20Sopenharmony_ci
2528c2ecf20Sopenharmony_ci	/* flow control on mac */
2538c2ecf20Sopenharmony_ci	if ((fc ^ hw->flowctrl) & (ALX_FC_RX | ALX_FC_TX))
2548c2ecf20Sopenharmony_ci		alx_cfg_mac_flowcontrol(hw, fc);
2558c2ecf20Sopenharmony_ci
2568c2ecf20Sopenharmony_ci	hw->flowctrl = fc;
2578c2ecf20Sopenharmony_ci
2588c2ecf20Sopenharmony_ci	return 0;
2598c2ecf20Sopenharmony_ci}
2608c2ecf20Sopenharmony_ci
2618c2ecf20Sopenharmony_cistatic u32 alx_get_msglevel(struct net_device *netdev)
2628c2ecf20Sopenharmony_ci{
2638c2ecf20Sopenharmony_ci	struct alx_priv *alx = netdev_priv(netdev);
2648c2ecf20Sopenharmony_ci
2658c2ecf20Sopenharmony_ci	return alx->msg_enable;
2668c2ecf20Sopenharmony_ci}
2678c2ecf20Sopenharmony_ci
2688c2ecf20Sopenharmony_cistatic void alx_set_msglevel(struct net_device *netdev, u32 data)
2698c2ecf20Sopenharmony_ci{
2708c2ecf20Sopenharmony_ci	struct alx_priv *alx = netdev_priv(netdev);
2718c2ecf20Sopenharmony_ci
2728c2ecf20Sopenharmony_ci	alx->msg_enable = data;
2738c2ecf20Sopenharmony_ci}
2748c2ecf20Sopenharmony_ci
2758c2ecf20Sopenharmony_cistatic void alx_get_ethtool_stats(struct net_device *netdev,
2768c2ecf20Sopenharmony_ci				  struct ethtool_stats *estats, u64 *data)
2778c2ecf20Sopenharmony_ci{
2788c2ecf20Sopenharmony_ci	struct alx_priv *alx = netdev_priv(netdev);
2798c2ecf20Sopenharmony_ci	struct alx_hw *hw = &alx->hw;
2808c2ecf20Sopenharmony_ci
2818c2ecf20Sopenharmony_ci	spin_lock(&alx->stats_lock);
2828c2ecf20Sopenharmony_ci
2838c2ecf20Sopenharmony_ci	alx_update_hw_stats(hw);
2848c2ecf20Sopenharmony_ci	BUILD_BUG_ON(sizeof(hw->stats) != ALX_NUM_STATS * sizeof(u64));
2858c2ecf20Sopenharmony_ci	memcpy(data, &hw->stats, sizeof(hw->stats));
2868c2ecf20Sopenharmony_ci
2878c2ecf20Sopenharmony_ci	spin_unlock(&alx->stats_lock);
2888c2ecf20Sopenharmony_ci}
2898c2ecf20Sopenharmony_ci
2908c2ecf20Sopenharmony_cistatic void alx_get_strings(struct net_device *netdev, u32 stringset, u8 *buf)
2918c2ecf20Sopenharmony_ci{
2928c2ecf20Sopenharmony_ci	switch (stringset) {
2938c2ecf20Sopenharmony_ci	case ETH_SS_STATS:
2948c2ecf20Sopenharmony_ci		memcpy(buf, &alx_gstrings_stats, sizeof(alx_gstrings_stats));
2958c2ecf20Sopenharmony_ci		break;
2968c2ecf20Sopenharmony_ci	default:
2978c2ecf20Sopenharmony_ci		WARN_ON(1);
2988c2ecf20Sopenharmony_ci		break;
2998c2ecf20Sopenharmony_ci	}
3008c2ecf20Sopenharmony_ci}
3018c2ecf20Sopenharmony_ci
3028c2ecf20Sopenharmony_cistatic int alx_get_sset_count(struct net_device *netdev, int sset)
3038c2ecf20Sopenharmony_ci{
3048c2ecf20Sopenharmony_ci	switch (sset) {
3058c2ecf20Sopenharmony_ci	case ETH_SS_STATS:
3068c2ecf20Sopenharmony_ci		return ALX_NUM_STATS;
3078c2ecf20Sopenharmony_ci	default:
3088c2ecf20Sopenharmony_ci		return -EINVAL;
3098c2ecf20Sopenharmony_ci	}
3108c2ecf20Sopenharmony_ci}
3118c2ecf20Sopenharmony_ci
3128c2ecf20Sopenharmony_ciconst struct ethtool_ops alx_ethtool_ops = {
3138c2ecf20Sopenharmony_ci	.get_pauseparam	= alx_get_pauseparam,
3148c2ecf20Sopenharmony_ci	.set_pauseparam	= alx_set_pauseparam,
3158c2ecf20Sopenharmony_ci	.get_msglevel	= alx_get_msglevel,
3168c2ecf20Sopenharmony_ci	.set_msglevel	= alx_set_msglevel,
3178c2ecf20Sopenharmony_ci	.get_link	= ethtool_op_get_link,
3188c2ecf20Sopenharmony_ci	.get_strings	= alx_get_strings,
3198c2ecf20Sopenharmony_ci	.get_sset_count	= alx_get_sset_count,
3208c2ecf20Sopenharmony_ci	.get_ethtool_stats	= alx_get_ethtool_stats,
3218c2ecf20Sopenharmony_ci	.get_link_ksettings	= alx_get_link_ksettings,
3228c2ecf20Sopenharmony_ci	.set_link_ksettings	= alx_set_link_ksettings,
3238c2ecf20Sopenharmony_ci};
324