Commit 24654f09 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller
Browse files

bnxt_en: Don't set ETS on unused TCs.



Currently, the code allows ETS bandwidth weight 0 to be set on unused TCs.
We should not set any DCB parameters on unused TCs at all.

Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e37fed79
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -471,6 +471,9 @@ static int bnxt_ets_validate(struct bnxt *bp, struct ieee_ets *ets, u8 *tc)
	if (total_ets_bw > 100)
		return -EINVAL;

	if (max_tc >= bp->max_tc)
		*tc = bp->max_tc;
	else
		*tc = max_tc + 1;
	return 0;
}