Ejemplo n.º 1
0
INT32 wmt_func_wifi_off(P_WMT_IC_OPS pOps, P_WMT_GEN_CONF pConf)
{
	int iRet = 0;

	UINT32 ctrlPa1 = 0;
	UINT32 ctrlPa2 = 0;
	
	if(NULL != mtk_wcn_wlan_remove){
		
		WMT_INFO_FUNC("WMT-FUNC: wmt wlan func on befor wlan remove\n");
		iRet = (*mtk_wcn_wlan_remove)();
		if(iRet){
			WMT_ERR_FUNC("WMT-FUNC: wmt call wlan remove fail(%d)\n",iRet);
			iRet = -1;
		}else{
			WMT_INFO_FUNC("WMT-FUNC: wmt call wlan remove ok\n");
		}
	}else{
		WMT_ERR_FUNC("WMT-FUNC: null pointer mtk_wcn_wlan_remove\n");
		iRet = -2;
	}

	if(!iRet)
	{
		osal_clear_bit(WMT_WIFI_ON,&gBtWifiGpsState);
		if((!osal_test_bit(WMT_BT_ON,&gBtWifiGpsState)) && (osal_test_bit(WMT_GPS_ON,&gBtWifiGpsState)))
		{
			//send msg to GPS native for stopping send de-sense CMD
			ctrlPa1 = 0;
			ctrlPa2 = 0;
			wmt_core_ctrl(WMT_CTRL_BGW_DESENSE_CTRL,&ctrlPa1,&ctrlPa2);
		}
	}
	return iRet; 
#if 0
    return wmt_func_wifi_ctrl(FUNC_OFF);
#endif
}
Ejemplo n.º 2
0
INT32 wmt_func_wifi_on(P_WMT_IC_OPS pOps, P_WMT_GEN_CONF pConf)
{
	int iRet = 0;
	UINT32 ctrlPa1;
	UINT32 ctrlPa2;
	
	if(NULL != mtk_wcn_wlan_probe){
		
		WMT_INFO_FUNC("WMT-FUNC: wmt wlan func on befor wlan probe\n");
		iRet = (*mtk_wcn_wlan_probe)();
		if(iRet){
			WMT_ERR_FUNC("WMT-FUNC: wmt call wlan probe fail(%d)\n",iRet);
			iRet = -1;
		}else{
			WMT_INFO_FUNC("WMT-FUNC: wmt call wlan probe ok\n");
		}
	}else{
		WMT_ERR_FUNC("WMT-FUNC: null pointer mtk_wcn_wlan_probe\n");
		gWifiProbed = 1;
		iRet = -2;
	}

	if(!iRet)
	{
		osal_set_bit(WMT_WIFI_ON,&gBtWifiGpsState);
		if(osal_test_bit(WMT_GPS_ON,&gBtWifiGpsState))
		{
			//send msg to GPS native for sending de-sense CMD
			ctrlPa1 = 1;
			ctrlPa2 = 0;
			wmt_core_ctrl(WMT_CTRL_BGW_DESENSE_CTRL,&ctrlPa1,&ctrlPa2);
		}
	}
	return iRet;
#if 0
	return wmt_func_wifi_ctrl(FUNC_ON);
#endif
}
Ejemplo n.º 3
0
INT32 wmt_func_wifi_off(P_WMT_IC_OPS pOps, P_WMT_GEN_CONF pConf)
{
	return wmt_func_wifi_ctrl(FUNC_OFF);
}