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

General Description

Wi-Fi functions for WLAN low power modes.

Functions

whd_result_t whd_wifi_enable_powersave (whd_interface_t ifp)
 Enables powersave mode on specified interface without regard for throughput reduction. More...
 
whd_result_t whd_wifi_enable_powersave_with_throughput (whd_interface_t ifp, uint16_t return_to_sleep_delay)
 Enables powersave mode on specified interface while attempting to maximise throughput. More...
 
whd_result_t whd_wifi_get_powersave_mode (whd_interface_t ifp, uint32_t *value)
 Get powersave mode on specified interface. More...
 
whd_result_t whd_wifi_disable_powersave (whd_interface_t ifp)
 Disables 802.11 power save mode on specified interface. More...
 
whd_result_t whd_wifi_config_ulp_mode (whd_interface_t ifp, uint32_t *mode, uint32_t *wait_time)
 Configure ULP mode on specified interface. More...
 

Function Documentation

◆ whd_wifi_enable_powersave()

whd_result_t whd_wifi_enable_powersave ( whd_interface_t  ifp)

Enables powersave mode on specified interface without regard for throughput reduction.

This function enables (legacy) 802.11 PS-Poll mode and should be used to achieve the lowest power consumption possible when the Wi-Fi device is primarily passively listening to the network

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

◆ whd_wifi_enable_powersave_with_throughput()

whd_result_t whd_wifi_enable_powersave_with_throughput ( whd_interface_t  ifp,
uint16_t  return_to_sleep_delay 
)

Enables powersave mode on specified interface while attempting to maximise throughput.

Network traffic is typically bursty. Reception of a packet often means that another packet will be received shortly afterwards (and vice versa for transmit).

In high throughput powersave mode, rather then entering powersave mode immediately after receiving or sending a packet, the WLAN chip waits for a timeout period before returning to sleep.

Parameters
ifpPointer to handle instance of whd interface
return_to_sleep_delayThe variable to set return to sleep delay. return to sleep delay must be set to a multiple of 10 and not equal to zero.
Returns
WHD_SUCCESS if power save mode was successfully enabled Error code if power save mode was not successfully enabled

◆ whd_wifi_get_powersave_mode()

whd_result_t whd_wifi_get_powersave_mode ( whd_interface_t  ifp,
uint32_t *  value 
)

Get powersave mode on specified interface.

Parameters
ifpPointer to handle instance of whd interface
valueValue of the current powersave state PM1_POWERSAVE_MODE, PM2_POWERSAVE_MODE, NO_POWERSAVE_MODE
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_disable_powersave()

whd_result_t whd_wifi_disable_powersave ( whd_interface_t  ifp)

Disables 802.11 power save mode on specified interface.

Parameters
ifpPointer to handle instance of whd interface
Returns
WHD_SUCCESS if power save mode was successfully disabled Error code if power save mode was not successfully disabled

◆ whd_wifi_config_ulp_mode()

whd_result_t whd_wifi_config_ulp_mode ( whd_interface_t  ifp,
uint32_t *  mode,
uint32_t *  wait_time 
)

Configure ULP mode on specified interface.

Parameters
ifpPointer to handle instance of whd interface
modemode to be set for ULP(DS0/DS1/DS2) 1 for DS1, 2 for DS2 and 0 indicates to disable(DS0)
wait_timeindicates ulp_wait in ms to be set (if no network activity for this time, device will enter into DS2)
Returns
WHD_SUCCESS if ulp mode was successfully configured Error code if ulp mode was not configured successfully