net: mvneta: Don't force-set the offloading flag

The qopt->hw flag is set by the TC code according to the offloading mode
asked by user. Don't force-set it in the driver, but instead read it to
make sure we do what's asked.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Maxime Chevallier 2021-11-26 12:20:54 +01:00 committed by David S. Miller
parent 75fa71e3ac
commit e7ca75fe66

View File

@ -4915,7 +4915,9 @@ static int mvneta_setup_mqprio(struct net_device *dev,
u8 num_tc;
int i;
mqprio->qopt.hw = TC_MQPRIO_HW_OFFLOAD_TCS;
if (mqprio->qopt.hw != TC_MQPRIO_HW_OFFLOAD_TCS)
return 0;
num_tc = mqprio->qopt.num_tc;
if (num_tc > rxq_number)