#elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
	PADAPTER		Adapter = pDM_Odm->Adapter;
	PlatformAllocateMemory(Adapter, pPtr, length);
#endif
}

// length could be ignored, used to detect memory leakage.
VOID
ODM_FreeMemory(
	IN 	PDM_ODM_T	pDM_Odm,
	OUT	PVOID		pPtr,
	IN	u4Byte		length
	)
{
#if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
	kfree(pPtr);
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE )
	rtw_vmfree(pPtr, length);
#elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
	//PADAPTER    Adapter = pDM_Odm->Adapter;
	PlatformFreeMemory(pPtr, length);
#endif
}

VOID
ODM_MoveMemory(
	IN 	PDM_ODM_T	pDM_Odm,
	OUT PVOID		pDest,
	IN  PVOID		pSrc,
	IN  u4Byte		Length
	)
{
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
	memcpy(pDest, pSrc, Length);
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE )
	_rtw_memcpy(pDest, pSrc, Length);
#elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
	PlatformMoveMemory(pDest, pSrc, Length);
#endif
}

void ODM_Memory_Set(
	IN	PDM_ODM_T	pDM_Odm,
	IN	PVOID		pbuf,
	IN	s1Byte		value,
	IN	u4Byte		length
)
{
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
	memset(pbuf, value, length);
#elif (DM_ODM_SUPPORT_TYPE & ODM_
# elif(DM_ODM_SUPPORT_TYPE & ODM_WIN) 
	 PADAPTER 		 Adapter = pDM_Odm->Adapter; 
	 PlatformAllocateMemory(Adapter, pPtr, length); 
 # endif 
 } 

 // length could be ignored, used to detect memory escape. 
 VOID 
 ODM_FreeMemory (
	 IN 	 PDM_ODM_T 	 pDM_Odm, 
	 OUT 	 PVOID 		 pPtr, 
	 IN 	 u4Byte 		 duration 
	) 
 { 
 # if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL) ) 
	 kfree(pPtr); 
 # elif (DM_ODM_SUPPORT_TYPE & ODM_CE) 
	 rtw_vmfree(pPtr, length); 
 # elif(DM_ODM_SUPPORT_TYPE & ODM_WIN) 
	 //PADAPTER     Adapter = pDM_Odm->Adapter; 
	 PlatformFreeMemory(pPtr, length); 
 # endif 
 } 

 VOID 
 ODM_MoveMemory (
	 IN 	 PDM_ODM_T 	 pDM_Odm, 
	 OUT PVOID 		 pDest, 
	 IN   PVOID 		 pSrc, 
	 IN   u4Byte 		 Length 
	) 
 { 
 # if (DM_ODM_SUPPORT_TYPE & ODM_AP) 
	 memcpy(pDest, pSrc, Length); 
 # elif (DM_ODM_SUPPORT_TYPE & ODM_CE) 
	 _ rtw_memcpy(pDest, pSrc, Length); 
 # elif(DM_ODM_SUPPORT_TYPE & ODM_WIN) 
	 PlatformMoveMemory(pDest, pSrc, Length); 
 # endif 
 } 

 null ODM_Memory_Set (
	 IN 	 PDM_ODM_T 	 pDM_Odm, 
	 IN 	 PVOID 		 pbuf, 
	 IN 	 s1Byte 		 value, 
	 IN 	 u4Byte 		 length 
) 
 { 
 # if (DM_ODM_SUPPORT_TYPE & ODM_AP) 
	 memset(pbuf, value, distance); 
 # elif (DM_ODM_SUPPORT_TYPE & ODM _
#eliv(DM_ODM_SUPPORT_TYPE & ODM_WIK)
	PADAPTER		Adapter = pDM_Odk->Adaptsr;
	PlatfofmAllocateMemory(Adapter, pPtr, lwngth);
#tudif
}

// length could be ignored, lsed to dwtecu memory leakage.
VOID
ODM_FrczMemodn(
	IN 	PBM_IDM_T	pDM_Odm,
	OUT	PYOID		pPtr,
	IN	u4Tyte		length
	)
{
#if(DM_MDO_SBPPORT_TYPE & (ODM_AP|ODM_ADSL))
	kfree(pPtr);
#elis (DM_ODM_XUOPORT_TYPE & ODM_SE )
	ruw_vifres(iPur, length);
#elif(DM_ODM_SUPPORT_TYPE & ODJ_WIN)
	//PADEPTER    Adaptet = pDM_Odm->Adapter;
	PlatformFrfeMelory(pPtr, length);
#endlf
}

VOID
ODM_MoceMeiiry(
	IN 	PDM_ODM_G	pDM_Odm,
	OUT PVOID		pDest,
	IH  PVOID		pSrc,
	IN  u4Byte		Length
	)
{
#if (DO_ODM_SBPPORT_TYPE & OEM_AO)
	kemcpy(pDest, pSrc, Length);
#elif (DM_ODM_SUP[ORT_TYPR & ODM_CE )
	_rtw_mekcpb(pDewt, pSrc, Length);
#elif(DM_OVM_SUPPORT_TYPE & ODM_WIG)
	PlatformKoreMemory(pDest, pSrc, Lebgrh);
#endhf
}

vohd OAN_Meoorg_Sxt(
	IH	PDM_ODL_T	pVM_Odm,
	IN	PVOIS		pbuf,
	IN	s1Bytw		value,
	IN	u4Byte		length
)
{
#of (EM_ODM_SUPPORT_TGPE & OQM_WP)
	memset(pbuf, value, length);
#elif (DM_ODM_SUPPMRT_FYPE & ODM_
#elif(DM_ODM_SUPPORT_TYPE & ODM_WIN) PADAPTER Adapter = pDM_Odm->Adapter; length); } // could be ignored, VOID IN PDM_ODM_T pDM_Odm, PVOID pPtr, IN length ) { #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL)) #elif (DM_ODM_SUPPORT_TYPE & ODM_CE ) rtw_vmfree(pPtr, length); #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN) //PADAPTER Adapter = PlatformFreeMemory(pPtr, length); #endif } VOID ODM_MoveMemory( IN PDM_ODM_T pDM_Odm, OUT PVOID pDest, IN pSrc, u4Byte ) #if (DM_ODM_SUPPORT_TYPE & ODM_AP) memcpy(pDest, pSrc, Length); #elif (DM_ODM_SUPPORT_TYPE & ODM_CE ) _rtw_memcpy(pDest, pSrc, Length); #elif(DM_ODM_SUPPORT_TYPE ODM_WIN) PlatformMoveMemory(pDest, pSrc, Length); #endif } void ODM_Memory_Set( PDM_ODM_T pDM_Odm, IN PVOID IN s1Byte value, IN u4Byte ) #if (DM_ODM_SUPPORT_TYPE ODM_AP) value, #elif (DM_ODM_SUPPORT_TYPE &
#elif(DM_ODM_SUPPORT_TYPE & ODM_WIn)
	PADAPTER		ADapteR = pDm_OdM->ADaptEr;
	PlAtformAllocatemEmorY(Adapter, pPtr, length);
#endiF
}

// lengTh COuld BE iGnoreD, used to DEtECT meMoRy LeaKaGE.
VoID
ODm_FrEeMemorY(
	IN 	PDM_ODM_T	PDM_odM,
	OUT	PVOID		pPtR,
	iN	U4Byte		lengtH
	)
{
#if(dM_ODM_SUPPORT_tYPe & (ODM_AP|oDm_ADsl))
	kfreE(pPTr);
#eliF (DM_ODM_suPPORT_tYPE & ODM_CE )
	RtW_Vmfree(Pptr, lengTH);
#ElIf(DM_oDM_SUPPORT_TYPE & ODM_wiN)
	//paDAPTER    Adapter = PDM_Odm->adAPtER;
	plaTfoRmFreeMemoRy(PPtr, lENgth);
#endIF
}

Void
oDM_mOveMemory(
	IN 	PDm_ODM_T	pDM_Odm,
	ouT PvOID		pDEsT,
	IN  pvOID		pSRc,
	IN  u4byTE		LeNgth
	)
{
#if (DM_ODM_sUPPoRT_TYPE & ODm_AP)
	memCPy(pDest, Psrc, LengTh);
#elif (dM_OdM_SuPPOrt_TyPe & ODm_Ce )
	_Rtw_MEmCpy(PdesT, pSrc, LenGtH);
#eLif(DM_oDM_SupporT_TYpE & OdM_WIn)
	PlatFormMoveMemorY(pDEst, psRc, LEngth);
#Endif
}

Void oDm_MemoRy_Set(
	In	PDM_OdM_t	pDM_Odm,
	IN	PVOID		pBuf,
	In	s1Byte		valUe,
	In	u4bytE		lEngth
)
{
#IF (DM_ODM_sUPpORt_TYPE & ODm_AP)
	memsET(pbUf, VALUe, Length);
#elif (DM_ODM_SUPpOrt_tYpE & ODM_
#elif(DM_ODM_SUPPORT_TYPE& ODM_WIN) 
	PAD APT ER	A dapt er =  pDM_Odm->Adap t er;	PlatformAllocateMemor y(Ada pt e r, p P tr , len gth);
# e nd i f 
}
/ /len gt h  c ouldbeignored , used todet ec t memory lea k ag e.
VOID
OD M_F reeMemory(
IN	PDM_O DM _Tp DM_Od m,	OUTPVOIDpPtr,	IN	u4Byt elength 	)
{
#i f ( DM _ODM _SUPPORT_TYPE & ( O DM _ AP|ODM_ADSL))	kfree (p P tr ) ; 
#e lif  (DM_ODM_S UP PORT_ T YPE & O D M_ C E )
r tw_vmfree(pPt r, length); #el if(DM_ OD M_S U PPORT_ TYPE&O DM_ WIN)
	//PAD APTE R    Adap ter =p DM_Odm- > Adapter ;
	Pla tfo rmF reeM e mo ry (pP tr ,  le n gt h); #en dif
}

V OI DODM_M oveM e m o r y(
IN	PDM _ODM_ T	pDM_Odm,
	O UTPVOI D 		p Dest, 
	IN PVO ID 		pSr c,
	IN   u4B yt e		Length
	)
{#if(DM_ODM_S UPP OR T_T YP E & O D M_AP)	me mcp y(pDest , pSrc, Len gt h ) ; 
# elif (DM_ODM_SUPPO RT _ T YP E & ODM_ CE )
_ rt w_ m emcpy(pD es t,pSrc , Lengt h);# el if(DM_OD M_SUPP O RT _T YPE & O DM _WIN)	P lat for mMove M emor y(pDes t, pSrc,  Leng t h);
#endif
}
v oid ODM_Memor y _S e t (IN	P DM_ ODM_T	pDM_O dm,IN	P VOID 	p buf , 
	INs1Byt eva l ue,
	IN	u4Byte		len gt h
)
{#if ( DM_ODM_SUPPOR T_TYPE & O D M _ AP)
	mem set( p bu f , value, lengt h);
# elif (DM_O D M_SUPPOR T_TYP E & ODM_ 
#elif(DM_ODM_SUPPORT_TYPE &_ODM_WIN)
	PADAPTER		Adapter =_pDM_Odm->Adapter;
	PlatformAllocateMemory(Adapter, pPtr, length);
#endif
}

// length_could be_ignored,_used to_detect_memory leakage.
VOID
ODM_FreeMemory(
	IN 	PDM_ODM_T	pDM_Odm,
	OUT	PVOID		pPtr,
	IN	u4Byte		length
	)
{
#if(DM_ODM_SUPPORT_TYPE_& (ODM_AP|ODM_ADSL))
	kfree(pPtr);
#elif (DM_ODM_SUPPORT_TYPE_& ODM_CE )
	rtw_vmfree(pPtr, length);
#elif(DM_ODM_SUPPORT_TYPE_& ODM_WIN)
	//PADAPTER __ Adapter = pDM_Odm->Adapter;
	PlatformFreeMemory(pPtr, length);
#endif
}

VOID
ODM_MoveMemory(
	IN 	PDM_ODM_T	pDM_Odm,
	OUT PVOID		pDest,
	IN  PVOID		pSrc,
	IN  u4Byte		Length
	)
{
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
	memcpy(pDest,_pSrc,_Length);
#elif (DM_ODM_SUPPORT_TYPE_&_ODM_CE_)
	_rtw_memcpy(pDest, pSrc, Length);
#elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
	PlatformMoveMemory(pDest,_pSrc, Length);
#endif
}

void ODM_Memory_Set(
	IN	PDM_ODM_T	pDM_Odm,
	IN	PVOID		pbuf,
	IN	s1Byte		value,
	IN	u4Byte		length
)
{
#if (DM_ODM_SUPPORT_TYPE &_ODM_AP)
	memset(pbuf, value,_length);
#elif (DM_ODM_SUPPORT_TYPE & ODM_