ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
port_esp_hosted_host_wifi_config.h File Reference

esp-hosted port header: which Wi-Fi and supplicant features exist. More...

Go to the source code of this file.

Macros

#define H_WIFI_HE_SUPPORT   (1)
 Whether the co-processor's radio speaks 802.11ax (Wi-Fi 6).
#define H_WIFI_HE_GREATER_THAN_ESP_IDF_5_3   (1)
 Whether the HE structures use the post-5.3 layout.
#define H_WIFI_DUALBAND_SUPPORT   (0)
 Whether the co-processor's radio covers 5 GHz as well as 2.4 GHz.
#define H_WIFI_ENTERPRISE_SUPPORT   (1)
 Whether the image carries the WPA2/WPA3-Enterprise supplicant.
#define H_GOT_SET_EAP_METHODS_API   (1)
 Whether the image exposes the "set EAP methods" call.
#define H_GOT_EAP_OKC_SUPPORT   (1)
 Whether the image exposes opportunistic key caching control.
#define H_GOT_EAP_SET_DOMAIN_NAME   (1)
 Whether the image exposes the EAP domain-name setter.
#define H_GOT_AP_CONFIG_PARAM_TRANSITION_DISABLE   (1)
 Whether the AP configuration carries the transition-disable bit.
#define H_GOT_TWT_ENABLE_KEEP_ALIVE   (1)
 Whether the TWT configuration carries the keep-alive flag.
#define H_PRESENT_IN_ESP_IDF_5_4_0   (1)
 Whether fields added in ESP-IDF v5.4.0 are present.
#define H_PRESENT_IN_ESP_IDF_5_5_0   (1)
 Whether fields added in ESP-IDF v5.5.0 are present.
#define H_WIFI_NEW_RESERVED_FIELD_NAMES   (1)
 Whether the reserved bitfields use their post-5.4 names.
#define H_DECODE_WIFI_RESERVED_FIELD   (1)
 Whether the host preserves the spare configuration bits.
#define H_DPP_SUPPORT   (0)
 Whether the host offers the DPP provisioning API.
#define H_SUPP_DPP_SUPPORT   (0)
 Whether the supplicant half of DPP is present.
#define H_WIFI_DPP_SUPPORT   (0)
 Whether the Wi-Fi layer forwards DPP events.
#define H_DPP_URI_LEN_MAX   (255)
 Longest DPP bootstrapping URI the host would accept, in characters.
#define H_EXT_COEX_SUPPORT   (0)
 Whether the host can configure external radio coexistence.
#define H_EXT_COEX_ADVANCE_SUPPORT   (0)
 Whether the extended coexistence parameter set is available.
#define H_GPIO_EXPANDER_SUPPORT   (0)
 Whether the host drives the co-processor's spare GPIOs.

Detailed Description

esp-hosted port header: which Wi-Fi and supplicant features exist.

Tag
[Ring 4 / PORT] {World: NS}

One of the ten port headers the vendored esp-hosted core includes by name (see docs/SOUP/esp-hosted-host.md); ten vendored translation units – the whole RPC and public-API layer – reach it. Upstream generates its equivalent from Kconfig under host/port/, which this project excludes; this file is its first-party replacement and keeps the upstream file name and every upstream macro spelling exactly.

These flags describe the co-processor, not a preference
Every switch here answers one of two factual questions:
  • What can the radio do? The co-processor is an ESP32-C6: a single-band 2.4 GHz part with 802.11ax (Wi-Fi 6) support. Whatever the host asks for beyond that, the radio cannot deliver.
  • What is in the co-processor image? It is built from ESP-IDF v5.5.4 with the defaults in coprocessor/esp32c6/sdkconfig.defaults (coprocessor/esp32c6/pins.env pins both versions). A structure field or an RPC identifier exists on that image or it does not, and a flag that claims otherwise makes the host serialise a request the co-processor will reject – or, worse, decode a response field that is not there. That is why none of the reasons below is "upstream default": the default is only relevant as evidence about what v5.5.4 actually compiled.
Version-shaped flags
H_PRESENT_IN_ESP_IDF_5_4_0 and H_PRESENT_IN_ESP_IDF_5_5_0 gate individual structure fields that IDF added in those releases (the 5 GHz RSSI adjustment, the SAE extension, the VHT beamformee bits). v5.5.4 is at or past both, so both are on and the host mirrors the full structure.
Since
0.1.0

Definition in file port_esp_hosted_host_wifi_config.h.

Macro Definition Documentation

◆ H_DECODE_WIFI_RESERVED_FIELD

#define H_DECODE_WIFI_RESERVED_FIELD   (1)

Whether the host preserves the spare configuration bits.

One. The reserved bits round-trip between the application's structure and the wire bitmask; carrying them means a configuration read back from the co-processor and written straight out again is unchanged, instead of quietly losing bits this IDF version does not name yet.

Note
Read-only build configuration.
Warning
Needs H_WIFI_NEW_RESERVED_FIELD_NAMES to match the image, or the decode names a member that does not exist.
Example:
#if H_DECODE_WIFI_RESERVED_FIELD
p_a_sta->reserved2 = WIFI_STA_CONFIG_2_GET_RESERVED_VAL(p_c_sta->he_bitmask);
#endif
Since
0.1.0

Definition at line 304 of file port_esp_hosted_host_wifi_config.h.

◆ H_DPP_SUPPORT

#define H_DPP_SUPPORT   (0)

Whether the host offers the DPP provisioning API.

Zero. ESP-IDF leaves CONFIG_WPA_DPP_SUPPORT off by default and coprocessor/esp32c6/sdkconfig.defaults does not turn it on, so the DPP bootstrap and listen calls are not in the image the host talks to.

Note
Read-only build configuration.
Warning
This also controls whether esp_dpp.h is included by the RPC headers; a 1 here needs the header and the co-processor support together.
Example:
#if H_DPP_SUPPORT
#include "esp_dpp.h"
#endif
Since
0.1.0

Definition at line 328 of file port_esp_hosted_host_wifi_config.h.

◆ H_DPP_URI_LEN_MAX

#define H_DPP_URI_LEN_MAX   (255)

Longest DPP bootstrapping URI the host would accept, in characters.

  1. The vendored header derives DPP_URI_LEN_MAX as this plus one for the terminator, so the buffer is a round 256 bytes; a DPP URI carries a curve name, a base64 public key and optional channel and MAC hints, which fits comfortably.
    Note
    Read-only build configuration.
    Warning
    The buffer is a fixed array in a structure, so this is an allocation size, not a policy limit; shrinking it truncates URIs rather than rejecting them.
    Example:
    #define DPP_URI_LEN_MAX (H_DPP_URI_LEN_MAX + 1)
    Since
    0.1.0

Definition at line 384 of file port_esp_hosted_host_wifi_config.h.

◆ H_EXT_COEX_ADVANCE_SUPPORT

#define H_EXT_COEX_ADVANCE_SUPPORT   (0)

Whether the extended coexistence parameter set is available.

Zero, matching H_EXT_COEX_SUPPORT; the advanced parameters are a superset of a feature this board does not wire at all.

Note
Read-only build configuration.
Warning
Enabling this without H_EXT_COEX_SUPPORT compiles the advanced RPC case with no basic configuration behind it.
Example:
#if H_EXT_COEX_ADVANCE_SUPPORT
encode_advanced_coex(req);
#endif
Since
0.1.0

Definition at line 425 of file port_esp_hosted_host_wifi_config.h.

◆ H_EXT_COEX_SUPPORT

#define H_EXT_COEX_SUPPORT   (0)

Whether the host can configure external radio coexistence.

Zero. External coexistence arbitrates the 2.4 GHz medium with another radio over dedicated request/grant/priority wires; this harness has no second radio and no coexistence pins between the RA8 and the C6.

Note
Read-only build configuration.
Warning
Controls inclusion of esp_hosted_cp_ext_coex.h as well as the RPC cases; the header and the flag move together.
Example:
#if H_EXT_COEX_SUPPORT
#include "esp_hosted_cp_ext_coex.h"
#endif
Since
0.1.0

Definition at line 407 of file port_esp_hosted_host_wifi_config.h.

◆ H_GOT_AP_CONFIG_PARAM_TRANSITION_DISABLE

#define H_GOT_AP_CONFIG_PARAM_TRANSITION_DISABLE   (1)

Whether the AP configuration carries the transition-disable bit.

One. transition_disable – the WPA3 downgrade-protection indication an access point advertises – is a field of the v5.5.4 AP configuration structure, so it is copied in both RPC directions.

Note
Read-only build configuration.
Warning
The field is copied field-by-field, not memcpy'd, so a 1 here against a structure without it is a compile error rather than silent corruption.
Example:
#if H_GOT_AP_CONFIG_PARAM_TRANSITION_DISABLE
p_c_ap->transition_disable = p_a_ap->transition_disable;
#endif
Since
0.1.0

Definition at line 204 of file port_esp_hosted_host_wifi_config.h.

◆ H_GOT_EAP_OKC_SUPPORT

#define H_GOT_EAP_OKC_SUPPORT   (1)

Whether the image exposes opportunistic key caching control.

One. The OKC toggle is in the v5.5.4 EAP client, so the host can offer the matching RPC request.

Note
Read-only build configuration.
Warning
A 1 here on an older co-processor image produces an RPC id the far end does not recognise, which fails the whole transaction.
Example:
#if H_GOT_EAP_OKC_SUPPORT
case RPC_ID__Req_WifiSetOkcSupport: encode_okc(); break;
#endif
Since
0.1.0

Definition at line 168 of file port_esp_hosted_host_wifi_config.h.

◆ H_GOT_EAP_SET_DOMAIN_NAME

#define H_GOT_EAP_SET_DOMAIN_NAME   (1)

Whether the image exposes the EAP domain-name setter.

One; present in the v5.5.4 EAP client alongside the OKC control.

Note
Read-only build configuration.
Warning
See H_GOT_EAP_OKC_SUPPORT for what an over-claimed RPC id does.
Example:
#if H_GOT_EAP_SET_DOMAIN_NAME
case RPC_ID__Req_EapSetDomainName: encode_domain(); break;
#endif
Since
0.1.0

Definition at line 184 of file port_esp_hosted_host_wifi_config.h.

◆ H_GOT_SET_EAP_METHODS_API

#define H_GOT_SET_EAP_METHODS_API   (1)

Whether the image exposes the "set EAP methods" call.

One. esp_eap_client_set_eap_methods() is part of the EAP client in ESP-IDF v5.5.4, so both the RPC request encoder and the public esp_eap_client_remote_set_eap_methods() prototype are real.

Note
Read-only build configuration.
Warning
Only meaningful with H_WIFI_ENTERPRISE_SUPPORT on; the two are nested upstream and an inconsistent pair drops the prototype while keeping its RPC case.
Example:
#if H_GOT_SET_EAP_METHODS_API
case RPC_ID__Req_EapSetEapMethods: encode_methods(); break;
#endif
Since
0.1.0

Definition at line 150 of file port_esp_hosted_host_wifi_config.h.

◆ H_GOT_TWT_ENABLE_KEEP_ALIVE

#define H_GOT_TWT_ENABLE_KEEP_ALIVE   (1)

Whether the TWT configuration carries the keep-alive flag.

One. Target Wake Time is part of 802.11ax, the C6 supports it, and twt_enable_keep_alive is a field of the v5.5.4 TWT configuration.

Note
Read-only build configuration.
Warning
Only reachable while H_WIFI_HE_SUPPORT is 1; TWT is an HE feature.
Example:
#if H_GOT_TWT_ENABLE_KEEP_ALIVE
req->config->twt_enable_keep_alive = cfg.twt_enable_keep_alive;
#endif
Since
0.1.0

Definition at line 222 of file port_esp_hosted_host_wifi_config.h.

◆ H_GPIO_EXPANDER_SUPPORT

#define H_GPIO_EXPANDER_SUPPORT   (0)

Whether the host drives the co-processor's spare GPIOs.

Zero. It would let the RA8 use unused C6 pins as a remote GPIO expander over RPC. The C6 module here has no spare pins broken out – the seven the harness uses are the seven that are wired – so the feature has nothing to expand onto.

Note
Read-only build configuration.
Warning
Controls inclusion of esp_hosted_cp_gpio.h in the RPC wrapper headers as well as the RPC cases themselves.
Example:
#if H_GPIO_EXPANDER_SUPPORT
#include "esp_hosted_cp_gpio.h"
#endif
Since
0.1.0

Definition at line 445 of file port_esp_hosted_host_wifi_config.h.

◆ H_PRESENT_IN_ESP_IDF_5_4_0

#define H_PRESENT_IN_ESP_IDF_5_4_0   (1)

Whether fields added in ESP-IDF v5.4.0 are present.

One; the co-processor image is v5.5.4. The field this actually gates is the scan threshold's 5 GHz RSSI adjustment, which exists in the structure even on a single-band part and must therefore be copied for the two ends to agree on the layout.

Note
Read-only build configuration.
Warning
Structure layout, not capability: leaving it off on a v5.5.4 image would silently drop a field the co-processor still expects.
Example:
#if H_PRESENT_IN_ESP_IDF_5_4_0
p_a_sta->threshold.rssi_5g_adjustment = p_c_sta->threshold->rssi_5g_adjustment;
#endif
Since
0.1.0

Definition at line 246 of file port_esp_hosted_host_wifi_config.h.

◆ H_PRESENT_IN_ESP_IDF_5_5_0

#define H_PRESENT_IN_ESP_IDF_5_5_0   (1)

Whether fields added in ESP-IDF v5.5.0 are present.

One; v5.5.4 is a v5.5 patch release. It gates the SAE extension field of the AP and station configurations and the three VHT beamformee bits in the HE bitmask.

Note
Read-only build configuration.
Warning
See H_PRESENT_IN_ESP_IDF_5_4_0 – this is about layout agreement, not about whether the feature is wanted.
Example:
#if H_PRESENT_IN_ESP_IDF_5_5_0
p_c_ap->sae_ext = p_a_ap->sae_ext;
#endif
Since
0.1.0

Definition at line 265 of file port_esp_hosted_host_wifi_config.h.

◆ H_SUPP_DPP_SUPPORT

#define H_SUPP_DPP_SUPPORT   (0)

Whether the supplicant half of DPP is present.

Zero, matching H_DPP_SUPPORT. It is a separate upstream switch because the supplicant callbacks and the application API were added at different times; on this image neither exists.

Note
Read-only build configuration.
Warning
Enabling this alone gives the event path a DPP callback with no API to drive it.
Example:
#if H_SUPP_DPP_SUPPORT
dispatch_dpp_event(evt);
#endif
Since
0.1.0

Definition at line 347 of file port_esp_hosted_host_wifi_config.h.

◆ H_WIFI_DPP_SUPPORT

#define H_WIFI_DPP_SUPPORT   (0)

Whether the Wi-Fi layer forwards DPP events.

Zero, matching H_DPP_SUPPORT. The third of the upstream DPP switches; all three describe the same absent feature from three layers.

Note
Read-only build configuration.
Warning
All three DPP switches must agree; a mismatch compiles a dispatcher for events that are never encoded.
Example:
#if H_WIFI_DPP_SUPPORT
forward_dpp_uri_ready(evt);
#endif
Since
0.1.0

Definition at line 365 of file port_esp_hosted_host_wifi_config.h.

◆ H_WIFI_DUALBAND_SUPPORT

#define H_WIFI_DUALBAND_SUPPORT   (0)

Whether the co-processor's radio covers 5 GHz as well as 2.4 GHz.

Zero. The ESP32-C6 is single-band 2.4 GHz; there is no 5 GHz PHY on the part, so band selection and the dual-band scan variants have nothing to drive.

Note
Read-only build configuration.
Warning
Setting this to 1 makes the host offer a band the radio does not have, and the resulting failures surface as scan timeouts rather than as a clear rejection.
Example:
#if H_WIFI_DUALBAND_SUPPORT
esp_wifi_set_band_mode(WIFI_BAND_MODE_AUTO);
#endif
Since
0.1.0

Definition at line 106 of file port_esp_hosted_host_wifi_config.h.

◆ H_WIFI_ENTERPRISE_SUPPORT

#define H_WIFI_ENTERPRISE_SUPPORT   (1)

Whether the image carries the WPA2/WPA3-Enterprise supplicant.

One. ESP-IDF builds the enterprise supplicant into the C6 Wi-Fi image by default, and sdkconfig.defaults does not disable it, so the EAP client and its RPC surface are there to be driven.

Note
Read-only build configuration.
Warning
This switch also controls whether esp_eap_client.h is included by the RPC headers; turning it off removes types the public API declares.
Example:
#if H_WIFI_ENTERPRISE_SUPPORT
#include "esp_eap_client.h"
#endif
Since
0.1.0

Definition at line 130 of file port_esp_hosted_host_wifi_config.h.

◆ H_WIFI_HE_GREATER_THAN_ESP_IDF_5_3

#define H_WIFI_HE_GREATER_THAN_ESP_IDF_5_3   (1)

Whether the HE structures use the post-5.3 layout.

One. The co-processor image is ESP-IDF v5.5.4, comfortably past v5.3, where the high-efficiency fields moved into the bitmask form the vendored encoder writes.

Note
Read-only build configuration.
Warning
Must track the image's IDF version, not the host's ambitions; the wrong layout mis-decodes every station configuration.
Example:
#if H_WIFI_HE_GREATER_THAN_ESP_IDF_5_3
use_he_bitmask_layout();
#endif
Since
0.1.0

Definition at line 86 of file port_esp_hosted_host_wifi_config.h.

◆ H_WIFI_HE_SUPPORT

#define H_WIFI_HE_SUPPORT   (1)

Whether the co-processor's radio speaks 802.11ax (Wi-Fi 6).

One. The ESP32-C6 is an 802.11ax part, so the high-efficiency configuration blocks – the HE bitmask in the station config, the TWT calls, the HE-aware scan record – are all meaningful on this link.

Note
Read-only build configuration.
Warning
Turning this off does not merely hide an option: the host stops serialising the HE half of the station configuration, and the co-processor then joins with defaults the application never chose.
Example:
#if H_WIFI_HE_SUPPORT
p_c_sta->he_bitmask = encode_he_bits(cfg);
#endif
Since
0.1.0

Definition at line 67 of file port_esp_hosted_host_wifi_config.h.

◆ H_WIFI_NEW_RESERVED_FIELD_NAMES

#define H_WIFI_NEW_RESERVED_FIELD_NAMES   (1)

Whether the reserved bitfields use their post-5.4 names.

One. ESP-IDF v5.4 renamed the station configuration's spare bits to reserved1 and reserved2; the pre-5.4 spellings were reserved and he_reserved. v5.5.4 uses the new names.

Note
Read-only build configuration.
Warning
Only consulted when H_DECODE_WIFI_RESERVED_FIELD is 1; the wrong choice is a compile error naming a struct member.
Example:
#if H_WIFI_NEW_RESERVED_FIELD_NAMES
p_a_sta->reserved1 = WIFI_STA_CONFIG_1_GET_RESERVED_VAL(p_c_sta->bitmask);
#endif
Since
0.1.0

Definition at line 284 of file port_esp_hosted_host_wifi_config.h.