diff --git a/doc/connectivity/networking/api/wifi.rst b/doc/connectivity/networking/api/wifi.rst index d69d3c1836d..fdb8f22cabd 100644 --- a/doc/connectivity/networking/api/wifi.rst +++ b/doc/connectivity/networking/api/wifi.rst @@ -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 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 samples/net/wifi -- -DEXTRA_CONF_FILE=overlay-enterprise-variable-bufs.conf - + $ west build -p -b samples/net/wifi -S wifi-enterprise Run time certificates --------------------- diff --git a/samples/net/wifi/shell/overlay-enterprise.conf b/samples/net/wifi/shell/overlay-enterprise.conf deleted file mode 100644 index 5290e31744b..00000000000 --- a/samples/net/wifi/shell/overlay-enterprise.conf +++ /dev/null @@ -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 diff --git a/snippets/wifi-enterprise/README.rst b/snippets/wifi-enterprise/README.rst new file mode 100644 index 00000000000..ddf512b5835 --- /dev/null +++ b/snippets/wifi-enterprise/README.rst @@ -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` diff --git a/snippets/wifi-enterprise/snippet.yml b/snippets/wifi-enterprise/snippet.yml new file mode 100644 index 00000000000..6a4f73d38b4 --- /dev/null +++ b/snippets/wifi-enterprise/snippet.yml @@ -0,0 +1,3 @@ +name: wifi-enterprise +append: + EXTRA_CONF_FILE: wifi-enterprise.conf diff --git a/samples/net/wifi/shell/overlay-enterprise-variable-bufs.conf b/snippets/wifi-enterprise/wifi-enterprise.conf similarity index 70% rename from samples/net/wifi/shell/overlay-enterprise-variable-bufs.conf rename to snippets/wifi-enterprise/wifi-enterprise.conf index 627d77a9247..250e6461155 100644 --- a/samples/net/wifi/shell/overlay-enterprise-variable-bufs.conf +++ b/snippets/wifi-enterprise/wifi-enterprise.conf @@ -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