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

net: wifi_mgmt: reduce struct wifi_scan_params size #62735

Merged
merged 3 commits into from
Sep 25, 2023
Merged

net: wifi_mgmt: reduce struct wifi_scan_params size #62735

merged 3 commits into from
Sep 25, 2023

Commits on Sep 21, 2023

  1. net: wifi_mgmt: avoid declaring zero length array

    Zero length arrays are a GNUism not supported by all compilers. If
    `zephyr/net/wifi_mgmt.h` is included by an application without WiFi
    enabled, ensure array is at least one element long.
    
    Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
    Jordan Yates committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    9b00560 View commit details
    Browse the repository at this point in the history
  2. net: wifi_mgmt: make number of scan channels configurable

    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 <jordan.yates@data61.csiro.au>
    Jordan Yates committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    db7a01e View commit details
    Browse the repository at this point in the history
  3. net: wifi_mgmt: linearise scan_params->chan arrays

    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 <jordan.yates@data61.csiro.au>
    Jordan Yates committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    eb98b93 View commit details
    Browse the repository at this point in the history