1 // SPDX-License-Identifier: GPL-2.0+
2 
3 #include "lan966x_main.h"
4 
5 int lan966x_mqprio_add(struct lan966x_port *port, u8 num_tc)
6 {
7 	u8 i;
8 
9 	if (num_tc != NUM_PRIO_QUEUES) {
10 		netdev_err(port->dev, "Only %d traffic classes supported\n",
11 			   NUM_PRIO_QUEUES);
12 		return -EINVAL;
13 	}
14 
15 	netdev_set_num_tc(port->dev, num_tc);
16 
17 	for (i = 0; i < num_tc; ++i)
18 		netdev_set_tc_queue(port->dev, i, 1, i);
19 
20 	return 0;
21 }
22 
23 int lan966x_mqprio_del(struct lan966x_port *port)
24 {
25 	netdev_reset_tc(port->dev);
26 
27 	return 0;
28 }
29