diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c index 005e5f25600d..79a92fe987b9 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | |||
@@ -112,6 +112,8 @@ static u8 ixgbe_dcbnl_get_state(struct net_device *netdev) | |||
112 | static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | 112 | static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) |
113 | { | 113 | { |
114 | u8 err = 0; | 114 | u8 err = 0; |
115 | u8 prio_tc[MAX_USER_PRIORITY] = {0}; | ||
116 | int i; | ||
115 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 117 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
116 | 118 | ||
117 | /* Fail command if not in CEE mode */ | 119 | /* Fail command if not in CEE mode */ |
@@ -122,10 +124,15 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | |||
122 | if (!!state != !(adapter->flags & IXGBE_FLAG_DCB_ENABLED)) | 124 | if (!!state != !(adapter->flags & IXGBE_FLAG_DCB_ENABLED)) |
123 | return err; | 125 | return err; |
124 | 126 | ||
125 | if (state > 0) | 127 | if (state > 0) { |
126 | err = ixgbe_setup_tc(netdev, adapter->dcb_cfg.num_tcs.pg_tcs); | 128 | err = ixgbe_setup_tc(netdev, adapter->dcb_cfg.num_tcs.pg_tcs); |
127 | else | 129 | ixgbe_dcb_unpack_map(&adapter->dcb_cfg, DCB_TX_CONFIG, prio_tc); |
130 | } else { | ||
128 | err = ixgbe_setup_tc(netdev, 0); | 131 | err = ixgbe_setup_tc(netdev, 0); |
132 | } | ||
133 | |||
134 | for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) | ||
135 | netdev_set_prio_tc_map(netdev, i, prio_tc[i]); | ||
129 | 136 | ||
130 | return err; | 137 | return err; |
131 | } | 138 | } |