mgmt: smp: shell: initialize SMP before feeding with received bytes
So far SMP shell transport was initialized in APPLICATION run level, but shell over UART was initialized in POST_KERNEL. This could end up in situation when received frames were scheduled for further processing in SMP layer, when it was not initialized yet. Export smp_shell_init() function declaration and call it before shell is initialized with all its receive data handlers. This prevents situation when data is scheduled for processing in SMP layer, when that one is not ready yet. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
This commit is contained in:
parent
c1f80db44a
commit
f74feca027
4 changed files with 15 additions and 7 deletions
|
@ -285,6 +285,10 @@ static int enable_shell_uart(struct device *arg)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_MCUMGR_SMP_SHELL)) {
|
||||
smp_shell_init();
|
||||
}
|
||||
|
||||
shell_init(&shell_uart, dev, true, log_backend, level);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue