]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ramips: update drivers to be compatible with kernel 6.12 18711/head
authorMieczyslaw Nalewaj <namiltd@yahoo.com>
Fri, 25 Apr 2025 14:59:55 +0000 (16:59 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 6 May 2025 22:40:05 +0000 (00:40 +0200)
Update drivers to be compatible with kernel 6.12:
 - change deprecate function strlcpy to strscpy
 - fix kernel warning "no previous prototype", by static declaration
 - add missing of.h headers

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18711
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c
target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c
target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c
target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c

index 9181ebba5c0163163938d65902680cd8ffc39ac2..9cd6fc456c0a43e523bc1c425335ec6856489688 100644 (file)
@@ -19,6 +19,7 @@
 #include <asm/mach-ralink/ralink_regs.h>
 #include <linux/of_device.h>
 #include <linux/of_irq.h>
+#include <linux/of_platform.h>
 
 #include <linux/switch.h>
 #include <linux/reset.h>
index 5d4cebb089684e25ce1538e3a0e7c82c9ca8f543..63d904e4bff4cf5d536e5ecfd84e8b1e0f226284 100644 (file)
@@ -13,6 +13,7 @@
  */
 
 #include "mtk_eth_soc.h"
+#include "ethtool.h"
 
 static const char fe_gdma_str[][ETH_GSTRING_LEN] = {
 #define _FE(x...)      # x,
@@ -70,9 +71,9 @@ static void fe_get_drvinfo(struct net_device *dev,
        struct fe_priv *priv = netdev_priv(dev);
        struct fe_soc_data *soc = priv->soc;
 
-       strlcpy(info->driver, priv->dev->driver->name, sizeof(info->driver));
-       strlcpy(info->version, MTK_FE_DRV_VERSION, sizeof(info->version));
-       strlcpy(info->bus_info, dev_name(priv->dev), sizeof(info->bus_info));
+       strscpy(info->driver, priv->dev->driver->name, sizeof(info->driver));
+       strscpy(info->version, MTK_FE_DRV_VERSION, sizeof(info->version));
+       strscpy(info->bus_info, dev_name(priv->dev), sizeof(info->bus_info));
 
        if (soc->reg_table[FE_REG_FE_COUNTER_BASE])
                info->n_stats = ARRAY_SIZE(fe_gdma_str);
index 593caaa6a7f2169ecf4168943a3fb65773bbd914..ad0b2007aff8015947be12f788ecbc2cf3ddbbf9 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/platform_device.h>
 #include <linux/of_device.h>
 #include <linux/of_irq.h>
+#include <linux/of_platform.h>
 
 #include <ralink_regs.h>
 
index b4632d39904fcb682eac2e4429ec574171658ac7..9d40dfb520098b56484b969104b80b193c51a1b3 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/lockdep.h>
 #include <linux/workqueue.h>
 #include <linux/of_device.h>
+#include <linux/of.h>
 #include <asm/byteorder.h>
 
 #include "mt7530.h"
@@ -209,7 +210,7 @@ struct mt7530_mapping {
        },
 };
 
-struct mt7530_mapping*
+static struct mt7530_mapping*
 mt7530_find_mapping(struct device_node *np)
 {
        const char *map;