WHD Wi-Fi Debug API

group dbg

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

Functions

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

Retrieves the WLAN firmware version.

Return

WHD_SUCCESS or Error code

Parameters
  • ifp: Pointer to handle instance of whd interface

  • version: Pointer to a buffer that version information will be written to

  • length: Length of the buffer

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

Retrieves the WLAN CLM version.

Return

WHD_SUCCESS or Error code

Parameters
  • ifp: Pointer to handle instance of whd interface

  • version: Pointer to a buffer that version information will be written to

  • length: Length of the buffer

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

To print whd log information.

Return

WHD_SUCCESS or Error code

Parameters
  • whd_drv: Pointer to handle instance of the driver

  • buffer: Buffer to store read log results

  • buffer_size: Variable to store size of the buffer

uint32_t whd_wifi_print_whd_log(whd_driver_t whd_drv)

To print whd log information.

Return

WHD_SUCCESS or Error code

Parameters
  • whd_drv: Pointer to handle instance of the driver

uint32_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

Return

WHD_SUCCESS or Error code

Parameters
  • ifp: Pointer to the whd_interface_t

  • ifidx: Pointer to ifidx

uint32_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

Return

WHD_SUCCESS or Error code

Parameters
  • ifp: Pointer to handle instance of whd interface

  • bsscfgidx: Pointer to bsscfgidx

uint32_t whd_wifi_get_bss_info(whd_interface_t ifp, wl_bss_info_t *bi)

Retrives the bss info.

Return

WHD_SUCCESS or Error code

Parameters
  • ifp: Pointer to handle instance of whd interface

  • bi: A pointer to the structure wl_bss_info_t

uint32_t whd_print_stats(whd_driver_t whd_drv, whd_bool_t reset_after_print)

Prints WHD stats.

Return

WHD_SUCCESS or Error code

Parameters
  • whd_drv: Pointer to handle instance of the driver

  • reset_after_print: Bool variable to decide if whd_stats to be reset