From 43dbc6d4d65cdc0ae80eb074aff5b311608dcb24 Mon Sep 17 00:00:00 2001 From: Harshal Gohel Date: Fri, 8 Aug 2025 17:31:03 +0200 Subject: [PATCH] realtek: rtl931x: Register support for trapping management frames Driver needs to configure management frame actions To support LLDP, EAPOL or MSTP, which needs to be trapped to the CPU instead of being forwarded. The function to implement the various management frame actions was already present but not yet registered correctly. Signed-off-by: Harshal Gohel Signed-off-by: Sharadanand Karanjkar Link: https://github.com/openwrt/openwrt/pull/19571 Signed-off-by: Hauke Mehrtens --- .../linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h | 2 +- .../linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h index 6d7f154129..88aee748c6 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h @@ -211,7 +211,7 @@ void rtl930x_pie_rule_dump_raw(u32 r[]); void rtl931x_print_matrix(void); void rtldsa_930x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action); -void rtl931x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action); +void rtldsa_931x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action); void rtl931x_sw_init(struct rtl838x_switch_priv *priv); diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c index 226b7ce5d3..cac09081ef 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c @@ -328,7 +328,7 @@ void rtl931x_print_matrix(void) rtl_table_release(r); } -void rtl931x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action) +void rtldsa_931x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action) { u32 value = 0; @@ -1587,4 +1587,5 @@ const struct rtl838x_reg rtl931x_reg = { .led_init = rtldsa_931x_led_init, .enable_learning = rtldsa_931x_enable_learning, .enable_flood = rtldsa_931x_enable_flood, + .set_receive_management_action = rtldsa_931x_set_receive_management_action, }; -- 2.30.2