Description
Describe the bug
The MCUmgr statistics only work correctly when selecting MCUMGR_SMP_LEGACY_RC_BEHAVIOUR. This flag is correctly handled for stat_mgmt_show command but it is missing for stat_mgmt_list command.
It is easy to compare both functions on this points:
zephyr/subsys/mgmt/mcumgr/grp/stat_mgmt/src/stat_mgmt.c
Lines 153 to 163 in 4b4bba4
zephyr/subsys/mgmt/mcumgr/grp/stat_mgmt/src/stat_mgmt.c
Lines 203 to 206 in 4b4bba4
Expected behavior
The MCUmgr statistics should work correctly for all protocol versions.
Impact
Field devices can not report their groups correctly when using a tool that not allow to use the MCUMGR_SMP_LEGACY_RC_BEHAVIOUR.
Environment (please complete the following information):
- OS: Linux
- Toolchain Zephyr SDK: 0.16.4
- mainline
Additional context
Tested with https://github.com/intercreate/smpmgr