# Copyright (c) 2023 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config WIFI_MGMT_RAW_SCAN_RESULTS
	bool "Raw scan results"
	help
	  This option enables raw scan results. When enabled, the raw scan
	  results (beacons or probe responses) are provided to the application.
	  Enabling this config will increase the net_mgmt event size
	  considerably.

if WIFI_MGMT_RAW_SCAN_RESULTS

config WIFI_MGMT_RAW_SCAN_RESULT_LENGTH
	int "Maximum length of raw scan results"
	default 512
	help
	  This option defines the maximum length of raw scan results.

config WIFI_MGMT_RAW_SCAN_RESULTS_ONLY
	bool "Only raw scan results"
	help
	  This option enables only raw scan results. When enabled, the raw scan
	  results (beacons or probe responses) are provided to the application.
	  The scan results are not parsed and the application is responsible
	  for parsing the scan results. Normal scan results are not provided
	  to the application.

endif # WIFI_MGMT_RAW_SCAN_RESULTS

config WIFI_MGMT_TWT_CHECK_IP
	bool "Check IP Assignment for TWT"
	default y
	help
	  This option enables check for valid IP address before TWT setup.
	  If TWT setup is triggered early in the connection, then device might
	  enter deep sleep without having a valid IP, this can result in device
	  being unreachable (IP Level) or unable to receive down link traffic
	  even when it is awake intervals. Rejecting TWT setup till Wi-Fi
	  interface has a valid IP address might be desirable in most scenarios.

config WIFI_MGMT_FORCED_PASSIVE_SCAN
	bool "Force passive Wi-Fi scanning"
	help
	  Always request a passive scan, regardless of the user supplied parameters.
	  This is typically used when the underlying hardware is not certified for
	  RF transmissions. This doesn't guarantee that passive scan will be used,
	  it depends on the underlying chip implementation to support and honour
	  scan type.

config WIFI_MGMT_SCAN_SSID_FILT_MAX
	int "Maximum number of SSIDs that can be specified for SSID filtering"
	default 1
	range 1 4
	help
	  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"
	range 1 110
	default 3
	help
	  There are approximately 100 channels allocated across the three supported bands.
	  The default of 3 allows the 3 most common channels (2.4GHz: 1, 6, 11) to be specified.

config WIFI_SHELL_MAX_AP_STA
	int "Maximum number of APs and STAs that can be managed in Wi-Fi shell"
	range 1 8
	default 1
	help
	  This option defines the maximum number of APs and STAs that can be managed
	  in Wi-Fi shell.

config WIFI_NM
	bool "Wi-Fi Network manager support"
	help
	  This option enables using the Wi-Fi Network managers (e.g. wpa_supplicant) to
	  manage the Wi-Fi network interfaces.

if WIFI_NM

config WIFI_NM_MAX_MANAGED_INTERFACES
	int "Maximum number of managed interfaces per Wi-Fi network manager"
	default 2 if WIFI_USAGE_MODE_STA_AP
	default 1
	help
	  This option defines the maximum number of managed interfaces per Wi-Fi
	  network manager instance that can be used simultaneously.

module = WIFI_NM
module-dep = NET_LOG
module-str = Log level for Wi-Fi Network manager module
module-help = Enables using the Wi-Fi Network managers to manage the Wi-Fi network interfaces.
source "subsys/net/Kconfig.template.log_config.net"
endif # WIFI_NM

config WIFI_MGMT_AP_STA_INACTIVITY_TIMEOUT
	int "Station inactivity timeout in seconds"
	default 300
	help
	  Station inactivity timeout is the period for which AP may keep a client
	  in associated state while there is no traffic from that particular
	  client. If a non-zero value is set, AP may choose to disassociate the
	  client after the timeout.

config WIFI_MGMT_AP_STA_SKIP_INACTIVITY_POLL
	bool "Skip inactivity poll for stations after the inactivity timeout"
	help
	  Skip inactivity poll for stations after the inactivity timeout. This
	  will prevent the AP from sending null data frames to the stations after
	  the inactivity timeout. This is useful to disconnect idle stations even
	  if they are within the range of the AP.
	  Note: This is only build time parameter, runtime configuration not supported.

config WIFI_MGMT_AP_MAX_NUM_STA
	int "Maximum number of stations allowed in station table"
	range 1 2007
	default 4
	help
	  Maximum number of stations allowed in station table. New stations will be
	  rejected after the station table is full.

config WIFI_ENT_IDENTITY_MAX_USERS
	int "Maximum number of identity users allowed connection"
	default 8
	help
	  This option defines the maximum number of identity users allowed connection.

config WIFI_CERTIFICATE_LIB
	bool
	help
	  Enable this option to process certificates in enterprise mode.

if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE

config WIFI_SHELL_RUNTIME_CERTIFICATES
	bool "Provide Wi-Fi enterprise security certificates at run-time"
	select TLS_CREDENTIALS
	select TLS_CREDENTIALS_SHELL
	select BASE64
	help
	  This option enables providing Wi-Fi enterprise security certificates at run-time.
	  Uses the TLS credentials subsystem to store and manage the certificates.

if WIFI_SHELL_RUNTIME_CERTIFICATES

config HEAP_MEM_POOL_ADD_SIZE_WIFI_CERT
	int "Wi-Fi enterprise security certificates memory pool size"
	# STA - 6 certs and each assume 1500 bytes
	default 12000
	help
	  The size of the memory pool used by the Wi-Fi enterprise security certificates.

endif # WIFI_SHELL_RUNTIME_CERTIFICATES

endif # WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE

config WIFI_MGMT_BSS_MAX_IDLE_TIME
	int "BSS max idle timeout in seconds"
	range 0 64000
	default 300
	help
	  As per 802.11-2020: 11.21.13 BSS max idle period management
	  If dot11WirelessManagementImplemented is true, dot11BSSMaxIdlePeriod is
	  nonzero and dot11BSSMaxIdlePeriodIndicationByNonAPSTA is true, then a
	  non-S1G non-AP STA shall include a BSS Max Idle Period element
	  in the (Re)Association Request frame. If the BSS Max Idle Period
	  element is present in the (Re)Association Request frame received
	  by a non-S1G AP that has dot11BSSMaxIdlePeriodIndicationByNonAPSTA
	  equal to true, then the non-S1G AP may choose the non-AP STA’s
	  preferred maximum idle period. The non-S1G AP indicates its chosen
	  value to the non-S1G STA in the (Re)Association Response frame.
