Infineon Logo Wi-Fi Host Driver (WHD) Public API Reference Guide
 
WHD Wi-Fi Debug API

General Description

WHD APIs which allows debugging like, printing whd log information, getting whd stats, etc.

Data Structures

struct  deepsleep_cb_info
 

Typedefs

typedef void *(* whd_ds_callback_t) (void *, char *, uint32_t)
 
typedef struct deepsleep_cb_info deepsleep_cb_info_t
 

Functions

whd_result_t whd_wifi_get_wifi_version (whd_interface_t ifp, char *version, uint8_t length)
 Retrieves the WLAN firmware version. More...
 
whd_result_t whd_wifi_get_clm_version (whd_interface_t ifp, char *version, uint8_t length)
 Retrieves the WLAN CLM version. More...
 
whd_result_t whd_wifi_read_wlan_log (whd_driver_t whd_drv, char *buffer, uint32_t buffer_size)
 To print whd log information. More...
 
whd_result_t whd_wifi_print_whd_log (whd_driver_t whd_drv)
 To print whd log information. More...
 
whd_result_t whd_network_get_ifidx_from_ifp (whd_interface_t ifp, uint8_t *ifidx)
 Retrieves the ifidx from interface pointer. More...
 
whd_result_t whd_network_get_bsscfgidx_from_ifp (whd_interface_t ifp, uint8_t *bsscfgidx)
 Retrieves the bsscfgidx from interface pointer. More...
 
whd_result_t whd_wifi_get_bss_info (whd_interface_t ifp, wl_bss_info_t *bi)
 Retrives the bss info. More...
 
whd_result_t whd_print_stats (whd_driver_t whd_drv, whd_bool_t reset_after_print)
 Prints WHD stats. More...
 
whd_result_t whd_wifi_get_deepsleep_stats (whd_driver_t whd_driver, char *buf, uint32_t buflen)
 Fetches ulp statistics and fills the buffer with that data and executes deepsleep indication callback if application registers for it. More...
 
whd_result_t whd_wifi_register_ds_callback (whd_interface_t ifp, whd_ds_callback_t callback, void *ctx, char *buf, uint32_t buflen)
 Function to register callbacks to be executed. More...
 
whd_result_t whd_wifi_deregister_ds_callback (whd_interface_t ifp, whd_ds_callback_t callback)
 Function to unregister callbacks that are note needed to be executed anymore. More...
 

Function Documentation

◆ whd_wifi_get_wifi_version()

whd_result_t whd_wifi_get_wifi_version ( whd_interface_t  ifp,
char *  version,
uint8_t  length 
)

Retrieves the WLAN firmware version.

Parameters
ifpPointer to handle instance of whd interface
versionPointer to a buffer that version information will be written to
lengthLength of the buffer
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_get_clm_version()

whd_result_t whd_wifi_get_clm_version ( whd_interface_t  ifp,
char *  version,
uint8_t  length 
)

Retrieves the WLAN CLM version.

Parameters
ifpPointer to handle instance of whd interface
versionPointer to a buffer that version information will be written to
lengthLength of the buffer
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_read_wlan_log()

whd_result_t whd_wifi_read_wlan_log ( whd_driver_t  whd_drv,
char *  buffer,
uint32_t  buffer_size 
)

To print whd log information.

Parameters
whd_drvPointer to handle instance of the driver
bufferBuffer to store read log results
buffer_sizeVariable to store size of the buffer
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_print_whd_log()

whd_result_t whd_wifi_print_whd_log ( whd_driver_t  whd_drv)

To print whd log information.

Parameters
whd_drvPointer to handle instance of the driver
Returns
WHD_SUCCESS or Error code

◆ whd_network_get_ifidx_from_ifp()

whd_result_t whd_network_get_ifidx_from_ifp ( whd_interface_t  ifp,
uint8_t *  ifidx 
)

Retrieves the ifidx from interface pointer.

ifidx is a unique value and be used to identify a instance of tcp/ip stack

Parameters
ifpPointer to the whd_interface_t
ifidxPointer to ifidx
Returns
WHD_SUCCESS or Error code

◆ whd_network_get_bsscfgidx_from_ifp()

whd_result_t whd_network_get_bsscfgidx_from_ifp ( whd_interface_t  ifp,
uint8_t *  bsscfgidx 
)

Retrieves the bsscfgidx from interface pointer.

Can be used to send IOCTL with requires bsscfgidx

Parameters
ifpPointer to handle instance of whd interface
bsscfgidxPointer to bsscfgidx
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_get_bss_info()

whd_result_t whd_wifi_get_bss_info ( whd_interface_t  ifp,
wl_bss_info_t bi 
)

Retrives the bss info.

Parameters
ifpPointer to handle instance of whd interface
biA pointer to the structure wl_bss_info_t
Returns
WHD_SUCCESS or Error code

◆ whd_print_stats()

whd_result_t whd_print_stats ( whd_driver_t  whd_drv,
whd_bool_t  reset_after_print 
)

Prints WHD stats.

Parameters
whd_drvPointer to handle instance of the driver
reset_after_printBool variable to decide if whd_stats to be reset
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_get_deepsleep_stats()

whd_result_t whd_wifi_get_deepsleep_stats ( whd_driver_t  whd_driver,
char *  buf,
uint32_t  buflen 
)

Fetches ulp statistics and fills the buffer with that data and executes deepsleep indication callback if application registers for it.

Parameters
whd_driverInstance of whd driver
bufPointer to buffer to be filled with ulpstats data
buflenBuffer length of the above buffer should be between 2048 and 4096
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_register_ds_callback()

whd_result_t whd_wifi_register_ds_callback ( whd_interface_t  ifp,
whd_ds_callback_t  callback,
void *  ctx,
char *  buf,
uint32_t  buflen 
)

Function to register callbacks to be executed.

Parameters
ifpPointer to handle instance of whd interface
callbackCallback api to be registered
ctxPointer to context
bufBuffer to be filled with data
buflenBuffer length of the above buffer
Returns
WHD_SUCCESS or WHD_UNKNOWN_INTERFACE

◆ whd_wifi_deregister_ds_callback()

whd_result_t whd_wifi_deregister_ds_callback ( whd_interface_t  ifp,
whd_ds_callback_t  callback 
)

Function to unregister callbacks that are note needed to be executed anymore.

Parameters
ifpPointer to handle instance of whd interface
callbackCallback api to be registered
Returns
WHD_SUCCESS or WHD_UNKNOWN_INTERFACE