drivers: wifi: options for application usage of Wi-Fi

The `CONFIG_WIFI` symbol currently covers a number of different
use-cases of Wi-Fi, primarily:
  * Wi-Fi AP (Broadcasting a network others can connect to)
  * Wi-Fi Station (Connecting to an AP + SSID scanning)
  * Wi-Fi AP + Station (Both the above)
  * Wi-Fi SSID scanning (SSID scanning only)

Each of these application usages of Wi-Fi requires a different set of
supporting options to operate correctly (`WPA_SUPP`,
`NET_CONNECTION_MANAGER`, etc), and different opportunities for resource
optimisation (System heap, buffer counts, etc).

Currently, optimizing the Wi-Fi drivers depends on driver specific
options, which can be challenging to find and are obviously not portable
across different drivers.

The addition of this choice allows applications to specify in a single
Kconfig option which features of Wi-Fi they use, and enable individual
Wi-Fi drivers to choose defaults based on those features.

Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit is contained in:
Jordan Yates 2025-01-22 10:43:06 +10:00 committed by Benjamin Cabé
parent 5cffb8e5a6
commit 7dbd36a222

View File

@ -46,4 +46,27 @@ source "drivers/wifi/infineon/Kconfig.airoc"
source "drivers/wifi/nrf_wifi/Kconfig.nrfwifi"
source "drivers/wifi/siwx91x/Kconfig.siwx91x"
# Choice is after individual drivers to enable driver specific defaults
choice WIFI_USAGE_MODE
prompt "Application usage of the Wi-Fi driver"
default WIFI_USAGE_MODE_STA
help
Inform the Wi-Fi driver of which Wi-Fi features the application
will be using. Drivers can use this choice to default appropriate
driver-specific options.
config WIFI_USAGE_MODE_STA
bool "Wi-Fi interface(s) acts as a Station"
config WIFI_USAGE_MODE_AP
bool "Wi-Fi interface(s) acts as an Access Point"
config WIFI_USAGE_MODE_STA_AP
bool "Wi-Fi interface(s) acts as an Access Point and Station"
config WIFI_USAGE_MODE_SCAN_ONLY
bool "Wi-Fi interface(s) used for SSID scanning only"
endchoice
endif # WIFI