net: mvneta: Don't force-set the offloading flag
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Fri, 26 Nov 2021 11:20:54 +0000 (12:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Nov 2021 12:05:52 +0000 (12:05 +0000)
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>
drivers/net/ethernet/marvell/mvneta.c

index 46b7604..d3ce87e 100644 (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)