software/drivers/sd8887/src/wlan/mlinux/moal_ioctl.c
/**
 *  @brief Cancel Host Sleep configuration
 *
 *  @param priv             A pointer to moal_private structure
 *  @param wait_option      wait option
 *
 *  @return                 MLAN_STATUS_SUCCESS, MLAN_STATUS_PENDING,
 *                              or MLAN_STATUS_FAILURE
 */
@brief Cancel Host Sleep configuration
@param priv             A pointer to moal_private structure
@param wait_option      wait option


@brief Cancel Host Sleep configuration @param priv A pointer to moal_private structure @param wait_option wait option
mlan_status
woal_cancel_hs(moal_private *priv, t_u8 wait_option)
{
	moal_handle *handle = NULL;
	mlan_status ret = MLAN_STATUS_SUCCESS;
	mlan_ds_hs_cfg hscfg;
	int i;
	ENTER();
	if (!priv) {
		LEAVE();
		return MLAN_STATUS_FAILURE;
	}
	handle = priv->phandle;
	hscfg.conditions = HOST_SLEEP_CFG_CANCEL;
	hscfg.is_invoke_hostcmd = MTRUE;
	ret = woal_set_get_hs_params(priv, MLAN_ACT_SET, wait_option, &hscfg);
#if defined(SDIO_SUSPEND_RESUME)
	if (priv->phandle->hs_auto_arp) {
		PRINTM(MIOCTL, "Cancel Host Sleep... remove FW auto arp\n");
		woal_set_auto_arp(priv->phandle, MFALSE);
	}
#endif
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 1, 0)
	if (GTK_REKEY_OFFLOAD_SUSPEND == gtk_rekey_offload) {
		PRINTM(MIOCTL,
		       "Cancel Host Sleep... clear gtk rekey offload of FW\n");
		for (i = 0; i < handle->priv_num; i++) {
			if (handle->priv[i] && handle->priv[i]->gtk_data_ready) {
				PRINTM(MCMND, "clear GTK in resume\n");
				woal_set_rekey_data(handle->priv[i], NULL,
						    MLAN_ACT_CLEAR,
						    wait_option);
			}
		}
	}
#endif
	LEAVE();
	return ret;
}
mlan_status woal_cancel_hs ( moal_private * priv , t_u8 wait_option ) { moal_handle * handle = NULL ; mlan_status ret = MLAN_STATUS_SUCCESS ; mlan_ds_hs_cfg hscfg ; int i ; ENTER ( ) ; if ( ! priv ) { LEAVE ( ) ; return MLAN_STATUS_FAILURE ; } handle = priv -> phandle ; hscfg . conditions = HOST_SLEEP_CFG_CANCEL ; hscfg . is_invoke_hostcmd = MTRUE ; ret = woal_set_get_hs_params ( priv , MLAN_ACT_SET , wait_option , & hscfg ) ; #if defined ( SDIO_SUSPEND_RESUME ) if ( priv -> phandle -> hs_auto_arp ) { PRINTM ( MIOCTL , " \n " ) ; woal_set_auto_arp ( priv -> phandle , MFALSE ) ; } #endif #if CFG80211_VERSION_CODE >= KERNEL_VERSION ( 3 , 1 , 0 ) if ( GTK_REKEY_OFFLOAD_SUSPEND == gtk_rekey_offload ) { PRINTM ( MIOCTL , " \n " ) ; for ( i = 0 ; i < handle -> priv_num ; i ++ ) { if ( handle -> priv [ i ] && handle -> priv [ i ] -> gtk_data_ready ) { PRINTM ( MCMND , " \n " ) ; woal_set_rekey_data ( handle -> priv [ i ] , NULL , MLAN_ACT_CLEAR , wait_option ) ; } } } #endif LEAVE ( ) ; return ret ; }
@brief Cancel Host Sleep configuration
  @param priv             A pointer to moal_private structure
  @param wait_option      wait option
@brief Cancel Host Sleep configuration @param priv A pointer to moal_private structure @param wait_option wait option
/* Cancel Host Sleep */ /* remove auto arp from FW */