summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_dcb_nl.c
diff options
context:
space:
mode:
authorDave Ertman <david.m.ertman@intel.com>2020-02-14 00:31:21 +0300
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2020-02-20 00:09:20 +0300
commit31c5f7f3f45aab8231c76be6d87c7503f442d019 (patch)
tree0e7b7e457433bb70a1bc755822a9aa762606ae60 /drivers/net/ethernet/intel/ice/ice_dcb_nl.c
parent27d9be98eda1d01073db142f11f4880ff513dae2 (diff)
downloadlinux-31c5f7f3f45aab8231c76be6d87c7503f442d019.tar.xz
ice: SW DCB, report correct max TC value
lldpad is using the value reported in the DCB config for max_tc as the max allowed number of TCs, not the current max. ICE driver was reporting it as current maximum TC. Change DCB_NL function to report maximum TC allowed by this device. Signed-off-by: Dave Ertman <david.m.ertman@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_dcb_nl.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_dcb_nl.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c
index 589b820a6b5b..c4c12414083a 100644
--- a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c
+++ b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c
@@ -100,14 +100,7 @@ static int ice_dcbnl_setets(struct net_device *netdev, struct ieee_ets *ets)
goto ets_out;
}
- /* max_tc is a 1-8 value count of number of TC's, not a 0-7 value
- * for the TC's index number. Add one to value if not zero, and
- * for zero set it to the FW's default value
- */
- if (max_tc)
- max_tc++;
- else
- max_tc = IEEE_8021QAZ_MAX_TCS;
+ max_tc = pf->hw.func_caps.common_cap.maxtc;
new_cfg->etscfg.maxtcs = max_tc;