From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sean Wang <sean.wang@mediatek.com>,
Mark Lee <mark-mc.lee@mediatek.com>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.14 16/27] net: ethernet: mediatek: Use hw_feature to judge if HWLRO is supported
Date: Fri, 14 Jun 2019 16:30:05 -0400 [thread overview]
Message-ID: <20190614203018.27686-16-sashal@kernel.org> (raw)
In-Reply-To: <20190614203018.27686-1-sashal@kernel.org>
From: Sean Wang <sean.wang@mediatek.com>
[ Upstream commit 9e4f56f1a7f3287718d0083b5cb85298dc05a5fd ]
Should hw_feature as hardware capability flags to check if hardware LRO
got support.
Signed-off-by: Mark Lee <mark-mc.lee@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 3fd71cf5cd60..5208bf61df10 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2304,13 +2304,13 @@ static int mtk_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
switch (cmd->cmd) {
case ETHTOOL_GRXRINGS:
- if (dev->features & NETIF_F_LRO) {
+ if (dev->hw_features & NETIF_F_LRO) {
cmd->data = MTK_MAX_RX_RING_NUM;
ret = 0;
}
break;
case ETHTOOL_GRXCLSRLCNT:
- if (dev->features & NETIF_F_LRO) {
+ if (dev->hw_features & NETIF_F_LRO) {
struct mtk_mac *mac = netdev_priv(dev);
cmd->rule_cnt = mac->hwlro_ip_cnt;
@@ -2318,11 +2318,11 @@ static int mtk_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
}
break;
case ETHTOOL_GRXCLSRULE:
- if (dev->features & NETIF_F_LRO)
+ if (dev->hw_features & NETIF_F_LRO)
ret = mtk_hwlro_get_fdir_entry(dev, cmd);
break;
case ETHTOOL_GRXCLSRLALL:
- if (dev->features & NETIF_F_LRO)
+ if (dev->hw_features & NETIF_F_LRO)
ret = mtk_hwlro_get_fdir_all(dev, cmd,
rule_locs);
break;
@@ -2339,11 +2339,11 @@ static int mtk_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
switch (cmd->cmd) {
case ETHTOOL_SRXCLSRLINS:
- if (dev->features & NETIF_F_LRO)
+ if (dev->hw_features & NETIF_F_LRO)
ret = mtk_hwlro_add_ipaddr(dev, cmd);
break;
case ETHTOOL_SRXCLSRLDEL:
- if (dev->features & NETIF_F_LRO)
+ if (dev->hw_features & NETIF_F_LRO)
ret = mtk_hwlro_del_ipaddr(dev, cmd);
break;
default:
--
2.20.1
next prev parent reply other threads:[~2019-06-14 20:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 20:29 [PATCH AUTOSEL 4.14 01/27] ARC: fix build warnings Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.14 02/27] ARC: [plat-hsdk]: Add missing multicast filter bins number to GMAC node Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.14 03/27] ARC: [plat-hsdk]: Add missing FIFO size entry in " Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.14 04/27] parport: Fix mem leak in parport_register_dev_model Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.14 05/27] parisc: Fix compiler warnings in float emulation code Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.14 06/27] IB/rdmavt: Fix alloc_qpn() WARN_ON() Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.14 07/27] IB/hfi1: Insure freeze_work work_struct is canceled on shutdown Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.14 08/27] IB/{qib, hfi1, rdmavt}: Correct ibv_devinfo max_mr value Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.14 09/27] IB/hfi1: Validate page aligned for a given virtual address Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.14 10/27] MIPS: uprobes: remove set but not used variable 'epc' Sasha Levin
2019-06-14 20:30 ` [PATCH AUTOSEL 4.14 11/27] xtensa: Fix section mismatch between memblock_reserve and mem_reserve Sasha Levin
2019-06-14 20:30 ` [PATCH AUTOSEL 4.14 12/27] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0 Sasha Levin
2019-06-14 20:30 ` [PATCH AUTOSEL 4.14 13/27] net: hns: Fix loopback test failed at copper ports Sasha Levin
2019-06-14 20:30 ` [PATCH AUTOSEL 4.14 14/27] mdesc: fix a missing-check bug in get_vdev_port_node_info() Sasha Levin
2019-06-14 20:30 ` [PATCH AUTOSEL 4.14 15/27] sparc: perf: fix updated event period in response to PERF_EVENT_IOC_PERIOD Sasha Levin
2019-06-14 20:30 ` Sasha Levin [this message]
2019-06-14 20:30 ` [PATCH AUTOSEL 4.14 17/27] net: ethernet: mediatek: Use NET_IP_ALIGN to judge if HW RX_2BYTE_OFFSET is enabled Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190614203018.27686-16-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mark-mc.lee@mediatek.com \
--cc=netdev@vger.kernel.org \
--cc=sean.wang@mediatek.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).