From: Michael Chan Date: Fri, 13 Jan 2017 06:32:01 +0000 (-0500) Subject: bnxt_en: Clear TPA flags when BNXT_FLAG_NO_AGG_RINGS is set. X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=341138c3e6afa8e77f9f3e773d72b37022dbcee8;p=openwrt%2Fstaging%2Fblogic.git bnxt_en: Clear TPA flags when BNXT_FLAG_NO_AGG_RINGS is set. Commit bdbd1eb59c56 ("bnxt_en: Handle no aggregation ring gracefully.") introduced the BNXT_FLAG_NO_AGG_RINGS flag. For consistency, bnxt_set_tpa_flags() should also clear TPA flags when there are no aggregation rings. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index c0918507fdb4..df2358bb05e1 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -2467,6 +2467,8 @@ static int bnxt_calc_nr_ring_pages(u32 ring_size, int desc_per_pg) static void bnxt_set_tpa_flags(struct bnxt *bp) { bp->flags &= ~BNXT_FLAG_TPA; + if (bp->flags & BNXT_FLAG_NO_AGG_RINGS) + return; if (bp->dev->features & NETIF_F_LRO) bp->flags |= BNXT_FLAG_LRO; if (bp->dev->features & NETIF_F_GRO)