Skip to content

Commit

Permalink
Upload wifi-host-driver 3.0.0.22316 [2049]
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlab-runner committed Dec 15, 2023
1 parent 919d921 commit 04ee318
Show file tree
Hide file tree
Showing 203 changed files with 87,722 additions and 23,265 deletions.
78 changes: 78 additions & 0 deletions External/rtos/cyabs_rtos.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,84 @@ extern cy_rslt_t cy_rtos_set_semaphore(cy_semaphore_t *semaphore, bool in_isr);
*/
extern cy_rslt_t cy_rtos_deinit_semaphore(cy_semaphore_t *semaphore);

/*********************************************** Events **********************************************/

/** Create an event.
*
* This is an event which can be used to signal a set of threads
* with a 32 bit data element.
*
* @param[in,out] event Pointer to the event handle to be initialized
*
* @return The status of the event initialization request.
* [CY_RSLT_SUCCESS, CY_RTOS_NO_MEMORY, CY_RTOS_GENERAL_ERROR]
*/
extern cy_rslt_t cy_rtos_init_event(cy_event_t *event) ;

/** Set the event flag bits.
*
* This is an event which can be used to signal a set of threads
* with a 32 bit data element. Any threads waiting on this event are released
*
* @param[in] event Pointer to the event handle
* @param[in] bits The value of the 32 bit flags
* @param[in] in_isr If true, this is called from an ISR, otherwise from a thread
*
* @return The status of the set request. [CY_RSLT_SUCCESS, CY_RTOS_NO_MEMORY, CY_RTOS_GENERAL_ERROR]
*/
extern cy_rslt_t cy_rtos_setbits_event(cy_event_t *event, uint32_t bits, bool in_isr) ;

/**
* Clear the event flag bits
*
* This function clears bits in the event.
*
* @param[in] event Pointer to the event handle
* @param[in] bits Any bits set in this value, will be cleared in the event.
* @param[in] in_isr if true, this is called from an ISR, otherwise from a thread
*
* @return The status of the clear flags request. [CY_RSLT_SUCCESS, CY_RTOS_NO_MEMORY, CY_RTOS_GENERAL_ERROR]
*/
extern cy_rslt_t cy_rtos_clearbits_event(cy_event_t *event, uint32_t bits, bool in_isr) ;

/** Get the event bits.
*
* Returns the current bits for the event.
*
* @param[in] event Pointer to the event handle
* @param[out] bits pointer to receive the value of the event flags
*
* @return The status of the get request. [CY_RSLT_SUCCESS, CY_RTOS_NO_MEMORY, CY_RTOS_GENERAL_ERROR]
*/
extern cy_rslt_t cy_rtos_getbits_event(cy_event_t *event, uint32_t *bits) ;

/** Wait for the event and return bits.
*
* Waits for the event to be set and then returns the bits assocaited
* with the event, or waits for the given timeout period.
* @note This function returns if any bit in the set is set.
*
* @param[in] event Pointer to the event handle
* @param[in,out] bits pointer to receive the value of the event flags
* @param[in] clear if true, clear any bits set that cause the wait to return
* if false, do not clear bits
* @param[in] all if true, all bits in the initial bits value must be set to return
* if false, any one bit in the initial bits value must be set to return
* @param[in] timeout The amount of time to wait in milliseconds
*
* @return The status of the wait for event request. [CY_RSLT_SUCCESS, CY_RTOS_NO_MEMORY, CY_RTOS_GENERAL_ERROR]
*/
extern cy_rslt_t cy_rtos_waitbits_event(cy_event_t *event, uint32_t *bits, bool clear, bool all, cy_time_t timeout) ;

/** Deinitialize a event.
*
* This function frees the resources associated with an event.
*
* @param[in] event Pointer to the event handle
*
* @return The status of the deletion request. [CY_RSLT_SUCCESS, CY_RTOS_GENERAL_ERROR]
*/
extern cy_rslt_t cy_rtos_deinit_event(cy_event_t *event) ;

/*********************************************** Time **********************************************/

Expand Down
1 change: 1 addition & 0 deletions External/rtos/cyabs_rtos_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ typedef volatile uint32_t cy_thread_t; /** RTOS definition of a thread han
typedef int32_t cy_rtos_error_t; /** RTOS definition of a error status */
typedef uint32_t cy_time_t;
typedef uint32_t cy_thread_arg_t;
typedef uint32_t cy_event_t; /** RTOS definition of a event */

20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ The WHD is an independent, embedded Wi-Fi Host Driver that provides a set of API
The [release notes](./RELEASE.md) detail the current release. You can also find information about previous versions.

### Supported bus interface
---------------------------------------------------
| Interface |4343W|43438|4373 |43012|43439|43907|
|:-----------:|:---:|:---:|:---:|:---:|:---:|:---:|
| SDIO | O | O | O | O | O | |
| SPI | O | O | | | O | |
| M2M | | | | | | O |
---------------------------------------------------------
| Interface |4343W|43438|4373 |43012|43439|43907|43022|
|:-----------:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| SDIO | O | O | O | O | O | | O |
| SPI | O | O | | | O | | |
| M2M | | | | | | O | |

### WPA3 AP mode support
---------------------------------------------------
| Security |4343W|43438|4373 |43012|43439|43907|
|:-----------:|:---:|:---:|:---:|:---:|:---:|:---:|
| WPA3 | | | O | | O | |
---------------------------------------------------------
| Security |4343W|43438|4373 |43012|43439|43907|43022|
|:-----------:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| WPA3 | | | O | | O | | |

### More information
* [Wi-Fi Host Driver API Reference Manual and Porting Guide](https://infineon.github.io/wifi-host-driver/html/index.html)
Expand Down
8 changes: 6 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Wi-Fi Host Driver (WHD) v2.7.0
# Wi-Fi Host Driver (WHD) v3.0.0
Please refer to the [README File](./README.md) and the [WHD API Reference Manual](https://infineon.github.io/wifi-host-driver/html/index.html) for a complete description of the Wi-Fi Host Driver.

## Features
Expand All @@ -11,8 +11,9 @@ Please refer to the [README File](./README.md) and the [WHD API Reference Manual
* Supports low-power offloads, including ARP, packet filters, TCP Keepalive offload, DHCP lease time renewal offload, and Beacon trim
* Includes WFA pre-certification support for 802.11n and WPA3

## Changes since v2.6.1
## Changes since v2.7.0
### New Features
* 43022 support

### Defect Fixes

Expand Down Expand Up @@ -43,6 +44,9 @@ Please refer to the [README File](./README.md) and the [WHD API Reference Manual
* CVE fixs
* --- 7.15.168.159 ---

#### CYW43022
* --- 13.54.1 ---

Note: [r] is regulatory-related

## Supported Software and Tools
Expand Down
51 changes: 43 additions & 8 deletions WiFi_Host_Driver/inc/whd_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,17 @@ extern "C"
#define PM2_POWERSAVE_MODE (2) /**< Powersave mode on specified interface with High throughput */
#define NO_POWERSAVE_MODE (0) /**< No Powersave mode */

#define ULP_BUSWIDTH_INTR_MODE (0) /**< Use BUS Width Interrupt method, when device is in DS2 state Exit */
#define ULP_OOB_INTR_MODE (1) /**< Use OOB interrupt method, when device is in DS2 state Exit */
#define ULP_ASYNC_INTR_MODE (2) /**< Use Asynchronous method, when device is in DS2 state Exit */

#define PMKID_LEN (16) /**< PMKID LENGTH */

#define ULP_NO_SUPPORT (0) /* Flag to disable ULP in 43022 */
#define ULP_DS1_SUPPORT (1) /* Flag to enable DS1 mode in 43022 */
#define ULP_DS2_SUPPORT (2) /* Flag to enable DS2 mode in 43022(Only supported in DM) */
#define WHD_OOB_CONFIG_VERSION (2) /**< Indicate the version for whd_oob_config structure */
#define WHD_SAP_USE_CHANSPEC (1) /**< Define this macro as any value indicate whd_wifi_init_ap api uses chanspec instead of channel */

/**
* Suppress unused parameter warning
Expand Down Expand Up @@ -108,6 +116,8 @@ typedef struct whd_tko_status whd_tko_status_t;

#define BDC_HEADER_WITH_PAD 6 /**< BDC Header with padding 4 + 2 */

#define MSGBUF_OVERHEAD_WITH_PAD 6 /**< Overhaed Space with padding 4 + 2 */

/** From bdc header, Ethernet data starts after an offset of (bdc_header->data_offset<<2).
* It is variable, but usually 4.
*/
Expand All @@ -121,18 +131,28 @@ typedef struct whd_tko_status whd_tko_status_t;
#define MAX_BUS_HEADER_SIZE 4 /**< Max bus header size for all bus types (spi) */
#elif (CYBSP_WIFI_INTERFACE_TYPE == CYBSP_M2M_INTERFACE)
#define MAX_BUS_HEADER_SIZE 8 /**< Max bus header size for all bus types (m2m) */
#elif defined(COMPONENT_WIFI_INTERFACE_OCI)
#define MAX_BUS_HEADER_SIZE 8 /**< Max bus header size for all bus types (custom/oci) */
#else
#error "CYBSP_WIFI_INTERFACE_TYPE is not defined"
#error "CYBSP_WIFI_INTERFACE_TYPE or COMPONENT_WIFI_INTERFACE_OCI is not defined"
#endif

#define BUFFER_OVERHEAD 4 /**< Buffer overhead, sizeof(void *) */

#ifndef PROTO_MSGBUF
/**
* The maximum space in bytes required for headers in front of the Ethernet header.
* 6 + (8 + 4) + 4 + 4 + 4 = 30 bytes
*/
#define WHD_LINK_HEADER (BDC_HEADER_WITH_PAD + BDC_HEADER_OFFSET_TO_DATA + \
SDPCM_HEADER + MAX_BUS_HEADER_SIZE + BUFFER_OVERHEAD)
#else
/*
* In nx_user.h NX_PHYSICAL_HEADER is (14(Ethernet) + 4(Overhaed) + 2(pad)),
* so we are doing the similar here -> 4(hedaer) + 2(pad) in front of ethernet header
*/
#define WHD_LINK_HEADER (MSGBUF_OVERHEAD_WITH_PAD)
#endif /* PROTO_MSGBUF */

/**
* The size of an Ethernet header
Expand Down Expand Up @@ -268,7 +288,8 @@ typedef enum
typedef enum
{
WHD_802_11_BAND_5GHZ = 0, /**< Denotes 5GHz radio band */
WHD_802_11_BAND_2_4GHZ = 1 /**< Denotes 2.4GHz radio band */
WHD_802_11_BAND_2_4GHZ = 1, /**< Denotes 2.4GHz radio band */
WHD_802_11_BAND_6GHZ = 2 /**< Denotes 6GHz radio band */
} whd_802_11_band_t;

/**
Expand Down Expand Up @@ -315,8 +336,8 @@ typedef enum
typedef struct
{
int32_t number_of_bands; /**< Number of bands supported, currently 1 or 2 */
int32_t current_band; /**< Current band type: WLC_BAND_2G or WLC_BAND_5G */
int32_t other_band; /**< If value of number_of_bands parameter is 2, then this member specifies the 2nd band */
int32_t current_band; /**< Current band type: WLC_BAND_2G or WLC_BAND_5G or WLC_BAND_6G */
int32_t other_band[2]; /**< If value of number_of_bands parameter is 2, then this member specifies the 2nd band */
} whd_band_list_t;

/**
Expand Down Expand Up @@ -422,8 +443,10 @@ typedef enum
*/
typedef enum
{
WHD_FWCAP_SAE = 0, /**< Internal SAE */
WHD_FWCAP_SAE_EXT = 1, /**< External SAE */
WHD_FWCAP_SAE = 0, /**< Internal SAE */
WHD_FWCAP_SAE_EXT = 1, /**< External SAE */
WHD_FWCAP_OFFLOADS = 2, /**< Offload config */
WHD_FWCAP_GCMP = 3, /**< GCMP */
} whd_fwcap_id_t;

/******************************************************
Expand Down Expand Up @@ -923,6 +946,10 @@ typedef uint32_t whd_result_t;
#define WHD_HAL_ERROR WHD_RESULT_CREATE(1069) /**< WHD HAL Error */
#define WHD_RTOS_STATIC_MEM_LIMIT WHD_RESULT_CREATE(1070) /**< Exceeding the RTOS static objects memory */
#define WHD_NO_REGISTER_FUNCTION_POINTER WHD_RESULT_CREATE(1071) /**< No register function pointer */
#define WHD_BLHS_VALIDATE_FAILED WHD_RESULT_CREATE(1072) /**< Bootloader handshake validation failed */
#define WHD_BUS_UP_FAIL WHD_RESULT_CREATE(1073) /**< bus failed to come up */
#define WHD_BUS_MEM_RESERVE_FAIL WHD_RESULT_CREATE(1074) /**< commonring reserve for write failed */
#define WHD_NO_PKT_ID_AVAILABLE WHD_RESULT_CREATE(1075) /**< commonring reserve for write failed */

#define WLAN_ENUM_OFFSET 2000 /**< WLAN enum offset for WHD_WLAN error processing */

Expand Down Expand Up @@ -1155,11 +1182,11 @@ typedef struct
typedef struct whd_oob_config
{
cyhal_gpio_t host_oob_pin; /**< Host-side GPIO pin selection */
cyhal_gpio_drive_mode_t drive_mode; /**< Host-side GPIO pin drive mode */
whd_bool_t init_drive_state; /**< Host-side GPIO pin initial drive state */
uint8_t dev_gpio_sel; /**< WiFi device-side GPIO pin selection (must be zero) */
whd_bool_t is_falling_edge; /**< Interrupt trigger (polarity) */
uint8_t intr_priority; /**< OOB interrupt priority */
cyhal_gpio_drive_mode_t drive_mode; /**< Host-side GPIO pin drive mode */
whd_bool_t init_drive_state; /**< Host-side GPIO pin initial drive state */
} whd_oob_config_t;

/**
Expand Down Expand Up @@ -1192,6 +1219,14 @@ typedef struct whd_m2m_config
whd_bool_t is_normal_mode; /**< Default is false */
} whd_m2m_config_t;

/**
* Structure for OCI config parameters which can be set by application during whd power up
*/
typedef struct whd_oci_config
{
/* Bus config */
whd_bool_t is_normal_mode; /**< Default is false */
} whd_oci_config_t;

/**
* Enumeration of applicable packet mask bits for custom Information Elements (IEs)
Expand Down
6 changes: 3 additions & 3 deletions WiFi_Host_Driver/inc/whd_version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define WHD_VERSION "2.7.0.21138"
#define WHD_BRANCH "v2.7.0"
#define WHD_DATE "2023-09-08 15:26:32 +0300"
#define WHD_VERSION "3.0.0.22316"
#define WHD_BRANCH "v3.0.0"
#define WHD_DATE "2023-12-04 07:24:34 -0600"
Loading

0 comments on commit 04ee318

Please sign in to comment.