# Nordic Wi-Fi driver for nRF700x
#
# Copyright (c) 2022 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

DT_COMPAT_NORDIC_NRF700X_QSPI := nordic,nrf700x-qspi
DT_COMPAT_NORDIC_NRF700X_SPI := nordic,nrf700x-spi

menuconfig WIFI_NRF700X
	bool "nRF700x driver"
	depends on WIFI
	select NET_L2_WIFI_MGMT if NETWORKING
	select NET_L2_ETHERNET_MGMT if NETWORKING && NET_L2_ETHERNET
	select WIFI_USE_NATIVE_NETWORKING if NETWORKING
	select EXPERIMENTAL if !SOC_SERIES_NRF53X && !SOC_SERIES_NRF91X
	help
	  Nordic Wi-Fi Driver

if WIFI_NRF700X
module = WIFI_NRF700X_BUS
module-dep = LOG
module-str = Log level for Wi-Fi nRF700x bus layers
module-help = Sets log level for Wi-Fi nRF700x bus layers
source "subsys/net/Kconfig.template.log_config.net"

config WIFI_NRF700X_BUS_LOG_LEVEL
	# Enable error by default
	default 1

choice NRF700X_OPER_MODES
	bool "nRF700x operating modes"
	default NRF700X_SYSTEM_MODE if WPA_SUPP && !(NRF700X_RAW_DATA_TX || NRF700X_RAW_DATA_RX || NRF700X_PROMISC_DATA_RX)
	default NRF700X_SYSTEM_WITH_RAW_MODES if (NRF700X_RAW_DATA_TX || NRF700X_RAW_DATA_RX || NRF700X_PROMISC_DATA_RX)
	default NRF700X_SCAN_ONLY
	help
	  Select the operating mode of the nRF700x driver

config NRF700X_SYSTEM_MODE
	bool "Enable nRF700X system mode"
	depends on WPA_SUPP
	help
	  Select this option to enable system mode of the nRF700x driver

config NRF700X_SCAN_ONLY
	bool "Enable nRF700X scan only mode"
	help
	  Select this option to enable scan only mode of the nRF700x driver

config NRF700X_RADIO_TEST
	bool "Radio test mode of the nRF700x driver"

config NRF700X_SYSTEM_WITH_RAW_MODES
	bool "Enable nRF700X system mode with raw modes"
	# TODO: This dependency need to be removed for Monitor and TX injection only
	depends on WPA_SUPP
	help
	  Select this option to enable system mode of the nRF700x driver with raw modes

endchoice

if NRF700X_SYSTEM_MODE || NRF700X_SYSTEM_WITH_RAW_MODES
config NRF700X_STA_MODE
	bool "Enable nRF700X STA mode"
	default y
	help
		Select this option to enable STA mode of the nRF700x driver

config NRF700X_AP_MODE
	bool "Enable Access point mode"
	depends on WPA_SUPP_AP

config NRF700X_P2P_MODE
	bool "Enable P2P support in driver"
endif # NRF700X_SYSTEM_MODE || NRF700X_SYSTEM_WITH_RAW_MODES

config NRF700X_RAW_DATA_TX
	bool "Enable RAW TX data path in the driver"

config NRF700X_RAW_DATA_RX
	bool "Enable RAW RX sniffer operation in the driver"

config NRF700X_PROMISC_DATA_RX
	bool "Enable promiscuous RX sniffer operation in the driver"
	depends on WPA_SUPP
	select EXPERIMENTAL
	select NET_PROMISCUOUS_MODE

config NRF700X_DATA_TX
	bool "Enable TX data path in the driver"
	default y if NRF700X_SYSTEM_MODE || NRF700X_SYSTEM_WITH_RAW_MODES

config NRF_WIFI_IF_AUTO_START
	bool "Enable Wi-Fi interface auto start on boot"
	default y

config NRF_WIFI_PATCHES_BUILTIN
	bool "Store nRF700x FW patches as part of the driver"
	depends on !NRF_WIFI_PATCHES_EXT_FLASH_STORE
	default y if !NRF_WIFI_PATCHES_EXT_FLASH_STORE
	help
	  Select this option to store nRF700x FW patches as part of the driver.
	  This option impacts the code memory footprint of the driver.

choice NRF_WIFI_PATCHES_EXT_FLASH_SUPPORT
	bool "Store nRF700x FW patches in external flash"
	default NRF_WIFI_PATCHES_EXT_FLASH_DISABLED
	help
	  Select this option to store nRF700x FW patches in external flash.
	  This option helps to reduce the code memory size of the application, but
	  requires external memory to be available for storing the FW patches.

config NRF_WIFI_PATCHES_EXT_FLASH_DISABLED
	bool "Store nRF700x FW patches in RAM"
	select NRF_WIFI_PATCHES_BUILTIN

config NRF_WIFI_PATCHES_EXT_FLASH_XIP
	bool "Relocate nRF700x FW patches to external memory and execute from there"
	# nRF7002 supports SPI based external flash access with no XIP
	depends on !BOARD_NRF7002DK_NRF5340_CPUAPP && !BOARD_NRF7002DK_NRF5340_CPUAPP_NS
	# Disable until Matter DFU changes are ready
	# default y if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840
	select NRF_WIFI_PATCHES_BUILTIN
	# For accessing external flash
	select FLASH
	# For relocation code to external flash
	select XIP
	select NORDIC_QSPI_NOR
	select BUILD_NO_GAP_FILL
	select CODE_DATA_RELOCATION
	select HAVE_CUSTOM_LINKER_SCRIPT

config NRF_WIFI_PATCHES_EXT_FLASH_STORE
	bool "Store nRF700x FW patches in external memory but execute from RAM"
	# nRF7002 supports SPI based external memory access but missing tools support
	# TODO: Enable when tools support is available (NRFJPROG-157)
	depends on !BOARD_NRF7002DK_NRF5340_CPUAPP && !BOARD_NRF7002DK_NRF5340_CPUAPP_NS
	select FLASH
	select FLASH_MAP
endchoice

if NRF_WIFI_PATCHES_EXT_FLASH_STORE
config NRF_WIFI_FW_FLASH_CHUNK_SIZE
	int "Chunk size for nRF70 FW patches to be read from external flash"
	default 8192
	help
	  Chunk size for nRF70 FW patches to be read from external flash.
	  This option impacts the loading time of the nRF70 FW patches and
	  RAM usage (heap) of the application.

config NRF_WIFI_FW_PATCH_INTEGRITY_CHECK
	bool "Enable integrity check of nRF70 FW patches"
	select FLASH_AREA_CHECK_INTEGRITY
	default y
	help
	  Select this option to enable integrity check of nRF70 FW patches using
	  SHA-256 verification algorithm.This option impacts the loading time of the
	  nRF70 FW patches but protects against corrupted FW patches.

config NRF_WIFI_FW_PATCH_DFU
	bool "Direct Firmware Update of nRF70 FW patch"
	depends on PARTITION_MANAGER_ENABLED
	depends on BOOTLOADER_MCUBOOT
	depends on !XIP_SPLIT_IMAGE
	help
	  Enabling this option adds support for Device Firmware Update (DFU)
	  for the nRF70 Series Firmware Patch.

	  This feature requires the addition of an MCUBoot partition pair:
	  a primary and a secondary partition. These partitions are used to
	  store the new firmware patch. The specific partition numbers to be used
	  depend on the number of partitions already in use.

	  The "nrf70_wifi_fw" partition must be added to the newly created
	  MCUBoot primary partition. Once this Kconfig option is enabled,
	  the nRF70.hex file will be signed by MCUBoot. The signed image
	  will then be merged with the application image and flashed onto
	  the target board.

	  Ensure that the required MCUBoot partitions are properly configured
	  before enabling this option. Refer to the documentation for detailed
	  instructions on partition configuration and the DFU process.

# TC is the default but Wi-Fi uses MbedTLS, so, to avoid loading another library.
if NRF_WIFI_FW_PATCH_INTEGRITY_CHECK
choice FLASH_AREA_CHECK_INTEGRITY_BACKEND
	default FLASH_AREA_CHECK_INTEGRITY_MBEDTLS
endchoice
endif
endif

config CUSTOM_LINKER_SCRIPT
	string "Custom linker script for nRF700x FW patches"
	default "${ZEPHYR_BASE}/../nrf/drivers/wifi/nrf700x/rpu_fw_patches.ld"

config NRF_WIFI_LOW_POWER
	bool "Enable low power mode in nRF Wi-Fi chipsets"
	default y

config NRF700X_TCP_IP_CHECKSUM_OFFLOAD
	bool "Enable TCP/IP checksum offload"
	default y

config NRF700X_REG_DOMAIN
	string "The ISO/IEC alpha2 country code for the country in which this device is currently operating. Default 00 (World regulatory)"
	# 00 is used for World regulatory
	default "00"

# Making calls to RPU from net_mgmt callbacks.
#
# If WPA supplicant is enabled, then don't override as it has higher
# stack requirements.
config NET_MGMT_EVENT_STACK_SIZE
	default 2048 if !WPA_SUPP

config NRF700X_LOG_VERBOSE
	bool "Maintains the verbosity of information in logs"
	default y

module = WIFI_NRF700X
module-dep = LOG
module-str = Log level for Wi-Fi nRF700x driver
module-help = Sets log level for Wi-Fi nRF700x driver
source "subsys/logging/Kconfig.template.log_config"

config WIFI_NRF700X_LOG_LEVEL
	# Enable error by default
	default 1

config NRF700X_ON_QSPI
	def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_QSPI))
	select NRFX_QSPI

config NRF700X_ON_SPI
	def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF700X_SPI))
	select SPI

# Wi-Fi and SR Coexistence Hardware configuration.
config NRF700X_SR_COEX
	bool "Enable Wi-Fi and SR coexistence support"
	select EXPERIMENTAL if OPENTHREAD
	def_bool $(dt_nodelabel_enabled,nrf_radio_coex)

# GPIO configuration to control SR side RF switch position.
config NRF700X_SR_COEX_RF_SWITCH
	def_bool $(dt_nodelabel_has_prop,nrf_radio_coex,srrf-switch-gpios)

config NRF700X_WORKQ_STACK_SIZE
	int "Stack size for workqueue"
	default 4096

config NRF700X_WORKQ_MAX_ITEMS
	int "Maximum work items for all workqueues"
	default 100

config NRF700X_MAX_TX_PENDING_QLEN
	int "Maximum number of pending TX packets"
	default 18

config NRF700X_UTIL
	depends on SHELL
	bool "Enable Utility shell in nRF700x driver"

config NRF700X_QSPI_LOW_POWER
	bool "Enable low power mode in QSPI"
	default y if NRF_WIFI_LOW_POWER

config NRF700X_PCB_LOSS_2G
	int "PCB loss for 2.4 GHz band"
	default 0
	range 0 4
	help
	  Specifies PCB loss from the antenna connector to the RF pin.
	  The values are in dB scale in steps of 1dB and range of 0-4dB.
	  The loss is considered in the RX path only.

config NRF700X_PCB_LOSS_5G_BAND1
	int "PCB loss for 5 GHz band (5150 MHz - 5350 MHz, Channel-32 - Channel-68)"
	default 0
	range 0 4
	help
	  Specifies PCB loss from the antenna connector to the RF pin.
	  The values are in dB scale in steps of 1dB and range of 0-4dB.
	  The loss is considered in the RX path only.

config NRF700X_PCB_LOSS_5G_BAND2
	int "PCB loss for 5 GHz band (5470 MHz - 5730 MHz, Channel-96 - Channel-144)"
	default 0
	range 0 4
	help
	  Specifies PCB loss from the antenna connector to the RF pin.
	  The values are in dB scale in steps of 1dB and range of 0-4dB.
	  The loss is considered in the RX path only.

config NRF700X_PCB_LOSS_5G_BAND3
	int "PCB loss for 5 GHz band (5730 MHz - 5895 MHz, Channel-149 - Channel-177)"
	default 0
	range 0 4
	help
	  Specifies PCB loss from the antenna connector to the RF pin.
	  The values are in dB scale in steps of 1dB and range of 0-4dB.
	  The loss is considered in the RX path only.

config NRF700X_ANT_GAIN_2G
	int "Antenna gain for 2.4 GHz band"
	default 0
	range 0 6

config NRF700X_ANT_GAIN_5G_BAND1
	int "Antenna gain for 5 GHz band (5150 MHz - 5350 MHz)"
	default 0
	range 0 6

config NRF700X_ANT_GAIN_5G_BAND2
	int "Antenna gain for 5 GHz band (5470 MHz - 5730 MHz)"
	default 0
	range 0 6

config NRF700X_ANT_GAIN_5G_BAND3
	int "Antenna gain for 5 GHz band (5730 MHz - 5895 MHz)"
	default 0
	range 0 6

config NRF700X_BAND_2G_LOWER_EDGE_BACKOFF_DSSS
	int "DSSS Transmit power backoff (in dB) for lower edge of 2.4 GHz frequency band"
	default 0
	range 0 10

config NRF700X_BAND_2G_LOWER_EDGE_BACKOFF_HT
	int "HT/VHT Transmit power backoff (in dB) for lower edge of 2.4 GHz frequency band"
	default 0
	range 0 10

config NRF700X_BAND_2G_LOWER_EDGE_BACKOFF_HE
	int "HE Transmit power backoff (in dB) for lower edge of 2.4 GHz frequency band"
	default 0
	range 0 10

config NRF700X_BAND_2G_UPPER_EDGE_BACKOFF_DSSS
	int "DSSS Transmit power backoff (in dB) for upper edge of 2.4 GHz frequency band"
	default 0
	range 0 10

config NRF700X_BAND_2G_UPPER_EDGE_BACKOFF_HT
	int "HT/VHT Transmit power backoff (in dB) for upper edge of 2.4 GHz frequency band"
	default 0
	range 0 10

config NRF700X_BAND_2G_UPPER_EDGE_BACKOFF_HE
	int "HE Transmit power backoff (in dB) for upper edge of 2.4 GHz frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_1_LOWER_EDGE_BACKOFF_HT
	int "HT/VHT Transmit power backoff (in dB) for lower edge of UNII-1 frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_1_LOWER_EDGE_BACKOFF_HE
	int "HE Transmit power backoff (in dB) for lower edge of UNII-1 frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_1_UPPER_EDGE_BACKOFF_HT
	int "HT/VHT Transmit power backoff (in dB) for upper edge of UNII-1 frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_1_UPPER_EDGE_BACKOFF_HE
	int "HE Transmit power backoff (in dB) for upper edge of UNII-1 frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_2A_LOWER_EDGE_BACKOFF_HT
	int "HT/VHT Transmit power backoff (in dB) for lower edge of UNII-2A frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_2A_LOWER_EDGE_BACKOFF_HE
	int "HE Transmit power backoff (in dB) for lower edge of UNII-2A frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_2A_UPPER_EDGE_BACKOFF_HT
	int "HT/VHT Transmit power backoff (in dB) for upper edge of UNII-2A frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_2A_UPPER_EDGE_BACKOFF_HE
	int "HE Transmit power backoff (in dB) for upper edge of UNII-2A frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_2C_LOWER_EDGE_BACKOFF_HT
	int "HT/VHT Transmit power backoff (in dB) for lower edge of UNII-2C frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_2C_LOWER_EDGE_BACKOFF_HE
	int "HE Transmit power backoff (in dB) for lower edge of UNII-2C frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_2C_UPPER_EDGE_BACKOFF_HT
	int "HT/VHT Transmit power backoff (in dB) for upper edge of UNII-2C frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_2C_UPPER_EDGE_BACKOFF_HE
	int "HE Transmit power backoff (in dB) for upper edge of UNII-2C frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_3_LOWER_EDGE_BACKOFF_HT
	int "HT/VHT Transmit power backoff (in dB) for lower edge of UNII-3 frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_3_LOWER_EDGE_BACKOFF_HE
	int "HE Transmit power backoff (in dB) for lower edge of UNII-3 frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_3_UPPER_EDGE_BACKOFF_HT
	int "HT/VHT Transmit power backoff (in dB) for upper edge of UNII-3 frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_3_UPPER_EDGE_BACKOFF_HE
	int "HE Transmit power backoff (in dB) for upper edge of UNII-3 frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_4_LOWER_EDGE_BACKOFF_HT
	int "HT/VHT Transmit power backoff (in dB) for lower edge of UNII-4 frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_4_LOWER_EDGE_BACKOFF_HE
	int "HE Transmit power backoff (in dB) for lower edge of UNII-4 frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_4_UPPER_EDGE_BACKOFF_HT
	int "HT/VHT Transmit power backoff (in dB) for upper edge of UNII-4 frequency band"
	default 0
	range 0 10

config NRF700X_BAND_UNII_4_UPPER_EDGE_BACKOFF_HE
	int "HE Transmit power backoff (in dB) for upper edge of UNII-4 frequency band"
	default 0
	range 0 10

# Performance fine tuning options

config NRF700X_RX_NUM_BUFS
	int "Number of RX buffers"
	default 48

config NRF700X_MAX_TX_AGGREGATION
	int "Maximum number of TX packets to aggregate"
	default 12

config NRF700X_MAX_TX_TOKENS
	int "Maximum number of TX tokens"
	range 5 12 if !NRF700X_RADIO_TEST
	default 10

config NRF700X_TX_MAX_DATA_SIZE
	int "Maximum size of TX data"
	default 1600

config NRF700X_RX_MAX_DATA_SIZE
	int "Maximum size of RX data"
	default 1600

config NRF700X_TX_DONE_WQ_ENABLED
	bool "Enable TX done workqueue (impacts performance negatively)"

config NRF700X_RX_WQ_ENABLED
	bool "Enable RX workqueue"

# Use for IRQ processing (TODO: using for BH processing causes issues)
config NUM_METAIRQ_PRIORITIES
	default 1

config NRF700X_IRQ_WQ_PRIORITY
	int "Priority of the workqueue for handling IRQs"
	default -15

config NRF700X_BH_WQ_PRIORITY
	int "Priority of the workqueue for handling bottom half"
	default 0

config NRF700X_IRQ_WQ_STACK_SIZE
	int "Stack size of the workqueue for handling IRQs"
	default 2048

config NRF700X_BH_WQ_STACK_SIZE
	int "Stack size of the workqueue for handling bottom half"
	default 2048

if NRF700X_TX_DONE_WQ_ENABLED
config NRF700X_TX_DONE_WQ_PRIORITY
	int "Priority of the workqueue for handling TX done"
	default 0

config NRF700X_TX_DONE_WQ_STACK_SIZE
	int "Stack size of the workqueue for handling TX done"
	default 2048
endif

if NRF700X_RX_WQ_ENABLED
config NRF700X_RX_WQ_PRIORITY
	int "Priority of the workqueue for handling RX"
	default 0

config NRF700X_RX_WQ_STACK_SIZE
	int "Stack size of the workqueue for handling RX"
	default 2048
endif

if NRF_WIFI_LOW_POWER
config NRF700X_RPU_PS_IDLE_TIMEOUT_MS
	int "RPU power save idle timeout in milliseconds"
	default 10

config NRF700X_RPU_EXTEND_TWT_SP
	bool "Enable extending TWT service period"
	help
	  In case frames accepted before beginning of SP are not
	  transmitted before the SP completes then typically they are
	  dropped to conform to SP window as per specification i.e., no
	  transmission outside SP window.

	  This feature mitigates the frame loss by transmitting even after SP
	  completion by using standard contention mechanism which is allowed
	  in specification but not recommended. As the device is actively transmitting
	  beyond SP, the power consumption increases depending on the amount
	  of traffic available at the start of SP.

	  Please note that if a frame is sent after SP starts it will be queued and this
	  mechanism is not used.
endif

config WIFI_FIXED_MAC_ADDRESS
	string "WiFi Fixed MAC address in format XX:XX:XX:XX:XX:XX"
	help
	  This overrides the MAC address read from OTP. Strictly for testing purposes only.

choice
	prompt "Wi-Fi MAC address type"
	default WIFI_OTP_MAC_ADDRESS if WIFI_FIXED_MAC_ADDRESS = ""
	default WIFI_FIXED_MAC_ADDRESS_ENABLED if WIFI_FIXED_MAC_ADDRESS != ""
	help
	  Select the type of MAC address to be used by the Wi-Fi driver

config WIFI_OTP_MAC_ADDRESS
	bool "Use MAC address from OTP"
	help
	  This option uses the MAC address stored in the OTP memory of the nRF700x.

config WIFI_FIXED_MAC_ADDRESS_ENABLED
	bool "Enable fixed MAC address"
	help
	  Enable fixed MAC address

config WIFI_RANDOM_MAC_ADDRESS
	bool "Enable random MAC address generation at runtime"
	depends on ENTROPY_GENERATOR
	help
	  This option enables random MAC address generation at runtime.
	  The random MAC address is generated using the entropy device random generator.

endchoice

config NRF700X_RSSI_STALE_TIMEOUT_MS
	int "RSSI stale timeout in milliseconds"
	default 1000
	help
	  RSSI stale timeout is the period after which driver queries
	  RPU to get the RSSI the value.
	  If data is active (e.g. ping), driver stores the RSSI value from
	  the received frames and provides this stored information
	  to wpa_supplicant. In this case a higher value will be suitable
	  as stored RSSI value at driver will be updated regularly.
	  If data is not active or after the stale timeout duration,
	  driver queries the RPU to get the RSSI value
	  and provides it to wpa_supplicant. The value should be set to lower
	  value as driver does not store it and requires RPU to provide the
	  info.

if NETWORKING
# Finetune defaults for certain system components used by the driver
config HEAP_MEM_POOL_SIZE
	default 153000

config SYSTEM_WORKQUEUE_STACK_SIZE
	default 4096

config NET_TX_STACK_SIZE
	default 4096

config NET_RX_STACK_SIZE
	default 4096

config NET_TC_TX_COUNT
	default 1

endif # NETWORKING

# Override the Wi-Fi subsytems WIFI_MGMT_SCAN_SSID_FILT_MAX parameter,
# since we support a maximum of 2 SSIDs for scan result filtering.
config WIFI_MGMT_SCAN_SSID_FILT_MAX
	default 2
endif

config NRF_WIFI_SCAN_MAX_BSS_CNT
	int "Maximum number of scan results to return."
	default 0
	range 0 65535
	help
	  Maximum number of scan results to return. 0 represents unlimited number of BSSes.

config NRF_WIFI_BEAMFORMING
	bool "Enable Wi-Fi beamforming. Enabling beamforming can provide slight improvement in performance where as disabling it can provide better power saving in low network activity applications"
	default y

config WIFI_NRF700X_SCAN_TIMEOUT_S
	int "Scan timeout in seconds"
	default 30

menu "nRF Wi-Fi operation band(s)"
	visible if !NRF70_2_4G_ONLY

config NRF_WIFI_2G_BAND
	bool "Set operation band to 2.4GHz"
	default y if NRF70_2_4G_ONLY

config NRF_WIFI_5G_BAND
	bool "Set operation band to 5GHz"
	depends on !NRF70_2_4G_ONLY

config NRF_WIFI_OP_BAND
	int "Options to set operation band"
	default 1 if NRF_WIFI_2G_BAND
	default 2 if NRF_WIFI_5G_BAND
	default 3
	help
	  Set this option to select frequency band
	  1 - 2.4GHz
	  2 - 5GHz
	  3 - All ( 2.4GHz and 5GHz )
endmenu

config NRF_WIFI_IFACE_MTU
	int "MTU for Wi-Fi interface"
	range 576 2304 if NET_IPV4
	range 1280 2304 if NET_IPV6
	default 1500

config WIFI_NRF700X_SKIP_LOCAL_ADMIN_MAC
	bool "Suppress networks with non-individual MAC address as BSSID in the scan results"
	help
	  Wi-Fi access points use locally administered MAC address to manage
	  multiple virtual interfaces, for geo-location usecase these networks
	  from the virtual interfaces do not help in anyway as they are co-located with the primary interface
	  that has globally unique MAC address.

	  So, to save resources, this option drops such networks from the scan results.

config WIFI_NRF700X_SCAN_DISABLE_DFS_CHANNELS
	bool "Disables DFS channels in scan operation"
	help
	  This option disables inclusion of DFS channels in scan operation.
	  This is useful to reduce the scan time, as DFS channels are seldom used.

config NET_INTERFACE_NAME_LEN
	# nordic_wlanN
	default 15

config NRF_WIFI_AP_DEAD_DETECT_TIMEOUT
	int "Access point dead detection timeout in seconds"
	range 1 30
	default 20
	help
		The number of seconds after which AP is declared dead if no beacons
		are received from the AP. Used to detect AP silently going down e.g., power off.

config NRF_WIFI_RPU_RECOVERY
	bool "Enable RPU recovery mechanism"
	select EXPERIMENTAL
	help
		Enable RPU recovery mechanism to recover from RPU (nRF70) hang.
		This feature performs an interface reset (down and up) which triggers
		a RPU coldboot. Application's network connection will be lost during
		the recovery process and it is application's responsibility to
		re-establish the network connection.

if NRF_WIFI_RPU_RECOVERY

config NRF_WIFI_RPU_RECOVERY_PROPAGATION_DELAY_MS
	int "RPU recovery propagation delay in milliseconds"
	default 10
	help
		Propagation delay in milliseconds to wait after RPU is powered down
		before powering it up. This delay is required to ensure that the recovery
		is propagted to all the applications and stack and have enough time to
		clean up the resources.

config NET_MGMT_EVENT_QUEUE_SIZE
	# Doing interface down and up even with delay puts a lot of events in the queue
	default 16
endif

config NRF_WIFI_COMBINED_BUCKEN_IOVDD_GPIO
	bool
	help
	  Enable this option to use a single GPIO to control both buck enable and IOVDD enable,
	  there will be a internal hardware switch to add delay between the two operations. This
	  is typically 4ms delay for nRF70.
