aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/microchip/ksz_common.h
diff options
context:
space:
mode:
authorOleksij Rempel <[email protected]>2023-03-10 09:08:08 +0000
committerDavid S. Miller <[email protected]>2023-03-15 08:00:34 +0000
commit69444581d0022b8afced2c90c441b7b4d9b8eba9 (patch)
tree8599d5ccb50836b3e5b69f1b48b5c45fdd5e8c5d /drivers/net/dsa/microchip/ksz_common.h
parentMerge branch 'ipv6-optimize-rt6_score_route' (diff)
downloadkernel-69444581d0022b8afced2c90c441b7b4d9b8eba9.tar.gz
kernel-69444581d0022b8afced2c90c441b7b4d9b8eba9.zip
net: dsa: microchip: add ksz_setup_tc_mode() function
Add ksz_setup_tc_mode() to make queue scheduling and shaping configuration more visible. Signed-off-by: Oleksij Rempel <[email protected]> Acked-by: Arun Ramadoss <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
-rw-r--r--drivers/net/dsa/microchip/ksz_common.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h
index d2d5761d58e9..7d87c9a79fb4 100644
--- a/drivers/net/dsa/microchip/ksz_common.h
+++ b/drivers/net/dsa/microchip/ksz_common.h
@@ -654,12 +654,10 @@ static inline int is_lan937x(struct ksz_device *dev)
#define REG_PORT_MTI_QUEUE_CTRL_0 0x0914
-#define MTI_SCHEDULE_MODE_M 0x3
-#define MTI_SCHEDULE_MODE_S 6
+#define MTI_SCHEDULE_MODE_M GENMASK(7, 6)
#define MTI_SCHEDULE_STRICT_PRIO 0
#define MTI_SCHEDULE_WRR 2
-#define MTI_SHAPING_M 0x3
-#define MTI_SHAPING_S 4
+#define MTI_SHAPING_M GENMASK(5, 4)
#define MTI_SHAPING_OFF 0
#define MTI_SHAPING_SRP 1
#define MTI_SHAPING_TIME_AWARE 2