software/drivers/sd8887/src/wlan/mlinux/moal_ioctl.c
/**
 *  @brief  Get power mode
 *
 *  @param priv                 A pointer to moal_private structure
 *  @param powermode            A pointer to powermode buf
 *
 *  @return                     MLAN_STATUS_SUCCESS -- success, otherwise fail
 */
@brief  Get power mode
@param priv                 A pointer to moal_private structure
@param powermode            A pointer to powermode buf

@return                     MLAN_STATUS_SUCCESS -- success, otherwise fail
@brief Get power mode @param priv A pointer to moal_private structure @param powermode A pointer to powermode buf @return MLAN_STATUS_SUCCESS -- success otherwise fail
mlan_status
woal_get_powermode(moal_private *priv, int *powermode)
{
	mlan_status ret = MLAN_STATUS_SUCCESS;
	int ps_mode;
	ENTER();
	if (MLAN_STATUS_SUCCESS !=
	    woal_set_get_power_mgmt(priv, MLAN_ACT_GET, &ps_mode, 0,
				    MOAL_IOCTL_WAIT)) {
		ret = MLAN_STATUS_FAILURE;
		goto done;
	}
	if (ps_mode)
		*powermode = MFALSE;
	else
		*powermode = MTRUE;
done:
	LEAVE();
	return ret;
}
mlan_status woal_get_powermode ( moal_private * priv , int * powermode ) { mlan_status ret = MLAN_STATUS_SUCCESS ; int ps_mode ; ENTER ( ) ; if ( MLAN_STATUS_SUCCESS != woal_set_get_power_mgmt ( priv , MLAN_ACT_GET , & ps_mode , 0 , MOAL_IOCTL_WAIT ) ) { ret = MLAN_STATUS_FAILURE ; goto done ; } if ( ps_mode ) * powermode = MFALSE ; else * powermode = MTRUE ; done : LEAVE ( ) ; return ret ; }
@brief  Get power mode
  @param priv                 A pointer to moal_private structure
  @param powermode            A pointer to powermode buf
@brief Get power mode @param priv A pointer to moal_private structure @param powermode A pointer to powermode buf