ixgbe: Fix PFC mask generation
authorMark Rustad <mark.d.rustad@intel.com>
Tue, 20 Sep 2011 03:00:27 +0000 (03:00 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 6 Oct 2011 10:18:46 +0000 (03:18 -0700)
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 <mark.d.rustad@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c

index 83bf7cc3fbf05c471ae7c957e85bd8ef3ed92684..3d44b15fb2862b2c6b72d6284bfb2fd3f2a601b0 100644 (file)
@@ -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,