Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2251820ybd; Mon, 24 Jun 2019 03:20:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlU/0jNfqkMzF5L1uOPdkj4TCHvCKEpKhLXf1BeHgoLQXTGAlftSnMywh2lDuHsIEZOAEy X-Received: by 2002:a17:90a:a404:: with SMTP id y4mr24725379pjp.58.1561371601570; Mon, 24 Jun 2019 03:20:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561371601; cv=none; d=google.com; s=arc-20160816; b=SJMc6kMfuKZvfdkB5APxGkWnM9ebMuCVMVFYKJWXjIZ14eHMz8AsN29PpcYo45eNFE VOsO2cV9HAH+EnFKCFSDZfvFNC746HXnW9r4IJfjO0dR0ovttgiElRF6oFm0lW2TIjRW /viwuwILdivD/WFTk6XNnemV+cm4AmbiTwNcb6t5wKAJC77jyfrY0SIPSDszkabYRRus AeCv/URK4G05EySiUqePEKEldL62CgnZNC5SEw8lGxQ1hnkPrwL5/HoV7KSHJIF0gPiG /Rm94cY3QBsiqMX8LCYbcD2RDIEkWbNJk1RbQZj1zMLFLsKkXL6BpJbn2cpKxhYrsIjQ dyTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0+vWtJRo6qcRNX5308iR44mTnFDxozy20kVzu4mi/qQ=; b=cvOUF6a7pUxHRcB72i1zkqi1lmzEv42n7Lugrpu/gJvo8cQ2KWkGrGxaFSudq5jT59 UZHVJUB0htGDG6xeQDl1uodDQjo740yZWVeJouaM147v0UkiqOlXKs4iHHTkeN/QN82K h22QTlY9UxdxSIwGv4i62F1WWATsd7SixoARXE4vcvCNxQ9fEypoRyJSNERAJcx5n9uL Ax/9h7lw0JNQ0oom8AwHvF7aIGdxgKsKPWphGyytDD37eH8TD4Teu9lHBekl+m3q0o7v QYSI9bptonCLl9hEFfwUFzyQltahPljvXf4EFVVzm50C6XdGy2LMF5yNClpVrMW7Ps0c zeYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pzoQ+WAT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si10679824pfe.22.2019.06.24.03.19.46; Mon, 24 Jun 2019 03:20:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pzoQ+WAT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730753AbfFXKSu (ORCPT + 99 others); Mon, 24 Jun 2019 06:18:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:53094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730084AbfFXKPp (ORCPT ); Mon, 24 Jun 2019 06:15:45 -0400 Received: from localhost (f4.8f.5177.ip4.static.sl-reverse.com [119.81.143.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 17D58205ED; Mon, 24 Jun 2019 10:15:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561371344; bh=wmC6sIKsGuYIVEGrslgGVmYB1d51672VeR1UWq/sook=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pzoQ+WATQamKZISpr7+KQZYWrsonvJ/IBKI0Ed5WRQ//4KPYa7mhLr+VmGw80YGEh 6j1u9KJ5Pg7JoZpZd3jmqyT+rBYCGGMMGXSXCRiUKTsrDiwk/yEg2KYAHsr6B8oRPU B6Qty0UefSKSddlu0dpI9+lrczGdVpUNbPVYC6dg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Lee , Sean Wang , "David S. Miller" , Sasha Levin Subject: [PATCH 5.1 067/121] net: ethernet: mediatek: Use hw_feature to judge if HWLRO is supported Date: Mon, 24 Jun 2019 17:56:39 +0800 Message-Id: <20190624092324.278858135@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092320.652599624@linuxfoundation.org> References: <20190624092320.652599624@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 9e4f56f1a7f3287718d0083b5cb85298dc05a5fd ] Should hw_feature as hardware capability flags to check if hardware LRO got support. Signed-off-by: Mark Lee Signed-off-by: Sean Wang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 549d36497b8c..59601cb5aeee 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -2297,13 +2297,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; @@ -2311,11 +2311,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; @@ -2332,11 +2332,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