lkml.org 
[lkml]   [2019]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 53/90] net: ethernet: mediatek: Use hw_feature to judge if HWLRO is supported
    Date
    [ 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 6e6abdc399de..0c70fb345f83 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


    \
     
     \ /
      Last update: 2019-06-24 12:07    [W:4.026 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site