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

Wi-Fi shell improvs #1429

Merged
merged 15 commits into from
Jan 3, 2024
Merged

Conversation

krish2718
Copy link
Contributor

No description provided.

@krish2718 krish2718 force-pushed the fix_reg_domain_shell branch from 7b6de01 to d487645 Compare December 22, 2023 12:56
Jordan Yates and others added 15 commits December 22, 2023 18:34
All WiFi channel numbers fit within a 8 bit number, as the maximum
allocated channel is 233. This halves the memory requirement.

Signed-off-by: Jordan Yates <[email protected]>
(cherry picked from commit dd090f0)
Remove the wifi_mgmt interface overriding default values with values
from kconfig. The defaults were only applied when a `params` struct was
provided by the application.

This is the case when the application is explicitly setting the options
it wants, why is the mgmt API changing these. When `params` is NULL and
thus modem defaults are requested, these defaults aren't applied. This
is the opposite behaviour from what seems reasonable.

In addition, these options are:
 * Undocumented
 * Using non-trivial string parsing functions (strtok)
 * Adding complexity to the API implementation by forcing support for
   ROM versions of command line arguments.

Signed-off-by: Jordan Yates <[email protected]>
(cherry picked from commit 5452665)
Make the maximum number of channels that can be manually scanned
configurable by the application. The previous value of 233 was vastly
overallocating memory as the largest band only contains 60 allocated
channels.

Signed-off-by: Jordan Yates <[email protected]>
(cherry picked from commit 6a428f1)
Turn the nested arrays of `scan_params->chan` into a single array.
This adds the requirement to specify the band for each channel, but
eliminates the large amount of dead memory for unused bands. Overall,
this saves 50% of the RAM space for this variable.

Signed-off-by: Jordan Yates <[email protected]>
(cherry picked from commit b54951b)
Instead of providing a comma seperated list of SSIDs, provide the SSIDs
individually. This substantially simplifies the implementation.

Signed-off-by: Jordan Yates <[email protected]>
(cherry picked from commit 3b7237e)
Re-add the `WIFI_MGMT_FORCED_PASSIVE_SCAN` option removed in #62751.
Now that `struct wifi_scan_params` is a reasonable size, we can enforce
the passive scan request even when no parameter struct is supplied by
the user.

Signed-off-by: Jordan Yates <[email protected]>
(cherry picked from commit 2b92598)
Update the storage type of the SSID strings to pointers to the strings,
instead of needing to copy the strings into the struct. This
substantially reduces the parameter struct size.

Signed-off-by: Jordan Yates <[email protected]>
(cherry picked from commit a32e7aa)
Missed accounting for "-f" option.

Upstream PR: zephyrproject-rtos/zephyr#66876

Signed-off-by: Chaitanya Tata <[email protected]>
Fix an extra optional arg.

Upstream PR: zephyrproject-rtos/zephyr#66876

Signed-off-by: Chaitanya Tata <[email protected]>
Clearly mark the args as optional.

Upstream PR: zephyrproject-rtos/zephyr#66876

Signed-off-by: Chaitanya Tata <[email protected]>
We are using standard notation to differentiate optional and mandatory,
so, no need for a heading.

Upstream PR: zephyrproject-rtos/zephyr#66876

Signed-off-by: Chaitanya Tata <[email protected]>
Separate the two optional parameters and add help.

Upstream PR: zephyrproject-rtos/zephyr#66876

Signed-off-by: Chaitanya Tata <[email protected]>
The parameters heading is implied and doesn't have the newline, so, just
remove it.

Upstream PR: zephyrproject-rtos/zephyr#66876

Signed-off-by: Chaitanya Tata <[email protected]>
For better readability, below rules will help:

 * Each command should be separated by a newline
 * Each command should end with a full stop (intermediate statements
   shouldn't have full stops)

Upstream PR: zephyrproject-rtos/zephyr#66876

Signed-off-by: Chaitanya Tata <[email protected]>
Just a cosmetic change, but IMHO the help looks much better now :).

Upstream PR: zephyrproject-rtos/zephyr#66876

Signed-off-by: Chaitanya Tata <[email protected]>
@krish2718 krish2718 force-pushed the fix_reg_domain_shell branch from d487645 to 42fe4d0 Compare December 22, 2023 13:16
@krish2718
Copy link
Contributor Author

FYI, for a single line change in help, had to pull in many of the scan re-work fromtree commits, as upmerge is still pending.

@cvinayak cvinayak merged commit 72453d6 into nrfconnect:main Jan 3, 2024
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.

7 participants