This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 8429eef73 pic32_eth/shell: Fix command call
8429eef73 is described below
commit 8429eef73aa61c5e166c9d51ef10ac8289ffc30e
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Thu Mar 12 22:05:42 2026 +0100
pic32_eth/shell: Fix command call
There was mismatch between pic32_eth_cmd
and function pic32_eth_compat_cmd.
Function was ext (with streamer) while
description did not have sc_ext set.
Additionally all commands in pic32_eth_commands
were EXT while call to them from
pic32_eth_compat_cmd was using wrong type
resulting in wrong argument usage.
eth stats
eth phy
...
did not work as expected
functionality was still available via module
/eth stats
/etc phy
worked fine
This fixes mismatch described above.
Signed-off-by: Jerzy Kasenberg <[email protected]>
---
hw/drivers/lwip/pic32_eth/src/pic32_eth_shell.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/drivers/lwip/pic32_eth/src/pic32_eth_shell.c
b/hw/drivers/lwip/pic32_eth/src/pic32_eth_shell.c
index 10c6a438d..0956d3b24 100644
--- a/hw/drivers/lwip/pic32_eth/src/pic32_eth_shell.c
+++ b/hw/drivers/lwip/pic32_eth/src/pic32_eth_shell.c
@@ -276,7 +276,8 @@ pic32_eth_compat_cmd(const struct shell_cmd *cmd, int argc,
char **argv, struct
} else {
for (i = 0; pic32_eth_commands[i].sc_cmd; ++i) {
if (strcmp(pic32_eth_commands[i].sc_cmd, argv[1]) == 0) {
- rc = pic32_eth_commands[i].sc_cmd_func(argc - 1, argv + 1);
+ rc = pic32_eth_commands[i].sc_cmd_ext_func(
+ &pic32_eth_commands[i], argc - 1, argv + 1, streamer);
break;
}
}
@@ -291,6 +292,7 @@ pic32_eth_compat_cmd(const struct shell_cmd *cmd, int argc,
char **argv, struct
}
static const struct shell_cmd pic32_eth_cmd = {
+ .sc_ext = 1,
.sc_cmd = "eth",
.sc_cmd_ext_func = pic32_eth_compat_cmd,
};