diff --git a/modules/wfa-qt/src/indigo_api_callback_dut.c b/modules/wfa-qt/src/indigo_api_callback_dut.c index 01a411b7764e..0652f296a5f7 100644 --- a/modules/wfa-qt/src/indigo_api_callback_dut.c +++ b/modules/wfa-qt/src/indigo_api_callback_dut.c @@ -30,6 +30,12 @@ #include "hs2_profile.h" #include "common.h" +#ifdef CONFIG_WIFI_CERTIFICATE_LIB +#include + +int process_certificates(void); +#endif + struct interface_info *band_transmitter[16]; struct interface_info *band_first_wlan[16]; extern struct sockaddr_in *tool_addr; @@ -1867,7 +1873,64 @@ static int configure_sta_handler(struct packet_wrapper *req, struct packet_wrapp CHECK_RET(); ret = run_qt_command("SET_NETWORK 0 ieee80211w 2"); CHECK_RET(); +#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE + } else if (strstr(tlv->value, "WPA-EAP")) { + /* + * Process Certificates + */ + + process_certificates(); + + struct { + int tlv_id; + const char *cmd_fmt; + const char *default_val; + bool use_tlv_value; + } config_cmds[] = { + { TLV_EAP, + "SET_NETWORK 0 eap %s", + NULL, true }, + { TLV_IDENTITY, + "SET_NETWORK 0 identity \"%s\"", + NULL, true }, + { TLV_CA_CERT, + "SET_NETWORK 0 ca_cert \"%s\"", + "blob://ca_cert", false }, + { TLV_CLIENT_CERT, + "SET_NETWORK 0 client_cert \"%s\"", + "blob://client_cert", false }, + { TLV_PRIVATE_KEY, + "SET_NETWORK 0 private_key \"%s\"", + "blob://private_key", false }, + }; + + for (size_t i = 0; i < ARRAY_SIZE(config_cmds); i++) { + tlv = find_wrapper_tlv_by_id(req, config_cmds[i].tlv_id); + if (tlv) { + memset(buffer, 0, sizeof(buffer)); + if (config_cmds[i].use_tlv_value) { + CHECK_SNPRINTF(buffer, sizeof(buffer), ret, + config_cmds[i].cmd_fmt, tlv->value); + } else { + CHECK_SNPRINTF(buffer, sizeof(buffer), ret, + config_cmds[i].cmd_fmt, + config_cmds[i].default_val); + } + ret = run_qt_command(buffer); + CHECK_RET(); + } + } + + CHECK_SNPRINTF(buffer, sizeof(buffer), + ret, "SET_NETWORK 0 private_key_passwd \"whatever\""); + ret = run_qt_command(buffer); + CHECK_RET(); + ret = run_qt_command("SET_NETWORK 0 ieee80211w 1"); + CHECK_RET(); + } +#else } +#endif } tlv = find_wrapper_tlv_by_id(req, TLV_PROTO); diff --git a/samples/wifi/wfa_qt_app/overlay-enterprise.conf b/samples/wifi/wfa_qt_app/overlay-enterprise.conf new file mode 100644 index 000000000000..9010b44fe9ba --- /dev/null +++ b/samples/wifi/wfa_qt_app/overlay-enterprise.conf @@ -0,0 +1,3 @@ +CONFIG_NRF_WIFI_DATA_HEAP_SIZE=80000 +CONFIG_WIFI_CREDENTIALS=n +CONFIG_NRF70_RX_NUM_BUFS=16 diff --git a/samples/wifi/wfa_qt_app/sample.yaml b/samples/wifi/wfa_qt_app/sample.yaml index 6a56c7d6b275..d61a6e60a50b 100644 --- a/samples/wifi/wfa_qt_app/sample.yaml +++ b/samples/wifi/wfa_qt_app/sample.yaml @@ -12,6 +12,19 @@ tests: - ci_build - sysbuild - ci_samples_wifi + sample.nrf7002.enterprise_mode.wfa_qt_app: + sysbuild: true + build_only: true + extra_args: + - EXTRA_CONF_FILE:STRING="overlay-netusb.conf;overlay-enterprise.conf" + - wfa_qt_app_SNIPPET="wifi-enterprise" + integration_platforms: + - nrf7002dk/nrf5340/cpuapp + platform_allow: nrf7002dk/nrf5340/cpuapp + tags: + - ci_build + - sysbuild + - ci_samples_wifi sample.nrf7002_eks.wfa_qt_app: sysbuild: true build_only: true diff --git a/west.yml b/west.yml index 649a9730783b..0d0bfd81c470 100644 --- a/west.yml +++ b/west.yml @@ -65,7 +65,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: bc6d4d7b667e68d807901fcd31413cf6aa3c0b19 + revision: 331f27b4aa44c555882267c531c71e6d2e4b96a4 import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above