[openwrt/openwrt] realtek: update rtl83xx switch driver to the updated DSA API

LEDE Commits lede-commits at lists.infradead.org
Mon Jan 2 08:44:57 PST 2023


rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/f5646ae0b903028c980d385273bcea6e6703685c

commit f5646ae0b903028c980d385273bcea6e6703685c
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Mon Jan 2 17:26:56 2023 +0100

    realtek: update rtl83xx switch driver to the updated DSA API
    
    This fixes:
      CC      drivers/net/dsa/rtl83xx/dsa.o
    drivers/net/dsa/rtl83xx/dsa.c:1274:22: error: initialization of 'enum dsa_tag_protocol (*)(struct dsa_switch *, int,  enum dsa_tag_protocol)' from incompatible pointer type 'enum dsa_tag_protocol (*)(struct dsa_switch *, int)' [-Werror=incompatible-pointer-types]
      .get_tag_protocol = rtl83xx_get_tag_protocol,
                          ^~~~~~~~~~~~~~~~~~~~~~~~
    drivers/net/dsa/rtl83xx/dsa.c:1274:22: note: (near initialization for 'rtl83xx_switch_ops.get_tag_protocol')
    drivers/net/dsa/rtl83xx/dsa.c:1316:22: error: initialization of 'enum dsa_tag_protocol (*)(struct dsa_switch *, int,  enum dsa_tag_protocol)' from incompatible pointer type 'enum dsa_tag_protocol (*)(struct dsa_switch *, int)' [-Werror=incompatible-pointer-types]
      .get_tag_protocol = rtl83xx_get_tag_protocol,
                          ^~~~~~~~~~~~~~~~~~~~~~~~
    
    Fixes: 1f5024aa73fc ("kernel: backport b53/bcm_sf2 changes from v5.6")
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
index 987b47dc8f..ed71c9ce44 100644
--- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
@@ -145,7 +145,9 @@ const struct rtl83xx_mib_desc rtl83xx_mib[] = {
 /* DSA callbacks */
 
 
-static enum dsa_tag_protocol rtl83xx_get_tag_protocol(struct dsa_switch *ds, int port)
+static enum dsa_tag_protocol rtl83xx_get_tag_protocol(struct dsa_switch *ds,
+						      int port,
+						      enum dsa_tag_protocol mprot)
 {
 	/* The switch does not tag the frames, instead internally the header
 	 * structure for each packet is tagged accordingly.




More information about the lede-commits mailing list