wapi: Make the initial scan buffer configurable through Kconfig

The default value is 4KB which is same as IW_SCAN_MAX_DATA

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu 2022-04-02 15:25:45 +08:00 committed by Xiang Xiao
parent a755cb72da
commit a25f640e54
2 changed files with 5 additions and 1 deletions

View File

@ -36,6 +36,10 @@ config WIRELESS_WAPI_PRIORITY
int "Command Priority"
default 100
config WIRELESS_WAPI_SCAN_MAX_DATA
int "Scan Cache Buffer Size (bytes)"
default 4096
config WIRELESS_WAPI_INITCONF
bool "Wireless Configure Initialization"
default n

View File

@ -1292,7 +1292,7 @@ int wapi_scan_coll(int sock, FAR const char *ifname,
WAPI_VALIDATE_PTR(aps);
buflen = IW_SCAN_MAX_DATA;
buflen = CONFIG_WIRELESS_WAPI_SCAN_MAX_DATA;
buf = malloc(buflen * sizeof(char));
if (!buf)
{