Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor wifi shell #79609

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jukkar
Copy link
Member

@jukkar jukkar commented Oct 9, 2024

  • Rework the wifi-shell code so that external subcommands can be bolted into it easily. This means that the commands should be created using SHELL_SUBCMD_ADD(). This is related to work at subsys: net: lib: add wifi_credentials library #78048.
  • Place the various subcommands in alphabetical order to find them more easily.
  • Split long lines in order to pass CI checks.
  • Fixed missing newlines
  • While testing I noticed that the wifi 11v_btm_query did not work at all, fixed it.

subsys/net/l2/wifi/wifi_shell.c Outdated Show resolved Hide resolved
subsys/net/l2/wifi/wifi_shell.c Outdated Show resolved Hide resolved
Rework the wifi-shell code so that external subcommands can be
bolted into it easily. This means that the commands should be
created using SHELL_SUBCMD_ADD().

Place the various subcommands in alphabetical order to find them
more easily.

Split long lines in order to pass CI checks.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The parse_number() did not print newline after error or warning message.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The 11v_btm_query shell command was calling parse_number() using
a pointer to uint8_t. This will cause memory overwrite and possible
crash. Convert to use long temporary value to avoid this.

Fix also the output prints in case of an error.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Copy link
Contributor

@rlubos rlubos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants