From 2ad30e2633430717dbdf857962ba0c697dc471ef Mon Sep 17 00:00:00 2001 From: Mark Rustad Date: Tue, 20 Sep 2011 03:00:27 +0000 Subject: [PATCH] ixgbe: Fix PFC mask generation Fix PFC mask generation to OR in only a single bit for each priority in the PFC mask returned via netlink. Signed-off-by: Mark Rustad Tested-by: Ross Brattain Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c index 83bf7cc3fbf..3d44b15fb28 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c @@ -184,7 +184,7 @@ void ixgbe_dcb_unpack_pfc(struct ixgbe_dcb_config *cfg, u8 *pfc_en) *pfc_en = 0; for (i = 0; i < MAX_TRAFFIC_CLASS; i++) - *pfc_en |= (cfg->tc_config[i].dcb_pfc & 0xF) << i; + *pfc_en |= !!(cfg->tc_config[i].dcb_pfc & 0xF) << i; } void ixgbe_dcb_unpack_refill(struct ixgbe_dcb_config *cfg, int direction, -- 2.39.5