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>
This commit is contained in:
parent
8940343ead
commit
6a428f19b6
2 changed files with 15 additions and 1 deletions
|
@ -41,6 +41,12 @@ extern "C" {
|
|||
#define WIFI_MGMT_SCAN_SSID_FILT_MAX 1
|
||||
#endif /* CONFIG_WIFI_MGMT_SCAN_SSID_FILT_MAX */
|
||||
|
||||
#ifdef CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL
|
||||
#define WIFI_MGMT_SCAN_CHAN_MAX_MANUAL CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL
|
||||
#else
|
||||
#define WIFI_MGMT_SCAN_CHAN_MAX_MANUAL 1
|
||||
#endif /* CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL */
|
||||
|
||||
#define WIFI_MGMT_BAND_STR_SIZE_MAX 8
|
||||
|
||||
/** Wi-Fi management commands */
|
||||
|
@ -252,7 +258,7 @@ struct wifi_scan_params {
|
|||
* not conforming to regulatory restrictions etc. The invoker of the API should
|
||||
* ensure that the channels specified follow regulatory rules.
|
||||
*/
|
||||
uint8_t chan[WIFI_FREQ_BAND_MAX + 1][WIFI_CHANNEL_MAX];
|
||||
uint8_t chan[WIFI_FREQ_BAND_MAX + 1][WIFI_MGMT_SCAN_CHAN_MAX_MANUAL];
|
||||
};
|
||||
|
||||
/** Wi-Fi scan result, each result is provided to the net_mgmt_event_callback
|
||||
|
|
|
@ -47,6 +47,14 @@ config WIFI_MGMT_SCAN_SSID_FILT_MAX
|
|||
Maximum number of SSIDs that can be specified for SSID filtering.
|
||||
This can be set based on the underlying chipsets limitations.
|
||||
|
||||
config WIFI_MGMT_SCAN_CHAN_MAX_MANUAL
|
||||
int "Maximum number of channels that can be manually specified per-band"
|
||||
range 1 70
|
||||
default 3
|
||||
help
|
||||
There are currently 60 channels allocated in the largest band (6GHz).
|
||||
The default of 3 allows the 3 most common channels (2.4GHz: 1, 6, 11) to be specified.
|
||||
|
||||
config WIFI_NM
|
||||
bool "Wi-Fi Network manager support"
|
||||
help
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue