bnxt_en: Clear TPA flags when BNXT_FLAG_NO_AGG_RINGS is set.
authorMichael Chan <michael.chan@broadcom.com>
Fri, 13 Jan 2017 06:32:01 +0000 (01:32 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Jan 2017 04:21:31 +0000 (23:21 -0500)
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 <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index c0918507fdb4ed1584c44e5379c4cd81c45532ab..df2358bb05e15ecd9b2bd8fb57e154b06697a3c6 100644 (file)
@@ -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)