Skip to content

Commit 41a35de

Browse files
siddhantmodicfriedt
authored andcommitted
drivers: ethernet: eth_w5500
Fixes #97217 Added new MONITOR_PERIOD config for W5500 driver to remove dependency from ETH_PHY_DRIVER. Signed-off-by: Siddhant Modi <siddhant.modi@gmail.com>
1 parent 0e83446 commit 41a35de

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

drivers/ethernet/Kconfig.w5500

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,12 @@ config ETH_W5500_TIMEOUT
3737
Given timeout in milliseconds. Maximum amount of time
3838
that the driver will wait from the IP stack to get
3939
a memory buffer before the Ethernet frame is dropped.
40+
41+
config ETH_W5500_MONITOR_PERIOD
42+
int "Monitor task execution period"
43+
depends on ETH_W5500
44+
default 500
45+
help
46+
Monitor task execution period in milliseconds. The monitor task is
47+
periodically executed to detect and report any changes in the
48+
link status to the operating system.

drivers/ethernet/eth_w5500.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static void w5500_thread(void *p1, void *p2, void *p3)
311311
const struct w5500_config *config = dev->config;
312312

313313
while (true) {
314-
res = k_sem_take(&ctx->int_sem, K_MSEC(CONFIG_PHY_MONITOR_PERIOD));
314+
res = k_sem_take(&ctx->int_sem, K_MSEC(CONFIG_ETH_W5500_MONITOR_PERIOD));
315315

316316
if (res == 0) {
317317
/* semaphore taken, update link status and receive packets */

0 commit comments

Comments
 (0)