Skip to content

Commit d22e32b

Browse files
author
Kyle Kearney
committed
Update WHD to v1.90.2
1 parent 9d0eb2f commit d22e32b

File tree

102 files changed

+137912
-133214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+137912
-133214
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_WHD/generated_mac_address.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
* MAC address is printed during WHD power up
77
*/
88

9-
#define NVRAM_GENERATED_MAC_ADDRESS "macaddr=00:A0:50:2f:32:99"
9+
#define NVRAM_GENERATED_MAC_ADDRESS "macaddr=00:A0:50:83:ef:22"

targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_WHD/inc/whd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 Cypress Semiconductor Corporation
2+
* Copyright 2020 Cypress Semiconductor Corporation
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");

targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_WHD/inc/whd_events.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 Cypress Semiconductor Corporation
2+
* Copyright 2020 Cypress Semiconductor Corporation
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");

targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_WHD/inc/whd_network_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 Cypress Semiconductor Corporation
2+
* Copyright 2020 Cypress Semiconductor Corporation
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");

targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_WHD/inc/whd_resource_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 Cypress Semiconductor Corporation
2+
* Copyright 2020 Cypress Semiconductor Corporation
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");

targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_WHD/inc/whd_types.h

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 Cypress Semiconductor Corporation
2+
* Copyright 2020 Cypress Semiconductor Corporation
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -76,6 +76,11 @@ typedef void *whd_buffer_t;
7676
typedef struct wl_bss_info_struct whd_bss_info_t;
7777
typedef struct edcf_acparam whd_edcf_ac_param_t;
7878
typedef struct wl_af_params whd_af_params_t;
79+
typedef struct whd_arp_stats_s whd_arp_stats_t;
80+
typedef struct wl_pkt_filter_stats whd_pkt_filter_stats_t;
81+
typedef struct whd_tko_retry whd_tko_retry_t;
82+
typedef struct whd_tko_connect whd_tko_connect_t;
83+
typedef struct whd_tko_status whd_tko_status_t;
7984
/** @endcond */
8085
/******************************************************
8186
* Constants
@@ -197,8 +202,7 @@ typedef enum
197202
WHD_SECURITY_WPA2_FBT_ENT = (ENTERPRISE_ENABLED | WPA2_SECURITY | AES_ENABLED | FBT_ENABLED), /**< WPA2 Enterprise Security with AES & FBT */
198203

199204
WHD_SECURITY_IBSS_OPEN = (IBSS_ENABLED), /**< Open security on IBSS ad-hoc network */
200-
WHD_SECURITY_WPS_OPEN = (WPS_ENABLED), /**< WPS with open security */
201-
WHD_SECURITY_WPS_SECURE = (WPS_ENABLED | AES_ENABLED), /**< WPS with AES security */
205+
WHD_SECURITY_WPS_SECURE = AES_ENABLED, /**< WPS with AES security */
202206

203207
WHD_SECURITY_UNKNOWN = -1, /**< May be returned by scan function if security is unknown. Do not pass this to the join function! */
204208

@@ -1012,6 +1016,33 @@ typedef struct whd_coex_config
10121016
whd_btc_lescan_params_t le_scan_params; /**< LE Scan Parameters */
10131017
} whd_coex_config_t;
10141018

1019+
#define PORT_FILTER_LEN 26 /**< Port filter len */
1020+
#define PACKET_FILTER_LIST_BUFFER_MAX_LEN 1000 /**< Packet filter buffer max len */
1021+
/**
1022+
* Enumeration of packet filter rules
1023+
*/
1024+
typedef enum
1025+
{
1026+
WHD_PACKET_FILTER_RULE_POSITIVE_MATCHING = 0, /**< Specifies that a filter should match a given pattern */
1027+
WHD_PACKET_FILTER_RULE_NEGATIVE_MATCHING = 1 /**< Specifies that a filter should NOT match a given pattern */
1028+
} whd_packet_filter_rule_t;
1029+
1030+
/**
1031+
* Structure describing a packet filter list item
1032+
*/
1033+
typedef struct
1034+
{
1035+
uint32_t id; /**< Unique identifier for a packet filter item */
1036+
whd_packet_filter_rule_t rule; /**< Filter matches are either POSITIVE or NEGATIVE matching */
1037+
uint16_t offset; /**< Offset in bytes to start filtering (referenced to the start of the ethernet packet) */
1038+
uint16_t mask_size; /**< Size of the mask in bytes */
1039+
uint8_t *mask; /**< Pattern mask bytes to be ANDed with the pattern eg. "\xff00" (must be in network byte order) */
1040+
uint8_t *pattern; /**< Pattern bytes used to filter eg. "\x0800" (must be in network byte order) */
1041+
whd_bool_t enabled_status; /**< When returned from wwd_wifi_get_packet_filters, indicates if the filter is enabled */
1042+
} whd_packet_filter_t;
1043+
1044+
#define TKO_DATA_OFFSET offsetof(wl_tko_t, data) /**< TKO data offset */
1045+
10151046
#ifdef __cplusplus
10161047
} /* extern "C" */
10171048
#endif
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#define WHD_VERSION "v1.70.0"
2-
#define WHD_BRANCH "v1.70.0"
3-
#define WHD_DATE "2019-12-02 04:14:53 -0600"
1+
#define WHD_VERSION "v1.90.2"
2+
#define WHD_BRANCH "v1.90.2"
3+
#define WHD_DATE "2020-04-13 02:49:57 -0500"

targets/TARGET_Cypress/TARGET_PSOC6/COMPONENT_WHD/inc/whd_wifi_api.h

Lines changed: 276 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 Cypress Semiconductor Corporation
2+
* Copyright 2020 Cypress Semiconductor Corporation
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -745,6 +745,280 @@ extern uint32_t whd_wifi_send_action_frame(whd_interface_t ifp, whd_af_params_t
745745
*/
746746
extern uint32_t whd_wifi_set_coex_config(whd_interface_t ifp, whd_coex_config_t *coex_config);
747747

748+
/** Get version of Device (WLAN) Firmware
749+
*
750+
* @param[in] ifp : pointer to handle instance of whd interface
751+
* @param[out] version : pointer to store version #
752+
*
753+
* @return whd_result_t
754+
*/
755+
whd_result_t whd_arp_version(whd_interface_t ifp, uint32_t *version);
756+
757+
/** Get ARP Offload Peer Age from Device (WLAN)
758+
* Length of time in seconds before aging out an entry in the WLAN processor ARP table.
759+
*
760+
* @param[in] ifp : pointer to handle instance of whd interface
761+
* @param[out] seconds : pointer to store value
762+
*
763+
* @return whd_result_t
764+
*/
765+
whd_result_t whd_arp_peerage_get(whd_interface_t ifp, uint32_t *seconds);
766+
767+
/** Set ARP Offload Peer Age in Device (WLAN)
768+
* Length of time in seconds before aging out an entry in the WLAN processor ARP table.
769+
*
770+
* @param[in] ifp : pointer to handle instance of whd interface
771+
* @param[in] seconds : Seconds to age out IP
772+
*
773+
* @return whd_result_t
774+
*/
775+
whd_result_t whd_arp_peerage_set(whd_interface_t ifp, uint32_t seconds);
776+
777+
/** Get ARP Offload Agent Enable from Device (WLAN)
778+
*
779+
* @param[in] ifp : pointer to handle instance of whd interface
780+
* @param[out] agent_enable : pointer to store value
781+
*
782+
* @return whd_result_t
783+
*/
784+
whd_result_t whd_arp_arpoe_get(whd_interface_t ifp, uint32_t *agent_enable);
785+
786+
/** Set ARP Offload Agent Enable in Device (WLAN)
787+
* Set Enable/Disable of ARP Offload Agent
788+
*
789+
* @param[in] ifp : pointer to handle instance of whd interface
790+
* @param[in] agent_enable : Enable=1 / Disable=0
791+
*
792+
* @return whd_result_t
793+
*/
794+
whd_result_t whd_arp_arpoe_set(whd_interface_t ifp, uint32_t agent_enable);
795+
796+
/** Clear ARP Offload cache in Device (WLAN)
797+
*
798+
* @param[in] ifp : pointer to handle instance of whd interface
799+
*
800+
* @return whd_result_t
801+
*/
802+
whd_result_t whd_arp_cache_clear(whd_interface_t ifp);
803+
804+
/** Get ARP Offload Feature Flags from Device (WLAN)
805+
*
806+
* @param[in] ifp : pointer to handle instance of whd interface
807+
* @param[out] features : ptr to store currently set features - bit flags @ref CY_ARP_OL_AGENT_ENABLE, etc.
808+
* ARL_OL_AGENT | ARL_OL_SNOOP | ARP_OL_HOST_AUTO_REPLY | ARP_OL_PEER_AUTO_REPLY
809+
*
810+
* @return whd_result_t
811+
*/
812+
whd_result_t whd_arp_features_get(whd_interface_t ifp, uint32_t *features);
813+
814+
/** Set ARP Offload Feature Flags in Device (WLAN)
815+
*
816+
* @param[in] ifp : pointer to handle instance of whd interface
817+
* @param[in] features : features to set value (you can OR ('|') multiple flags) @ref CY_ARP_OL_AGENT_ENABLE, etc.
818+
* ARL_OL_AGENT | ARL_OL_SNOOP | ARP_OL_HOST_AUTO_REPLY | ARP_OL_PEER_AUTO_REPLY
819+
*
820+
* @return whd_result_t
821+
*/
822+
whd_result_t whd_arp_features_set(whd_interface_t ifp, uint32_t features);
823+
824+
/** Print ARP Offload Feature Flags in Human readable form to console
825+
*
826+
* @param[in] features : feature flags to set (you can OR '|' multiple flags) @ref CY_ARP_OL_AGENT_ENABLE, etc.
827+
* ARL_OL_AGENT | ARL_OL_SNOOP | ARP_OL_HOST_AUTO_REPLY | ARP_OL_PEER_AUTO_REPLY
828+
* @param[in] title : Optional: Title for output (NULL == no title)
829+
*
830+
* @return whd_result_t
831+
*/
832+
whd_result_t whd_arp_features_print(uint32_t features, const char *title);
833+
834+
/** Add ARP Offload Host IP Identifier(s) to HostIP List to Device (WLAN)
835+
*
836+
* @param[in] ifp : pointer to handle instance of whd interface
837+
* @param[in] host_ipv4_list : pointer to host_ip data (IPv4, 1 uint32_t per ip addr)
838+
* @param[in] count : Number of array elements in host_ip
839+
*
840+
* @return whd_result_t
841+
*/
842+
whd_result_t whd_arp_hostip_list_add(whd_interface_t ifp, uint32_t *host_ipv4_list, uint32_t count);
843+
844+
/** Add One ARP Offload Host IP Identifier to HostIP List (mbed-style IP string) to Device (WLAN)
845+
*
846+
* @param[in] ifp : pointer to handle instance of whd interface
847+
* @param[in] ip_addr : pointer to ip string (as returned from mbedos calls)
848+
*
849+
* @return whd_result_t
850+
*/
851+
whd_result_t whd_arp_hostip_list_add_string(whd_interface_t ifp, const char *ip_addr);
852+
853+
/** Clear One ARP Offload Host IP Identifier from Host IP List in Device (WLAN)
854+
*
855+
* @param[in] ifp : pointer to handle instance of whd interface
856+
* @param[in] ipv4_addr : ip addr expressed as a uint32_t
857+
*
858+
* @return whd_result_t
859+
*/
860+
whd_result_t whd_arp_hostip_list_clear_id(whd_interface_t ifp, uint32_t ipv4_addr);
861+
862+
/** Clear One ARP Offload Host IP Identifier from Host IP List (mbed-style IP string) in Device (WLAN)
863+
*
864+
* @param[in] ifp : pointer to handle instance of whd interface
865+
* @param[in] ip_addr : pointer to ip string (as returned from mbedos calls)
866+
*
867+
* @return whd_result_t
868+
*/
869+
whd_result_t whd_arp_hostip_list_clear_id_string(whd_interface_t ifp, const char *ip_addr);
870+
871+
/** Clear all ARP Offload Host IP Identifier List
872+
*
873+
* @param[in] ifp : pointer to handle instance of whd interface
874+
*
875+
* @return whd_result_t
876+
*/
877+
whd_result_t whd_arp_hostip_list_clear(whd_interface_t ifp);
878+
879+
/** Get ARP Offload Host IP Identifiers from Device (WLAN)
880+
*
881+
* @param[in] ifp : pointer to handle instance of whd interface
882+
* @param[in] count : Number of array elements in host_ip
883+
* @param[out] host_ipv4_list : Pointer to structure array to store host_ip data
884+
* @param[out] filled : Number of array elements filled by this routine
885+
*
886+
* @return whd_result_t
887+
*/
888+
whd_result_t whd_arp_hostip_list_get(whd_interface_t ifp, uint32_t count, uint32_t *host_ipv4_list, uint32_t *filled);
889+
890+
/** Clear ARP Offload statistics in Device (WLAN)
891+
*
892+
* @param[in] ifp : pointer to handle instance of whd interface
893+
*
894+
* @return whd_result_t
895+
*/
896+
whd_result_t whd_arp_stats_clear(whd_interface_t ifp);
897+
898+
/** Get ARP Offload statistics from Device (WLAN)
899+
*
900+
* @param[in] ifp : pointer to handle instance of whd interface
901+
* @param[out] stats : Ptr to store statistics @ref whd_arp_stats_t
902+
*
903+
* @return whd_result_t
904+
*/
905+
whd_result_t whd_arp_stats_get(whd_interface_t ifp, whd_arp_stats_t *stats);
906+
907+
/** Print ARP Offload statistics
908+
* NOTE: call whd_arp_stats_get(), then print them using this function.
909+
*
910+
* @param[in] arp_stats : Ptr to ARP statistics structure
911+
* @param[in] title : Optional: Title for output (NULL == no title)
912+
*
913+
* @return whd_result_t
914+
*/
915+
whd_result_t whd_arp_stats_print(whd_arp_stats_t *arp_stats, const char *title);
916+
917+
/** A filter must be added (e.g. created) before it can be enabled.
918+
* @param[in] ifp : pointer to handle instance of whd interface
919+
* @param[in] settings : Ptr to filter settings @ref whd_packet_filter_t
920+
* @return whd_result_t
921+
*/
922+
whd_result_t whd_pf_add_packet_filter(whd_interface_t ifp, const whd_packet_filter_t *settings);
923+
924+
/** Remove a previously added filter.
925+
* @param[in] ifp : pointer to handle instance of whd interface
926+
* @param[in] filter_id : filter to remove
927+
* @return whd_result_t
928+
*/
929+
whd_result_t whd_pf_remove_packet_filter(whd_interface_t ifp, uint8_t filter_id);
930+
931+
/** After a filter has been added it can be enabled or disabled as needed.
932+
* @param[in] ifp : pointer to handle instance of whd interface
933+
* @param[in] filter_id : filter to enable
934+
* @return whd_result_t
935+
*/
936+
whd_result_t whd_pf_enable_packet_filter(whd_interface_t ifp, uint8_t filter_id);
937+
938+
/** After a filter has been added it can be enabled or disabled as needed.
939+
* @param[in] ifp : pointer to handle instance of whd interface
940+
* @param[in] filter_id : filter to disable
941+
* @return whd_result_t
942+
*/
943+
whd_result_t whd_pf_disable_packet_filter(whd_interface_t ifp, uint8_t filter_id);
944+
945+
/** After a filter has been added it can be enabled or disabled as needed.
946+
* @param[in] ifp : pointer to handle instance of whd interface
947+
* @param[in] filter_id : filter to disable/enable
948+
* @param[in] enable : Enable/Disable Flag
949+
* @return whd_result_t
950+
*/
951+
whd_result_t whd_wifi_toggle_packet_filter(whd_interface_t ifp, uint8_t filter_id, whd_bool_t enable);
952+
953+
/** Filters are implemented in WLAN subsystem as a bit pattern and matching bit mask that
954+
* are applied to incoming packets. This API retrieves the pattern and mask.
955+
* @param[in] ifp : pointer to handle instance of whd interface
956+
* @param[in] filter_id : which filter to retrieve
957+
* @param[in] max_size : size of both mask and pattern buffers
958+
* @param[out] mask : mask for this filter
959+
* @param[out] pattern : pattern for this filter
960+
* @param[out] size_out : length of both mask and pattern
961+
* @return whd_result_t
962+
*/
963+
whd_result_t whd_pf_get_packet_filter_mask_and_pattern(whd_interface_t ifp, uint8_t filter_id, uint32_t max_size,
964+
uint8_t *mask,
965+
uint8_t *pattern, uint32_t *size_out);
966+
967+
/** Clear the packet filter stats associated with a filter id
968+
* @param[in] ifp : pointer to handle instance of whd interface
969+
* @param[in] filter_id : which filter
970+
* @return whd_result_t
971+
*/
972+
whd_result_t whd_wifi_clear_packet_filter_stats(whd_interface_t ifp, uint32_t filter_id);
973+
974+
/** Return the stats associated with a filter
975+
* @param[in] ifp : pointer to handle instance of whd interface
976+
* @param[in] filter_id : which filter
977+
* @param[out] stats : Ptr to store statistics wl_pkt_filter_stats_t
978+
* @return whd_result_t
979+
*/
980+
whd_result_t whd_pf_get_packet_filter_stats(whd_interface_t ifp, uint8_t filter_id, whd_pkt_filter_stats_t *stats);
981+
982+
/** Set/Get TKO retry & interval parameters
983+
* @param[in] ifp : Pointer to handle instance of whd interface
984+
* @param[in] whd_tko_retry : whd retry & interval parameters structure
985+
* @param[in] set : Set/Get Flag
986+
* @return whd_result_t
987+
*/
988+
whd_result_t whd_tko_param(whd_interface_t ifp, whd_tko_retry_t *whd_tko_retry, int set);
989+
990+
/** Return the tko status for all indexes
991+
* @param[in] ifp : Pointer to handle instance of whd interface
992+
* @param[out] tko_status : Ptr to store tko_status
993+
* @return whd_result_t
994+
*/
995+
whd_result_t whd_tko_get_status(whd_interface_t ifp, whd_tko_status_t *tko_status);
996+
997+
/** Return the stats associated with a filter
998+
* @param[in] ifp : Pointer to handle instance of whd interface
999+
* @param[out] max : returns Max TCP connections supported by WLAN Firmware
1000+
* @return whd_result_t
1001+
*/
1002+
whd_result_t whd_tko_max_assoc(whd_interface_t ifp, uint8_t *max);
1003+
1004+
/** Return the stats associated with a filter
1005+
* @param[in] ifp : Pointer to handle instance of whd interface
1006+
* @param[in] index : index for TCP offload connection
1007+
* @param[out] whd_connect : tko_connect structure buffer from Firmware
1008+
* @param[in] buflen : Buffer given for tko_connect
1009+
* @return whd_result_t
1010+
*/
1011+
whd_result_t whd_tko_get_FW_connect(whd_interface_t ifp, uint8_t index, whd_tko_connect_t *whd_connect,
1012+
uint16_t buflen);
1013+
1014+
/** Return the stats associated with a filter
1015+
* @param[in] ifp : Pointer to handle instance of whd interface
1016+
* @param[in] enable : Enable/Disable TCP Keepalive offload
1017+
* @return whd_result_t
1018+
*/
1019+
whd_result_t whd_tko_toggle(whd_interface_t ifp, whd_bool_t enable);
1020+
1021+
7481022
/* @} */
7491023

7501024
/** @addtogroup wifiioctl WHD Wi-Fi IOCTL Set/Get API
@@ -893,6 +1167,7 @@ extern uint32_t whd_wifi_get_bss_info(whd_interface_t ifp, wl_bss_info_t *bi);
8931167
* @return WHD_SUCCESS or Error code
8941168
*/
8951169
extern uint32_t whd_print_stats(whd_driver_t whd_drv, whd_bool_t reset_after_print);
1170+
8961171
/* @} */
8971172
/* @} */
8981173

0 commit comments

Comments
 (0)