]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
generic: net: phy: rtl8261n: fix build with Linux 6.12
authorDaniel Golle <daniel@makrotopia.org>
Thu, 8 May 2025 01:57:33 +0000 (02:57 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 26 May 2025 15:58:03 +0000 (16:58 +0100)
Mark functions which aren't exported as static to fix build with
Linux 6.12.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/generic/files/drivers/net/phy/rtl8261n/phy_rtl826xb_patch.c
target/linux/generic/files/drivers/net/phy/rtl8261n/rtk_osal.c

index 90a792a17b26ae983439122ceb3bda340b9a69f1..0bfd93033f83adfb79f6b79accb3c7c33c35317b 100644 (file)
@@ -66,7 +66,7 @@ static uint16 _phy_rtl826xb_mmd_convert(uint16 page, uint16 addr)
     return reg;
 }
 
-int32
+static int32
 _phy_rtl826xb_patch_wait(uint32 unit, rtk_port_t port, uint32 mmdAddr, uint32 mmdReg, uint32 data, uint32 mask, uint8 patch_mode)
 {
     int32  ret = 0;
@@ -211,7 +211,7 @@ _phy_rtl826xb_patch_wait(uint32 unit, rtk_port_t port, uint32 mmdAddr, uint32 mm
     return RT_ERR_OK;
 }
 
-int32
+static int32
 _phy_rtl826xb_patch_wait_not_equal(uint32 unit, rtk_port_t port, uint32 mmdAddr, uint32 mmdReg, uint32 data, uint32 mask, uint8 patch_mode)
 {
     int32  ret = 0;
@@ -355,7 +355,7 @@ _phy_rtl826xb_patch_wait_not_equal(uint32 unit, rtk_port_t port, uint32 mmdAddr,
     return RT_ERR_OK;
 }
 
-int32
+static int32
 _phy_rtl826xb_patch_top_get(uint32 unit, rtk_port_t port, uint32 topPage, uint32 topReg, uint32 *pData)
 {
     int32  ret = 0;
@@ -368,7 +368,7 @@ _phy_rtl826xb_patch_top_get(uint32 unit, rtk_port_t port, uint32 topPage, uint32
     return RT_ERR_OK;
 }
 
-int32
+static int32
 _phy_rtl826xb_patch_top_set(uint32 unit, rtk_port_t port, uint32 topPage, uint32 topReg, uint32 wData)
 {
     int32  ret = 0;
@@ -378,7 +378,7 @@ _phy_rtl826xb_patch_top_set(uint32 unit, rtk_port_t port, uint32 topPage, uint32
     return RT_ERR_OK;
 }
 
-int32
+static int32
 _phy_rtl826xb_patch_sds_get(uint32 unit, rtk_port_t port, uint32 sdsPage, uint32 sdsReg, uint32 *pData)
 {
     int32  ret = 0;
@@ -393,7 +393,7 @@ _phy_rtl826xb_patch_sds_get(uint32 unit, rtk_port_t port, uint32 sdsPage, uint32
     return _phy_rtl826xb_patch_wait(unit, port, PHY_MMD_VEND1, 0x143, 0, BIT_15, PHY_PATCH_MODE_NORMAL);
 }
 
-int32
+static int32
 _phy_rtl826xb_patch_sds_set(uint32 unit, rtk_port_t port, uint32 sdsPage, uint32 sdsReg, uint32 wData, uint8 patch_mode)
 {
     int32  ret = 0;
@@ -693,7 +693,7 @@ static int32 _phy_rtl826xb_flow_s(uint32 unit, rtk_port_t port, uint8 portOffset
     return RT_ERR_OK;
 }
 
-int32 phy_rtl826xb_patch_op(uint32 unit, rtk_port_t port, uint8 portOffset, rtk_hwpatch_t *pPatch_data, uint8 patch_mode)
+static int32 phy_rtl826xb_patch_op(uint32 unit, rtk_port_t port, uint8 portOffset, rtk_hwpatch_t *pPatch_data, uint8 patch_mode)
 {
     int32 ret = RT_ERR_OK;
     uint32 rData = 0, wData = 0;
@@ -803,7 +803,7 @@ int32 phy_rtl826xb_patch_op(uint32 unit, rtk_port_t port, uint8 portOffset, rtk_
     return ret;
 }
 
-int32 phy_rtl826xb_patch_flow(uint32 unit, rtk_port_t port, uint8 portOffset, uint8 patch_flow, uint8 patch_mode)
+static int32 phy_rtl826xb_patch_flow(uint32 unit, rtk_port_t port, uint8 portOffset, uint8 patch_flow, uint8 patch_mode)
 {
     int32 ret = RT_ERR_OK;
 
index bf3ac4b12447c8c2534e1e21b6db4b108acf34fb..35339400d01b387654f072f3f8253c7f7b9ddf64 100644 (file)
@@ -7,6 +7,7 @@
 #include "type.h"
 #include "error.h"
 #include "rtk_phylib_def.h"
+#include "rtk_osal.h"
 
 #include <linux/version.h>
 #include <linux/jiffies.h>