123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731 |
- /******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
- //============================================================
- // include files
- //============================================================
- #include "odm_precomp.h"
- //
- // ODM IO Relative API.
- //
- u1Byte
- ODM_Read1Byte(
- IN PDM_ODM_T pDM_Odm,
- IN u4Byte RegAddr
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- prtl8192cd_priv priv = pDM_Odm->priv;
- return RTL_R8(RegAddr);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- PADAPTER Adapter = pDM_Odm->Adapter;
- return rtw_read8(Adapter,RegAddr);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- return PlatformEFIORead1Byte(Adapter, RegAddr);
- #endif
- }
- u2Byte
- ODM_Read2Byte(
- IN PDM_ODM_T pDM_Odm,
- IN u4Byte RegAddr
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- prtl8192cd_priv priv = pDM_Odm->priv;
- return RTL_R16(RegAddr);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- PADAPTER Adapter = pDM_Odm->Adapter;
- return rtw_read16(Adapter,RegAddr);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- return PlatformEFIORead2Byte(Adapter, RegAddr);
- #endif
- }
- u4Byte
- ODM_Read4Byte(
- IN PDM_ODM_T pDM_Odm,
- IN u4Byte RegAddr
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- prtl8192cd_priv priv = pDM_Odm->priv;
- return RTL_R32(RegAddr);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- PADAPTER Adapter = pDM_Odm->Adapter;
- return rtw_read32(Adapter,RegAddr);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- return PlatformEFIORead4Byte(Adapter, RegAddr);
- #endif
- }
- VOID
- ODM_Write1Byte(
- IN PDM_ODM_T pDM_Odm,
- IN u4Byte RegAddr,
- IN u1Byte Data
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- prtl8192cd_priv priv = pDM_Odm->priv;
- RTL_W8(RegAddr, Data);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- PADAPTER Adapter = pDM_Odm->Adapter;
- rtw_write8(Adapter,RegAddr, Data);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- PlatformEFIOWrite1Byte(Adapter, RegAddr, Data);
- #endif
-
- }
- VOID
- ODM_Write2Byte(
- IN PDM_ODM_T pDM_Odm,
- IN u4Byte RegAddr,
- IN u2Byte Data
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- prtl8192cd_priv priv = pDM_Odm->priv;
- RTL_W16(RegAddr, Data);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- PADAPTER Adapter = pDM_Odm->Adapter;
- rtw_write16(Adapter,RegAddr, Data);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- PlatformEFIOWrite2Byte(Adapter, RegAddr, Data);
- #endif
- }
- VOID
- ODM_Write4Byte(
- IN PDM_ODM_T pDM_Odm,
- IN u4Byte RegAddr,
- IN u4Byte Data
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- prtl8192cd_priv priv = pDM_Odm->priv;
- RTL_W32(RegAddr, Data);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- PADAPTER Adapter = pDM_Odm->Adapter;
- rtw_write32(Adapter,RegAddr, Data);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- PlatformEFIOWrite4Byte(Adapter, RegAddr, Data);
- #endif
- }
- VOID
- ODM_SetMACReg(
- IN PDM_ODM_T pDM_Odm,
- IN u4Byte RegAddr,
- IN u4Byte BitMask,
- IN u4Byte Data
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- PHY_SetBBReg(pDM_Odm->priv, RegAddr, BitMask, Data);
- #elif(DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_WIN))
- PADAPTER Adapter = pDM_Odm->Adapter;
- PHY_SetBBReg(Adapter, RegAddr, BitMask, Data);
- #endif
- }
- u4Byte
- ODM_GetMACReg(
- IN PDM_ODM_T pDM_Odm,
- IN u4Byte RegAddr,
- IN u4Byte BitMask
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- return PHY_QueryBBReg(pDM_Odm->priv, RegAddr, BitMask);
- #elif(DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_WIN))
- PADAPTER Adapter = pDM_Odm->Adapter;
- return PHY_QueryBBReg(Adapter, RegAddr, BitMask);
- #endif
- }
- VOID
- ODM_SetBBReg(
- IN PDM_ODM_T pDM_Odm,
- IN u4Byte RegAddr,
- IN u4Byte BitMask,
- IN u4Byte Data
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- PHY_SetBBReg(pDM_Odm->priv, RegAddr, BitMask, Data);
- #elif(DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_WIN))
- PADAPTER Adapter = pDM_Odm->Adapter;
- PHY_SetBBReg(Adapter, RegAddr, BitMask, Data);
- #endif
- }
- u4Byte
- ODM_GetBBReg(
- IN PDM_ODM_T pDM_Odm,
- IN u4Byte RegAddr,
- IN u4Byte BitMask
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- return PHY_QueryBBReg(pDM_Odm->priv, RegAddr, BitMask);
- #elif(DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_WIN))
- PADAPTER Adapter = pDM_Odm->Adapter;
- return PHY_QueryBBReg(Adapter, RegAddr, BitMask);
- #endif
- }
- VOID
- ODM_SetRFReg(
- IN PDM_ODM_T pDM_Odm,
- IN ODM_RF_RADIO_PATH_E eRFPath,
- IN u4Byte RegAddr,
- IN u4Byte BitMask,
- IN u4Byte Data
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- PHY_SetRFReg(pDM_Odm->priv, eRFPath, RegAddr, BitMask, Data);
- #elif(DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_WIN))
- PADAPTER Adapter = pDM_Odm->Adapter;
- PHY_SetRFReg(Adapter, eRFPath, RegAddr, BitMask, Data);
- #endif
- }
- u4Byte
- ODM_GetRFReg(
- IN PDM_ODM_T pDM_Odm,
- IN ODM_RF_RADIO_PATH_E eRFPath,
- IN u4Byte RegAddr,
- IN u4Byte BitMask
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- return PHY_QueryRFReg(pDM_Odm->priv, eRFPath, RegAddr, BitMask, 1);
- #elif(DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_WIN))
- PADAPTER Adapter = pDM_Odm->Adapter;
- return PHY_QueryRFReg(Adapter, eRFPath, RegAddr, BitMask);
- #endif
- }
- //
- // ODM Memory relative API.
- //
- VOID
- ODM_AllocateMemory(
- IN PDM_ODM_T pDM_Odm,
- OUT PVOID *pPtr,
- IN u4Byte length
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- *pPtr = kmalloc(length, GFP_ATOMIC);
- #elif (DM_ODM_SUPPORT_TYPE & ODM_CE )
- *pPtr = rtw_zvmalloc(length);
- #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|ODM_ADSL))
-
- #elif (DM_ODM_SUPPORT_TYPE & ODM_CE )
- _rtw_memcpy(pDest, pSrc, Length);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PlatformMoveMemory(pDest, pSrc, Length);
- #endif
- }
- s4Byte ODM_CompareMemory(
- IN PDM_ODM_T pDM_Odm,
- IN PVOID pBuf1,
- IN PVOID pBuf2,
- IN u4Byte length
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- return memcmp(pBuf1,pBuf2,length);
- #elif (DM_ODM_SUPPORT_TYPE & ODM_CE )
- return _rtw_memcmp(pBuf1,pBuf2,length);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- return PlatformCompareMemory(pBuf1,pBuf2,length);
- #endif
- }
- //
- // ODM MISC relative API.
- //
- VOID
- ODM_AcquireSpinLock(
- IN PDM_ODM_T pDM_Odm,
- IN RT_SPINLOCK_TYPE type
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- #elif (DM_ODM_SUPPORT_TYPE & ODM_CE )
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- PlatformAcquireSpinLock(Adapter, type);
- #endif
- }
- VOID
- ODM_ReleaseSpinLock(
- IN PDM_ODM_T pDM_Odm,
- IN RT_SPINLOCK_TYPE type
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- #elif (DM_ODM_SUPPORT_TYPE & ODM_CE )
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- PlatformReleaseSpinLock(Adapter, type);
- #endif
- }
- //
- // Work item relative API. FOr MP driver only~!
- //
- VOID
- ODM_InitializeWorkItem(
- IN PDM_ODM_T pDM_Odm,
- IN PRT_WORK_ITEM pRtWorkItem,
- IN RT_WORKITEM_CALL_BACK RtWorkItemCallback,
- IN PVOID pContext,
- IN const char* szID
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- PlatformInitializeWorkItem(Adapter, pRtWorkItem, RtWorkItemCallback, pContext, szID);
- #endif
- }
- VOID
- ODM_StartWorkItem(
- IN PRT_WORK_ITEM pRtWorkItem
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PlatformStartWorkItem(pRtWorkItem);
- #endif
- }
- VOID
- ODM_StopWorkItem(
- IN PRT_WORK_ITEM pRtWorkItem
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PlatformStopWorkItem(pRtWorkItem);
- #endif
- }
- VOID
- ODM_FreeWorkItem(
- IN PRT_WORK_ITEM pRtWorkItem
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PlatformFreeWorkItem(pRtWorkItem);
- #endif
- }
- VOID
- ODM_ScheduleWorkItem(
- IN PRT_WORK_ITEM pRtWorkItem
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PlatformScheduleWorkItem(pRtWorkItem);
- #endif
- }
- VOID
- ODM_IsWorkItemScheduled(
- IN PRT_WORK_ITEM pRtWorkItem
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PlatformIsWorkItemScheduled(pRtWorkItem);
- #endif
- }
- //
- // ODM Timer relative API.
- //
- VOID
- ODM_StallExecution(
- IN u4Byte usDelay
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- rtw_udelay_os(usDelay);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PlatformStallExecution(usDelay);
- #endif
- }
- VOID
- ODM_delay_ms(IN u4Byte ms)
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- delay_ms(ms);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- rtw_mdelay_os(ms);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- delay_ms(ms);
- #endif
- }
- VOID
- ODM_delay_us(IN u4Byte us)
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- delay_us(us);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- rtw_udelay_os(us);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PlatformStallExecution(us);
- #endif
- }
- VOID
- ODM_sleep_ms(IN u4Byte ms)
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- rtw_msleep_os(ms);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- #endif
- }
- VOID
- ODM_sleep_us(IN u4Byte us)
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- rtw_usleep_os(us);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- #endif
- }
- VOID
- ODM_SetTimer(
- IN PDM_ODM_T pDM_Odm,
- IN PRT_TIMER pTimer,
- IN u4Byte msDelay
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- mod_timer(pTimer, jiffies + (msDelay+9)/10);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- _set_timer(pTimer,msDelay ); //ms
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- PlatformSetTimer(Adapter, pTimer, msDelay);
- #endif
- }
- VOID
- ODM_InitializeTimer(
- IN PDM_ODM_T pDM_Odm,
- IN PRT_TIMER pTimer,
- IN RT_TIMER_CALL_BACK CallBackFunc,
- IN PVOID pContext,
- IN const char* szID
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- pTimer->function = CallBackFunc;
- pTimer->data = (unsigned long)pDM_Odm;
- init_timer(pTimer);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- PADAPTER Adapter = pDM_Odm->Adapter;
- _init_timer(pTimer,Adapter->pnetdev,CallBackFunc,pDM_Odm);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- PlatformInitializeTimer(Adapter, pTimer, CallBackFunc,pContext,szID);
- #endif
- }
- VOID
- ODM_CancelTimer(
- IN PDM_ODM_T pDM_Odm,
- IN PRT_TIMER pTimer
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- del_timer_sync(pTimer);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- _cancel_timer_ex(pTimer);
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- PlatformCancelTimer(Adapter, pTimer);
- #endif
- }
- VOID
- ODM_ReleaseTimer(
- IN PDM_ODM_T pDM_Odm,
- IN PRT_TIMER pTimer
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- PADAPTER Adapter = pDM_Odm->Adapter;
- // <20120301, Kordan> If the initilization fails, InitializeAdapterXxx will return regardless of InitHalDm.
- // Hence, uninitialized timers cause BSOD when the driver releases resources since the init fail.
- if (pTimer == 0)
- {
- ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_SERIOUS, ("=====>ODM_ReleaseTimer(), The timer is NULL! Please check it!\n"));
- return;
- }
-
- PlatformReleaseTimer(Adapter, pTimer);
- #endif
- }
- //
- // ODM FW relative API.
- //
- #if (DM_ODM_SUPPORT_TYPE & ODM_WIN)
- VOID
- ODM_FillH2CCmd(
- IN PADAPTER Adapter,
- IN u1Byte ElementID,
- IN u4Byte CmdLen,
- IN pu1Byte pCmdBuffer
- )
- {
- if(IS_HARDWARE_TYPE_JAGUAR(Adapter))
- {
- switch(ElementID)
- {
- case ODM_H2C_RSSI_REPORT:
- FillH2CCmd8812(Adapter, H2C_8812_RSSI_REPORT, CmdLen, pCmdBuffer);
- break;
- default:
- break;
- }
- }
- else if(IS_HARDWARE_TYPE_8192E(Adapter))
- {
- switch(ElementID)
- {
- case ODM_H2C_RSSI_REPORT:
- FillH2CCmd8812(Adapter, H2C_8812_RSSI_REPORT, CmdLen, pCmdBuffer);
- break;
- default:
- break;
- }
- }
- else if(IS_HARDWARE_TYPE_8723B(Adapter))
- {
- //
- // <Roger_TODO> We should take RTL8723B into consideration, 2012.10.08
- //
- switch(ElementID)
- {
- case ODM_H2C_RSSI_REPORT:
- FillH2CCmd8723B(Adapter, H2C_8723B_RSSI_REPORT, CmdLen, pCmdBuffer);
- break;
-
- default:
- break;
- }
- }
- else if(IS_HARDWARE_TYPE_8188E(Adapter))
- {
- switch(ElementID)
- {
- case ODM_H2C_PSD_RESULT:
- FillH2CCmd88E(Adapter, H2C_88E_PSD_RESULT, CmdLen, pCmdBuffer);
- break;
- case ODM_H2C_RSSI_REPORT:
- if(IS_VENDOR_8188E_I_CUT_SERIES(Adapter))
- FillH2CCmd8812(Adapter, H2C_88E_RSSI_REPORT, CmdLen, pCmdBuffer);
- break;
- default:
- break;
- }
- }
- else if(IS_HARDWARE_TYPE_8192E(Adapter))
- {
- switch(ElementID)
- {
- case ODM_H2C_RSSI_REPORT:
- FillH2CCmd8192E(Adapter, H2C_8192E_RSSI_REPORT, CmdLen, pCmdBuffer);
- break;
-
- default:
- break;
- }
- }
- else
- {
- switch(ElementID)
- {
- case ODM_H2C_RSSI_REPORT:
- FillH2CCmd92C(Adapter, H2C_RSSI_REPORT, CmdLen, pCmdBuffer);
- break;
- case ODM_H2C_PSD_RESULT:
- FillH2CCmd92C(Adapter, H2C_92C_PSD_RESULT, CmdLen, pCmdBuffer);
- break;
- default:
- break;
- }
- }
- }
- #else
- u4Byte
- ODM_FillH2CCmd(
- IN pu1Byte pH2CBuffer,
- IN u4Byte H2CBufferLen,
- IN u4Byte CmdNum,
- IN pu4Byte pElementID,
- IN pu4Byte pCmdLen,
- IN pu1Byte* pCmbBuffer,
- IN pu1Byte CmdStartSeq
- )
- {
- #if(DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
-
- #elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
- #elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
- //FillH2CCmd(pH2CBuffer, H2CBufferLen, CmdNum, pElementID, pCmdLen, pCmbBuffer, CmdStartSeq);
- return FALSE;
- #endif
- return TRUE;
- }
- #endif
|