From c30959bc3b4c8b8b7c1b11ba64fec3bc5d746a30 Mon Sep 17 00:00:00 2001 From: Sven Ginka Date: Tue, 22 Jul 2025 07:19:06 +0200 Subject: [PATCH 1/3] drivers: ethernet: sy1xx: fix static prototype removed invalid arguments. Signed-off-by: Sven Ginka --- drivers/ethernet/eth_sensry_sy1xx_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ethernet/eth_sensry_sy1xx_mac.c b/drivers/ethernet/eth_sensry_sy1xx_mac.c index ca7f51d3f6d85..c2dbe7a203b99 100644 --- a/drivers/ethernet/eth_sensry_sy1xx_mac.c +++ b/drivers/ethernet/eth_sensry_sy1xx_mac.c @@ -103,7 +103,7 @@ struct sy1xx_mac_dev_data { }; /* prototypes */ -static int sy1xx_mac_set_mac_addr(const struct device *dev, uint8_t *mac_addr); +static int sy1xx_mac_set_mac_addr(const struct device *dev); static int sy1xx_mac_set_promiscuous_mode(const struct device *dev, bool promiscuous_mode); static int sy1xx_mac_set_config(const struct device *dev, enum ethernet_config_type type, const struct ethernet_config *config); From ab02fdf0ee9438dc2de7513837eabe833606d5e5 Mon Sep 17 00:00:00 2001 From: Sven Ginka Date: Thu, 21 Aug 2025 10:47:47 +0200 Subject: [PATCH 2/3] drivers: ethernet: sy1xx: fix warning casting the address to uint32_t removes the compiler warning. Signed-off-by: Sven Ginka --- drivers/ethernet/eth_sensry_sy1xx_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ethernet/eth_sensry_sy1xx_mac.c b/drivers/ethernet/eth_sensry_sy1xx_mac.c index c2dbe7a203b99..a70ffc3b40bb2 100644 --- a/drivers/ethernet/eth_sensry_sy1xx_mac.c +++ b/drivers/ethernet/eth_sensry_sy1xx_mac.c @@ -312,7 +312,7 @@ static void sy1xx_mac_iface_init(struct net_if *iface) struct sy1xx_mac_dev_config *cfg = (struct sy1xx_mac_dev_config *)dev->config; struct sy1xx_mac_dev_data *const data = dev->data; - LOG_INF("Interface init %s (%.8x)", net_if_get_device(iface)->name, iface); + LOG_INF("Interface init %s (%p)", net_if_get_device(iface)->name, iface); data->iface = iface; From e9cfa0ecf841f6bb887b175812d294ebda78360f Mon Sep 17 00:00:00 2001 From: Sven Ginka Date: Thu, 21 Aug 2025 11:15:47 +0200 Subject: [PATCH 3/3] drivers: ethernet: sy1xx: fix random mac before that commit, random mac was used even when defining zephyr,random-mac-address to false. Signed-off-by: Sven Ginka --- drivers/ethernet/eth_sensry_sy1xx_mac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/ethernet/eth_sensry_sy1xx_mac.c b/drivers/ethernet/eth_sensry_sy1xx_mac.c index a70ffc3b40bb2..d254bb137343d 100644 --- a/drivers/ethernet/eth_sensry_sy1xx_mac.c +++ b/drivers/ethernet/eth_sensry_sy1xx_mac.c @@ -208,7 +208,6 @@ static int sy1xx_mac_start(const struct device *dev) sys_rand_get(&data->mac_addr, 6); /* Set MAC address locally administered, unicast (LAA) */ data->mac_addr[0] |= 0x02; - } sy1xx_mac_set_mac_addr(dev); @@ -571,7 +570,7 @@ const struct ethernet_api sy1xx_mac_driver_api = { .base_addr = DT_INST_REG_ADDR_BY_NAME(n, data), \ .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(n), \ .promiscuous_mode = DT_INST_PROP_OR(n, promiscuous_mode, false), \ - .use_zephyr_random_mac = DT_INST_NODE_HAS_PROP(n, zephyr_random_mac_address), \ + .use_zephyr_random_mac = DT_INST_PROP(n, zephyr_random_mac_address), \ .phy_dev = DEVICE_DT_GET(DT_INST_PHANDLE(0, phy_handle))}; \ \ static struct sy1xx_mac_dma_buffers __attribute__((section(".udma_access"))) \