wifi: Move Wi-Fi enterprise configs to a snippet

Instead of having an overlay move the Enterprise configurations to a
dedicated snippet so that it can be enabled with any sample.

Can be used along with Wi-Fi snippet e.g., `-S
"wifi-ipv4;wifi-enterprise"`.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This commit is contained in:
Chaitanya Tata 2025-03-26 00:10:17 +05:30 committed by Benjamin Cabé
commit d7b3bcd982
5 changed files with 37 additions and 21 deletions

View file

@ -50,14 +50,7 @@ module.
$ cp client2.pem samples/net/wifi/test_certs/
$ cp client-key2.pem samples/net/wifi/test_certs/
$ cp ca2.pem samples/net/wifi/test_certs/
$ west build -p -b <board> samples/net/wifi -- -DEXTRA_CONF_FILE=overlay-enterprise.conf
For using variable size network buffer, the following overlay file can be used:
.. code-block:: bash
$ west build -p -b <board> samples/net/wifi -- -DEXTRA_CONF_FILE=overlay-enterprise-variable-bufs.conf
$ west build -p -b <board> samples/net/wifi -S wifi-enterprise
Run time certificates
---------------------

View file

@ -1,10 +0,0 @@
CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE=y
# EAP frames are ~1100 bytes, so, need higher packet counts as default packet size is 128
CONFIG_NET_PKT_TX_COUNT=36
CONFIG_NET_PKT_RX_COUNT=36
CONFIG_NET_BUF_TX_COUNT=72
CONFIG_NET_BUF_RX_COUNT=36
# For TLS and X.509 processing MbedTLS needs large heap size and using separate heap
# for MbedTLS gives us more control over the heap size.
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=60000

View file

@ -0,0 +1,31 @@
.. _snippet-wifi-enterprise:
Wi-Fi Enterprise Snippet (wifi-enterprise)
##########################################
.. code-block:: console
west build -S wifi-enterprise [...]
Can also be used along with the :ref:`snippet-wifi-ipv4` snippet.
.. code-block:: console
west build -S "wifi-enterprise,wifi-ipv4" [...]
Overview
********
This snippet enables enterprise Wi-Fi support in supported networking samples.
See :ref:`wifi_mgmt` for more information on the usage.
Requirements
************
Hardware support for:
- :kconfig:option:`CONFIG_WIFI`
- :kconfig:option:`CONFIG_WIFI_USE_NATIVE_NETWORKING`
- :kconfig:option:`CONFIG_WIFI_NM_WPA_SUPPLICANT`
- :kconfig:option:`CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE`

View file

@ -0,0 +1,3 @@
name: wifi-enterprise
append:
EXTRA_CONF_FILE: wifi-enterprise.conf

View file

@ -1,9 +1,8 @@
# Enable Wi-Fi enterprise mode
CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE=y
# EAP frames are ~1100 bytes, so, for efficiency, we set the data size to 1100
CONFIG_NET_BUF_DATA_SIZE=1100
# Use variable data size to reduce memory usage for small data packets
CONFIG_NET_BUF_VARIABLE_DATA_SIZE=y
# For TLS and X.509 processing MbedTLS needs large heap size and using separate heap
# for MbedTLS gives us more control over the heap size.
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=55000
CONFIG_MBEDTLS_HEAP_SIZE=70000