diff options
Diffstat (limited to 'drivers/staging/rt2860/common')
31 files changed, 1319 insertions, 1319 deletions
diff --git a/drivers/staging/rt2860/common/action.c b/drivers/staging/rt2860/common/action.c index 8928ee742676..56ad236e1144 100644 --- a/drivers/staging/rt2860/common/action.c +++ b/drivers/staging/rt2860/common/action.c @@ -39,7 +39,7 @@ #include "../rt_config.h" #include "action.h" -static void ReservedAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +static void ReservedAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); /* ========================================================================== @@ -58,8 +58,8 @@ static void ReservedAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); MT2_CLS3ERR cls3err_action ========================================================================== */ -void ActionStateMachineInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, +void ActionStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, OUT STATE_MACHINE_FUNC Trans[]) { StateMachineInit(S, (STATE_MACHINE_FUNC *) Trans, MAX_ACT_STATE, @@ -98,19 +98,19 @@ void ActionStateMachineInit(IN PRTMP_ADAPTER pAd, (STATE_MACHINE_FUNC) MlmeInvalidAction); } -void MlmeADDBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeADDBAAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - MLME_ADDBA_REQ_STRUCT *pInfo; + struct rt_mlme_addba_req *pInfo; u8 Addr[6]; u8 *pOutBuffer = NULL; int NStatus; unsigned long Idx; - FRAME_ADDBA_REQ Frame; + struct rt_frame_addba_req Frame; unsigned long FrameLen; - BA_ORI_ENTRY *pBAEntry = NULL; + struct rt_ba_ori_entry *pBAEntry = NULL; - pInfo = (MLME_ADDBA_REQ_STRUCT *) Elem->Msg; - NdisZeroMemory(&Frame, sizeof(FRAME_ADDBA_REQ)); + pInfo = (struct rt_mlme_addba_req *)Elem->Msg; + NdisZeroMemory(&Frame, sizeof(struct rt_frame_addba_req)); if (MlmeAddBAReqSanity(pAd, Elem->Msg, Elem->MsgLen, Addr)) { NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */ @@ -161,7 +161,7 @@ void MlmeADDBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Frame.BaStartSeq.word = cpu2le16(Frame.BaStartSeq.word); MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(FRAME_ADDBA_REQ), &Frame, END_OF_ARGS); + sizeof(struct rt_frame_addba_req), &Frame, END_OF_ARGS); MiniportMMRequest(pAd, (MGMT_USE_QUEUE_FLAG | @@ -182,26 +182,26 @@ void MlmeADDBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Description: send DELBA and delete BaEntry if any Parametrs: - Elem - MLME message MLME_DELBA_REQ_STRUCT + Elem - MLME message struct rt_mlme_delba_req IRQL = DISPATCH_LEVEL ========================================================================== */ -void MlmeDELBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeDELBAAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - MLME_DELBA_REQ_STRUCT *pInfo; + struct rt_mlme_delba_req *pInfo; u8 *pOutBuffer = NULL; u8 *pOutBuffer2 = NULL; int NStatus; unsigned long Idx; - FRAME_DELBA_REQ Frame; + struct rt_frame_delba_req Frame; unsigned long FrameLen; - FRAME_BAR FrameBar; + struct rt_frame_bar FrameBar; - pInfo = (MLME_DELBA_REQ_STRUCT *) Elem->Msg; + pInfo = (struct rt_mlme_delba_req *)Elem->Msg; /* must send back DELBA */ - NdisZeroMemory(&Frame, sizeof(FRAME_DELBA_REQ)); + NdisZeroMemory(&Frame, sizeof(struct rt_frame_delba_req)); DBGPRINT(RT_DEBUG_TRACE, ("==> MlmeDELBAAction(), Initiator(%d) \n", pInfo->Initiator)); @@ -236,7 +236,7 @@ void MlmeDELBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) FrameBar.BarControl.MTID = 0; /* make sure sequence not clear in DEL funciton. */ MakeOutgoingFrame(pOutBuffer2, &FrameLen, - sizeof(FRAME_BAR), &FrameBar, END_OF_ARGS); + sizeof(struct rt_frame_bar), &FrameBar, END_OF_ARGS); MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer2, FrameLen); MlmeFreeMemory(pAd, pOutBuffer2); DBGPRINT(RT_DEBUG_TRACE, @@ -269,7 +269,7 @@ void MlmeDELBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Frame.ReasonCode = cpu2le16(Frame.ReasonCode); MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(FRAME_DELBA_REQ), &Frame, END_OF_ARGS); + sizeof(struct rt_frame_delba_req), &Frame, END_OF_ARGS); MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen); MlmeFreeMemory(pAd, pOutBuffer); DBGPRINT(RT_DEBUG_TRACE, @@ -278,25 +278,25 @@ void MlmeDELBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } } -void MlmeQOSAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeQOSAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } -void MlmeDLSAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeDLSAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } -void MlmeInvalidAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void MlmeInvalidAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { /*u8 * pOutBuffer = NULL; */ /*Return the receiving frame except the MSB of category filed set to 1. 7.3.1.11 */ } -void PeerQOSAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerQOSAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } -void PeerBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerBAAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Action = Elem->Msg[LENGTH_802_11 + 1]; @@ -313,13 +313,13 @@ void PeerBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } } -void PeerPublicAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerPublicAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { if (Elem->Wcid >= MAX_LEN_OF_MAC_TABLE) return; } -static void ReservedAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +static void ReservedAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Category; @@ -333,18 +333,18 @@ static void ReservedAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) hex_dump("Reserved Action Frame", &Elem->Msg[0], Elem->MsgLen); } -void PeerRMAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerRMAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { return; } -static void respond_ht_information_exchange_action(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem) +static void respond_ht_information_exchange_action(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem) { u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen; - FRAME_HT_INFO HTINFOframe, *pFrame; + struct rt_frame_ht_info HTINFOframe, *pFrame; u8 *pAddr; /* 2. Always send back ADDBA Response */ @@ -356,10 +356,10 @@ static void respond_ht_information_exchange_action(IN PRTMP_ADAPTER pAd, return; } /* get RA */ - pFrame = (FRAME_HT_INFO *) & Elem->Msg[0]; + pFrame = (struct rt_frame_ht_info *) & Elem->Msg[0]; pAddr = pFrame->Hdr.Addr2; - NdisZeroMemory(&HTINFOframe, sizeof(FRAME_HT_INFO)); + NdisZeroMemory(&HTINFOframe, sizeof(struct rt_frame_ht_info)); /* 2-1. Prepare ADDBA Response frame. */ { if (ADHOC_ON(pAd)) @@ -381,13 +381,13 @@ static void respond_ht_information_exchange_action(IN PRTMP_ADAPTER pAd, pAd->CommonCfg.AddHTInfo.AddHtInfo.RecomWidth; MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(FRAME_HT_INFO), &HTINFOframe, END_OF_ARGS); + sizeof(struct rt_frame_ht_info), &HTINFOframe, END_OF_ARGS); MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen); MlmeFreeMemory(pAd, pOutBuffer); } -void PeerHTAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerHTAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Action = Elem->Msg[LENGTH_802_11 + 1]; @@ -436,10 +436,10 @@ void PeerHTAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) break; case HT_INFO_EXCHANGE: { - HT_INFORMATION_OCTET *pHT_info; + struct rt_ht_information_octet *pHT_info; pHT_info = - (HT_INFORMATION_OCTET *) & Elem->Msg[LENGTH_802_11 + + (struct rt_ht_information_octet *) & Elem->Msg[LENGTH_802_11 + 2]; /* 7.4.8.10 */ DBGPRINT(RT_DEBUG_TRACE, @@ -467,9 +467,9 @@ void PeerHTAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) FALSE , then continue indicaterx at this moment. ========================================================================== */ -void ORIBATimerTimeout(IN PRTMP_ADAPTER pAd) +void ORIBATimerTimeout(struct rt_rtmp_adapter *pAd) { - MAC_TABLE_ENTRY *pEntry; + struct rt_mac_table_entry *pEntry; int i, total; u8 TID; @@ -489,16 +489,16 @@ void ORIBATimerTimeout(IN PRTMP_ADAPTER pAd) } } -void SendRefreshBAR(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry) +void SendRefreshBAR(struct rt_rtmp_adapter *pAd, struct rt_mac_table_entry *pEntry) { - FRAME_BAR FrameBar; + struct rt_frame_bar FrameBar; unsigned long FrameLen; int NStatus; u8 *pOutBuffer = NULL; u16 Sequence; u8 i, TID; u16 idx; - BA_ORI_ENTRY *pBAEntry; + struct rt_ba_ori_entry *pBAEntry; for (i = 0; i < NUM_OF_TID; i++) { idx = pEntry->BAOriWcidArray[i]; @@ -529,7 +529,7 @@ void SendRefreshBAR(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry) FrameBar.BarControl.TID = TID; /* make sure sequence not clear in DEL funciton. */ MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(FRAME_BAR), &FrameBar, + sizeof(struct rt_frame_bar), &FrameBar, END_OF_ARGS); /*if (!(CLIENT_STATUS_TEST_FLAG(pEntry, fCLIENT_STATUS_RALINK_CHIPSET))) */ if (1) /* Now we always send BAR. */ @@ -547,11 +547,11 @@ void SendRefreshBAR(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry) } } -void ActHeaderInit(IN PRTMP_ADAPTER pAd, - IN OUT PHEADER_802_11 pHdr80211, +void ActHeaderInit(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHdr80211, u8 *Addr1, u8 *Addr2, u8 *Addr3) { - NdisZeroMemory(pHdr80211, sizeof(HEADER_802_11)); + NdisZeroMemory(pHdr80211, sizeof(struct rt_header_802_11)); pHdr80211->FC.Type = BTYPE_MGMT; pHdr80211->FC.SubType = SUBTYPE_ACTION; @@ -560,10 +560,10 @@ void ActHeaderInit(IN PRTMP_ADAPTER pAd, COPY_MAC_ADDR(pHdr80211->Addr3, Addr3); } -void BarHeaderInit(IN PRTMP_ADAPTER pAd, - IN OUT PFRAME_BAR pCntlBar, u8 *pDA, u8 *pSA) +void BarHeaderInit(struct rt_rtmp_adapter *pAd, + struct rt_frame_bar * pCntlBar, u8 *pDA, u8 *pSA) { - NdisZeroMemory(pCntlBar, sizeof(FRAME_BAR)); + NdisZeroMemory(pCntlBar, sizeof(struct rt_frame_bar)); pCntlBar->FC.Type = BTYPE_CNTL; pCntlBar->FC.SubType = SUBTYPE_BLOCK_ACK_REQ; pCntlBar->BarControl.MTID = 0; @@ -571,7 +571,7 @@ void BarHeaderInit(IN PRTMP_ADAPTER pAd, pCntlBar->BarControl.ACKPolicy = 0; pCntlBar->Duration = - 16 + RTMPCalcDuration(pAd, RATE_1, sizeof(FRAME_BA)); + 16 + RTMPCalcDuration(pAd, RATE_1, sizeof(struct rt_frame_ba)); COPY_MAC_ADDR(pCntlBar->Addr1, pDA); COPY_MAC_ADDR(pCntlBar->Addr2, pSA); @@ -591,7 +591,7 @@ void BarHeaderInit(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void InsertActField(IN PRTMP_ADAPTER pAd, +void InsertActField(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, u8 Category, u8 ActCode) { diff --git a/drivers/staging/rt2860/common/action.h b/drivers/staging/rt2860/common/action.h index f1d1ac73b1cb..974f8b84039f 100644 --- a/drivers/staging/rt2860/common/action.h +++ b/drivers/staging/rt2860/common/action.h @@ -39,18 +39,18 @@ #ifndef __ACTION_H__ #define __ACTION_H__ -typedef struct PACKED __HT_INFO_OCTET { +struct PACKED rt_ht_information_octet { u8 Request:1; u8 Forty_MHz_Intolerant:1; u8 STA_Channel_Width:1; u8 Reserved:5; -} HT_INFORMATION_OCTET; +}; -typedef struct PACKED __FRAME_HT_INFO { - HEADER_802_11 Hdr; +struct PACKED rt_frame_ht_info { + struct rt_header_802_11 Hdr; u8 Category; u8 Action; - HT_INFORMATION_OCTET HT_Info; -} FRAME_HT_INFO, *PFRAME_HT_INFO; + struct rt_ht_information_octet HT_Info; +}; #endif /* __ACTION_H__ */ diff --git a/drivers/staging/rt2860/common/ba_action.c b/drivers/staging/rt2860/common/ba_action.c index f90d709bcf40..69eea402d32d 100644 --- a/drivers/staging/rt2860/common/ba_action.c +++ b/drivers/staging/rt2860/common/ba_action.c @@ -38,12 +38,12 @@ #define RESET_RCV_SEQ (0xFFFF) -static void ba_mpdu_blk_free(PRTMP_ADAPTER pAd, +static void ba_mpdu_blk_free(struct rt_rtmp_adapter *pAd, struct reordering_mpdu *mpdu_blk); -BA_ORI_ENTRY *BATableAllocOriEntry(IN PRTMP_ADAPTER pAd, u16 * Idx); +struct rt_ba_ori_entry *BATableAllocOriEntry(struct rt_rtmp_adapter *pAd, u16 * Idx); -BA_REC_ENTRY *BATableAllocRecEntry(IN PRTMP_ADAPTER pAd, u16 * Idx); +struct rt_ba_rec_entry *BATableAllocRecEntry(struct rt_rtmp_adapter *pAd, u16 * Idx); void BAOriSessionSetupTimeout(void *SystemSpecific1, void *FunctionContext, @@ -61,8 +61,8 @@ BUILD_TIMER_FUNCTION(BARecSessionIdleTimeout); #define ANNOUNCE_REORDERING_PACKET(_pAd, _mpdu_blk) \ Announce_Reordering_Packet(_pAd, _mpdu_blk); -void BA_MaxWinSizeReasign(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntryPeer, u8 * pWinSize) +void BA_MaxWinSizeReasign(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntryPeer, u8 * pWinSize) { u8 MaxSize; @@ -97,7 +97,7 @@ void BA_MaxWinSizeReasign(IN PRTMP_ADAPTER pAd, } } -void Announce_Reordering_Packet(IN PRTMP_ADAPTER pAd, +void Announce_Reordering_Packet(struct rt_rtmp_adapter *pAd, IN struct reordering_mpdu *mpdu) { void *pPacket; @@ -194,10 +194,10 @@ static inline struct reordering_mpdu *ba_reordering_mpdu_probe(struct /* * free all resource for reordering mechanism */ -void ba_reordering_resource_release(PRTMP_ADAPTER pAd) +void ba_reordering_resource_release(struct rt_rtmp_adapter *pAd) { - BA_TABLE *Tab; - PBA_REC_ENTRY pBAEntry; + struct rt_ba_table *Tab; + struct rt_ba_rec_entry *pBAEntry; struct reordering_mpdu *mpdu_blk; int i; @@ -229,7 +229,7 @@ void ba_reordering_resource_release(PRTMP_ADAPTER pAd) /* * Allocate all resource for reordering mechanism */ -BOOLEAN ba_reordering_resource_init(PRTMP_ADAPTER pAd, int num) +BOOLEAN ba_reordering_resource_init(struct rt_rtmp_adapter *pAd, int num) { int i; u8 *mem; @@ -277,7 +277,7 @@ BOOLEAN ba_reordering_resource_init(PRTMP_ADAPTER pAd, int num) /*static int blk_count=0; // sample take off, no use */ -static struct reordering_mpdu *ba_mpdu_blk_alloc(PRTMP_ADAPTER pAd) +static struct reordering_mpdu *ba_mpdu_blk_alloc(struct rt_rtmp_adapter *pAd) { struct reordering_mpdu *mpdu_blk; @@ -292,7 +292,7 @@ static struct reordering_mpdu *ba_mpdu_blk_alloc(PRTMP_ADAPTER pAd) return mpdu_blk; } -static void ba_mpdu_blk_free(PRTMP_ADAPTER pAd, +static void ba_mpdu_blk_free(struct rt_rtmp_adapter *pAd, struct reordering_mpdu *mpdu_blk) { ASSERT(mpdu_blk); @@ -303,8 +303,8 @@ static void ba_mpdu_blk_free(PRTMP_ADAPTER pAd, NdisReleaseSpinLock(&pAd->mpdu_blk_pool.lock); } -static u16 ba_indicate_reordering_mpdus_in_order(IN PRTMP_ADAPTER pAd, - IN PBA_REC_ENTRY pBAEntry, +static u16 ba_indicate_reordering_mpdus_in_order(struct rt_rtmp_adapter *pAd, + struct rt_ba_rec_entry *pBAEntry, u16 StartSeq) { struct reordering_mpdu *mpdu_blk; @@ -334,8 +334,8 @@ static u16 ba_indicate_reordering_mpdus_in_order(IN PRTMP_ADAPTER pAd, return LastIndSeq; } -static void ba_indicate_reordering_mpdus_le_seq(IN PRTMP_ADAPTER pAd, - IN PBA_REC_ENTRY pBAEntry, +static void ba_indicate_reordering_mpdus_le_seq(struct rt_rtmp_adapter *pAd, + struct rt_ba_rec_entry *pBAEntry, u16 Sequence) { struct reordering_mpdu *mpdu_blk; @@ -358,8 +358,8 @@ static void ba_indicate_reordering_mpdus_le_seq(IN PRTMP_ADAPTER pAd, NdisReleaseSpinLock(&pBAEntry->RxReRingLock); } -static void ba_refresh_reordering_mpdus(IN PRTMP_ADAPTER pAd, - PBA_REC_ENTRY pBAEntry) +static void ba_refresh_reordering_mpdus(struct rt_rtmp_adapter *pAd, + struct rt_ba_rec_entry *pBAEntry) { struct reordering_mpdu *mpdu_blk; @@ -381,8 +381,8 @@ static void ba_refresh_reordering_mpdus(IN PRTMP_ADAPTER pAd, } /*static */ -void ba_flush_reordering_timeout_mpdus(IN PRTMP_ADAPTER pAd, - IN PBA_REC_ENTRY pBAEntry, +void ba_flush_reordering_timeout_mpdus(struct rt_rtmp_adapter *pAd, + struct rt_ba_rec_entry *pBAEntry, unsigned long Now32) { u16 Sequence; @@ -440,14 +440,14 @@ void ba_flush_reordering_timeout_mpdus(IN PRTMP_ADAPTER pAd, * generate ADDBA request to * set up BA agreement */ -void BAOriSessionSetUp(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, +void BAOriSessionSetUp(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 TID, u16 TimeOut, unsigned long DelayTime, IN BOOLEAN isForced) { - /*MLME_ADDBA_REQ_STRUCT AddbaReq; */ - BA_ORI_ENTRY *pBAEntry = NULL; + /*struct rt_mlme_addba_req AddbaReq; */ + struct rt_ba_ori_entry *pBAEntry = NULL; u16 Idx; BOOLEAN Cancelled; @@ -506,17 +506,17 @@ void BAOriSessionSetUp(IN PRTMP_ADAPTER pAd, RTMPSetTimer(&pBAEntry->ORIBATimer, DelayTime); } -void BAOriSessionAdd(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN PFRAME_ADDBA_RSP pFrame) +void BAOriSessionAdd(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_frame_addba_rsp * pFrame) { - BA_ORI_ENTRY *pBAEntry = NULL; + struct rt_ba_ori_entry *pBAEntry = NULL; BOOLEAN Cancelled; u8 TID; u16 Idx; u8 *pOutBuffer2 = NULL; int NStatus; unsigned long FrameLen; - FRAME_BAR FrameBar; + struct rt_frame_bar FrameBar; TID = pFrame->BaParm.TID; Idx = pEntry->BAOriWcidArray[TID]; @@ -562,7 +562,7 @@ void BAOriSessionAdd(IN PRTMP_ADAPTER pAd, FrameBar.StartingSeq.field.StartSeq = pBAEntry->Sequence; /* make sure sequence not clear in DEL funciton. */ FrameBar.BarControl.TID = pBAEntry->TID; /* make sure sequence not clear in DEL funciton. */ MakeOutgoingFrame(pOutBuffer2, &FrameLen, - sizeof(FRAME_BAR), &FrameBar, END_OF_ARGS); + sizeof(struct rt_frame_bar), &FrameBar, END_OF_ARGS); MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer2, FrameLen); MlmeFreeMemory(pAd, pOutBuffer2); @@ -571,10 +571,10 @@ void BAOriSessionAdd(IN PRTMP_ADAPTER pAd, } } -BOOLEAN BARecSessionAdd(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN PFRAME_ADDBA_REQ pFrame) +BOOLEAN BARecSessionAdd(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_frame_addba_req * pFrame) { - BA_REC_ENTRY *pBAEntry = NULL; + struct rt_ba_rec_entry *pBAEntry = NULL; BOOLEAN Status = TRUE; BOOLEAN Cancelled; u16 Idx; @@ -660,10 +660,10 @@ BOOLEAN BARecSessionAdd(IN PRTMP_ADAPTER pAd, return (Status); } -BA_REC_ENTRY *BATableAllocRecEntry(IN PRTMP_ADAPTER pAd, u16 * Idx) +struct rt_ba_rec_entry *BATableAllocRecEntry(struct rt_rtmp_adapter *pAd, u16 * Idx) { int i; - BA_REC_ENTRY *pBAEntry = NULL; + struct rt_ba_rec_entry *pBAEntry = NULL; NdisAcquireSpinLock(&pAd->BATabLock); @@ -690,10 +690,10 @@ done: return pBAEntry; } -BA_ORI_ENTRY *BATableAllocOriEntry(IN PRTMP_ADAPTER pAd, u16 * Idx) +struct rt_ba_ori_entry *BATableAllocOriEntry(struct rt_rtmp_adapter *pAd, u16 * Idx) { int i; - BA_ORI_ENTRY *pBAEntry = NULL; + struct rt_ba_ori_entry *pBAEntry = NULL; NdisAcquireSpinLock(&pAd->BATabLock); @@ -718,10 +718,10 @@ done: return pBAEntry; } -void BATableFreeOriEntry(IN PRTMP_ADAPTER pAd, unsigned long Idx) +void BATableFreeOriEntry(struct rt_rtmp_adapter *pAd, unsigned long Idx) { - BA_ORI_ENTRY *pBAEntry = NULL; - MAC_TABLE_ENTRY *pEntry; + struct rt_ba_ori_entry *pBAEntry = NULL; + struct rt_mac_table_entry *pEntry; if ((Idx == 0) || (Idx >= MAX_LEN_OF_BA_ORI_TABLE)) return; @@ -752,10 +752,10 @@ void BATableFreeOriEntry(IN PRTMP_ADAPTER pAd, unsigned long Idx) } } -void BATableFreeRecEntry(IN PRTMP_ADAPTER pAd, unsigned long Idx) +void BATableFreeRecEntry(struct rt_rtmp_adapter *pAd, unsigned long Idx) { - BA_REC_ENTRY *pBAEntry = NULL; - MAC_TABLE_ENTRY *pEntry; + struct rt_ba_rec_entry *pBAEntry = NULL; + struct rt_mac_table_entry *pEntry; if ((Idx == 0) || (Idx >= MAX_LEN_OF_BA_REC_TABLE)) return; @@ -777,13 +777,13 @@ void BATableFreeRecEntry(IN PRTMP_ADAPTER pAd, unsigned long Idx) } } -void BAOriSessionTearDown(IN OUT PRTMP_ADAPTER pAd, +void BAOriSessionTearDown(struct rt_rtmp_adapter *pAd, u8 Wcid, u8 TID, IN BOOLEAN bPassive, IN BOOLEAN bForceSend) { unsigned long Idx = 0; - BA_ORI_ENTRY *pBAEntry; + struct rt_ba_ori_entry *pBAEntry; BOOLEAN Cancelled; if (Wcid >= MAX_LEN_OF_MAC_TABLE) { @@ -796,13 +796,13 @@ void BAOriSessionTearDown(IN OUT PRTMP_ADAPTER pAd, if ((Idx == 0) || (Idx >= MAX_LEN_OF_BA_ORI_TABLE)) { if (bForceSend == TRUE) { /* force send specified TID DelBA */ - MLME_DELBA_REQ_STRUCT DelbaReq; - MLME_QUEUE_ELEM *Elem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_delba_req DelbaReq; + struct rt_mlme_queue_elem *Elem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (Elem != NULL) { NdisZeroMemory(&DelbaReq, sizeof(DelbaReq)); - NdisZeroMemory(Elem, sizeof(MLME_QUEUE_ELEM)); + NdisZeroMemory(Elem, sizeof(struct rt_mlme_queue_elem)); COPY_MAC_ADDR(DelbaReq.Addr, pAd->MacTab.Content[Wcid].Addr); @@ -836,13 +836,13 @@ void BAOriSessionTearDown(IN OUT PRTMP_ADAPTER pAd, /* */ if ((bPassive == FALSE) && (TID == pBAEntry->TID) && (pBAEntry->ORI_BA_Status == Originator_Done)) { - MLME_DELBA_REQ_STRUCT DelbaReq; - MLME_QUEUE_ELEM *Elem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_delba_req DelbaReq; + struct rt_mlme_queue_elem *Elem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (Elem != NULL) { NdisZeroMemory(&DelbaReq, sizeof(DelbaReq)); - NdisZeroMemory(Elem, sizeof(MLME_QUEUE_ELEM)); + NdisZeroMemory(Elem, sizeof(struct rt_mlme_queue_elem)); COPY_MAC_ADDR(DelbaReq.Addr, pAd->MacTab.Content[Wcid].Addr); @@ -867,11 +867,11 @@ void BAOriSessionTearDown(IN OUT PRTMP_ADAPTER pAd, } } -void BARecSessionTearDown(IN OUT PRTMP_ADAPTER pAd, +void BARecSessionTearDown(struct rt_rtmp_adapter *pAd, u8 Wcid, u8 TID, IN BOOLEAN bPassive) { unsigned long Idx = 0; - BA_REC_ENTRY *pBAEntry; + struct rt_ba_rec_entry *pBAEntry; if (Wcid >= MAX_LEN_OF_MAC_TABLE) { return; @@ -895,7 +895,7 @@ void BARecSessionTearDown(IN OUT PRTMP_ADAPTER pAd, /* */ if ((TID == pBAEntry->TID) && (pBAEntry->REC_BA_Status == Recipient_Accept)) { - MLME_DELBA_REQ_STRUCT DelbaReq; + struct rt_mlme_delba_req DelbaReq; BOOLEAN Cancelled; /*unsigned long offset; */ /*u32 VALUE; */ @@ -906,12 +906,12 @@ void BARecSessionTearDown(IN OUT PRTMP_ADAPTER pAd, /* 1. Send DELBA Action Frame */ /* */ if (bPassive == FALSE) { - MLME_QUEUE_ELEM *Elem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_queue_elem *Elem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (Elem != NULL) { NdisZeroMemory(&DelbaReq, sizeof(DelbaReq)); - NdisZeroMemory(Elem, sizeof(MLME_QUEUE_ELEM)); + NdisZeroMemory(Elem, sizeof(struct rt_mlme_queue_elem)); COPY_MAC_ADDR(DelbaReq.Addr, pAd->MacTab.Content[Wcid].Addr); @@ -956,7 +956,7 @@ void BARecSessionTearDown(IN OUT PRTMP_ADAPTER pAd, BATableFreeRecEntry(pAd, Idx); } -void BASessionTearDownALL(IN OUT PRTMP_ADAPTER pAd, u8 Wcid) +void BASessionTearDownALL(struct rt_rtmp_adapter *pAd, u8 Wcid) { int i; @@ -985,9 +985,9 @@ void BAOriSessionSetupTimeout(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3) { - BA_ORI_ENTRY *pBAEntry = (BA_ORI_ENTRY *) FunctionContext; - MAC_TABLE_ENTRY *pEntry; - PRTMP_ADAPTER pAd; + struct rt_ba_ori_entry *pBAEntry = (struct rt_ba_ori_entry *)FunctionContext; + struct rt_mac_table_entry *pEntry; + struct rt_rtmp_adapter *pAd; if (pBAEntry == NULL) return; @@ -1004,7 +1004,7 @@ void BAOriSessionSetupTimeout(void *SystemSpecific1, if ((pBAEntry->ORI_BA_Status == Originator_WaitRes) && (pBAEntry->Token < ORI_SESSION_MAX_RETRY)) { - MLME_ADDBA_REQ_STRUCT AddbaReq; + struct rt_mlme_addba_req AddbaReq; NdisZeroMemory(&AddbaReq, sizeof(AddbaReq)); COPY_MAC_ADDR(AddbaReq.pAddr, pEntry->Addr); @@ -1015,7 +1015,7 @@ void BAOriSessionSetupTimeout(void *SystemSpecific1, AddbaReq.TimeOutValue = 0; AddbaReq.Token = pBAEntry->Token; MlmeEnqueue(pAd, ACTION_STATE_MACHINE, MT2_MLME_ADD_BA_CATE, - sizeof(MLME_ADDBA_REQ_STRUCT), (void *)& AddbaReq); + sizeof(struct rt_mlme_addba_req), (void *)& AddbaReq); RTMP_MLME_HANDLER(pAd); DBGPRINT(RT_DEBUG_TRACE, ("BA Ori Session Timeout(%d) : Send ADD BA again\n", @@ -1047,8 +1047,8 @@ void BARecSessionIdleTimeout(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3) { - BA_REC_ENTRY *pBAEntry = (BA_REC_ENTRY *) FunctionContext; - PRTMP_ADAPTER pAd; + struct rt_ba_rec_entry *pBAEntry = (struct rt_ba_rec_entry *)FunctionContext; + struct rt_rtmp_adapter *pAd; unsigned long Now32; if (pBAEntry == NULL) @@ -1070,20 +1070,20 @@ void BARecSessionIdleTimeout(void *SystemSpecific1, } } -void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerAddBAReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { /* 7.4.4.1 */ /*unsigned long Idx; */ u8 Status = 1; u8 pAddr[6]; - FRAME_ADDBA_RSP ADDframe; + struct rt_frame_addba_rsp ADDframe; u8 *pOutBuffer = NULL; int NStatus; - PFRAME_ADDBA_REQ pAddreqFrame = NULL; + struct rt_frame_addba_req * pAddreqFrame = NULL; /*u8 BufSize; */ unsigned long FrameLen; unsigned long *ptemp; - PMAC_TABLE_ENTRY pMacEntry; + struct rt_mac_table_entry *pMacEntry; DBGPRINT(RT_DEBUG_TRACE, ("%s ==> (Wcid = %d)\n", __func__, Elem->Wcid)); @@ -1103,7 +1103,7 @@ void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) if ((pAd->CommonCfg.bBADecline == FALSE) && IS_HT_STA(pMacEntry)) { - pAddreqFrame = (PFRAME_ADDBA_REQ) (&Elem->Msg[0]); + pAddreqFrame = (struct rt_frame_addba_req *) (&Elem->Msg[0]); DBGPRINT(RT_DEBUG_OFF, ("Rcv Wcid(%d) AddBAReq\n", Elem->Wcid)); if (BARecSessionAdd @@ -1120,7 +1120,7 @@ void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) if (pAd->MacTab.Content[Elem->Wcid].ValidAsCLI) ASSERT(pAd->MacTab.Content[Elem->Wcid].Sst == SST_ASSOC); - pAddreqFrame = (PFRAME_ADDBA_REQ) (&Elem->Msg[0]); + pAddreqFrame = (struct rt_frame_addba_req *) (&Elem->Msg[0]); /* 2. Always send back ADDBA Response */ NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */ if (NStatus != NDIS_STATUS_SUCCESS) { @@ -1129,7 +1129,7 @@ void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) return; } - NdisZeroMemory(&ADDframe, sizeof(FRAME_ADDBA_RSP)); + NdisZeroMemory(&ADDframe, sizeof(struct rt_frame_addba_rsp)); /* 2-1. Prepare ADDBA Response frame. */ { @@ -1164,7 +1164,7 @@ void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ADDframe.TimeOutValue = cpu2le16(ADDframe.TimeOutValue); MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(FRAME_ADDBA_RSP), &ADDframe, END_OF_ARGS); + sizeof(struct rt_frame_addba_rsp), &ADDframe, END_OF_ARGS); MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen); MlmeFreeMemory(pAd, pOutBuffer); @@ -1173,12 +1173,12 @@ void PeerAddBAReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ADDframe.BaParm.TID, ADDframe.BaParm.BufSize)); } -void PeerAddBARspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerAddBARspAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { /*u8 Idx, i; */ /*u8 * pOutBuffer = NULL; */ - PFRAME_ADDBA_RSP pFrame = NULL; - /*PBA_ORI_ENTRY pBAEntry; */ + struct rt_frame_addba_rsp * pFrame = NULL; + /*struct rt_ba_ori_entry *pBAEntry; */ /*ADDBA Response from unknown peer, ignore this. */ if (Elem->Wcid >= MAX_LEN_OF_MAC_TABLE) @@ -1189,7 +1189,7 @@ void PeerAddBARspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) /*hex_dump("PeerAddBARspAction()", Elem->Msg, Elem->MsgLen); */ if (PeerAddBARspActionSanity(pAd, Elem->Msg, Elem->MsgLen)) { - pFrame = (PFRAME_ADDBA_RSP) (&Elem->Msg[0]); + pFrame = (struct rt_frame_addba_rsp *) (&Elem->Msg[0]); DBGPRINT(RT_DEBUG_TRACE, ("\t\t StatusCode = %d\n", pFrame->StatusCode)); @@ -1216,16 +1216,16 @@ void PeerAddBARspAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } } -void PeerDelBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerDelBAAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { /*u8 Idx; */ /*u8 * pOutBuffer = NULL; */ - PFRAME_DELBA_REQ pDelFrame = NULL; + struct rt_frame_delba_req * pDelFrame = NULL; DBGPRINT(RT_DEBUG_TRACE, ("%s ==>\n", __func__)); /*DELBA Request from unknown peer, ignore this. */ if (PeerDelBAActionSanity(pAd, Elem->Wcid, Elem->Msg, Elem->MsgLen)) { - pDelFrame = (PFRAME_DELBA_REQ) (&Elem->Msg[0]); + pDelFrame = (struct rt_frame_delba_req *) (&Elem->Msg[0]); if (pDelFrame->DelbaParm.Initiator == ORIGINATOR) { DBGPRINT(RT_DEBUG_TRACE, ("BA - PeerDelBAAction----> ORIGINATOR\n")); @@ -1243,14 +1243,14 @@ void PeerDelBAAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) } } -BOOLEAN CntlEnqueueForRecv(IN PRTMP_ADAPTER pAd, +BOOLEAN CntlEnqueueForRecv(struct rt_rtmp_adapter *pAd, unsigned long Wcid, - unsigned long MsgLen, IN PFRAME_BA_REQ pMsg) + unsigned long MsgLen, struct rt_frame_ba_req * pMsg) { - PFRAME_BA_REQ pFrame = pMsg; + struct rt_frame_ba_req * pFrame = pMsg; /*PRTMP_REORDERBUF pBuffer; */ /*PRTMP_REORDERBUF pDmaBuf; */ - PBA_REC_ENTRY pBAEntry; + struct rt_ba_rec_entry *pBAEntry; /*BOOLEAN Result; */ unsigned long Idx; /*u8 NumRxPkt; */ @@ -1271,10 +1271,10 @@ BOOLEAN CntlEnqueueForRecv(IN PRTMP_ADAPTER pAd, if (MsgLen > MGMT_DMA_BUFFER_SIZE) { DBGPRINT_ERR(("CntlEnqueueForRecv: frame too large, size = %ld \n", MsgLen)); return FALSE; - } else if (MsgLen != sizeof(FRAME_BA_REQ)) { + } else if (MsgLen != sizeof(struct rt_frame_ba_req)) { DBGPRINT_ERR(("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen)); return FALSE; - } else if (MsgLen != sizeof(FRAME_BA_REQ)) { + } else if (MsgLen != sizeof(struct rt_frame_ba_req)) { DBGPRINT_ERR(("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen)); return FALSE; } @@ -1309,12 +1309,12 @@ BOOLEAN CntlEnqueueForRecv(IN PRTMP_ADAPTER pAd, /* Description : Send PSMP Action frame If PSMP mode switches. */ -void SendPSMPAction(IN PRTMP_ADAPTER pAd, u8 Wcid, u8 Psmp) +void SendPSMPAction(struct rt_rtmp_adapter *pAd, u8 Wcid, u8 Psmp) { u8 *pOutBuffer = NULL; int NStatus; /*unsigned long Idx; */ - FRAME_PSMP_ACTION Frame; + struct rt_frame_psmp_action Frame; unsigned long FrameLen; NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */ @@ -1355,7 +1355,7 @@ void SendPSMPAction(IN PRTMP_ADAPTER pAd, u8 Wcid, u8 Psmp) break; } MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(FRAME_PSMP_ACTION), &Frame, END_OF_ARGS); + sizeof(struct rt_frame_psmp_action), &Frame, END_OF_ARGS); MiniportMMRequest(pAd, QID_AC_BE, pOutBuffer, FrameLen); MlmeFreeMemory(pAd, pOutBuffer); DBGPRINT(RT_DEBUG_ERROR, ("HT - SendPSMPAction( %d ) \n", Frame.Psmp)); @@ -1363,7 +1363,7 @@ void SendPSMPAction(IN PRTMP_ADAPTER pAd, u8 Wcid, u8 Psmp) #define RADIO_MEASUREMENT_REQUEST_ACTION 0 -typedef struct PACKED { +struct PACKED rt_beacon_request { u8 RegulatoryClass; u8 ChannelNumber; u16 RandomInterval; @@ -1373,18 +1373,18 @@ typedef struct PACKED { u8 ReportingCondition; u8 Threshold; u8 SSIDIE[2]; /* 2 byte */ -} BEACON_REQUEST; +}; -typedef struct PACKED { +struct PACKED rt_measurement_req { u8 ID; u8 Length; u8 Token; u8 RequestMode; u8 Type; -} MEASUREMENT_REQ; +}; -void convert_reordering_packet_to_preAMSDU_or_802_3_packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, +void convert_reordering_packet_to_preAMSDU_or_802_3_packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { @@ -1436,9 +1436,9 @@ void convert_reordering_packet_to_preAMSDU_or_802_3_packet(IN PRTMP_ADAPTER pAd, } \ } while (0); -static void ba_enqueue_reordering_packet(IN PRTMP_ADAPTER pAd, - IN PBA_REC_ENTRY pBAEntry, - IN RX_BLK * pRxBlk, +static void ba_enqueue_reordering_packet(struct rt_rtmp_adapter *pAd, + struct rt_ba_rec_entry *pBAEntry, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { struct reordering_mpdu *mpdu_blk; @@ -1515,11 +1515,11 @@ static void ba_enqueue_reordering_packet(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void Indicate_AMPDU_Packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void Indicate_AMPDU_Packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { u16 Idx; - PBA_REC_ENTRY pBAEntry = NULL; + struct rt_ba_rec_entry *pBAEntry = NULL; u16 Sequence = pRxBlk->pHeader->Sequence; unsigned long Now32; u8 Wcid = pRxBlk->pRxWI->WirelessCliID; diff --git a/drivers/staging/rt2860/common/cmm_aes.c b/drivers/staging/rt2860/common/cmm_aes.c index 99b0b1bff468..6730d78badfc 100644 --- a/drivers/staging/rt2860/common/cmm_aes.c +++ b/drivers/staging/rt2860/common/cmm_aes.c @@ -37,11 +37,11 @@ #include "../rt_config.h" -typedef struct { +struct aes_context { u32 erk[64]; /* encryption round keys */ u32 drk[64]; /* decryption round keys */ int nr; /* number of rounds */ -} aes_context; +}; /*****************************/ /******** SBOX Table *********/ @@ -408,9 +408,9 @@ void construct_ctr_preload(unsigned char *ctr_preload, } -BOOLEAN RTMPSoftDecryptAES(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPSoftDecryptAES(struct rt_rtmp_adapter *pAd, u8 *pData, - unsigned long DataByteCnt, IN PCIPHER_KEY pWpaKey) + unsigned long DataByteCnt, struct rt_cipher_key *pWpaKey) { u8 KeyID; u32 HeaderLen; @@ -878,7 +878,7 @@ static uint32 KT3[256]; (b)[(i) + 3] = (uint8) ( (n) ); \ } -int rt_aes_set_key(aes_context * ctx, uint8 * key, int nbits) +int rt_aes_set_key(struct aes_context * ctx, uint8 * key, int nbits) { int i; uint32 *RK, *SK; @@ -1020,7 +1020,7 @@ int rt_aes_set_key(aes_context * ctx, uint8 * key, int nbits) /* AES 128-bit block encryption routine */ -void rt_aes_encrypt(aes_context * ctx, uint8 input[16], uint8 output[16]) +void rt_aes_encrypt(struct aes_context * ctx, uint8 input[16], uint8 output[16]) { uint32 *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3; @@ -1107,7 +1107,7 @@ void rt_aes_encrypt(aes_context * ctx, uint8 input[16], uint8 output[16]) /* AES 128-bit block decryption routine */ -void rt_aes_decrypt(aes_context * ctx, uint8 input[16], uint8 output[16]) +void rt_aes_decrypt(struct aes_context * ctx, uint8 input[16], uint8 output[16]) { uint32 *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3; @@ -1210,7 +1210,7 @@ void AES_GTK_KEY_WRAP(u8 * key, u8 R[512]; int num_blocks = p_len / 8; /* unit:64bits */ int i, j; - aes_context aesctx; + struct aes_context aesctx; u8 xor; rt_aes_set_key(&aesctx, key, 128); @@ -1271,7 +1271,7 @@ void AES_GTK_KEY_UNWRAP(u8 * key, u8 A[8], BIN[16], BOUT[16]; u8 xor; int i, j; - aes_context aesctx; + struct aes_context aesctx; u8 *R; int num_blocks = c_len / 8; /* unit:64bits */ diff --git a/drivers/staging/rt2860/common/cmm_asic.c b/drivers/staging/rt2860/common/cmm_asic.c index ef7d2a6c58d5..fafba27fcd7b 100644 --- a/drivers/staging/rt2860/common/cmm_asic.c +++ b/drivers/staging/rt2860/common/cmm_asic.c @@ -38,7 +38,7 @@ #include "../rt_config.h" /* Reset the RFIC setting to new series */ -RTMP_RF_REGS RF2850RegTable[] = { +struct rt_rtmp_rf_regs RF2850RegTable[] = { /* ch R1 R2 R3(TX0~4=0) R4 */ {1, 0x98402ecc, 0x984c0786, 0x9816b455, 0x9800510b} , @@ -177,9 +177,9 @@ RTMP_RF_REGS RF2850RegTable[] = { /* still lack of MMAC(Japan) ch 34,38,42,46 */ }; -u8 NUM_OF_2850_CHNL = (sizeof(RF2850RegTable) / sizeof(RTMP_RF_REGS)); +u8 NUM_OF_2850_CHNL = (sizeof(RF2850RegTable) / sizeof(struct rt_rtmp_rf_regs)); -FREQUENCY_ITEM FreqItems3020[] = { +struct rt_frequency_item FreqItems3020[] = { /**************************************************/ /* ISM : 2.4 to 2.483 GHz // */ /**************************************************/ @@ -216,16 +216,16 @@ FREQUENCY_ITEM FreqItems3020[] = { , }; -u8 NUM_OF_3020_CHNL = (sizeof(FreqItems3020) / sizeof(FREQUENCY_ITEM)); +u8 NUM_OF_3020_CHNL = (sizeof(FreqItems3020) / sizeof(struct rt_frequency_item)); -void AsicUpdateAutoFallBackTable(IN PRTMP_ADAPTER pAd, u8 *pRateTable) +void AsicUpdateAutoFallBackTable(struct rt_rtmp_adapter *pAd, u8 *pRateTable) { u8 i; HT_FBK_CFG0_STRUC HtCfg0; HT_FBK_CFG1_STRUC HtCfg1; LG_FBK_CFG0_STRUC LgCfg0; LG_FBK_CFG1_STRUC LgCfg1; - PRTMP_TX_RATE_SWITCH pCurrTxRate, pNextTxRate; + struct rt_rtmp_tx_rate_switch *pCurrTxRate, *pNextTxRate; /* set to initial value */ HtCfg0.word = 0x65432100; @@ -233,9 +233,9 @@ void AsicUpdateAutoFallBackTable(IN PRTMP_ADAPTER pAd, u8 *pRateTable) LgCfg0.word = 0xedcba988; LgCfg1.word = 0x00002100; - pNextTxRate = (PRTMP_TX_RATE_SWITCH) pRateTable + 1; + pNextTxRate = (struct rt_rtmp_tx_rate_switch *) pRateTable + 1; for (i = 1; i < *((u8 *)pRateTable); i++) { - pCurrTxRate = (PRTMP_TX_RATE_SWITCH) pRateTable + 1 + i; + pCurrTxRate = (struct rt_rtmp_tx_rate_switch *) pRateTable + 1 + i; switch (pCurrTxRate->Mode) { case 0: /*CCK */ break; @@ -417,7 +417,7 @@ void AsicUpdateAutoFallBackTable(IN PRTMP_ADAPTER pAd, u8 *pRateTable) we should choose not to use GF. But still set correct ASIC registers. ======================================================================== */ -void AsicUpdateProtect(IN PRTMP_ADAPTER pAd, +void AsicUpdateProtect(struct rt_rtmp_adapter *pAd, u16 OperationMode, u8 SetMask, IN BOOLEAN bDisableBGProtect, IN BOOLEAN bNonGFExist) @@ -631,13 +631,13 @@ void AsicUpdateProtect(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void AsicSwitchChannel(IN PRTMP_ADAPTER pAd, u8 Channel, IN BOOLEAN bScan) +void AsicSwitchChannel(struct rt_rtmp_adapter *pAd, u8 Channel, IN BOOLEAN bScan) { unsigned long R2 = 0, R3 = DEFAULT_RF_TX_POWER, R4 = 0; char TxPwer = 0, TxPwer2 = DEFAULT_RF_TX_POWER; /*Bbp94 = BBPR94_DEFAULT, TxPwer2 = DEFAULT_RF_TX_POWER; */ u8 index; u32 Value = 0; /*BbpReg, Value; */ - RTMP_RF_REGS *RFRegTable; + struct rt_rtmp_rf_regs *RFRegTable; u8 RFValue; RFValue = 0; @@ -1002,7 +1002,7 @@ void AsicSwitchChannel(IN PRTMP_ADAPTER pAd, u8 Channel, IN BOOLEAN bScan) RTMPusecDelay(1000); } -void AsicResetBBPAgent(IN PRTMP_ADAPTER pAd) +void AsicResetBBPAgent(struct rt_rtmp_adapter *pAd) { BBP_CSR_CFG_STRUC BbpCsr; DBGPRINT(RT_DEBUG_ERROR, ("Reset BBP Agent busy bit.!! \n")); @@ -1025,7 +1025,7 @@ void AsicResetBBPAgent(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicLockChannel(IN PRTMP_ADAPTER pAd, u8 Channel) +void AsicLockChannel(struct rt_rtmp_adapter *pAd, u8 Channel) { } @@ -1052,7 +1052,7 @@ void AsicRfTuningExec(void *SystemSpecific1, it should be called AFTER MlmeDynamicTxRatSwitching() ========================================================================== */ -void AsicAdjustTxPower(IN PRTMP_ADAPTER pAd) +void AsicAdjustTxPower(struct rt_rtmp_adapter *pAd) { int i, j; char DeltaPwr = 0; @@ -1277,7 +1277,7 @@ void AsicAdjustTxPower(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd, +void AsicSleepThenAutoWakeup(struct rt_rtmp_adapter *pAd, u16 TbttNumToNextWakeUp) { RTMP_STA_SLEEP_THEN_AUTO_WAKEUP(pAd, TbttNumToNextWakeUp); @@ -1291,7 +1291,7 @@ void AsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd, in INFRA BSS, we should use AsicSleepThenAutoWakeup() instead. ========================================================================== */ -void AsicForceSleep(IN PRTMP_ADAPTER pAd) +void AsicForceSleep(struct rt_rtmp_adapter *pAd) { } @@ -1306,7 +1306,7 @@ void AsicForceSleep(IN PRTMP_ADAPTER pAd) IRQL = DISPATCH_LEVEL ========================================================================== */ -void AsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) +void AsicForceWakeup(struct rt_rtmp_adapter *pAd, IN BOOLEAN bFromTx) { DBGPRINT(RT_DEBUG_INFO, ("--> AsicForceWakeup \n")); RTMP_STA_FORCE_WAKEUP(pAd, bFromTx); @@ -1321,7 +1321,7 @@ void AsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) ========================================================================== */ -void AsicSetBssid(IN PRTMP_ADAPTER pAd, u8 *pBssid) +void AsicSetBssid(struct rt_rtmp_adapter *pAd, u8 *pBssid) { unsigned long Addr4; DBGPRINT(RT_DEBUG_TRACE, @@ -1340,9 +1340,9 @@ void AsicSetBssid(IN PRTMP_ADAPTER pAd, u8 *pBssid) RTMP_IO_WRITE32(pAd, MAC_BSSID_DW1, Addr4); } -void AsicSetMcastWC(IN PRTMP_ADAPTER pAd) +void AsicSetMcastWC(struct rt_rtmp_adapter *pAd) { - MAC_TABLE_ENTRY *pEntry = &pAd->MacTab.Content[MCAST_WCID]; + struct rt_mac_table_entry *pEntry = &pAd->MacTab.Content[MCAST_WCID]; u16 offset; pEntry->Sst = SST_ASSOC; @@ -1360,7 +1360,7 @@ void AsicSetMcastWC(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicDelWcidTab(IN PRTMP_ADAPTER pAd, u8 Wcid) +void AsicDelWcidTab(struct rt_rtmp_adapter *pAd, u8 Wcid) { unsigned long Addr0 = 0x0, Addr1 = 0x0; unsigned long offset; @@ -1380,7 +1380,7 @@ void AsicDelWcidTab(IN PRTMP_ADAPTER pAd, u8 Wcid) ========================================================================== */ -void AsicEnableRDG(IN PRTMP_ADAPTER pAd) +void AsicEnableRDG(struct rt_rtmp_adapter *pAd) { TX_LINK_CFG_STRUC TxLinkCfg; u32 Data = 0; @@ -1405,7 +1405,7 @@ void AsicEnableRDG(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicDisableRDG(IN PRTMP_ADAPTER pAd) +void AsicDisableRDG(struct rt_rtmp_adapter *pAd) { TX_LINK_CFG_STRUC TxLinkCfg; u32 Data = 0; @@ -1441,7 +1441,7 @@ void AsicDisableRDG(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicDisableSync(IN PRTMP_ADAPTER pAd) +void AsicDisableSync(struct rt_rtmp_adapter *pAd) { BCN_TIME_CFG_STRUC csr; @@ -1468,7 +1468,7 @@ void AsicDisableSync(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicEnableBssSync(IN PRTMP_ADAPTER pAd) +void AsicEnableBssSync(struct rt_rtmp_adapter *pAd) { BCN_TIME_CFG_STRUC csr; @@ -1498,7 +1498,7 @@ void AsicEnableBssSync(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicEnableIbssSync(IN PRTMP_ADAPTER pAd) +void AsicEnableIbssSync(struct rt_rtmp_adapter *pAd) { BCN_TIME_CFG_STRUC csr9; u8 *ptr; @@ -1581,7 +1581,7 @@ void AsicEnableIbssSync(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AsicSetEdcaParm(IN PRTMP_ADAPTER pAd, IN PEDCA_PARM pEdcaParm) +void AsicSetEdcaParm(struct rt_rtmp_adapter *pAd, struct rt_edca_parm *pEdcaParm) { EDCA_AC_CFG_STRUC Ac0Cfg, Ac1Cfg, Ac2Cfg, Ac3Cfg; AC_TXOP_CSR0_STRUC csr0; @@ -1676,7 +1676,7 @@ void AsicSetEdcaParm(IN PRTMP_ADAPTER pAd, IN PEDCA_PARM pEdcaParm) RTMP_IO_WRITE32(pAd, WMM_AIFSN_CFG, 0x00002222); - NdisZeroMemory(&pAd->CommonCfg.APEdcaParm, sizeof(EDCA_PARM)); + NdisZeroMemory(&pAd->CommonCfg.APEdcaParm, sizeof(struct rt_edca_parm)); } else { OPSTATUS_SET_FLAG(pAd, fOP_STATUS_WMM_INUSED); /*======================================================== */ @@ -1823,7 +1823,7 @@ void AsicSetEdcaParm(IN PRTMP_ADAPTER pAd, IN PEDCA_PARM pEdcaParm) RTMP_IO_WRITE32(pAd, WMM_AIFSN_CFG, AifsnCsr.word); NdisMoveMemory(&pAd->CommonCfg.APEdcaParm, pEdcaParm, - sizeof(EDCA_PARM)); + sizeof(struct rt_edca_parm)); if (!ADHOC_ON(pAd)) { DBGPRINT(RT_DEBUG_TRACE, ("EDCA [#%d]: AIFSN CWmin CWmax TXOP(us) ACM\n", @@ -1862,7 +1862,7 @@ void AsicSetEdcaParm(IN PRTMP_ADAPTER pAd, IN PEDCA_PARM pEdcaParm) ========================================================================== */ -void AsicSetSlotTime(IN PRTMP_ADAPTER pAd, IN BOOLEAN bUseShortSlotTime) +void AsicSetSlotTime(struct rt_rtmp_adapter *pAd, IN BOOLEAN bUseShortSlotTime) { unsigned long SlotTime; u32 RegValue = 0; @@ -1930,7 +1930,7 @@ void AsicSetSlotTime(IN PRTMP_ADAPTER pAd, IN BOOLEAN bUseShortSlotTime) Return: ======================================================================== */ -void AsicAddSharedKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicAddSharedKeyEntry(struct rt_rtmp_adapter *pAd, u8 BssIndex, u8 KeyIdx, u8 CipherAlg, @@ -2048,7 +2048,7 @@ void AsicAddSharedKeyEntry(IN PRTMP_ADAPTER pAd, } /* IRQL = DISPATCH_LEVEL */ -void AsicRemoveSharedKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicRemoveSharedKeyEntry(struct rt_rtmp_adapter *pAd, u8 BssIndex, u8 KeyIdx) { /*unsigned long SecCsr0; */ @@ -2088,7 +2088,7 @@ void AsicRemoveSharedKeyEntry(IN PRTMP_ADAPTER pAd, } -void AsicUpdateWCIDAttribute(IN PRTMP_ADAPTER pAd, +void AsicUpdateWCIDAttribute(struct rt_rtmp_adapter *pAd, u16 WCID, u8 BssIndex, u8 CipherAlg, @@ -2106,7 +2106,7 @@ void AsicUpdateWCIDAttribute(IN PRTMP_ADAPTER pAd, RTMP_IO_WRITE32(pAd, offset, WCIDAttri); } -void AsicUpdateWCIDIVEIV(IN PRTMP_ADAPTER pAd, +void AsicUpdateWCIDIVEIV(struct rt_rtmp_adapter *pAd, u16 WCID, unsigned long uIV, unsigned long uEIV) { unsigned long offset; @@ -2117,7 +2117,7 @@ void AsicUpdateWCIDIVEIV(IN PRTMP_ADAPTER pAd, RTMP_IO_WRITE32(pAd, offset + 4, uEIV); } -void AsicUpdateRxWCIDTable(IN PRTMP_ADAPTER pAd, +void AsicUpdateRxWCIDTable(struct rt_rtmp_adapter *pAd, u16 WCID, u8 *pAddr) { unsigned long offset; @@ -2163,11 +2163,11 @@ void AsicUpdateRxWCIDTable(IN PRTMP_ADAPTER pAd, For AP mode bTxKey must be always set to TRUE. ======================================================================== */ -void AsicAddKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicAddKeyEntry(struct rt_rtmp_adapter *pAd, u16 WCID, u8 BssIndex, u8 KeyIdx, - IN PCIPHER_KEY pCipherKey, + struct rt_cipher_key *pCipherKey, IN BOOLEAN bUsePairewiseKeyTable, IN BOOLEAN bTxKey) { unsigned long offset; @@ -2339,9 +2339,9 @@ void AsicAddKeyEntry(IN PRTMP_ADAPTER pAd, Return: ======================================================================== */ -void AsicAddPairwiseKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicAddPairwiseKeyEntry(struct rt_rtmp_adapter *pAd, u8 *pAddr, - u8 WCID, IN CIPHER_KEY * pCipherKey) + u8 WCID, struct rt_cipher_key *pCipherKey) { int i; unsigned long offset; @@ -2422,7 +2422,7 @@ void AsicAddPairwiseKeyEntry(IN PRTMP_ADAPTER pAd, Return: ======================================================================== */ -void AsicRemovePairwiseKeyEntry(IN PRTMP_ADAPTER pAd, +void AsicRemovePairwiseKeyEntry(struct rt_rtmp_adapter *pAd, u8 BssIdx, u8 Wcid) { unsigned long WCIDAttri; @@ -2434,7 +2434,7 @@ void AsicRemovePairwiseKeyEntry(IN PRTMP_ADAPTER pAd, RTMP_IO_WRITE32(pAd, offset, WCIDAttri); } -BOOLEAN AsicSendCommandToMcu(IN PRTMP_ADAPTER pAd, +BOOLEAN AsicSendCommandToMcu(struct rt_rtmp_adapter *pAd, u8 Command, u8 Token, u8 Arg0, u8 Arg1) { @@ -2445,7 +2445,7 @@ BOOLEAN AsicSendCommandToMcu(IN PRTMP_ADAPTER pAd, return TRUE; } -void AsicSetRxAnt(IN PRTMP_ADAPTER pAd, u8 Ant) +void AsicSetRxAnt(struct rt_rtmp_adapter *pAd, u8 Ant) { #ifdef RT30xx /* RT3572 ATE need not to do this. */ @@ -2453,7 +2453,7 @@ void AsicSetRxAnt(IN PRTMP_ADAPTER pAd, u8 Ant) #endif /* RT30xx // */ } -void AsicTurnOffRFClk(IN PRTMP_ADAPTER pAd, u8 Channel) +void AsicTurnOffRFClk(struct rt_rtmp_adapter *pAd, u8 Channel) { if (pAd->chipOps.AsicRfTurnOff) { pAd->chipOps.AsicRfTurnOff(pAd); @@ -2461,7 +2461,7 @@ void AsicTurnOffRFClk(IN PRTMP_ADAPTER pAd, u8 Channel) /* RF R2 bit 18 = 0 */ u32 R1 = 0, R2 = 0, R3 = 0; u8 index; - RTMP_RF_REGS *RFRegTable; + struct rt_rtmp_rf_regs *RFRegTable; RFRegTable = RF2850RegTable; @@ -2507,12 +2507,12 @@ void AsicTurnOffRFClk(IN PRTMP_ADAPTER pAd, u8 Channel) } } -void AsicTurnOnRFClk(IN PRTMP_ADAPTER pAd, u8 Channel) +void AsicTurnOnRFClk(struct rt_rtmp_adapter *pAd, u8 Channel) { /* RF R2 bit 18 = 0 */ u32 R1 = 0, R2 = 0, R3 = 0; u8 index; - RTMP_RF_REGS *RFRegTable; + struct rt_rtmp_rf_regs *RFRegTable; #ifdef PCIE_PS_SUPPORT /* The RF programming sequence is difference between 3xxx and 2xxx */ diff --git a/drivers/staging/rt2860/common/cmm_cfg.c b/drivers/staging/rt2860/common/cmm_cfg.c index 9c6b7cacb089..24f439378439 100644 --- a/drivers/staging/rt2860/common/cmm_cfg.c +++ b/drivers/staging/rt2860/common/cmm_cfg.c @@ -80,7 +80,7 @@ char *GetBW(int BW) TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -int RT_CfgSetCountryRegion(IN PRTMP_ADAPTER pAd, char *arg, int band) +int RT_CfgSetCountryRegion(struct rt_rtmp_adapter *pAd, char *arg, int band) { long region, regionMax; u8 *pCountryRegion; @@ -126,7 +126,7 @@ int RT_CfgSetCountryRegion(IN PRTMP_ADAPTER pAd, char *arg, int band) TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -int RT_CfgSetWirelessMode(IN PRTMP_ADAPTER pAd, char *arg) +int RT_CfgSetWirelessMode(struct rt_rtmp_adapter *pAd, char *arg) { int MaxPhyMode = PHY_11G; long WirelessMode; @@ -143,7 +143,7 @@ int RT_CfgSetWirelessMode(IN PRTMP_ADAPTER pAd, char *arg) } -int RT_CfgSetShortSlot(IN PRTMP_ADAPTER pAd, char *arg) +int RT_CfgSetShortSlot(struct rt_rtmp_adapter *pAd, char *arg) { long ShortSlot; @@ -167,9 +167,9 @@ int RT_CfgSetShortSlot(IN PRTMP_ADAPTER pAd, char *arg) TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -int RT_CfgSetWepKey(IN PRTMP_ADAPTER pAd, +int RT_CfgSetWepKey(struct rt_rtmp_adapter *pAd, char *keyString, - IN CIPHER_KEY * pSharedKey, int keyIdx) + struct rt_cipher_key *pSharedKey, int keyIdx) { int KeyLen; int i; @@ -177,7 +177,7 @@ int RT_CfgSetWepKey(IN PRTMP_ADAPTER pAd, BOOLEAN bKeyIsHex = FALSE; /* TODO: Shall we do memset for the original key info?? */ - memset(pSharedKey, 0, sizeof(CIPHER_KEY)); + memset(pSharedKey, 0, sizeof(struct rt_cipher_key)); KeyLen = strlen(keyString); switch (KeyLen) { case 5: /*wep 40 Ascii type */ @@ -230,7 +230,7 @@ int RT_CfgSetWepKey(IN PRTMP_ADAPTER pAd, TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -int RT_CfgSetWPAPSKKey(IN RTMP_ADAPTER * pAd, +int RT_CfgSetWPAPSKKey(struct rt_rtmp_adapter *pAd, char *keyString, u8 * pHashStr, int hashStrLen, u8 *pPMKBuf) diff --git a/drivers/staging/rt2860/common/cmm_data.c b/drivers/staging/rt2860/common/cmm_data.c index 64b217710344..2d2c311bc7a4 100644 --- a/drivers/staging/rt2860/common/cmm_data.c +++ b/drivers/staging/rt2860/common/cmm_data.c @@ -104,7 +104,7 @@ QID_AC_VO, QID_AC_VO }; ======================================================================== */ -int MiniportMMRequest(IN PRTMP_ADAPTER pAd, +int MiniportMMRequest(struct rt_rtmp_adapter *pAd, u8 QueIdx, u8 *pData, u32 Length) { void *pPacket; @@ -242,13 +242,13 @@ int MiniportMMRequest(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int MlmeHardTransmit(IN PRTMP_ADAPTER pAd, +int MlmeHardTransmit(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; u8 *pSrcBufVA; u32 SrcBufLen; - PHEADER_802_11 pHeader_802_11; + struct rt_header_802_11 * pHeader_802_11; if ((pAd->CommonCfg.RadarDetect.RDMode != RD_NORMAL_MODE) ) { @@ -259,7 +259,7 @@ int MlmeHardTransmit(IN PRTMP_ADAPTER pAd, if (pSrcBufVA == NULL) return NDIS_STATUS_FAILURE; - pHeader_802_11 = (PHEADER_802_11) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); + pHeader_802_11 = (struct rt_header_802_11 *) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); #ifdef RTMP_MAC_PCI if (pAd->MACVersion == 0x28600100) @@ -270,17 +270,17 @@ int MlmeHardTransmit(IN PRTMP_ADAPTER pAd, } -int MlmeHardTransmitMgmtRing(IN PRTMP_ADAPTER pAd, +int MlmeHardTransmitMgmtRing(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; u8 *pSrcBufVA; u32 SrcBufLen; - PHEADER_802_11 pHeader_802_11; + struct rt_header_802_11 * pHeader_802_11; BOOLEAN bAckRequired, bInsertTimestamp; u8 MlmeRate; - PTXWI_STRUC pFirstTxWI; - MAC_TABLE_ENTRY *pMacEntry = NULL; + struct rt_txwi * pFirstTxWI; + struct rt_mac_table_entry *pMacEntry = NULL; u8 PID; RTMP_QueryPacketInfo(pPacket, &PacketInfo, &pSrcBufVA, &SrcBufLen); @@ -299,8 +299,8 @@ int MlmeHardTransmitMgmtRing(IN PRTMP_ADAPTER pAd, AsicForceWakeup(pAd, TRUE); } - pFirstTxWI = (PTXWI_STRUC) (pSrcBufVA + TXINFO_SIZE); - pHeader_802_11 = (PHEADER_802_11) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); /*TXWI_SIZE); */ + pFirstTxWI = (struct rt_txwi *) (pSrcBufVA + TXINFO_SIZE); + pHeader_802_11 = (struct rt_header_802_11 *) (pSrcBufVA + TXINFO_SIZE + TXWI_SIZE); /*TXWI_SIZE); */ if (pHeader_802_11->Addr1[0] & 0x01) { MlmeRate = pAd->CommonCfg.BasicMlmeRate; @@ -506,11 +506,11 @@ int MlmeHardTransmitMgmtRing(IN PRTMP_ADAPTER pAd, (2).Normal ======================================================================== */ -static u8 TxPktClassification(IN RTMP_ADAPTER * pAd, void *pPacket) +static u8 TxPktClassification(struct rt_rtmp_adapter *pAd, void *pPacket) { u8 TxFrameType = TX_UNKOWN_FRAME; u8 Wcid; - MAC_TABLE_ENTRY *pMacEntry = NULL; + struct rt_mac_table_entry *pMacEntry = NULL; BOOLEAN bHTRate = FALSE; Wcid = RTMP_GET_PACKET_WCID(pPacket); @@ -554,11 +554,11 @@ static u8 TxPktClassification(IN RTMP_ADAPTER * pAd, void *pPacket) return TxFrameType; } -BOOLEAN RTMP_FillTxBlkInfo(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk) +BOOLEAN RTMP_FillTxBlkInfo(struct rt_rtmp_adapter *pAd, struct rt_tx_blk *pTxBlk) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; void *pPacket; - PMAC_TABLE_ENTRY pMacEntry = NULL; + struct rt_mac_table_entry *pMacEntry = NULL; pPacket = pTxBlk->pPacket; RTMP_QueryPacketInfo(pPacket, &PacketInfo, &pTxBlk->pSrcBufHeader, @@ -662,8 +662,8 @@ BOOLEAN RTMP_FillTxBlkInfo(IN RTMP_ADAPTER * pAd, IN TX_BLK * pTxBlk) return TRUE; } -BOOLEAN CanDoAggregateTransmit(IN RTMP_ADAPTER * pAd, - char * pPacket, IN TX_BLK * pTxBlk) +BOOLEAN CanDoAggregateTransmit(struct rt_rtmp_adapter *pAd, + char * pPacket, struct rt_tx_blk *pTxBlk) { /*DBGPRINT(RT_DEBUG_TRACE, ("Check if can do aggregation! TxFrameType=%d!\n", pTxBlk->TxFrameType)); */ @@ -712,20 +712,20 @@ BOOLEAN CanDoAggregateTransmit(IN RTMP_ADAPTER * pAd, ======================================================================== */ -void RTMPDeQueuePacket(IN PRTMP_ADAPTER pAd, IN BOOLEAN bIntContext, u8 QIdx, /* BulkOutPipeId */ +void RTMPDeQueuePacket(struct rt_rtmp_adapter *pAd, IN BOOLEAN bIntContext, u8 QIdx, /* BulkOutPipeId */ u8 Max_Tx_Packets) { - PQUEUE_ENTRY pEntry = NULL; + struct rt_queue_entry *pEntry = NULL; void *pPacket; int Status = NDIS_STATUS_SUCCESS; u8 Count = 0; - PQUEUE_HEADER pQueue; + struct rt_queue_header *pQueue; unsigned long FreeNumber[NUM_OF_TX_RING]; u8 QueIdx, sQIdx, eQIdx; unsigned long IrqFlags = 0; BOOLEAN hasTxDesc = FALSE; - TX_BLK TxBlk; - TX_BLK *pTxBlk; + struct rt_tx_blk TxBlk; + struct rt_tx_blk *pTxBlk; if (QIdx == NUM_OF_TX_RING) { sQIdx = 0; @@ -780,7 +780,7 @@ void RTMPDeQueuePacket(IN PRTMP_ADAPTER pAd, IN BOOLEAN bIntContext, u8 QIdx, /* } pTxBlk = &TxBlk; - NdisZeroMemory((u8 *)pTxBlk, sizeof(TX_BLK)); + NdisZeroMemory((u8 *)pTxBlk, sizeof(struct rt_tx_blk)); /*InitializeQueueHeader(&pTxBlk->TxPacketList); // Didn't need it because we already memzero it. */ pTxBlk->QueIdx = QueIdx; @@ -908,7 +908,7 @@ void RTMPDeQueuePacket(IN PRTMP_ADAPTER pAd, IN BOOLEAN bIntContext, u8 QIdx, /* ======================================================================== */ -u16 RTMPCalcDuration(IN PRTMP_ADAPTER pAd, u8 Rate, unsigned long Size) +u16 RTMPCalcDuration(struct rt_rtmp_adapter *pAd, u8 Rate, unsigned long Size) { unsigned long Duration = 0; @@ -968,7 +968,7 @@ u16 RTMPCalcDuration(IN PRTMP_ADAPTER pAd, u8 Rate, unsigned long Size) ======================================================================== */ -void RTMPWriteTxWI(IN PRTMP_ADAPTER pAd, IN PTXWI_STRUC pOutTxWI, IN BOOLEAN FRAG, IN BOOLEAN CFACK, IN BOOLEAN InsTimestamp, IN BOOLEAN AMPDU, IN BOOLEAN Ack, IN BOOLEAN NSeq, /* HW new a sequence. */ +void RTMPWriteTxWI(struct rt_rtmp_adapter *pAd, struct rt_txwi * pOutTxWI, IN BOOLEAN FRAG, IN BOOLEAN CFACK, IN BOOLEAN InsTimestamp, IN BOOLEAN AMPDU, IN BOOLEAN Ack, IN BOOLEAN NSeq, /* HW new a sequence. */ u8 BASize, u8 WCID, unsigned long Length, @@ -978,9 +978,9 @@ void RTMPWriteTxWI(IN PRTMP_ADAPTER pAd, IN PTXWI_STRUC pOutTxWI, IN BOOLEAN FRA u8 Txopmode, IN BOOLEAN CfAck, IN HTTRANSMIT_SETTING * pTransmit) { - PMAC_TABLE_ENTRY pMac = NULL; - TXWI_STRUC TxWI; - PTXWI_STRUC pTxWI; + struct rt_mac_table_entry *pMac = NULL; + struct rt_txwi TxWI; + struct rt_txwi * pTxWI; if (WCID < MAX_LEN_OF_MAC_TABLE) pMac = &pAd->MacTab.Content[WCID]; @@ -1053,14 +1053,14 @@ void RTMPWriteTxWI(IN PRTMP_ADAPTER pAd, IN PTXWI_STRUC pOutTxWI, IN BOOLEAN FRA } pTxWI->PacketId = pTxWI->MCS; - NdisMoveMemory(pOutTxWI, &TxWI, sizeof(TXWI_STRUC)); + NdisMoveMemory(pOutTxWI, &TxWI, sizeof(struct rt_txwi)); } -void RTMPWriteTxWI_Data(IN PRTMP_ADAPTER pAd, - IN OUT PTXWI_STRUC pTxWI, IN TX_BLK * pTxBlk) +void RTMPWriteTxWI_Data(struct rt_rtmp_adapter *pAd, + struct rt_txwi * pTxWI, struct rt_tx_blk *pTxBlk) { HTTRANSMIT_SETTING *pTransmit; - PMAC_TABLE_ENTRY pMacEntry; + struct rt_mac_table_entry *pMacEntry; u8 BASize; ASSERT(pTxWI); @@ -1134,11 +1134,11 @@ void RTMPWriteTxWI_Data(IN PRTMP_ADAPTER pAd, pTxWI->PacketId = pTxWI->MCS; } -void RTMPWriteTxWI_Cache(IN PRTMP_ADAPTER pAd, - IN OUT PTXWI_STRUC pTxWI, IN TX_BLK * pTxBlk) +void RTMPWriteTxWI_Cache(struct rt_rtmp_adapter *pAd, + struct rt_txwi * pTxWI, struct rt_tx_blk *pTxBlk) { PHTTRANSMIT_SETTING /*pTxHTPhyMode, */ pTransmit; - PMAC_TABLE_ENTRY pMacEntry; + struct rt_mac_table_entry *pMacEntry; /* */ /* update TXWI */ @@ -1194,7 +1194,7 @@ void RTMPWriteTxWI_Cache(IN PRTMP_ADAPTER pAd, /* 2. AGGREGATION_IN_USED */ /* 3. Fragmentation not in used */ /* 4. either no previous frame (pPrevAddr1=NULL) .OR. previoud frame is aggregatible */ -BOOLEAN TxFrameIsAggregatible(IN PRTMP_ADAPTER pAd, +BOOLEAN TxFrameIsAggregatible(struct rt_rtmp_adapter *pAd, u8 *pPrevAddr1, u8 *p8023hdr) { @@ -1230,8 +1230,8 @@ BOOLEAN TxFrameIsAggregatible(IN PRTMP_ADAPTER pAd, ======================================================================== */ -BOOLEAN PeerIsAggreOn(IN PRTMP_ADAPTER pAd, - unsigned long TxRate, IN PMAC_TABLE_ENTRY pMacEntry) +BOOLEAN PeerIsAggreOn(struct rt_rtmp_adapter *pAd, + unsigned long TxRate, struct rt_mac_table_entry *pMacEntry) { unsigned long AFlags = (fCLIENT_STATUS_AMSDU_INUSED | fCLIENT_STATUS_AGGREGATION_CAPABLE); @@ -1269,7 +1269,7 @@ BOOLEAN PeerIsAggreOn(IN PRTMP_ADAPTER pAd, ======================================================================== */ -PQUEUE_HEADER RTMPCheckTxSwQueue(IN PRTMP_ADAPTER pAd, u8 *pQueIdx) +struct rt_queue_header *RTMPCheckTxSwQueue(struct rt_rtmp_adapter *pAd, u8 *pQueIdx) { unsigned long Number; @@ -1317,7 +1317,7 @@ PQUEUE_HEADER RTMPCheckTxSwQueue(IN PRTMP_ADAPTER pAd, u8 *pQueIdx) ======================================================================== */ -void RTMPSuspendMsduTransmission(IN PRTMP_ADAPTER pAd) +void RTMPSuspendMsduTransmission(struct rt_rtmp_adapter *pAd) { DBGPRINT(RT_DEBUG_TRACE, ("SCANNING, suspend MSDU transmission ...\n")); @@ -1354,7 +1354,7 @@ void RTMPSuspendMsduTransmission(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPResumeMsduTransmission(IN PRTMP_ADAPTER pAd) +void RTMPResumeMsduTransmission(struct rt_rtmp_adapter *pAd) { /* u8 IrqState; */ @@ -1379,13 +1379,13 @@ void RTMPResumeMsduTransmission(IN PRTMP_ADAPTER pAd) RTMPDeQueuePacket(pAd, FALSE, NUM_OF_TX_RING, MAX_TX_PROCESS); } -u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd, +u32 deaggregate_AMSDU_announce(struct rt_rtmp_adapter *pAd, void *pPacket, u8 *pData, unsigned long DataSize) { u16 PayloadSize; u16 SubFrameSize; - PHEADER_802_3 pAMSDUsubheader; + struct rt_header_802_3 * pAMSDUsubheader; u32 nMSDU; u8 Header802_3[14]; @@ -1399,7 +1399,7 @@ u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd, nMSDU++; /*hex_dump("subheader", pData, 64); */ - pAMSDUsubheader = (PHEADER_802_3) pData; + pAMSDUsubheader = (struct rt_header_802_3 *) pData; /*pData += LENGTH_802_3; */ PayloadSize = pAMSDUsubheader->Octet[1] + @@ -1421,8 +1421,8 @@ u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd, if ((Header802_3[12] == 0x88) && (Header802_3[13] == 0x8E)) { /* avoid local heap overflow, use dyanamic allocation */ - MLME_QUEUE_ELEM *Elem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_queue_elem *Elem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (Elem != NULL) { memmove(Elem->Msg + @@ -1479,7 +1479,7 @@ u32 deaggregate_AMSDU_announce(IN PRTMP_ADAPTER pAd, return nMSDU; } -u32 BA_Reorder_AMSDU_Annnounce(IN PRTMP_ADAPTER pAd, void *pPacket) +u32 BA_Reorder_AMSDU_Annnounce(struct rt_rtmp_adapter *pAd, void *pPacket) { u8 *pData; u16 DataSize; @@ -1501,10 +1501,10 @@ u32 BA_Reorder_AMSDU_Annnounce(IN PRTMP_ADAPTER pAd, void *pPacket) pEntry - pointer to the MAC entry; NULL is not found ========================================================================== */ -MAC_TABLE_ENTRY *MacTableLookup(IN PRTMP_ADAPTER pAd, u8 *pAddr) +struct rt_mac_table_entry *MacTableLookup(struct rt_rtmp_adapter *pAd, u8 *pAddr) { unsigned long HashIdx; - MAC_TABLE_ENTRY *pEntry = NULL; + struct rt_mac_table_entry *pEntry = NULL; HashIdx = MAC_ADDR_HASH_INDEX(pAddr); pEntry = pAd->MacTab.Hash[HashIdx]; @@ -1521,13 +1521,13 @@ MAC_TABLE_ENTRY *MacTableLookup(IN PRTMP_ADAPTER pAd, u8 *pAddr) return pEntry; } -MAC_TABLE_ENTRY *MacTableInsertEntry(IN PRTMP_ADAPTER pAd, +struct rt_mac_table_entry *MacTableInsertEntry(struct rt_rtmp_adapter *pAd, u8 *pAddr, u8 apidx, IN BOOLEAN CleanAll) { u8 HashIdx; int i, FirstWcid; - MAC_TABLE_ENTRY *pEntry = NULL, *pCurrEntry; + struct rt_mac_table_entry *pEntry = NULL, *pCurrEntry; /* u16 offset; */ /* unsigned long addr; */ @@ -1554,7 +1554,7 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(IN PRTMP_ADAPTER pAd, if (CleanAll == TRUE) { pEntry->MaxSupportedRate = RATE_11; pEntry->CurrTxRate = RATE_11; - NdisZeroMemory(pEntry, sizeof(MAC_TABLE_ENTRY)); + NdisZeroMemory(pEntry, sizeof(struct rt_mac_table_entry)); pEntry->PairwiseKey.KeyLen = 0; pEntry->PairwiseKey.CipherAlg = CIPHER_NONE; } @@ -1658,11 +1658,11 @@ MAC_TABLE_ENTRY *MacTableInsertEntry(IN PRTMP_ADAPTER pAd, Delete a specified client from MAC table ========================================================================== */ -BOOLEAN MacTableDeleteEntry(IN PRTMP_ADAPTER pAd, +BOOLEAN MacTableDeleteEntry(struct rt_rtmp_adapter *pAd, u16 wcid, u8 *pAddr) { u16 HashIdx; - MAC_TABLE_ENTRY *pEntry, *pPrevEntry, *pProbeEntry; + struct rt_mac_table_entry *pEntry, *pPrevEntry, *pProbeEntry; BOOLEAN Cancelled; /*u16 offset; // unused variable */ /*u8 j; // unused variable */ @@ -1722,7 +1722,7 @@ BOOLEAN MacTableDeleteEntry(IN PRTMP_ADAPTER pAd, EAPOL_START_DISABLE; } - NdisZeroMemory(pEntry, sizeof(MAC_TABLE_ENTRY)); + NdisZeroMemory(pEntry, sizeof(struct rt_mac_table_entry)); pAd->MacTab.Size--; DBGPRINT(RT_DEBUG_TRACE, ("MacTableDeleteEntry1 - Total= %d\n", @@ -1752,7 +1752,7 @@ BOOLEAN MacTableDeleteEntry(IN PRTMP_ADAPTER pAd, the power-saving queues are freed here. ========================================================================== */ -void MacTableReset(IN PRTMP_ADAPTER pAd) +void MacTableReset(struct rt_rtmp_adapter *pAd) { int i; @@ -1790,8 +1790,8 @@ void MacTableReset(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void AssocParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_ASSOC_REQ_STRUCT * AssocReq, +void AssocParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_assoc_req *AssocReq, u8 *pAddr, u16 CapabilityInfo, unsigned long Timeout, u16 ListenIntv) @@ -1811,8 +1811,8 @@ void AssocParmFill(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void DisassocParmFill(IN PRTMP_ADAPTER pAd, - IN OUT MLME_DISASSOC_REQ_STRUCT * DisassocReq, +void DisassocParmFill(struct rt_rtmp_adapter *pAd, + struct rt_mlme_disassoc_req *DisassocReq, u8 *pAddr, u16 Reason) { COPY_MAC_ADDR(DisassocReq->Addr, pAddr); @@ -1853,9 +1853,9 @@ void DisassocParmFill(IN PRTMP_ADAPTER pAd, ======================================================================== */ -BOOLEAN RTMPCheckDHCPFrame(IN PRTMP_ADAPTER pAd, void *pPacket) +BOOLEAN RTMPCheckDHCPFrame(struct rt_rtmp_adapter *pAd, void *pPacket) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; unsigned long NumberOfBytesRead = 0; unsigned long CurrentOffset = 0; void *pVirtualAddress = NULL; @@ -1908,7 +1908,7 @@ BOOLEAN RTMPCheckDHCPFrame(IN PRTMP_ADAPTER pAd, void *pPacket) return TRUE; } -BOOLEAN RTMPCheckEtherType(IN PRTMP_ADAPTER pAd, void *pPacket) +BOOLEAN RTMPCheckEtherType(struct rt_rtmp_adapter *pAd, void *pPacket) { u16 TypeLen; u8 Byte0, Byte1; @@ -2010,8 +2010,8 @@ BOOLEAN RTMPCheckEtherType(IN PRTMP_ADAPTER pAd, void *pPacket) } -void Update_Rssi_Sample(IN PRTMP_ADAPTER pAd, - IN RSSI_SAMPLE * pRssi, IN PRXWI_STRUC pRxWI) +void Update_Rssi_Sample(struct rt_rtmp_adapter *pAd, + struct rt_rssi_sample *pRssi, struct rt_rxwi * pRxWI) { char rssi0 = pRxWI->RSSI0; char rssi1 = pRxWI->RSSI1; @@ -2040,8 +2040,8 @@ void Update_Rssi_Sample(IN PRTMP_ADAPTER pAd, } /* Normal legacy Rx packet indication */ -void Indicate_Legacy_Packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void Indicate_Legacy_Packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { void *pRxPacket = pRxBlk->pRxPacket; u8 Header802_3[LENGTH_802_3]; @@ -2063,7 +2063,7 @@ void Indicate_Legacy_Packet(IN PRTMP_ADAPTER pAd, #ifdef RTMP_MAC_USB if (pAd->CommonCfg.bDisableReordering == 0) { - PBA_REC_ENTRY pBAEntry; + struct rt_ba_rec_entry *pBAEntry; unsigned long Now32; u8 Wcid = pRxBlk->pRxWI->WirelessCliID; u8 TID = pRxBlk->pRxWI->TID; @@ -2111,8 +2111,8 @@ void Indicate_Legacy_Packet(IN PRTMP_ADAPTER pAd, } /* Normal, AMPDU or AMSDU */ -void CmmRxnonRalinkFrameIndicate(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void CmmRxnonRalinkFrameIndicate(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { if (RX_BLK_TEST_FLAG(pRxBlk, fRX_AMPDU) && (pAd->CommonCfg.bDisableReordering == 0)) { @@ -2127,9 +2127,9 @@ void CmmRxnonRalinkFrameIndicate(IN PRTMP_ADAPTER pAd, } } -void CmmRxRalinkFrameIndicate(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void CmmRxRalinkFrameIndicate(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { u8 Header802_3[LENGTH_802_3]; u16 Msdu2Size; @@ -2192,9 +2192,9 @@ void CmmRxRalinkFrameIndicate(IN PRTMP_ADAPTER pAd, _fragFrame.Flags = 0; \ } -void *RTMPDeFragmentDataFrame(IN PRTMP_ADAPTER pAd, IN RX_BLK * pRxBlk) +void *RTMPDeFragmentDataFrame(struct rt_rtmp_adapter *pAd, struct rt_rx_blk *pRxBlk) { - PHEADER_802_11 pHeader = pRxBlk->pHeader; + struct rt_header_802_11 * pHeader = pRxBlk->pHeader; void *pRxPacket = pRxBlk->pRxPacket; u8 *pData = pRxBlk->pData; u16 DataSize = pRxBlk->DataSize; @@ -2283,7 +2283,7 @@ done: pRetPacket = pAd->FragFrame.pFragPacket; pAd->FragFrame.pFragPacket = pNewFragPacket; pRxBlk->pHeader = - (PHEADER_802_11) GET_OS_PKT_DATAPTR(pRetPacket); + (struct rt_header_802_11 *) GET_OS_PKT_DATAPTR(pRetPacket); pRxBlk->pData = (u8 *) pRxBlk->pHeader + HeaderRoom; pRxBlk->DataSize = pAd->FragFrame.RxSize - HeaderRoom; pRxBlk->pRxPacket = pRetPacket; @@ -2295,8 +2295,8 @@ done: return pRetPacket; } -void Indicate_AMSDU_Packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void Indicate_AMSDU_Packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { u32 nMSDU; @@ -2307,10 +2307,10 @@ void Indicate_AMSDU_Packet(IN PRTMP_ADAPTER pAd, pRxBlk->DataSize); } -void Indicate_EAPOL_Packet(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, u8 FromWhichBSSID) +void Indicate_EAPOL_Packet(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, u8 FromWhichBSSID) { - MAC_TABLE_ENTRY *pEntry = NULL; + struct rt_mac_table_entry *pEntry = NULL; { pEntry = &pAd->MacTab.Content[BSSID_WCID]; @@ -2329,7 +2329,7 @@ void Indicate_EAPOL_Packet(IN PRTMP_ADAPTER pAd, } #define BCN_TBTT_OFFSET 64 /*defer 64 us */ -void ReSyncBeaconTime(IN PRTMP_ADAPTER pAd) +void ReSyncBeaconTime(struct rt_rtmp_adapter *pAd) { u32 Offset; diff --git a/drivers/staging/rt2860/common/cmm_data_pci.c b/drivers/staging/rt2860/common/cmm_data_pci.c index b2549473fa8b..e6cb55a1292e 100644 --- a/drivers/staging/rt2860/common/cmm_data_pci.c +++ b/drivers/staging/rt2860/common/cmm_data_pci.c @@ -32,16 +32,16 @@ */ #include "../rt_config.h" -u16 RtmpPCI_WriteTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber) { u8 *pDMAHeaderBufVA; u16 TxIdx, RetTxIdx; - PTXD_STRUC pTxD; + struct rt_txd * pTxD; u32 BufBasePaLow; - PRTMP_TX_RING pTxRing; + struct rt_rtmp_tx_ring *pTxRing; u16 hwHeaderLen; /* */ @@ -73,7 +73,7 @@ u16 RtmpPCI_WriteTxResource(IN PRTMP_ADAPTER pAd, /* build Tx Descriptor */ /* */ - pTxD = (PTXD_STRUC) pTxRing->Cell[TxIdx].AllocVa; + pTxD = (struct rt_txd *) pTxRing->Cell[TxIdx].AllocVa; NdisZeroMemory(pTxD, TXD_SIZE); pTxD->SDPtr0 = BufBasePaLow; @@ -97,17 +97,17 @@ u16 RtmpPCI_WriteTxResource(IN PRTMP_ADAPTER pAd, return RetTxIdx; } -u16 RtmpPCI_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteSingleTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber) { u8 *pDMAHeaderBufVA; u16 TxIdx, RetTxIdx; - PTXD_STRUC pTxD; + struct rt_txd * pTxD; u32 BufBasePaLow; - PRTMP_TX_RING pTxRing; + struct rt_rtmp_tx_ring *pTxRing; u16 hwHeaderLen; /* */ @@ -132,7 +132,7 @@ u16 RtmpPCI_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, /* */ /* build Tx Descriptor */ /* */ - pTxD = (PTXD_STRUC) pTxRing->Cell[TxIdx].AllocVa; + pTxD = (struct rt_txd *) pTxRing->Cell[TxIdx].AllocVa; NdisZeroMemory(pTxD, TXD_SIZE); pTxD->SDPtr0 = BufBasePaLow; @@ -156,16 +156,16 @@ u16 RtmpPCI_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, return RetTxIdx; } -u16 RtmpPCI_WriteMultiTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteMultiTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 frameNum, u16 * FreeNumber) { BOOLEAN bIsLast; u8 *pDMAHeaderBufVA; u16 TxIdx, RetTxIdx; - PTXD_STRUC pTxD; + struct rt_txd * pTxD; u32 BufBasePaLow; - PRTMP_TX_RING pTxRing; + struct rt_rtmp_tx_ring *pTxRing; u16 hwHdrLen; u32 firstDMALen; @@ -210,7 +210,7 @@ u16 RtmpPCI_WriteMultiTxResource(IN PRTMP_ADAPTER pAd, /* */ /* build Tx Descriptor */ /* */ - pTxD = (PTXD_STRUC) pTxRing->Cell[TxIdx].AllocVa; + pTxD = (struct rt_txd *) pTxRing->Cell[TxIdx].AllocVa; NdisZeroMemory(pTxD, TXD_SIZE); pTxD->SDPtr0 = BufBasePaLow; @@ -235,28 +235,28 @@ u16 RtmpPCI_WriteMultiTxResource(IN PRTMP_ADAPTER pAd, } -void RtmpPCI_FinalWriteTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +void RtmpPCI_FinalWriteTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u16 totalMPDUSize, u16 FirstTxIdx) { - PTXWI_STRUC pTxWI; - PRTMP_TX_RING pTxRing; + struct rt_txwi * pTxWI; + struct rt_rtmp_tx_ring *pTxRing; /* */ /* get Tx Ring Resource */ /* */ pTxRing = &pAd->TxRing[pTxBlk->QueIdx]; - pTxWI = (PTXWI_STRUC) pTxRing->Cell[FirstTxIdx].DmaBuf.AllocVa; + pTxWI = (struct rt_txwi *) pTxRing->Cell[FirstTxIdx].DmaBuf.AllocVa; pTxWI->MPDUtotalByteCount = totalMPDUSize; } -void RtmpPCIDataLastTxIdx(IN PRTMP_ADAPTER pAd, +void RtmpPCIDataLastTxIdx(struct rt_rtmp_adapter *pAd, u8 QueIdx, u16 LastTxIdx) { - PTXD_STRUC pTxD; - PRTMP_TX_RING pTxRing; + struct rt_txd * pTxD; + struct rt_rtmp_tx_ring *pTxRing; /* */ /* get Tx Ring Resource */ @@ -266,21 +266,21 @@ void RtmpPCIDataLastTxIdx(IN PRTMP_ADAPTER pAd, /* */ /* build Tx Descriptor */ /* */ - pTxD = (PTXD_STRUC) pTxRing->Cell[LastTxIdx].AllocVa; + pTxD = (struct rt_txd *) pTxRing->Cell[LastTxIdx].AllocVa; pTxD->LastSec1 = 1; } -u16 RtmpPCI_WriteFragTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpPCI_WriteFragTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 fragNum, u16 * FreeNumber) { u8 *pDMAHeaderBufVA; u16 TxIdx, RetTxIdx; - PTXD_STRUC pTxD; + struct rt_txd * pTxD; u32 BufBasePaLow; - PRTMP_TX_RING pTxRing; + struct rt_rtmp_tx_ring *pTxRing; u16 hwHeaderLen; u32 firstDMALen; @@ -305,7 +305,7 @@ u16 RtmpPCI_WriteFragTxResource(IN PRTMP_ADAPTER pAd, /* */ /* Build Tx Descriptor */ /* */ - pTxD = (PTXD_STRUC) pTxRing->Cell[TxIdx].AllocVa; + pTxD = (struct rt_txd *) pTxRing->Cell[TxIdx].AllocVa; NdisZeroMemory(pTxD, TXD_SIZE); if (fragNum == pTxBlk->TotalFragNum) { @@ -341,15 +341,15 @@ u16 RtmpPCI_WriteFragTxResource(IN PRTMP_ADAPTER pAd, Must be run in Interrupt context This function handle PCI specific TxDesc and cpu index update and kick the packet out. */ -int RtmpPCIMgmtKickOut(IN RTMP_ADAPTER * pAd, +int RtmpPCIMgmtKickOut(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket, u8 *pSrcBufVA, u32 SrcBufLen) { - PTXD_STRUC pTxD; + struct rt_txd * pTxD; unsigned long SwIdx = pAd->MgmtRing.TxCpuIdx; - pTxD = (PTXD_STRUC) pAd->MgmtRing.Cell[SwIdx].AllocVa; + pTxD = (struct rt_txd *) pAd->MgmtRing.Cell[SwIdx].AllocVa; pAd->MgmtRing.Cell[SwIdx].pNdisPacket = pPacket; pAd->MgmtRing.Cell[SwIdx].pNextNdisPacket = NULL; @@ -405,11 +405,11 @@ int RtmpPCIMgmtKickOut(IN RTMP_ADAPTER * pAd, ======================================================================== */ -int RTMPCheckRxError(IN PRTMP_ADAPTER pAd, - IN PHEADER_802_11 pHeader, - IN PRXWI_STRUC pRxWI, IN PRT28XX_RXD_STRUC pRxD) +int RTMPCheckRxError(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHeader, + struct rt_rxwi * pRxWI, IN PRT28XX_RXD_STRUC pRxD) { - PCIPHER_KEY pWpaKey; + struct rt_cipher_key *pWpaKey; int dBm; /* Phy errors & CRC errors */ @@ -516,13 +516,13 @@ int RTMPCheckRxError(IN PRTMP_ADAPTER pAd, return (NDIS_STATUS_SUCCESS); } -BOOLEAN RTMPFreeTXDUponTxDmaDone(IN PRTMP_ADAPTER pAd, u8 QueIdx) +BOOLEAN RTMPFreeTXDUponTxDmaDone(struct rt_rtmp_adapter *pAd, u8 QueIdx) { - PRTMP_TX_RING pTxRing; - PTXD_STRUC pTxD; + struct rt_rtmp_tx_ring *pTxRing; + struct rt_txd * pTxD; void *pPacket; u8 FREE = 0; - TXD_STRUC TxD, *pOriTxD; + struct rt_txd TxD, *pOriTxD; /*unsigned long IrqFlags; */ BOOLEAN bReschedule = FALSE; @@ -541,9 +541,9 @@ BOOLEAN RTMPFreeTXDUponTxDmaDone(IN PRTMP_ADAPTER pAd, u8 QueIdx) /* Note : If (pAd->ate.bQATxStart == TRUE), we will never reach here. */ FREE++; pTxD = - (PTXD_STRUC) (pTxRing->Cell[pTxRing->TxSwFreeIdx].AllocVa); + (struct rt_txd *) (pTxRing->Cell[pTxRing->TxSwFreeIdx].AllocVa); pOriTxD = pTxD; - NdisMoveMemory(&TxD, pTxD, sizeof(TXD_STRUC)); + NdisMoveMemory(&TxD, pTxD, sizeof(struct rt_txd)); pTxD = &TxD; pTxD->DMADONE = 0; @@ -584,7 +584,7 @@ BOOLEAN RTMPFreeTXDUponTxDmaDone(IN PRTMP_ADAPTER pAd, u8 QueIdx) /* get tx_tdx_idx again */ RTMP_IO_READ32(pAd, TX_DTX_IDX0 + QueIdx * RINGREG_DIFF, &pTxRing->TxDmaIdx); - NdisMoveMemory(pOriTxD, pTxD, sizeof(TXD_STRUC)); + NdisMoveMemory(pOriTxD, pTxD, sizeof(struct rt_txd)); /* RTMP_IRQ_UNLOCK(&pAd->irq_lock, IrqFlags); */ } @@ -609,7 +609,7 @@ BOOLEAN RTMPFreeTXDUponTxDmaDone(IN PRTMP_ADAPTER pAd, u8 QueIdx) ======================================================================== */ -BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(struct rt_rtmp_adapter *pAd, INT_SOURCE_CSR_STRUC TxRingBitmap) { /* u8 Count = 0; */ @@ -661,13 +661,13 @@ BOOLEAN RTMPHandleTxRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPHandleMgmtRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd) +void RTMPHandleMgmtRingDmaDoneInterrupt(struct rt_rtmp_adapter *pAd) { - PTXD_STRUC pTxD; + struct rt_txd * pTxD; void *pPacket; /* int i; */ u8 FREE = 0; - PRTMP_MGMT_RING pMgmtRing = &pAd->MgmtRing; + struct rt_rtmp_mgmt_ring *pMgmtRing = &pAd->MgmtRing; NdisAcquireSpinLock(&pAd->MgmtRingLock); @@ -675,7 +675,7 @@ void RTMPHandleMgmtRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd) while (pMgmtRing->TxSwFreeIdx != pMgmtRing->TxDmaIdx) { FREE++; pTxD = - (PTXD_STRUC) (pMgmtRing->Cell[pAd->MgmtRing.TxSwFreeIdx]. + (struct rt_txd *) (pMgmtRing->Cell[pAd->MgmtRing.TxSwFreeIdx]. AllocVa); pTxD->DMADONE = 0; pPacket = pMgmtRing->Cell[pMgmtRing->TxSwFreeIdx].pNdisPacket; @@ -713,7 +713,7 @@ void RTMPHandleMgmtRingDmaDoneInterrupt(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPHandleTBTTInterrupt(IN PRTMP_ADAPTER pAd) +void RTMPHandleTBTTInterrupt(struct rt_rtmp_adapter *pAd) { { if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) { @@ -732,7 +732,7 @@ void RTMPHandleTBTTInterrupt(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPHandlePreTBTTInterrupt(IN PRTMP_ADAPTER pAd) +void RTMPHandlePreTBTTInterrupt(struct rt_rtmp_adapter *pAd) { { if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) { @@ -743,7 +743,7 @@ void RTMPHandlePreTBTTInterrupt(IN PRTMP_ADAPTER pAd) } -void RTMPHandleRxCoherentInterrupt(IN PRTMP_ADAPTER pAd) +void RTMPHandleRxCoherentInterrupt(struct rt_rtmp_adapter *pAd) { WPDMA_GLO_CFG_STRUC GloCfg; @@ -773,18 +773,18 @@ void RTMPHandleRxCoherentInterrupt(IN PRTMP_ADAPTER pAd) DBGPRINT(RT_DEBUG_TRACE, ("<== RTMPHandleRxCoherentInterrupt \n")); } -void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, +void *GetPacketFromRxRing(struct rt_rtmp_adapter *pAd, OUT PRT28XX_RXD_STRUC pSaveRxD, OUT BOOLEAN * pbReschedule, IN u32 * pRxPending) { - PRXD_STRUC pRxD; + struct rt_rxd * pRxD; void *pRxPacket = NULL; void *pNewPacket; void *AllocVa; dma_addr_t AllocPa; BOOLEAN bReschedule = FALSE; - RTMP_DMACB *pRxCell; + struct rt_rtmp_dmacb *pRxCell; RTMP_SEM_LOCK(&pAd->RxRingLock); @@ -811,7 +811,7 @@ void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, pRxCell = &pAd->RxRing.Cell[pAd->RxRing.RxSwReadIdx]; /* Point to Rx indexed rx ring descriptor */ - pRxD = (PRXD_STRUC) pRxCell->AllocVa; + pRxD = (struct rt_rxd *) pRxCell->AllocVa; if (pRxD->DDONE == 0) { *pRxPending = 0; @@ -864,24 +864,24 @@ done: return pRxPacket; } -int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd, +int MlmeHardTransmitTxRing(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; u8 *pSrcBufVA; u32 SrcBufLen; - PTXD_STRUC pTxD; - PHEADER_802_11 pHeader_802_11; + struct rt_txd * pTxD; + struct rt_header_802_11 * pHeader_802_11; BOOLEAN bAckRequired, bInsertTimestamp; unsigned long SrcBufPA; /*u8 TxBufIdx; */ u8 MlmeRate; unsigned long SwIdx = pAd->TxRing[QueIdx].TxCpuIdx; - PTXWI_STRUC pFirstTxWI; + struct rt_txwi * pFirstTxWI; /*unsigned long i; */ /*HTTRANSMIT_SETTING MlmeTransmit; //Rate for this MGMT frame. */ unsigned long FreeNum; - MAC_TABLE_ENTRY *pMacEntry = NULL; + struct rt_mac_table_entry *pMacEntry = NULL; RTMP_QueryPacketInfo(pPacket, &PacketInfo, &pSrcBufVA, &SrcBufLen); @@ -901,7 +901,7 @@ int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd, SwIdx = pAd->TxRing[QueIdx].TxCpuIdx; - pTxD = (PTXD_STRUC) pAd->TxRing[QueIdx].Cell[SwIdx].AllocVa; + pTxD = (struct rt_txd *) pAd->TxRing[QueIdx].Cell[SwIdx].AllocVa; if (pAd->TxRing[QueIdx].Cell[SwIdx].pNdisPacket) { DBGPRINT(RT_DEBUG_OFF, ("MlmeHardTransmit Error\n")); @@ -915,9 +915,9 @@ int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd, if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) AsicForceWakeup(pAd, TRUE); } - pFirstTxWI = (PTXWI_STRUC) pSrcBufVA; + pFirstTxWI = (struct rt_txwi *) pSrcBufVA; - pHeader_802_11 = (PHEADER_802_11) (pSrcBufVA + TXWI_SIZE); + pHeader_802_11 = (struct rt_header_802_11 *) (pSrcBufVA + TXWI_SIZE); if (pHeader_802_11->Addr1[0] & 0x01) { MlmeRate = pAd->CommonCfg.BasicMlmeRate; } else { @@ -1040,7 +1040,7 @@ int MlmeHardTransmitTxRing(IN PRTMP_ADAPTER pAd, return NDIS_STATUS_SUCCESS; } -int MlmeDataHardTransmit(IN PRTMP_ADAPTER pAd, +int MlmeDataHardTransmit(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket) { if ((pAd->CommonCfg.RadarDetect.RDMode != RD_NORMAL_MODE) @@ -1078,8 +1078,8 @@ int MlmeDataHardTransmit(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPWriteTxDescriptor(IN PRTMP_ADAPTER pAd, - IN PTXD_STRUC pTxD, +void RTMPWriteTxDescriptor(struct rt_rtmp_adapter *pAd, + struct rt_txd * pTxD, IN BOOLEAN bWIV, u8 QueueSEL) { /* */ diff --git a/drivers/staging/rt2860/common/cmm_data_usb.c b/drivers/staging/rt2860/common/cmm_data_usb.c index f3a7208e043e..7c56c2f51987 100644 --- a/drivers/staging/rt2860/common/cmm_data_usb.c +++ b/drivers/staging/rt2860/common/cmm_data_usb.c @@ -41,9 +41,9 @@ => => */ -static inline int RtmpUSBCanDoWrite(IN RTMP_ADAPTER * pAd, +static inline int RtmpUSBCanDoWrite(struct rt_rtmp_adapter *pAd, u8 QueIdx, - IN HT_TX_CONTEXT * pHTTXContext) + struct rt_ht_tx_context *pHTTXContext) { int canWrite = NDIS_STATUS_RESOURCES; @@ -68,8 +68,8 @@ static inline int RtmpUSBCanDoWrite(IN RTMP_ADAPTER * pAd, return canWrite; } -u16 RtmpUSB_WriteSubTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpUSB_WriteSubTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber) { @@ -78,15 +78,15 @@ u16 RtmpUSB_WriteSubTxResource(IN PRTMP_ADAPTER pAd, } -u16 RtmpUSB_WriteFragTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpUSB_WriteFragTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 fragNum, u16 * FreeNumber) { - HT_TX_CONTEXT *pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; u16 hwHdrLen; /* The hwHdrLen consist of 802.11 header length plus the header padding length. */ u32 fillOffset; - TXINFO_STRUC *pTxInfo; - TXWI_STRUC *pTxWI; + struct rt_txinfo *pTxInfo; + struct rt_txwi *pTxWI; u8 *pWirelessPacket = NULL; u8 QueIdx; int Status; @@ -147,8 +147,8 @@ u16 RtmpUSB_WriteFragTxResource(IN PRTMP_ADAPTER pAd, } NdisZeroMemory((u8 *)(&pTxBlk->HeaderBuf[0]), TXINFO_SIZE); - pTxInfo = (PTXINFO_STRUC) (&pTxBlk->HeaderBuf[0]); - pTxWI = (PTXWI_STRUC) (&pTxBlk->HeaderBuf[TXINFO_SIZE]); + pTxInfo = (struct rt_txinfo *)(&pTxBlk->HeaderBuf[0]); + pTxWI = (struct rt_txwi *) (&pTxBlk->HeaderBuf[TXINFO_SIZE]); pWirelessPacket = &pHTTXContext->TransferBuffer->field.WirelessPacket[fillOffset]; @@ -215,16 +215,16 @@ u16 RtmpUSB_WriteFragTxResource(IN PRTMP_ADAPTER pAd, } -u16 RtmpUSB_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpUSB_WriteSingleTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, IN BOOLEAN bIsLast, u16 * FreeNumber) { - HT_TX_CONTEXT *pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; u16 hwHdrLen; u32 fillOffset; - TXINFO_STRUC *pTxInfo; - TXWI_STRUC *pTxWI; + struct rt_txinfo *pTxInfo; + struct rt_txwi *pTxWI; u8 *pWirelessPacket; u8 QueIdx; unsigned long IrqFlags; @@ -249,8 +249,8 @@ u16 RtmpUSB_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, if (Status == NDIS_STATUS_SUCCESS) { pHTTXContext->bCurWriting = TRUE; - pTxInfo = (PTXINFO_STRUC) (&pTxBlk->HeaderBuf[0]); - pTxWI = (PTXWI_STRUC) (&pTxBlk->HeaderBuf[TXINFO_SIZE]); + pTxInfo = (struct rt_txinfo *)(&pTxBlk->HeaderBuf[0]); + pTxWI = (struct rt_txwi *) (&pTxBlk->HeaderBuf[TXINFO_SIZE]); /* Reserve space for 8 bytes padding. */ if ((pHTTXContext->ENextBulkOutPosition == @@ -328,15 +328,15 @@ u16 RtmpUSB_WriteSingleTxResource(IN PRTMP_ADAPTER pAd, } -u16 RtmpUSB_WriteMultiTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +u16 RtmpUSB_WriteMultiTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 frameNum, u16 * FreeNumber) { - HT_TX_CONTEXT *pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; u16 hwHdrLen; /* The hwHdrLen consist of 802.11 header length plus the header padding length. */ u32 fillOffset; - TXINFO_STRUC *pTxInfo; - TXWI_STRUC *pTxWI; + struct rt_txinfo *pTxInfo; + struct rt_txwi *pTxWI; u8 *pWirelessPacket = NULL; u8 QueIdx; int Status; @@ -357,8 +357,8 @@ u16 RtmpUSB_WriteMultiTxResource(IN PRTMP_ADAPTER pAd, if (Status == NDIS_STATUS_SUCCESS) { pHTTXContext->bCurWriting = TRUE; - pTxInfo = (PTXINFO_STRUC) (&pTxBlk->HeaderBuf[0]); - pTxWI = (PTXWI_STRUC) (&pTxBlk->HeaderBuf[TXINFO_SIZE]); + pTxInfo = (struct rt_txinfo *)(&pTxBlk->HeaderBuf[0]); + pTxWI = (struct rt_txwi *) (&pTxBlk->HeaderBuf[TXINFO_SIZE]); /* Reserve space for 8 bytes padding. */ if ((pHTTXContext->ENextBulkOutPosition == @@ -467,15 +467,15 @@ done: } -void RtmpUSB_FinalWriteTxResource(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, +void RtmpUSB_FinalWriteTxResource(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u16 totalMPDUSize, u16 TxIdx) { u8 QueIdx; - HT_TX_CONTEXT *pHTTXContext; + struct rt_ht_tx_context *pHTTXContext; u32 fillOffset; - TXINFO_STRUC *pTxInfo; - TXWI_STRUC *pTxWI; + struct rt_txinfo *pTxInfo; + struct rt_txwi *pTxWI; u32 USBDMApktLen, padding; unsigned long IrqFlags; u8 *pWirelessPacket; @@ -502,7 +502,7 @@ void RtmpUSB_FinalWriteTxResource(IN PRTMP_ADAPTER pAd, /* Update TxInfo->USBDMApktLen , */ /* the length = TXWI_SIZE + 802.11_hdr + 802.11_hdr_pad + payload_of_all_batch_frames + Bulk-Out-padding */ /* */ - pTxInfo = (PTXINFO_STRUC) (pWirelessPacket); + pTxInfo = (struct rt_txinfo *)(pWirelessPacket); /* Calculate the bulk-out padding */ USBDMApktLen = pTxBlk->Priv - TXINFO_SIZE; @@ -514,7 +514,7 @@ void RtmpUSB_FinalWriteTxResource(IN PRTMP_ADAPTER pAd, /* */ /* Update TXWI->MPDUtotalByteCount , */ /* the length = 802.11 header + payload_of_all_batch_frames */ - pTxWI = (PTXWI_STRUC) (pWirelessPacket + TXINFO_SIZE); + pTxWI = (struct rt_txwi *) (pWirelessPacket + TXINFO_SIZE); pTxWI->MPDUtotalByteCount = totalMPDUSize; /* */ @@ -547,7 +547,7 @@ void RtmpUSB_FinalWriteTxResource(IN PRTMP_ADAPTER pAd, } -void RtmpUSBDataLastTxIdx(IN PRTMP_ADAPTER pAd, +void RtmpUSBDataLastTxIdx(struct rt_rtmp_adapter *pAd, u8 QueIdx, u16 TxIdx) { /* DO nothing for USB. */ @@ -561,8 +561,8 @@ void RtmpUSBDataLastTxIdx(IN PRTMP_ADAPTER pAd, Check if the CurWriting flag is FALSE, if it's FALSE, we can do kick out. */ -void RtmpUSBDataKickOut(IN PRTMP_ADAPTER pAd, - IN TX_BLK * pTxBlk, u8 QueIdx) +void RtmpUSBDataKickOut(struct rt_rtmp_adapter *pAd, + struct rt_tx_blk *pTxBlk, u8 QueIdx) { RTUSB_SET_BULK_FLAG(pAd, (fRTUSB_BULK_OUT_DATA_NORMAL << QueIdx)); RTUSBKickBulkOut(pAd); @@ -573,21 +573,21 @@ void RtmpUSBDataKickOut(IN PRTMP_ADAPTER pAd, Must be run in Interrupt context This function handle RT2870 specific TxDesc and cpu index update and kick the packet out. */ -int RtmpUSBMgmtKickOut(IN RTMP_ADAPTER * pAd, +int RtmpUSBMgmtKickOut(struct rt_rtmp_adapter *pAd, u8 QueIdx, void *pPacket, u8 *pSrcBufVA, u32 SrcBufLen) { - PTXINFO_STRUC pTxInfo; + struct rt_txinfo *pTxInfo; unsigned long BulkOutSize; u8 padLen; u8 *pDest; unsigned long SwIdx = pAd->MgmtRing.TxCpuIdx; - PTX_CONTEXT pMLMEContext = - (PTX_CONTEXT) pAd->MgmtRing.Cell[SwIdx].AllocVa; + struct rt_tx_context *pMLMEContext = + (struct rt_tx_context *)pAd->MgmtRing.Cell[SwIdx].AllocVa; unsigned long IrqFlags; - pTxInfo = (PTXINFO_STRUC) (pSrcBufVA); + pTxInfo = (struct rt_txinfo *)(pSrcBufVA); /* Build our URB for USBD */ BulkOutSize = SrcBufLen; @@ -613,7 +613,7 @@ int RtmpUSBMgmtKickOut(IN RTMP_ADAPTER * pAd, pAd->MgmtRing.Cell[pAd->MgmtRing.TxCpuIdx].pNdisPacket = pPacket; pMLMEContext->TransferBuffer = - (PTX_BUFFER) (GET_OS_PKT_DATAPTR(pPacket)); + (struct rt_tx_buffer *)(GET_OS_PKT_DATAPTR(pPacket)); /* Length in TxInfo should be 8 less than bulkout size. */ pMLMEContext->BulkOutSize = BulkOutSize; @@ -642,14 +642,14 @@ int RtmpUSBMgmtKickOut(IN RTMP_ADAPTER * pAd, return 0; } -void RtmpUSBNullFrameKickOut(IN RTMP_ADAPTER * pAd, +void RtmpUSBNullFrameKickOut(struct rt_rtmp_adapter *pAd, u8 QueIdx, u8 * pNullFrame, u32 frameLen) { if (pAd->NullContext.InUse == FALSE) { - PTX_CONTEXT pNullContext; - PTXINFO_STRUC pTxInfo; - PTXWI_STRUC pTxWI; + struct rt_tx_context *pNullContext; + struct rt_txinfo *pTxInfo; + struct rt_txwi * pTxWI; u8 *pWirelessPkt; pNullContext = &(pAd->NullContext); @@ -661,19 +661,19 @@ void RtmpUSBNullFrameKickOut(IN RTMP_ADAPTER * pAd, WirelessPacket[0]; RTMPZeroMemory(&pWirelessPkt[0], 100); - pTxInfo = (PTXINFO_STRUC) & pWirelessPkt[0]; + pTxInfo = (struct rt_txinfo *)& pWirelessPkt[0]; RTMPWriteTxInfo(pAd, pTxInfo, - (u16)(sizeof(HEADER_802_11) + TXWI_SIZE), + (u16)(sizeof(struct rt_header_802_11) + TXWI_SIZE), TRUE, EpToQueue[MGMTPIPEIDX], FALSE, FALSE); pTxInfo->QSEL = FIFO_EDCA; - pTxWI = (PTXWI_STRUC) & pWirelessPkt[TXINFO_SIZE]; + pTxWI = (struct rt_txwi *) & pWirelessPkt[TXINFO_SIZE]; RTMPWriteTxWI(pAd, pTxWI, FALSE, FALSE, FALSE, FALSE, TRUE, - FALSE, 0, BSSID_WCID, (sizeof(HEADER_802_11)), 0, + FALSE, 0, BSSID_WCID, (sizeof(struct rt_header_802_11)), 0, 0, (u8)pAd->CommonCfg.MlmeTransmit.field.MCS, IFS_HTTXOP, FALSE, &pAd->CommonCfg.MlmeTransmit); RTMPMoveMemory(&pWirelessPkt[TXWI_SIZE + TXINFO_SIZE], - &pAd->NullFrame, sizeof(HEADER_802_11)); + &pAd->NullFrame, sizeof(struct rt_header_802_11)); pAd->NullContext.BulkOutSize = TXINFO_SIZE + TXWI_SIZE + sizeof(pAd->NullFrame) + 4; @@ -707,17 +707,17 @@ Return Value: Note: ======================================================================== */ -void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, +void *GetPacketFromRxRing(struct rt_rtmp_adapter *pAd, OUT PRT28XX_RXD_STRUC pSaveRxD, OUT BOOLEAN * pbReschedule, IN u32 * pRxPending) { - PRX_CONTEXT pRxContext; + struct rt_rx_context *pRxContext; void *pSkb; u8 *pData; unsigned long ThisFrameLen; unsigned long RxBufferLength; - PRXWI_STRUC pRxWI; + struct rt_rxwi * pRxWI; pRxContext = &pAd->RxContext[pAd->NextRxBulkInReadIndex]; if ((pRxContext->Readable == FALSE) || (pRxContext->InUse == TRUE)) @@ -725,8 +725,8 @@ void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, RxBufferLength = pRxContext->BulkInOffset - pAd->ReadPosition; if (RxBufferLength < - (RT2870_RXDMALEN_FIELD_SIZE + sizeof(RXWI_STRUC) + - sizeof(RXINFO_STRUC))) { + (RT2870_RXDMALEN_FIELD_SIZE + sizeof(struct rt_rxwi) + + sizeof(struct rt_rxinfo))) { goto label_null; } @@ -748,7 +748,7 @@ void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, goto label_null; } - if ((ThisFrameLen + 8) > RxBufferLength) /* 8 for (RT2870_RXDMALEN_FIELD_SIZE + sizeof(RXINFO_STRUC)) */ + if ((ThisFrameLen + 8) > RxBufferLength) /* 8 for (RT2870_RXDMALEN_FIELD_SIZE + sizeof(struct rt_rxinfo)) */ { DBGPRINT(RT_DEBUG_TRACE, ("BIRIdx(%d):FrameLen(0x%lx) outranges. BulkInLen=0x%lx, remaining RxBufLen=0x%lx, ReadPos=0x%lx\n", @@ -761,7 +761,7 @@ void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, } /* skip USB frame length field */ pData += RT2870_RXDMALEN_FIELD_SIZE; - pRxWI = (PRXWI_STRUC) pData; + pRxWI = (struct rt_rxwi *) pData; if (pRxWI->MPDUtotalByteCount > ThisFrameLen) { DBGPRINT(RT_DEBUG_ERROR, ("%s():pRxWIMPDUtotalByteCount(%d) large than RxDMALen(%ld)\n", @@ -783,10 +783,10 @@ void *GetPacketFromRxRing(IN PRTMP_ADAPTER pAd, RTMP_SET_PACKET_SOURCE(OSPKT_TO_RTPKT(pSkb), PKTSRC_NDIS); /* copy RxD */ - *pSaveRxD = *(PRXINFO_STRUC) (pData + ThisFrameLen); + *pSaveRxD = *(struct rt_rxinfo *) (pData + ThisFrameLen); /* update next packet read position. */ - pAd->ReadPosition += (ThisFrameLen + RT2870_RXDMALEN_FIELD_SIZE + RXINFO_SIZE); /* 8 for (RT2870_RXDMALEN_FIELD_SIZE + sizeof(RXINFO_STRUC)) */ + pAd->ReadPosition += (ThisFrameLen + RT2870_RXDMALEN_FIELD_SIZE + RXINFO_SIZE); /* 8 for (RT2870_RXDMALEN_FIELD_SIZE + sizeof(struct rt_rxinfo)) */ return pSkb; @@ -812,11 +812,11 @@ label_null: ======================================================================== */ -int RTMPCheckRxError(IN PRTMP_ADAPTER pAd, - IN PHEADER_802_11 pHeader, - IN PRXWI_STRUC pRxWI, IN PRT28XX_RXD_STRUC pRxINFO) +int RTMPCheckRxError(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHeader, + struct rt_rxwi * pRxWI, IN PRT28XX_RXD_STRUC pRxINFO) { - PCIPHER_KEY pWpaKey; + struct rt_cipher_key *pWpaKey; int dBm; if (pAd->bPromiscuous == TRUE) @@ -909,7 +909,7 @@ void RtmpUsbStaAsicForceWakeupTimeout(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; if (pAd && pAd->Mlme.AutoWakeupTimerRunning) { AsicSendCommandToMcu(pAd, 0x31, 0xff, 0x00, 0x02); @@ -919,7 +919,7 @@ void RtmpUsbStaAsicForceWakeupTimeout(void *SystemSpecific1, } } -void RT28xxUsbStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) +void RT28xxUsbStaAsicForceWakeup(struct rt_rtmp_adapter *pAd, IN BOOLEAN bFromTx) { BOOLEAN Canceled; @@ -931,7 +931,7 @@ void RT28xxUsbStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) OPSTATUS_CLEAR_FLAG(pAd, fOP_STATUS_DOZE); } -void RT28xxUsbStaAsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd, +void RT28xxUsbStaAsicSleepThenAutoWakeup(struct rt_rtmp_adapter *pAd, u16 TbttNumToNextWakeUp) { diff --git a/drivers/staging/rt2860/common/cmm_info.c b/drivers/staging/rt2860/common/cmm_info.c index 21780578f556..25302e8363b9 100644 --- a/drivers/staging/rt2860/common/cmm_info.c +++ b/drivers/staging/rt2860/common/cmm_info.c @@ -47,7 +47,7 @@ ======================================================================== */ -void RTMPSetDesiredRates(IN PRTMP_ADAPTER pAdapter, long Rates) +void RTMPSetDesiredRates(struct rt_rtmp_adapter *pAdapter, long Rates) { NDIS_802_11_RATES aryRates; @@ -235,7 +235,7 @@ void RTMPSetDesiredRates(IN PRTMP_ADAPTER pAdapter, long Rates) ======================================================================== */ -void RTMPWPARemoveAllKeys(IN PRTMP_ADAPTER pAd) +void RTMPWPARemoveAllKeys(struct rt_rtmp_adapter *pAd) { u8 i; @@ -262,7 +262,7 @@ void RTMPWPARemoveAllKeys(IN PRTMP_ADAPTER pAd) DBGPRINT(RT_DEBUG_TRACE, ("remove %s key #%d\n", CipherName[pAd->SharedKey[BSS0][i].CipherAlg], i)); - NdisZeroMemory(&pAd->SharedKey[BSS0][i], sizeof(CIPHER_KEY)); + NdisZeroMemory(&pAd->SharedKey[BSS0][i], sizeof(struct rt_cipher_key)); AsicRemoveSharedKeyEntry(pAd, BSS0, i); } @@ -307,7 +307,7 @@ void RTMPWPARemoveAllKeys(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPSetPhyMode(IN PRTMP_ADAPTER pAd, unsigned long phymode) +void RTMPSetPhyMode(struct rt_rtmp_adapter *pAd, unsigned long phymode) { int i; /* the selected phymode must be supported by the RF IC encoded in E2PROM */ @@ -435,7 +435,7 @@ void RTMPSetPhyMode(IN PRTMP_ADAPTER pAd, unsigned long phymode) ======================================================================== */ -void RTMPSetHT(IN PRTMP_ADAPTER pAd, IN OID_SET_HT_PHYMODE * pHTPhyMode) +void RTMPSetHT(struct rt_rtmp_adapter *pAd, struct rt_oid_set_ht_phymode *pHTPhyMode) { /*unsigned long *pmcs; */ u32 Value = 0; @@ -648,9 +648,9 @@ void RTMPSetHT(IN PRTMP_ADAPTER pAd, IN OID_SET_HT_PHYMODE * pHTPhyMode) ======================================================================== */ -void RTMPSetIndividualHT(IN PRTMP_ADAPTER pAd, u8 apidx) +void RTMPSetIndividualHT(struct rt_rtmp_adapter *pAd, u8 apidx) { - PRT_HT_PHY_INFO pDesired_ht_phy = NULL; + struct rt_ht_phy_info *pDesired_ht_phy = NULL; u8 TxStream = pAd->CommonCfg.TxStream; u8 DesiredMcs = MCS_AUTO; @@ -669,7 +669,7 @@ void RTMPSetIndividualHT(IN PRTMP_ADAPTER pAd, u8 apidx) ("RTMPSetIndividualHT: invalid apidx(%d)\n", apidx)); return; } - RTMPZeroMemory(pDesired_ht_phy, sizeof(RT_HT_PHY_INFO)); + RTMPZeroMemory(pDesired_ht_phy, sizeof(struct rt_ht_phy_info)); DBGPRINT(RT_DEBUG_TRACE, ("RTMPSetIndividualHT : Desired MCS = %d\n", DesiredMcs)); @@ -755,13 +755,13 @@ void RTMPSetIndividualHT(IN PRTMP_ADAPTER pAd, u8 apidx) ======================================================================== */ -void RTMPUpdateHTIE(IN RT_HT_CAPABILITY * pRtHt, +void RTMPUpdateHTIE(struct rt_ht_capability *pRtHt, u8 * pMcsSet, - OUT HT_CAPABILITY_IE * pHtCapability, - OUT ADD_HT_INFO_IE * pAddHtInfo) + struct rt_ht_capability_ie * pHtCapability, + struct rt_add_ht_info_ie * pAddHtInfo) { - RTMPZeroMemory(pHtCapability, sizeof(HT_CAPABILITY_IE)); - RTMPZeroMemory(pAddHtInfo, sizeof(ADD_HT_INFO_IE)); + RTMPZeroMemory(pHtCapability, sizeof(struct rt_ht_capability_ie)); + RTMPZeroMemory(pAddHtInfo, sizeof(struct rt_add_ht_info_ie)); pHtCapability->HtCapInfo.ChannelWidth = pRtHt->ChannelWidth; pHtCapability->HtCapInfo.MimoPs = pRtHt->MimoPs; @@ -790,10 +790,10 @@ void RTMPUpdateHTIE(IN RT_HT_CAPABILITY * pRtHt, Return: ======================================================================== */ -void RTMPAddWcidAttributeEntry(IN PRTMP_ADAPTER pAd, +void RTMPAddWcidAttributeEntry(struct rt_rtmp_adapter *pAd, u8 BssIdx, u8 KeyIdx, - u8 CipherAlg, IN MAC_TABLE_ENTRY * pEntry) + u8 CipherAlg, struct rt_mac_table_entry *pEntry) { u32 WCIDAttri = 0; u16 offset; @@ -914,9 +914,9 @@ char *GetAuthMode(char auth) return "UNKNOW"; } -int SetCommonHT(IN PRTMP_ADAPTER pAd) +int SetCommonHT(struct rt_rtmp_adapter *pAd) { - OID_SET_HT_PHYMODE SetHT; + struct rt_oid_set_ht_phymode SetHT; if (pAd->CommonCfg.PhyMode < PHY_11ABGN_MIXED) return FALSE; diff --git a/drivers/staging/rt2860/common/cmm_mac_pci.c b/drivers/staging/rt2860/common/cmm_mac_pci.c index f00534220562..11dfdc58c77b 100644 --- a/drivers/staging/rt2860/common/cmm_mac_pci.c +++ b/drivers/staging/rt2860/common/cmm_mac_pci.c @@ -48,18 +48,18 @@ ======================================================================== */ -int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) +int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd) { int Status = NDIS_STATUS_SUCCESS; unsigned long RingBasePaHigh; unsigned long RingBasePaLow; void *RingBaseVa; int index, num; - PTXD_STRUC pTxD; - PRXD_STRUC pRxD; + struct rt_txd * pTxD; + struct rt_rxd * pRxD; unsigned long ErrorValue = 0; - PRTMP_TX_RING pTxRing; - PRTMP_DMABUF pDmaBuf; + struct rt_rtmp_tx_ring *pTxRing; + struct rt_rtmp_dmabuf *pDmaBuf; void *pPacket; /* PRTMP_REORDERBUF pReorderBuf; */ @@ -166,7 +166,7 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) /* link the pre-allocated TxBuf to TXD */ pTxD = - (PTXD_STRUC) pTxRing->Cell[index].AllocVa; + (struct rt_txd *) pTxRing->Cell[index].AllocVa; pTxD->SDPtr0 = BufBasePaLow; /* advance to next ring descriptor address */ pTxD->DMADONE = 1; @@ -231,7 +231,7 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) RingBaseVa = (u8 *)RingBaseVa + TXD_SIZE; /* link the pre-allocated TxBuf to TXD */ - pTxD = (PTXD_STRUC) pAd->MgmtRing.Cell[index].AllocVa; + pTxD = (struct rt_txd *) pAd->MgmtRing.Cell[index].AllocVa; pTxD->DMADONE = 1; /* no pre-allocated buffer required in MgmtRing for scatter-gather case */ @@ -312,7 +312,7 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) NdisZeroMemory(pDmaBuf->AllocVa, pDmaBuf->AllocSize); /* Write RxD buffer address & allocated buffer length */ - pRxD = (PRXD_STRUC) pAd->RxRing.Cell[index].AllocVa; + pRxD = (struct rt_rxd *) pAd->RxRing.Cell[index].AllocVa; pRxD->SDP0 = RTMP_GetPhysicalAddressLow(pDmaBuf->AllocPa); pRxD->DDONE = 0; @@ -324,7 +324,7 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) } while (FALSE); - NdisZeroMemory(&pAd->FragFrame, sizeof(FRAGMENT_FRAME)); + NdisZeroMemory(&pAd->FragFrame, sizeof(struct rt_fragment_frame)); pAd->FragFrame.pFragPacket = RTMP_AllocateFragPacketBuffer(pAd, RX_BUFFER_NORMSIZE); @@ -400,14 +400,14 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) +void RTMPRingCleanUp(struct rt_rtmp_adapter *pAd, u8 RingType) { - PTXD_STRUC pTxD; - PRXD_STRUC pRxD; - PQUEUE_ENTRY pEntry; + struct rt_txd * pTxD; + struct rt_rxd * pRxD; + struct rt_queue_entry *pEntry; void *pPacket; int i; - PRTMP_TX_RING pTxRing; + struct rt_rtmp_tx_ring *pTxRing; unsigned long IrqFlags; /*u32 RxSwReadIdx; */ @@ -426,7 +426,7 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) /* We have to clean all descriptors in case some error happened with reset */ for (i = 0; i < TX_RING_SIZE; i++) /* We have to scan all TX ring */ { - pTxD = (PTXD_STRUC) pTxRing->Cell[i].AllocVa; + pTxD = (struct rt_txd *) pTxRing->Cell[i].AllocVa; pPacket = (void *)pTxRing->Cell[i].pNdisPacket; /* release scatter-and-gather char */ @@ -471,7 +471,7 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) NdisAcquireSpinLock(&pAd->MgmtRingLock); for (i = 0; i < MGMT_RING_SIZE; i++) { - pTxD = (PTXD_STRUC) pAd->MgmtRing.Cell[i].AllocVa; + pTxD = (struct rt_txd *) pAd->MgmtRing.Cell[i].AllocVa; pPacket = (void *)pAd->MgmtRing.Cell[i].pNdisPacket; @@ -514,7 +514,7 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) NdisAcquireSpinLock(&pAd->RxRingLock); for (i = 0; i < RX_RING_SIZE; i++) { - pRxD = (PRXD_STRUC) pAd->RxRing.Cell[i].AllocVa; + pRxD = (struct rt_rxd *) pAd->RxRing.Cell[i].AllocVa; pRxD->DDONE = 0; } @@ -533,11 +533,11 @@ void RTMPRingCleanUp(IN PRTMP_ADAPTER pAd, u8 RingType) } } -void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) +void RTMPFreeTxRxRingMemory(struct rt_rtmp_adapter *pAd) { int index, num, j; - PRTMP_TX_RING pTxRing; - PTXD_STRUC pTxD; + struct rt_rtmp_tx_ring *pTxRing; + struct rt_txd * pTxD; void *pPacket; unsigned int IrqFlags; @@ -547,9 +547,9 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) /* Free TxSwQueue Packet */ for (index = 0; index < NUM_OF_TX_RING; index++) { - PQUEUE_ENTRY pEntry; + struct rt_queue_entry *pEntry; void *pPacket; - PQUEUE_HEADER pQueue; + struct rt_queue_header *pQueue; RTMP_IRQ_LOCK(&pAd->irq_lock, IrqFlags); pQueue = &pAd->TxSwQueue[index]; @@ -566,7 +566,7 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) pTxRing = &pAd->TxRing[index]; for (j = 0; j < TX_RING_SIZE; j++) { - pTxD = (PTXD_STRUC) (pTxRing->Cell[j].AllocVa); + pTxD = (struct rt_txd *) (pTxRing->Cell[j].AllocVa); pPacket = pTxRing->Cell[j].pNdisPacket; if (pPacket) { @@ -607,21 +607,21 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) NDIS_STATUS_SUCCESS); } } - NdisZeroMemory(pAd->RxRing.Cell, RX_RING_SIZE * sizeof(RTMP_DMACB)); + NdisZeroMemory(pAd->RxRing.Cell, RX_RING_SIZE * sizeof(struct rt_rtmp_dmacb)); if (pAd->RxDescRing.AllocVa) { RTMP_FreeDescMemory(pAd, pAd->RxDescRing.AllocSize, pAd->RxDescRing.AllocVa, pAd->RxDescRing.AllocPa); } - NdisZeroMemory(&pAd->RxDescRing, sizeof(RTMP_DMABUF)); + NdisZeroMemory(&pAd->RxDescRing, sizeof(struct rt_rtmp_dmabuf)); if (pAd->MgmtDescRing.AllocVa) { RTMP_FreeDescMemory(pAd, pAd->MgmtDescRing.AllocSize, pAd->MgmtDescRing.AllocVa, pAd->MgmtDescRing.AllocPa); } - NdisZeroMemory(&pAd->MgmtDescRing, sizeof(RTMP_DMABUF)); + NdisZeroMemory(&pAd->MgmtDescRing, sizeof(struct rt_rtmp_dmabuf)); for (num = 0; num < NUM_OF_TX_RING; num++) { if (pAd->TxBufSpace[num].AllocVa) { @@ -631,14 +631,14 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) pAd->TxBufSpace[num].AllocVa, pAd->TxBufSpace[num].AllocPa); } - NdisZeroMemory(&pAd->TxBufSpace[num], sizeof(RTMP_DMABUF)); + NdisZeroMemory(&pAd->TxBufSpace[num], sizeof(struct rt_rtmp_dmabuf)); if (pAd->TxDescRing[num].AllocVa) { RTMP_FreeDescMemory(pAd, pAd->TxDescRing[num].AllocSize, pAd->TxDescRing[num].AllocVa, pAd->TxDescRing[num].AllocPa); } - NdisZeroMemory(&pAd->TxDescRing[num], sizeof(RTMP_DMABUF)); + NdisZeroMemory(&pAd->TxDescRing[num], sizeof(struct rt_rtmp_dmabuf)); } if (pAd->FragFrame.pFragPacket) @@ -667,7 +667,7 @@ Return Value: Note: ======================================================================== */ -void RT28XXDMADisable(IN RTMP_ADAPTER * pAd) +void RT28XXDMADisable(struct rt_rtmp_adapter *pAd) { WPDMA_GLO_CFG_STRUC GloCfg; @@ -691,7 +691,7 @@ Return Value: Note: ======================================================================== */ -void RT28XXDMAEnable(IN RTMP_ADAPTER * pAd) +void RT28XXDMAEnable(struct rt_rtmp_adapter *pAd) { WPDMA_GLO_CFG_STRUC GloCfg; int i = 0; @@ -721,7 +721,7 @@ void RT28XXDMAEnable(IN RTMP_ADAPTER * pAd) } -BOOLEAN AsicCheckCommanOk(IN PRTMP_ADAPTER pAd, u8 Command) +BOOLEAN AsicCheckCommanOk(struct rt_rtmp_adapter *pAd, u8 Command) { u32 CmdStatus = 0, CID = 0, i; u32 ThisCIDMask = 0; @@ -794,7 +794,7 @@ Return Value: Note: ======================================================================== */ -void RT28xx_UpdateBeaconToAsic(IN RTMP_ADAPTER * pAd, +void RT28xx_UpdateBeaconToAsic(struct rt_rtmp_adapter *pAd, int apidx, unsigned long FrameLen, unsigned long UpdatePos) { @@ -853,7 +853,7 @@ void RT28xx_UpdateBeaconToAsic(IN RTMP_ADAPTER * pAd, } -void RT28xxPciStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) +void RT28xxPciStaAsicForceWakeup(struct rt_rtmp_adapter *pAd, IN BOOLEAN bFromTx) { AUTO_WAKEUP_STRUC AutoWakeupCfg; @@ -888,7 +888,7 @@ void RT28xxPciStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) /* add by johnli, RF power sequence setup, load RF normal operation-mode setup */ if ((IS_RT3090(pAd) || IS_RT3572(pAd) || IS_RT3390(pAd)) && IS_VERSION_AFTER_F(pAd)) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; if (pChipOps->AsicReverseRfFromSleepMode) pChipOps-> @@ -949,7 +949,7 @@ void RT28xxPciStaAsicForceWakeup(IN PRTMP_ADAPTER pAd, IN BOOLEAN bFromTx) DBGPRINT(RT_DEBUG_TRACE, ("<=======RT28xxPciStaAsicForceWakeup\n")); } -void RT28xxPciStaAsicSleepThenAutoWakeup(IN PRTMP_ADAPTER pAd, +void RT28xxPciStaAsicSleepThenAutoWakeup(struct rt_rtmp_adapter *pAd, u16 TbttNumToNextWakeUp) { BOOLEAN brc; @@ -1020,7 +1020,7 @@ void PsPollWakeExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; unsigned long flags; DBGPRINT(RT_DEBUG_TRACE, ("-->PsPollWakeExec \n")); @@ -1048,8 +1048,8 @@ void RadioOnExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; WPDMA_GLO_CFG_STRUC DmaCfg; BOOLEAN Cancelled; @@ -1164,7 +1164,7 @@ void RadioOnExec(void *SystemSpecific1, ========================================================================== */ -BOOLEAN RT28xxPciAsicRadioOn(IN PRTMP_ADAPTER pAd, u8 Level) +BOOLEAN RT28xxPciAsicRadioOn(struct rt_rtmp_adapter *pAd, u8 Level) { /*WPDMA_GLO_CFG_STRUC DmaCfg; */ BOOLEAN Cancelled; @@ -1223,7 +1223,7 @@ BOOLEAN RT28xxPciAsicRadioOn(IN PRTMP_ADAPTER pAd, u8 Level) /* add by johnli, RF power sequence setup, load RF normal operation-mode setup */ if ((IS_RT3090(pAd) || IS_RT3572(pAd) || IS_RT3390(pAd))) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; if (pChipOps->AsicReverseRfFromSleepMode) pChipOps->AsicReverseRfFromSleepMode(pAd); @@ -1286,7 +1286,7 @@ BOOLEAN RT28xxPciAsicRadioOn(IN PRTMP_ADAPTER pAd, u8 Level) ========================================================================== */ -BOOLEAN RT28xxPciAsicRadioOff(IN PRTMP_ADAPTER pAd, +BOOLEAN RT28xxPciAsicRadioOff(struct rt_rtmp_adapter *pAd, u8 Level, u16 TbttNumToNextWakeUp) { WPDMA_GLO_CFG_STRUC DmaCfg; @@ -1497,7 +1497,7 @@ BOOLEAN RT28xxPciAsicRadioOff(IN PRTMP_ADAPTER pAd, return TRUE; } -void RT28xxPciMlmeRadioOn(IN PRTMP_ADAPTER pAd) +void RT28xxPciMlmeRadioOn(struct rt_rtmp_adapter *pAd) { if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RADIO_OFF)) return; @@ -1546,7 +1546,7 @@ void RT28xxPciMlmeRadioOn(IN PRTMP_ADAPTER pAd) } } -void RT28xxPciMlmeRadioOFF(IN PRTMP_ADAPTER pAd) +void RT28xxPciMlmeRadioOFF(struct rt_rtmp_adapter *pAd) { BOOLEAN brc = TRUE; @@ -1556,9 +1556,9 @@ void RT28xxPciMlmeRadioOFF(IN PRTMP_ADAPTER pAd) /* Link down first if any association exists */ if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)) { if (INFRA_ON(pAd) || ADHOC_ON(pAd)) { - MLME_DISASSOC_REQ_STRUCT DisReq; - MLME_QUEUE_ELEM *pMsgElem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_disassoc_req DisReq; + struct rt_mlme_queue_elem *pMsgElem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (pMsgElem) { @@ -1569,10 +1569,10 @@ void RT28xxPciMlmeRadioOFF(IN PRTMP_ADAPTER pAd) pMsgElem->Machine = ASSOC_STATE_MACHINE; pMsgElem->MsgType = MT2_MLME_DISASSOC_REQ; pMsgElem->MsgLen = - sizeof(MLME_DISASSOC_REQ_STRUCT); + sizeof(struct rt_mlme_disassoc_req); NdisMoveMemory(pMsgElem->Msg, &DisReq, sizeof - (MLME_DISASSOC_REQ_STRUCT)); + (struct rt_mlme_disassoc_req)); MlmeDisassocReqAction(pAd, pMsgElem); kfree(pMsgElem); diff --git a/drivers/staging/rt2860/common/cmm_mac_usb.c b/drivers/staging/rt2860/common/cmm_mac_usb.c index 251debb67d7c..010c37c4c724 100644 --- a/drivers/staging/rt2860/common/cmm_mac_usb.c +++ b/drivers/staging/rt2860/common/cmm_mac_usb.c @@ -43,12 +43,12 @@ Return Value: Note: Initialize all receive releated private buffer, include those define - in RTMP_ADAPTER structure and all private data structures. The mahor + in struct rt_rtmp_adapter structure and all private data structures. The mahor work is to allocate buffer for each packet and chain buffer to NDIS packet descriptor. ======================================================================== */ -int NICInitRecv(IN PRTMP_ADAPTER pAd) +int NICInitRecv(struct rt_rtmp_adapter *pAd) { u8 i; int Status = NDIS_STATUS_SUCCESS; @@ -64,7 +64,7 @@ int NICInitRecv(IN PRTMP_ADAPTER pAd) pAd->NextRxBulkInPosition = 0; for (i = 0; i < (RX_RING_SIZE); i++) { - PRX_CONTEXT pRxContext = &(pAd->RxContext[i]); + struct rt_rx_context *pRxContext = &(pAd->RxContext[i]); /*Allocate URB */ pRxContext->pUrb = RTUSB_ALLOC_URB(0); @@ -98,7 +98,7 @@ int NICInitRecv(IN PRTMP_ADAPTER pAd) out1: for (i = 0; i < (RX_RING_SIZE); i++) { - PRX_CONTEXT pRxContext = &(pAd->RxContext[i]); + struct rt_rx_context *pRxContext = &(pAd->RxContext[i]); if (NULL != pRxContext->TransferBuffer) { RTUSB_URB_FREE_BUFFER(pObj->pUsb_Dev, MAX_RXBULK_SIZE, @@ -132,7 +132,7 @@ Return Value: Note: ======================================================================== */ -int NICInitTransmit(IN PRTMP_ADAPTER pAd) +int NICInitTransmit(struct rt_rtmp_adapter *pAd) { #define LM_USB_ALLOC(pObj, Context, TB_Type, BufferSize, Status, msg1, err1, msg2, err2) \ Context->pUrb = RTUSB_ALLOC_URB(0); \ @@ -161,15 +161,15 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) u8 i, acidx; int Status = NDIS_STATUS_SUCCESS; - PTX_CONTEXT pNullContext = &(pAd->NullContext); - PTX_CONTEXT pPsPollContext = &(pAd->PsPollContext); - PTX_CONTEXT pRTSContext = &(pAd->RTSContext); - PTX_CONTEXT pMLMEContext = NULL; -/* PHT_TX_CONTEXT pHTTXContext = NULL; */ + struct rt_tx_context *pNullContext = &(pAd->NullContext); + struct rt_tx_context *pPsPollContext = &(pAd->PsPollContext); + struct rt_tx_context *pRTSContext = &(pAd->RTSContext); + struct rt_tx_context *pMLMEContext = NULL; +/* struct rt_ht_tx_context *pHTTXContext = NULL; */ struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie; void *RingBaseVa; -/* RTMP_TX_RING *pTxRing; */ - RTMP_MGMT_RING *pMgmtRing; +/* struct rt_rtmp_tx_ring *pTxRing; */ + struct rt_rtmp_mgmt_ring *pMgmtRing; DBGPRINT(RT_DEBUG_TRACE, ("--> NICInitTransmit\n")); pObj = pObj; @@ -199,15 +199,15 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) /* TX_RING_SIZE, 4 ACs */ /* */ for (acidx = 0; acidx < 4; acidx++) { - PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]); + struct rt_ht_tx_context *pHTTXContext = &(pAd->TxContext[acidx]); - NdisZeroMemory(pHTTXContext, sizeof(HT_TX_CONTEXT)); + NdisZeroMemory(pHTTXContext, sizeof(struct rt_ht_tx_context)); /*Allocate URB */ - LM_USB_ALLOC(pObj, pHTTXContext, PHTTX_BUFFER, - sizeof(HTTX_BUFFER), Status, + LM_USB_ALLOC(pObj, pHTTXContext, struct rt_httx_buffer *, + sizeof(struct rt_httx_buffer), Status, ("<-- ERROR in Alloc TX TxContext[%d] urb!! \n", acidx), done, - ("<-- ERROR in Alloc TX TxContext[%d] HTTX_BUFFER !! \n", + ("<-- ERROR in Alloc TX TxContext[%d] struct rt_httx_buffer !! \n", acidx), out1); NdisZeroMemory(pHTTXContext->TransferBuffer-> @@ -232,7 +232,7 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) /* Allocate MGMT ring descriptor's memory */ pAd->MgmtDescRing.AllocSize = - MGMT_RING_SIZE * sizeof(TX_CONTEXT); + MGMT_RING_SIZE * sizeof(struct rt_tx_context); os_alloc_mem(pAd, (u8 **) (&pAd->MgmtDescRing.AllocVa), pAd->MgmtDescRing.AllocSize); if (pAd->MgmtDescRing.AllocVa == NULL) { @@ -248,14 +248,14 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) pMgmtRing = &pAd->MgmtRing; for (i = 0; i < MGMT_RING_SIZE; i++) { /* link the pre-allocated Mgmt buffer to MgmtRing.Cell */ - pMgmtRing->Cell[i].AllocSize = sizeof(TX_CONTEXT); + pMgmtRing->Cell[i].AllocSize = sizeof(struct rt_tx_context); pMgmtRing->Cell[i].AllocVa = RingBaseVa; pMgmtRing->Cell[i].pNdisPacket = NULL; pMgmtRing->Cell[i].pNextNdisPacket = NULL; /*Allocate URB for MLMEContext */ pMLMEContext = - (PTX_CONTEXT) pAd->MgmtRing.Cell[i].AllocVa; + (struct rt_tx_context *)pAd->MgmtRing.Cell[i].AllocVa; pMLMEContext->pUrb = RTUSB_ALLOC_URB(0); if (pMLMEContext->pUrb == NULL) { DBGPRINT(RT_DEBUG_ERROR, @@ -274,7 +274,7 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) pMLMEContext->SelfIdx = i; /* Offset to next ring descriptor address */ - RingBaseVa = (u8 *)RingBaseVa + sizeof(TX_CONTEXT); + RingBaseVa = (u8 *)RingBaseVa + sizeof(struct rt_tx_context); } DBGPRINT(RT_DEBUG_TRACE, ("MGMT Ring: total %d entry allocated\n", i)); @@ -289,16 +289,16 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) /* */ for (i = 0; i < BEACON_RING_SIZE; i++) /* 2 */ { - PTX_CONTEXT pBeaconContext = &(pAd->BeaconContext[i]); + struct rt_tx_context *pBeaconContext = &(pAd->BeaconContext[i]); - NdisZeroMemory(pBeaconContext, sizeof(TX_CONTEXT)); + NdisZeroMemory(pBeaconContext, sizeof(struct rt_tx_context)); /*Allocate URB */ - LM_USB_ALLOC(pObj, pBeaconContext, PTX_BUFFER, - sizeof(TX_BUFFER), Status, + LM_USB_ALLOC(pObj, pBeaconContext, struct rt_tx_buffer *, + sizeof(struct rt_tx_buffer), Status, ("<-- ERROR in Alloc TX BeaconContext[%d] urb!! \n", i), out2, - ("<-- ERROR in Alloc TX BeaconContext[%d] TX_BUFFER !! \n", + ("<-- ERROR in Alloc TX BeaconContext[%d] struct rt_tx_buffer !! \n", i), out3); pBeaconContext->pAd = pAd; @@ -310,14 +310,14 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) /* */ /* NullContext */ /* */ - NdisZeroMemory(pNullContext, sizeof(TX_CONTEXT)); + NdisZeroMemory(pNullContext, sizeof(struct rt_tx_context)); /*Allocate URB */ - LM_USB_ALLOC(pObj, pNullContext, PTX_BUFFER, sizeof(TX_BUFFER), + LM_USB_ALLOC(pObj, pNullContext, struct rt_tx_buffer *, sizeof(struct rt_tx_buffer), Status, ("<-- ERROR in Alloc TX NullContext urb!! \n"), out3, - ("<-- ERROR in Alloc TX NullContext TX_BUFFER !! \n"), + ("<-- ERROR in Alloc TX NullContext struct rt_tx_buffer !! \n"), out4); pNullContext->pAd = pAd; @@ -328,14 +328,14 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) /* */ /* RTSContext */ /* */ - NdisZeroMemory(pRTSContext, sizeof(TX_CONTEXT)); + NdisZeroMemory(pRTSContext, sizeof(struct rt_tx_context)); /*Allocate URB */ - LM_USB_ALLOC(pObj, pRTSContext, PTX_BUFFER, sizeof(TX_BUFFER), + LM_USB_ALLOC(pObj, pRTSContext, struct rt_tx_buffer *, sizeof(struct rt_tx_buffer), Status, ("<-- ERROR in Alloc TX RTSContext urb!! \n"), out4, - ("<-- ERROR in Alloc TX RTSContext TX_BUFFER !! \n"), + ("<-- ERROR in Alloc TX RTSContext struct rt_tx_buffer !! \n"), out5); pRTSContext->pAd = pAd; @@ -346,13 +346,13 @@ int NICInitTransmit(IN PRTMP_ADAPTER pAd) /* */ /* PsPollContext */ /* */ - /*NdisZeroMemory(pPsPollContext, sizeof(TX_CONTEXT)); */ + /*NdisZeroMemory(pPsPollContext, sizeof(struct rt_tx_context)); */ /*Allocate URB */ - LM_USB_ALLOC(pObj, pPsPollContext, PTX_BUFFER, - sizeof(TX_BUFFER), Status, + LM_USB_ALLOC(pObj, pPsPollContext, struct rt_tx_buffer *, + sizeof(struct rt_tx_buffer), Status, ("<-- ERROR in Alloc TX PsPollContext urb!! \n"), out5, - ("<-- ERROR in Alloc TX PsPollContext TX_BUFFER !! \n"), + ("<-- ERROR in Alloc TX PsPollContext struct rt_tx_buffer !! \n"), out6); pPsPollContext->pAd = pAd; @@ -371,19 +371,19 @@ done: /* --------------------------- ERROR HANDLE --------------------------- */ out6: - LM_URB_FREE(pObj, pPsPollContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pPsPollContext, sizeof(struct rt_tx_buffer)); out5: - LM_URB_FREE(pObj, pRTSContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pRTSContext, sizeof(struct rt_tx_buffer)); out4: - LM_URB_FREE(pObj, pNullContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pNullContext, sizeof(struct rt_tx_buffer)); out3: for (i = 0; i < BEACON_RING_SIZE; i++) { - PTX_CONTEXT pBeaconContext = &(pAd->BeaconContext[i]); + struct rt_tx_context *pBeaconContext = &(pAd->BeaconContext[i]); if (pBeaconContext) - LM_URB_FREE(pObj, pBeaconContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pBeaconContext, sizeof(struct rt_tx_buffer)); } out2: @@ -391,10 +391,10 @@ out2: pMgmtRing = &pAd->MgmtRing; for (i = 0; i < MGMT_RING_SIZE; i++) { pMLMEContext = - (PTX_CONTEXT) pAd->MgmtRing.Cell[i].AllocVa; + (struct rt_tx_context *)pAd->MgmtRing.Cell[i].AllocVa; if (pMLMEContext) LM_URB_FREE(pObj, pMLMEContext, - sizeof(TX_BUFFER)); + sizeof(struct rt_tx_buffer)); } os_free_mem(pAd, pAd->MgmtDescRing.AllocVa); pAd->MgmtDescRing.AllocVa = NULL; @@ -402,9 +402,9 @@ out2: out1: for (acidx = 0; acidx < 4; acidx++) { - PHT_TX_CONTEXT pTxContext = &(pAd->TxContext[acidx]); + struct rt_ht_tx_context *pTxContext = &(pAd->TxContext[acidx]); if (pTxContext) - LM_URB_FREE(pObj, pTxContext, sizeof(HTTX_BUFFER)); + LM_URB_FREE(pObj, pTxContext, sizeof(struct rt_httx_buffer)); } /* Here we didn't have any pre-allocated memory need to free. */ @@ -428,16 +428,16 @@ Return Value: Note: ======================================================================== */ -int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) +int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd) { -/* COUNTER_802_11 pCounter = &pAd->WlanCounters; */ +/* struct rt_counter_802_11 pCounter = &pAd->WlanCounters; */ int Status; int num; DBGPRINT(RT_DEBUG_TRACE, ("--> RTMPAllocTxRxRingMemory\n")); do { - /* Init the CmdQ and CmdQLock */ + /* Init the struct rt_cmdq and CmdQLock */ NdisAllocateSpinLock(&pAd->CmdQLock); NdisAcquireSpinLock(&pAd->CmdQLock); RTUSBInitializeCmdQ(&pAd->CmdQ); @@ -490,7 +490,7 @@ int RTMPAllocTxRxRingMemory(IN PRTMP_ADAPTER pAd) } while (FALSE); - NdisZeroMemory(&pAd->FragFrame, sizeof(FRAGMENT_FRAME)); + NdisZeroMemory(&pAd->FragFrame, sizeof(struct rt_fragment_frame)); pAd->FragFrame.pFragPacket = RTMP_AllocateFragPacketBuffer(pAd, RX_BUFFER_NORMSIZE); @@ -519,7 +519,7 @@ Return Value: Note: ======================================================================== */ -void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) +void RTMPFreeTxRxRingMemory(struct rt_rtmp_adapter *pAd) { #define LM_URB_FREE(pObj, Context, BufferSize) \ if (NULL != Context->pUrb) { \ @@ -533,45 +533,45 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) Context->TransferBuffer = NULL; } u32 i, acidx; - PTX_CONTEXT pNullContext = &pAd->NullContext; - PTX_CONTEXT pPsPollContext = &pAd->PsPollContext; - PTX_CONTEXT pRTSContext = &pAd->RTSContext; -/* PHT_TX_CONTEXT pHTTXContext; */ + struct rt_tx_context *pNullContext = &pAd->NullContext; + struct rt_tx_context *pPsPollContext = &pAd->PsPollContext; + struct rt_tx_context *pRTSContext = &pAd->RTSContext; +/* struct rt_ht_tx_context *pHTTXContext; */ /*PRTMP_REORDERBUF pReorderBuf; */ struct os_cookie *pObj = (struct os_cookie *)pAd->OS_Cookie; -/* RTMP_TX_RING *pTxRing; */ +/* struct rt_rtmp_tx_ring *pTxRing; */ DBGPRINT(RT_DEBUG_ERROR, ("---> RTMPFreeTxRxRingMemory\n")); pObj = pObj; /* Free all resources for the RECEIVE buffer queue. */ for (i = 0; i < (RX_RING_SIZE); i++) { - PRX_CONTEXT pRxContext = &(pAd->RxContext[i]); + struct rt_rx_context *pRxContext = &(pAd->RxContext[i]); if (pRxContext) LM_URB_FREE(pObj, pRxContext, MAX_RXBULK_SIZE); } /* Free PsPoll frame resource */ - LM_URB_FREE(pObj, pPsPollContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pPsPollContext, sizeof(struct rt_tx_buffer)); /* Free NULL frame resource */ - LM_URB_FREE(pObj, pNullContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pNullContext, sizeof(struct rt_tx_buffer)); /* Free RTS frame resource */ - LM_URB_FREE(pObj, pRTSContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pRTSContext, sizeof(struct rt_tx_buffer)); /* Free beacon frame resource */ for (i = 0; i < BEACON_RING_SIZE; i++) { - PTX_CONTEXT pBeaconContext = &(pAd->BeaconContext[i]); + struct rt_tx_context *pBeaconContext = &(pAd->BeaconContext[i]); if (pBeaconContext) - LM_URB_FREE(pObj, pBeaconContext, sizeof(TX_BUFFER)); + LM_URB_FREE(pObj, pBeaconContext, sizeof(struct rt_tx_buffer)); } /* Free mgmt frame resource */ for (i = 0; i < MGMT_RING_SIZE; i++) { - PTX_CONTEXT pMLMEContext = - (PTX_CONTEXT) pAd->MgmtRing.Cell[i].AllocVa; - /*LM_URB_FREE(pObj, pMLMEContext, sizeof(TX_BUFFER)); */ + struct rt_tx_context *pMLMEContext = + (struct rt_tx_context *)pAd->MgmtRing.Cell[i].AllocVa; + /*LM_URB_FREE(pObj, pMLMEContext, sizeof(struct rt_tx_buffer)); */ if (NULL != pAd->MgmtRing.Cell[i].pNdisPacket) { RTMPFreeNdisPacket(pAd, pAd->MgmtRing.Cell[i].pNdisPacket); @@ -592,9 +592,9 @@ void RTMPFreeTxRxRingMemory(IN PRTMP_ADAPTER pAd) /* Free Tx frame resource */ for (acidx = 0; acidx < 4; acidx++) { - PHT_TX_CONTEXT pHTTXContext = &(pAd->TxContext[acidx]); + struct rt_ht_tx_context *pHTTXContext = &(pAd->TxContext[acidx]); if (pHTTXContext) - LM_URB_FREE(pObj, pHTTXContext, sizeof(HTTX_BUFFER)); + LM_URB_FREE(pObj, pHTTXContext, sizeof(struct rt_httx_buffer)); } if (pAd->FragFrame.pFragPacket) @@ -636,7 +636,7 @@ Return Value: Note: ======================================================================== */ -int RTUSBWriteHWMACAddress(IN PRTMP_ADAPTER pAd) +int RTUSBWriteHWMACAddress(struct rt_rtmp_adapter *pAd) { MAC_DW0_STRUC StaMacReg0; MAC_DW1_STRUC StaMacReg1; @@ -687,7 +687,7 @@ Return Value: Note: ======================================================================== */ -void RT28XXDMADisable(IN RTMP_ADAPTER * pAd) +void RT28XXDMADisable(struct rt_rtmp_adapter *pAd) { /* no use */ } @@ -706,7 +706,7 @@ Return Value: Note: ======================================================================== */ -void RT28XXDMAEnable(IN RTMP_ADAPTER * pAd) +void RT28XXDMAEnable(struct rt_rtmp_adapter *pAd) { WPDMA_GLO_CFG_STRUC GloCfg; USB_DMA_CFG_STRUC UsbCfg; @@ -767,14 +767,14 @@ Return Value: Note: ======================================================================== */ -void RT28xx_UpdateBeaconToAsic(IN RTMP_ADAPTER * pAd, +void RT28xx_UpdateBeaconToAsic(struct rt_rtmp_adapter *pAd, int apidx, unsigned long FrameLen, unsigned long UpdatePos) { u8 *pBeaconFrame = NULL; u8 *ptr; u32 i, padding; - BEACON_SYNC_STRUCT *pBeaconSync = pAd->CommonCfg.pBeaconSync; + struct rt_beacon_sync *pBeaconSync = pAd->CommonCfg.pBeaconSync; u32 longValue; /* u16 shortValue; */ BOOLEAN bBcnReq = FALSE; @@ -849,9 +849,9 @@ void RT28xx_UpdateBeaconToAsic(IN RTMP_ADAPTER * pAd, } -void RTUSBBssBeaconStop(IN RTMP_ADAPTER * pAd) +void RTUSBBssBeaconStop(struct rt_rtmp_adapter *pAd) { - BEACON_SYNC_STRUCT *pBeaconSync; + struct rt_beacon_sync *pBeaconSync; int i, offset; BOOLEAN Cancelled = TRUE; @@ -883,10 +883,10 @@ void RTUSBBssBeaconStop(IN RTMP_ADAPTER * pAd) } } -void RTUSBBssBeaconStart(IN RTMP_ADAPTER * pAd) +void RTUSBBssBeaconStart(struct rt_rtmp_adapter *pAd) { int apidx; - BEACON_SYNC_STRUCT *pBeaconSync; + struct rt_beacon_sync *pBeaconSync; /* LARGE_INTEGER tsfTime, deltaTime; */ pBeaconSync = pAd->CommonCfg.pBeaconSync; @@ -929,17 +929,17 @@ void RTUSBBssBeaconStart(IN RTMP_ADAPTER * pAd) } } -void RTUSBBssBeaconInit(IN RTMP_ADAPTER * pAd) +void RTUSBBssBeaconInit(struct rt_rtmp_adapter *pAd) { - BEACON_SYNC_STRUCT *pBeaconSync; + struct rt_beacon_sync *pBeaconSync; int i; os_alloc_mem(pAd, (u8 **) (&pAd->CommonCfg.pBeaconSync), - sizeof(BEACON_SYNC_STRUCT)); - /*NdisAllocMemory(pAd->CommonCfg.pBeaconSync, sizeof(BEACON_SYNC_STRUCT), MEM_ALLOC_FLAG); */ + sizeof(struct rt_beacon_sync)); + /*NdisAllocMemory(pAd->CommonCfg.pBeaconSync, sizeof(struct rt_beacon_sync), MEM_ALLOC_FLAG); */ if (pAd->CommonCfg.pBeaconSync) { pBeaconSync = pAd->CommonCfg.pBeaconSync; - NdisZeroMemory(pBeaconSync, sizeof(BEACON_SYNC_STRUCT)); + NdisZeroMemory(pBeaconSync, sizeof(struct rt_beacon_sync)); for (i = 0; i < HW_BEACON_MAX_COUNT; i++) { NdisZeroMemory(pBeaconSync->BeaconBuf[i], HW_BEACON_OFFSET); @@ -954,9 +954,9 @@ void RTUSBBssBeaconInit(IN RTMP_ADAPTER * pAd) } } -void RTUSBBssBeaconExit(IN RTMP_ADAPTER * pAd) +void RTUSBBssBeaconExit(struct rt_rtmp_adapter *pAd) { - BEACON_SYNC_STRUCT *pBeaconSync; + struct rt_beacon_sync *pBeaconSync; BOOLEAN Cancelled = TRUE; int i; @@ -1001,7 +1001,7 @@ void BeaconUpdateExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; LARGE_INTEGER tsfTime_a; /*, tsfTime_b, deltaTime_exp, deltaTime_ab; */ u32 delta, delta2MS, period2US, remain, remain_low, remain_high; /* BOOLEAN positive; */ @@ -1038,9 +1038,9 @@ void BeaconUpdateExec(void *SystemSpecific1, * 2870 Radio on/off Related functions. * ********************************************************************/ -void RT28xxUsbMlmeRadioOn(IN PRTMP_ADAPTER pAd) +void RT28xxUsbMlmeRadioOn(struct rt_rtmp_adapter *pAd) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; DBGPRINT(RT_DEBUG_TRACE, ("RT28xxUsbMlmeRadioOn()\n")); @@ -1068,7 +1068,7 @@ void RT28xxUsbMlmeRadioOn(IN PRTMP_ADAPTER pAd) RTMPSetLED(pAd, LED_RADIO_ON); } -void RT28xxUsbMlmeRadioOFF(IN PRTMP_ADAPTER pAd) +void RT28xxUsbMlmeRadioOFF(struct rt_rtmp_adapter *pAd) { WPDMA_GLO_CFG_STRUC GloCfg; u32 Value, i; @@ -1080,14 +1080,14 @@ void RT28xxUsbMlmeRadioOFF(IN PRTMP_ADAPTER pAd) /* Clear PMKID cache. */ pAd->StaCfg.SavedPMKNum = 0; - RTMPZeroMemory(pAd->StaCfg.SavedPMK, (PMKID_NO * sizeof(BSSID_INFO))); + RTMPZeroMemory(pAd->StaCfg.SavedPMK, (PMKID_NO * sizeof(struct rt_bssid_info))); /* Link down first if any association exists */ if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)) { if (INFRA_ON(pAd) || ADHOC_ON(pAd)) { - MLME_DISASSOC_REQ_STRUCT DisReq; - MLME_QUEUE_ELEM *pMsgElem = - (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), + struct rt_mlme_disassoc_req DisReq; + struct rt_mlme_queue_elem *pMsgElem = + (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem), MEM_ALLOC_FLAG); if (pMsgElem) { @@ -1098,10 +1098,10 @@ void RT28xxUsbMlmeRadioOFF(IN PRTMP_ADAPTER pAd) pMsgElem->Machine = ASSOC_STATE_MACHINE; pMsgElem->MsgType = MT2_MLME_DISASSOC_REQ; pMsgElem->MsgLen = - sizeof(MLME_DISASSOC_REQ_STRUCT); + sizeof(struct rt_mlme_disassoc_req); NdisMoveMemory(pMsgElem->Msg, &DisReq, sizeof - (MLME_DISASSOC_REQ_STRUCT)); + (struct rt_mlme_disassoc_req)); MlmeDisassocReqAction(pAd, pMsgElem); kfree(pMsgElem); diff --git a/drivers/staging/rt2860/common/cmm_sanity.c b/drivers/staging/rt2860/common/cmm_sanity.c index 16cc31af3259..556e3d06b88b 100644 --- a/drivers/staging/rt2860/common/cmm_sanity.c +++ b/drivers/staging/rt2860/common/cmm_sanity.c @@ -58,14 +58,14 @@ extern u8 WPS_OUI[]; ========================================================================== */ -BOOLEAN MlmeAddBAReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeAddBAReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr2) { - PMLME_ADDBA_REQ_STRUCT pInfo; + struct rt_mlme_addba_req *pInfo; - pInfo = (MLME_ADDBA_REQ_STRUCT *) Msg; + pInfo = (struct rt_mlme_addba_req *)Msg; - if ((MsgLen != sizeof(MLME_ADDBA_REQ_STRUCT))) { + if ((MsgLen != sizeof(struct rt_mlme_addba_req))) { DBGPRINT(RT_DEBUG_TRACE, ("MlmeAddBAReqSanity fail - message lenght not correct.\n")); return FALSE; @@ -97,12 +97,12 @@ BOOLEAN MlmeAddBAReqSanity(IN PRTMP_ADAPTER pAd, ========================================================================== */ -BOOLEAN MlmeDelBAReqSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned long MsgLen) +BOOLEAN MlmeDelBAReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen) { - MLME_DELBA_REQ_STRUCT *pInfo; - pInfo = (MLME_DELBA_REQ_STRUCT *) Msg; + struct rt_mlme_delba_req *pInfo; + pInfo = (struct rt_mlme_delba_req *)Msg; - if ((MsgLen != sizeof(MLME_DELBA_REQ_STRUCT))) { + if ((MsgLen != sizeof(struct rt_mlme_delba_req))) { DBGPRINT(RT_DEBUG_ERROR, ("MlmeDelBAReqSanity fail - message lenght not correct.\n")); return FALSE; @@ -131,14 +131,14 @@ BOOLEAN MlmeDelBAReqSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned long MsgLe return TRUE; } -BOOLEAN PeerAddBAReqActionSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerAddBAReqActionSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pAddr2) { - PFRAME_802_11 pFrame = (PFRAME_802_11) pMsg; - PFRAME_ADDBA_REQ pAddFrame; - pAddFrame = (PFRAME_ADDBA_REQ) (pMsg); - if (MsgLen < (sizeof(FRAME_ADDBA_REQ))) { + struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *) pMsg; + struct rt_frame_addba_req * pAddFrame; + pAddFrame = (struct rt_frame_addba_req *) (pMsg); + if (MsgLen < (sizeof(struct rt_frame_addba_req))) { DBGPRINT(RT_DEBUG_ERROR, ("PeerAddBAReqActionSanity: ADDBA Request frame length size = %ld incorrect\n", MsgLen)); @@ -171,13 +171,13 @@ BOOLEAN PeerAddBAReqActionSanity(IN PRTMP_ADAPTER pAd, return TRUE; } -BOOLEAN PeerAddBARspActionSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerAddBARspActionSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen) { - PFRAME_ADDBA_RSP pAddFrame; + struct rt_frame_addba_rsp * pAddFrame; - pAddFrame = (PFRAME_ADDBA_RSP) (pMsg); - if (MsgLen < (sizeof(FRAME_ADDBA_RSP))) { + pAddFrame = (struct rt_frame_addba_rsp *) (pMsg); + if (MsgLen < (sizeof(struct rt_frame_addba_rsp))) { DBGPRINT(RT_DEBUG_ERROR, ("PeerAddBARspActionSanity: ADDBA Response frame length size = %ld incorrect\n", MsgLen)); @@ -206,18 +206,18 @@ BOOLEAN PeerAddBARspActionSanity(IN PRTMP_ADAPTER pAd, } -BOOLEAN PeerDelBAActionSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerDelBAActionSanity(struct rt_rtmp_adapter *pAd, u8 Wcid, void * pMsg, unsigned long MsgLen) { - /*PFRAME_802_11 pFrame = (PFRAME_802_11)pMsg; */ - PFRAME_DELBA_REQ pDelFrame; - if (MsgLen != (sizeof(FRAME_DELBA_REQ))) + /*struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *)pMsg; */ + struct rt_frame_delba_req * pDelFrame; + if (MsgLen != (sizeof(struct rt_frame_delba_req))) return FALSE; if (Wcid >= MAX_LEN_OF_MAC_TABLE) return FALSE; - pDelFrame = (PFRAME_DELBA_REQ) (pMsg); + pDelFrame = (struct rt_frame_delba_req *) (pMsg); *(u16 *) (&pDelFrame->DelbaParm) = cpu2le16(*(u16 *) (&pDelFrame->DelbaParm)); @@ -240,14 +240,14 @@ BOOLEAN PeerDelBAActionSanity(IN PRTMP_ADAPTER pAd, ========================================================================== */ -BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned long MsgLen, u8 MsgChannel, u8 *pAddr2, u8 *pBssid, char Ssid[], u8 * pSsidLen, u8 * pBssType, u16 * pBeaconPeriod, u8 * pChannel, u8 * pNewChannel, OUT LARGE_INTEGER * pTimestamp, OUT CF_PARM * pCfParm, u16 * pAtimWin, u16 * pCapabilityInfo, u8 * pErp, u8 * pDtimCount, u8 * pDtimPeriod, u8 * pBcastFlag, u8 * pMessageToMe, u8 SupRate[], u8 * pSupRateLen, u8 ExtRate[], u8 * pExtRateLen, u8 * pCkipFlag, u8 * pAironetCellPowerLimit, OUT PEDCA_PARM pEdcaParm, OUT PQBSS_LOAD_PARM pQbssLoad, OUT PQOS_CAPABILITY_PARM pQosCapability, unsigned long * pRalinkIe, u8 * pHtCapabilityLen, u8 * pPreNHtCapabilityLen, OUT HT_CAPABILITY_IE * pHtCapability, u8 * AddHtInfoLen, OUT ADD_HT_INFO_IE * AddHtInfo, u8 * NewExtChannelOffset, /* Ht extension channel offset(above or below) */ +BOOLEAN PeerBeaconAndProbeRspSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 MsgChannel, u8 *pAddr2, u8 *pBssid, char Ssid[], u8 * pSsidLen, u8 * pBssType, u16 * pBeaconPeriod, u8 * pChannel, u8 * pNewChannel, OUT LARGE_INTEGER * pTimestamp, struct rt_cf_parm * pCfParm, u16 * pAtimWin, u16 * pCapabilityInfo, u8 * pErp, u8 * pDtimCount, u8 * pDtimPeriod, u8 * pBcastFlag, u8 * pMessageToMe, u8 SupRate[], u8 * pSupRateLen, u8 ExtRate[], u8 * pExtRateLen, u8 * pCkipFlag, u8 * pAironetCellPowerLimit, struct rt_edca_parm *pEdcaParm, struct rt_qbss_load_parm *pQbssLoad, struct rt_qos_capability_parm *pQosCapability, unsigned long * pRalinkIe, u8 * pHtCapabilityLen, u8 * pPreNHtCapabilityLen, struct rt_ht_capability_ie * pHtCapability, u8 * AddHtInfoLen, struct rt_add_ht_info_ie * AddHtInfo, u8 * NewExtChannelOffset, /* Ht extension channel offset(above or below) */ u16 * LengthVIE, - OUT PNDIS_802_11_VARIABLE_IEs pVIE) + struct rt_ndis_802_11_variable_ies *pVIE) { u8 *Ptr; u8 TimLen; - PFRAME_802_11 pFrame; - PEID_STRUCT pEid; + struct rt_frame_802_11 * pFrame; + struct rt_eid * pEid; u8 SubType; u8 Sanity; /*u8 ECWMin, ECWMax; */ @@ -284,7 +284,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l pEdcaParm->bValid = FALSE; /* default: no IE_EDCA_PARAMETER found */ pQosCapability->bValid = FALSE; /* default: no IE_QOS_CAPABILITY found */ - pFrame = (PFRAME_802_11) Msg; + pFrame = (struct rt_frame_802_11 *) Msg; /* get subtype from header */ SubType = (u8)pFrame->Hdr.FC.SubType; @@ -320,7 +320,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l else *pBssType = BSS_ADHOC; - pEid = (PEID_STRUCT) Ptr; + pEid = (struct rt_eid *) Ptr; /* get variable fields from payload and advance the pointer */ while ((Length + 2 + pEid->Len) <= MsgLen) { @@ -374,7 +374,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l if (pEid->Len >= SIZE_HT_CAP_IE) /*Note: allow extension.!! */ { NdisMoveMemory(pHtCapability, pEid->Octet, - sizeof(HT_CAPABILITY_IE)); + sizeof(struct rt_ht_capability_ie)); *pHtCapabilityLen = SIZE_HT_CAP_IE; /* Nnow we only support 26 bytes. */ *(u16 *) (&pHtCapability->HtCapInfo) = @@ -401,11 +401,11 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l break; case IE_ADD_HT: - if (pEid->Len >= sizeof(ADD_HT_INFO_IE)) { + if (pEid->Len >= sizeof(struct rt_add_ht_info_ie)) { /* This IE allows extension, but we can ignore extra bytes beyond our knowledge , so only */ - /* copy first sizeof(ADD_HT_INFO_IE) */ + /* copy first sizeof(struct rt_add_ht_info_ie) */ NdisMoveMemory(AddHtInfo, pEid->Octet, - sizeof(ADD_HT_INFO_IE)); + sizeof(struct rt_add_ht_info_ie)); *AddHtInfoLen = SIZE_ADD_HT_INFO_IE; CtrlChannel = AddHtInfo->ControlChan; @@ -516,14 +516,14 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l if ((pEid->Octet[3] == OUI_BROADCOM_HT) && (pEid->Len >= 30)) { { - NdisMoveMemory(pHtCapability, &pEid->Octet[4], sizeof(HT_CAPABILITY_IE)); + NdisMoveMemory(pHtCapability, &pEid->Octet[4], sizeof(struct rt_ht_capability_ie)); *pHtCapabilityLen = SIZE_HT_CAP_IE; // Nnow we only support 26 bytes. } } if ((pEid->Octet[3] == OUI_BROADCOM_HT) && (pEid->Len >= 26)) { { - NdisMoveMemory(AddHtInfo, &pEid->Octet[4], sizeof(ADD_HT_INFO_IE)); + NdisMoveMemory(AddHtInfo, &pEid->Octet[4], sizeof(struct rt_add_ht_info_ie)); *AddHtInfoLen = SIZE_ADD_HT_INFO_IE; // Nnow we only support 26 bytes. } } @@ -552,7 +552,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l NdisMoveMemory(pHtCapability, &pEid->Octet[4], sizeof - (HT_CAPABILITY_IE)); + (struct rt_ht_capability_ie)); *pPreNHtCapabilityLen = SIZE_HT_CAP_IE; } @@ -560,7 +560,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l && (pEid->Len >= 26)) { NdisMoveMemory(AddHtInfo, &pEid->Octet[4], - sizeof(ADD_HT_INFO_IE)); + sizeof(struct rt_add_ht_info_ie)); *AddHtInfoLen = SIZE_ADD_HT_INFO_IE; } } else if (NdisEqualMemory(pEid->Octet, WPA_OUI, 4)) { @@ -696,7 +696,7 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l } Length = Length + 2 + pEid->Len; /* Eid[1] + Len[1]+ content[Len] */ - pEid = (PEID_STRUCT) ((u8 *) pEid + 2 + pEid->Len); + pEid = (struct rt_eid *) ((u8 *) pEid + 2 + pEid->Len); } /* For some 11a AP. it did not have the channel EID, patch here */ @@ -730,16 +730,16 @@ BOOLEAN PeerBeaconAndProbeRspSanity(IN PRTMP_ADAPTER pAd, void * Msg, unsigned l TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -BOOLEAN MlmeScanReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeScanReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 * pBssType, char Ssid[], u8 * pSsidLen, u8 * pScanType) { - MLME_SCAN_REQ_STRUCT *Info; + struct rt_mlme_scan_req *Info; - Info = (MLME_SCAN_REQ_STRUCT *) (Msg); + Info = (struct rt_mlme_scan_req *)(Msg); *pBssType = Info->BssType; *pSsidLen = Info->SsidLen; NdisMoveMemory(Ssid, Info->Ssid, *pSsidLen); @@ -757,7 +757,7 @@ BOOLEAN MlmeScanReqSanity(IN PRTMP_ADAPTER pAd, } /* IRQL = DISPATCH_LEVEL */ -u8 ChannelSanity(IN PRTMP_ADAPTER pAd, u8 channel) +u8 ChannelSanity(struct rt_rtmp_adapter *pAd, u8 channel) { int i; @@ -779,12 +779,12 @@ u8 ChannelSanity(IN PRTMP_ADAPTER pAd, u8 channel) ========================================================================== */ -BOOLEAN PeerDeauthSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerDeauthSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr2, u16 * pReason) { - PFRAME_802_11 pFrame = (PFRAME_802_11) Msg; + struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *) Msg; COPY_MAC_ADDR(pAddr2, pFrame->Hdr.Addr2); NdisMoveMemory(pReason, &pFrame->Octet[0], 2); @@ -803,7 +803,7 @@ BOOLEAN PeerDeauthSanity(IN PRTMP_ADAPTER pAd, ========================================================================== */ -BOOLEAN PeerAuthSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerAuthSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr, @@ -811,7 +811,7 @@ BOOLEAN PeerAuthSanity(IN PRTMP_ADAPTER pAd, u16 * pSeq, u16 * pStatus, char * pChlgText) { - PFRAME_802_11 pFrame = (PFRAME_802_11) Msg; + struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *) Msg; COPY_MAC_ADDR(pAddr, pFrame->Hdr.Addr2); NdisMoveMemory(pAlg, &pFrame->Octet[0], 2); @@ -853,15 +853,15 @@ BOOLEAN PeerAuthSanity(IN PRTMP_ADAPTER pAd, TRUE if all parameters are OK, FALSE otherwise ========================================================================== */ -BOOLEAN MlmeAuthReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeAuthReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr, unsigned long * pTimeout, u16 * pAlg) { - MLME_AUTH_REQ_STRUCT *pInfo; + struct rt_mlme_auth_req *pInfo; - pInfo = (MLME_AUTH_REQ_STRUCT *) Msg; + pInfo = (struct rt_mlme_auth_req *)Msg; COPY_MAC_ADDR(pAddr, pInfo->Addr); *pTimeout = pInfo->Timeout; *pAlg = pInfo->Alg; @@ -887,16 +887,16 @@ BOOLEAN MlmeAuthReqSanity(IN PRTMP_ADAPTER pAd, ========================================================================== */ -BOOLEAN MlmeAssocReqSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeAssocReqSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pApAddr, u16 * pCapabilityInfo, unsigned long * pTimeout, u16 * pListenIntv) { - MLME_ASSOC_REQ_STRUCT *pInfo; + struct rt_mlme_assoc_req *pInfo; - pInfo = (MLME_ASSOC_REQ_STRUCT *) Msg; + pInfo = (struct rt_mlme_assoc_req *)Msg; *pTimeout = pInfo->Timeout; /* timeout */ COPY_MAC_ADDR(pApAddr, pInfo->Addr); /* AP address */ *pCapabilityInfo = pInfo->CapabilityInfo; /* capability info */ @@ -916,12 +916,12 @@ BOOLEAN MlmeAssocReqSanity(IN PRTMP_ADAPTER pAd, ========================================================================== */ -BOOLEAN PeerDisassocSanity(IN PRTMP_ADAPTER pAd, +BOOLEAN PeerDisassocSanity(struct rt_rtmp_adapter *pAd, void * Msg, unsigned long MsgLen, u8 *pAddr2, u16 * pReason) { - PFRAME_802_11 pFrame = (PFRAME_802_11) Msg; + struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *) Msg; COPY_MAC_ADDR(pAddr2, pFrame->Hdr.Addr2); NdisMoveMemory(pReason, &pFrame->Octet[0], 2); @@ -946,7 +946,7 @@ BOOLEAN PeerDisassocSanity(IN PRTMP_ADAPTER pAd, ======================================================================== */ -NDIS_802_11_NETWORK_TYPE NetworkTypeInUseSanity(IN PBSS_ENTRY pBss) +NDIS_802_11_NETWORK_TYPE NetworkTypeInUseSanity(struct rt_bss_entry *pBss) { NDIS_802_11_NETWORK_TYPE NetWorkType; u8 rate, i; @@ -1012,15 +1012,15 @@ NDIS_802_11_NETWORK_TYPE NetworkTypeInUseSanity(IN PBSS_ENTRY pBss) FALSE otherwise ========================================================================== */ -BOOLEAN PeerWpaMessageSanity(IN PRTMP_ADAPTER pAd, - IN PEAPOL_PACKET pMsg, +BOOLEAN PeerWpaMessageSanity(struct rt_rtmp_adapter *pAd, + struct rt_eapol_packet * pMsg, unsigned long MsgLen, - u8 MsgType, IN MAC_TABLE_ENTRY * pEntry) + u8 MsgType, struct rt_mac_table_entry *pEntry) { u8 mic[LEN_KEY_DESC_MIC], digest[80], KEYDATA[MAX_LEN_OF_RSNIE]; BOOLEAN bReplayDiff = FALSE; BOOLEAN bWPA2 = FALSE; - KEY_INFO EapolKeyInfo; + struct rt_key_info EapolKeyInfo; u8 GroupKeyIndex = 0; NdisZeroMemory(mic, sizeof(mic)); @@ -1029,7 +1029,7 @@ BOOLEAN PeerWpaMessageSanity(IN PRTMP_ADAPTER pAd, NdisZeroMemory((u8 *)& EapolKeyInfo, sizeof(EapolKeyInfo)); NdisMoveMemory((u8 *)& EapolKeyInfo, - (u8 *)& pMsg->KeyDesc.KeyInfo, sizeof(KEY_INFO)); + (u8 *)& pMsg->KeyDesc.KeyInfo, sizeof(struct rt_key_info)); *((u16 *) & EapolKeyInfo) = cpu2le16(*((u16 *) & EapolKeyInfo)); diff --git a/drivers/staging/rt2860/common/cmm_sync.c b/drivers/staging/rt2860/common/cmm_sync.c index 2d7f36a3e62c..f84194da47bc 100644 --- a/drivers/staging/rt2860/common/cmm_sync.c +++ b/drivers/staging/rt2860/common/cmm_sync.c @@ -105,13 +105,13 @@ u8 BaSizeArray[4] = { 8, 16, 32, 64 }; ========================================================================== */ -void BuildChannelList(IN PRTMP_ADAPTER pAd) +void BuildChannelList(struct rt_rtmp_adapter *pAd) { u8 i, j, index = 0, num = 0; u8 *pChannelList = NULL; NdisZeroMemory(pAd->ChannelList, - MAX_NUM_OF_CHANNELS * sizeof(CHANNEL_TX_POWER)); + MAX_NUM_OF_CHANNELS * sizeof(struct rt_channel_tx_power)); /* if not 11a-only mode, channel list starts from 2.4Ghz band */ if ((pAd->CommonCfg.PhyMode != PHY_11A) @@ -122,63 +122,63 @@ void BuildChannelList(IN PRTMP_ADAPTER pAd) case REGION_0_BG_BAND: /* 1 -11 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_0_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_0_SIZE); index += BG_BAND_REGION_0_SIZE; break; case REGION_1_BG_BAND: /* 1 - 13 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_1_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_1_SIZE); index += BG_BAND_REGION_1_SIZE; break; case REGION_2_BG_BAND: /* 10 - 11 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_2_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_2_SIZE); index += BG_BAND_REGION_2_SIZE; break; case REGION_3_BG_BAND: /* 10 - 13 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_3_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_3_SIZE); index += BG_BAND_REGION_3_SIZE; break; case REGION_4_BG_BAND: /* 14 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_4_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_4_SIZE); index += BG_BAND_REGION_4_SIZE; break; case REGION_5_BG_BAND: /* 1 - 14 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_5_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_5_SIZE); index += BG_BAND_REGION_5_SIZE; break; case REGION_6_BG_BAND: /* 3 - 9 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_6_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_6_SIZE); index += BG_BAND_REGION_6_SIZE; break; case REGION_7_BG_BAND: /* 5 - 13 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_7_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_7_SIZE); index += BG_BAND_REGION_7_SIZE; break; case REGION_31_BG_BAND: /* 1 - 14 */ NdisMoveMemory(&pAd->ChannelList[index], &pAd->TxPower[BG_BAND_REGION_31_START], - sizeof(CHANNEL_TX_POWER) * + sizeof(struct rt_channel_tx_power) * BG_BAND_REGION_31_SIZE); index += BG_BAND_REGION_31_SIZE; break; @@ -315,7 +315,7 @@ void BuildChannelList(IN PRTMP_ADAPTER pAd) + i], &pAd->TxPower[j], sizeof - (CHANNEL_TX_POWER)); + (struct rt_channel_tx_power)); } for (j = 0; j < 15; j++) { if (pChannelList[i] == RadarCh[j]) @@ -359,7 +359,7 @@ void BuildChannelList(IN PRTMP_ADAPTER pAd) ========================================================================== */ -u8 FirstChannel(IN PRTMP_ADAPTER pAd) +u8 FirstChannel(struct rt_rtmp_adapter *pAd) { return pAd->ChannelList[0].Channel; } @@ -375,7 +375,7 @@ u8 FirstChannel(IN PRTMP_ADAPTER pAd) return 0 if no more next channel ========================================================================== */ -u8 NextChannel(IN PRTMP_ADAPTER pAd, u8 channel) +u8 NextChannel(struct rt_rtmp_adapter *pAd, u8 channel) { int i; u8 next_channel = 0; @@ -408,7 +408,7 @@ u8 NextChannel(IN PRTMP_ADAPTER pAd, u8 channel) the minimum value or next lower value. ========================================================================== */ -void ChangeToCellPowerLimit(IN PRTMP_ADAPTER pAd, +void ChangeToCellPowerLimit(struct rt_rtmp_adapter *pAd, u8 AironetCellPowerLimit) { /*valud 0xFF means that hasn't found power limit information */ @@ -435,7 +435,7 @@ void ChangeToCellPowerLimit(IN PRTMP_ADAPTER pAd, } -char ConvertToRssi(IN PRTMP_ADAPTER pAd, char Rssi, u8 RssiNumber) +char ConvertToRssi(struct rt_rtmp_adapter *pAd, char Rssi, u8 RssiNumber) { u8 RssiOffset, LNAGain; @@ -469,15 +469,15 @@ char ConvertToRssi(IN PRTMP_ADAPTER pAd, char Rssi, u8 RssiNumber) Scan next channel ========================================================================== */ -void ScanNextChannel(IN PRTMP_ADAPTER pAd) +void ScanNextChannel(struct rt_rtmp_adapter *pAd) { - HEADER_802_11 Hdr80211; + struct rt_header_802_11 Hdr80211; u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen = 0; u8 SsidLen = 0, ScanType = pAd->MlmeAux.ScanType, BBPValue = 0; u16 Status; - PHEADER_802_11 pHdr80211; + struct rt_header_802_11 * pHdr80211; u32 ScanTimeIn5gChannel = SHORT_CHANNEL_TIME; { @@ -522,7 +522,7 @@ void ScanNextChannel(IN PRTMP_ADAPTER pAd) MlmeAllocateMemory(pAd, (void *)& pOutBuffer); if (NStatus == NDIS_STATUS_SUCCESS) { - pHdr80211 = (PHEADER_802_11) pOutBuffer; + pHdr80211 = (struct rt_header_802_11 *) pOutBuffer; MgtMacHeaderInit(pAd, pHdr80211, SUBTYPE_NULL_FUNC, 1, pAd->CommonCfg.Bssid, @@ -535,7 +535,7 @@ void ScanNextChannel(IN PRTMP_ADAPTER pAd) /* Send using priority queue */ MiniportMMRequest(pAd, 0, pOutBuffer, sizeof - (HEADER_802_11)); + (struct rt_header_802_11)); DBGPRINT(RT_DEBUG_TRACE, ("MlmeScanReqAction -- Send PSM Data frame\n")); MlmeFreeMemory(pAd, pOutBuffer); @@ -642,7 +642,7 @@ void ScanNextChannel(IN PRTMP_ADAPTER pAd) MgtMacHeaderInit(pAd, &Hdr80211, SUBTYPE_PROBE_REQ, 0, BROADCAST_ADDR, BROADCAST_ADDR); MakeOutgoingFrame(pOutBuffer, &FrameLen, - sizeof(HEADER_802_11), &Hdr80211, 1, + sizeof(struct rt_header_802_11), &Hdr80211, 1, &SsidIe, 1, &SsidLen, SsidLen, pAd->MlmeAux.Ssid, 1, &SupRateIe, 1, &pAd->CommonCfg.SupRateLen, @@ -700,12 +700,12 @@ void ScanNextChannel(IN PRTMP_ADAPTER pAd) } } -void MgtProbReqMacHeaderInit(IN PRTMP_ADAPTER pAd, - IN OUT PHEADER_802_11 pHdr80211, +void MgtProbReqMacHeaderInit(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHdr80211, u8 SubType, u8 ToDs, u8 *pDA, u8 *pBssid) { - NdisZeroMemory(pHdr80211, sizeof(HEADER_802_11)); + NdisZeroMemory(pHdr80211, sizeof(struct rt_header_802_11)); pHdr80211->FC.Type = BTYPE_MGMT; pHdr80211->FC.SubType = SubType; diff --git a/drivers/staging/rt2860/common/cmm_tkip.c b/drivers/staging/rt2860/common/cmm_tkip.c index 0ac9d744a86d..7a2a48eb8e51 100644 --- a/drivers/staging/rt2860/common/cmm_tkip.c +++ b/drivers/staging/rt2860/common/cmm_tkip.c @@ -115,7 +115,7 @@ u32 Tkip_Sbox_Upper[256] = { /* */ /* Expanded IV for TKIP function. */ /* */ -typedef struct PACKED _IV_CONTROL_ { +struct PACKED rt_tkip_iv { union PACKED { struct PACKED { u8 rc0; @@ -136,7 +136,7 @@ typedef struct PACKED _IV_CONTROL_ { } IV16; unsigned long IV32; -} TKIP_IV, *PTKIP_IV; +}; /* ======================================================================== @@ -214,7 +214,7 @@ void RTMPTkipPutUInt32(IN u8 *pDst, unsigned long val) ======================================================================== */ -void RTMPTkipSetMICKey(IN PTKIP_KEY_INFO pTkip, u8 *pMICKey) +void RTMPTkipSetMICKey(struct rt_tkip_key_info *pTkip, u8 *pMICKey) { /* Set the key */ pTkip->K0 = RTMPTkipGetUInt32(pMICKey); @@ -245,7 +245,7 @@ void RTMPTkipSetMICKey(IN PTKIP_KEY_INFO pTkip, u8 *pMICKey) ======================================================================== */ -void RTMPTkipAppendByte(IN PTKIP_KEY_INFO pTkip, u8 uChar) +void RTMPTkipAppendByte(struct rt_tkip_key_info *pTkip, u8 uChar) { /* Append the byte to our word-sized buffer */ pTkip->M |= (uChar << (8 * pTkip->nBytesInM)); @@ -289,7 +289,7 @@ void RTMPTkipAppendByte(IN PTKIP_KEY_INFO pTkip, u8 uChar) ======================================================================== */ -void RTMPTkipAppend(IN PTKIP_KEY_INFO pTkip, u8 *pSrc, u32 nBytes) +void RTMPTkipAppend(struct rt_tkip_key_info *pTkip, u8 *pSrc, u32 nBytes) { /* This is simple */ while (nBytes > 0) { @@ -316,7 +316,7 @@ void RTMPTkipAppend(IN PTKIP_KEY_INFO pTkip, u8 *pSrc, u32 nBytes) the MIC Value is store in pAd->PrivateInfo.MIC ======================================================================== */ -void RTMPTkipGetMIC(IN PTKIP_KEY_INFO pTkip) +void RTMPTkipGetMIC(struct rt_tkip_key_info *pTkip) { /* Append the minimum padding */ RTMPTkipAppendByte(pTkip, 0x5a); @@ -355,17 +355,17 @@ void RTMPTkipGetMIC(IN PTKIP_KEY_INFO pTkip) ======================================================================== */ -void RTMPInitTkipEngine(IN PRTMP_ADAPTER pAd, +void RTMPInitTkipEngine(struct rt_rtmp_adapter *pAd, u8 *pKey, u8 KeyId, u8 *pTA, u8 *pMICKey, u8 *pTSC, unsigned long *pIV16, unsigned long *pIV32) { - TKIP_IV tkipIv; + struct rt_tkip_iv tkipIv; /* Prepare 8 bytes TKIP encapsulation for MPDU */ - NdisZeroMemory(&tkipIv, sizeof(TKIP_IV)); + NdisZeroMemory(&tkipIv, sizeof(struct rt_tkip_iv)); tkipIv.IV16.field.rc0 = *(pTSC + 1); tkipIv.IV16.field.rc1 = (tkipIv.IV16.field.rc0 | 0x20) & 0x7f; tkipIv.IV16.field.rc2 = *pTSC; @@ -399,7 +399,7 @@ void RTMPInitTkipEngine(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPInitMICEngine(IN PRTMP_ADAPTER pAd, +void RTMPInitMICEngine(struct rt_rtmp_adapter *pAd, u8 *pKey, u8 *pDA, u8 *pSA, u8 UserPriority, u8 *pMICKey) @@ -440,7 +440,7 @@ void RTMPInitMICEngine(IN PRTMP_ADAPTER pAd, ======================================================================== */ -BOOLEAN RTMPTkipCompareMICValue(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPTkipCompareMICValue(struct rt_rtmp_adapter *pAd, u8 *pSrc, u8 *pDA, u8 *pSA, @@ -500,12 +500,12 @@ BOOLEAN RTMPTkipCompareMICValue(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPCalculateMICValue(IN PRTMP_ADAPTER pAd, +void RTMPCalculateMICValue(struct rt_rtmp_adapter *pAd, void *pPacket, u8 *pEncap, - IN PCIPHER_KEY pKey, u8 apidx) + struct rt_cipher_key *pKey, u8 apidx) { - PACKET_INFO PacketInfo; + struct rt_packet_info PacketInfo; u8 *pSrcBufVA; u32 SrcBufLen; u8 *pSrc; @@ -698,10 +698,10 @@ void RTMPTkipMixKey(u8 * key, u8 * ta, unsigned long pnl, /* Least significant 1 /* TRUE: Success! */ /* FALSE: Decrypt Error! */ /* */ -BOOLEAN RTMPSoftDecryptTKIP(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPSoftDecryptTKIP(struct rt_rtmp_adapter *pAd, u8 *pData, unsigned long DataByteCnt, - u8 UserPriority, IN PCIPHER_KEY pWpaKey) + u8 UserPriority, struct rt_cipher_key *pWpaKey) { u8 KeyID; u32 HeaderLen; @@ -726,7 +726,7 @@ BOOLEAN RTMPSoftDecryptTKIP(IN PRTMP_ADAPTER pAd, unsigned long pnh; /* Most significant 32 bits of PN */ u32 num_blocks; u32 payload_remainder; - ARCFOURCONTEXT ArcFourContext; + struct rt_arcfourcontext ArcFourContext; u32 crc32 = 0; u32 trailfcs = 0; u8 MIC[8]; diff --git a/drivers/staging/rt2860/common/cmm_wep.c b/drivers/staging/rt2860/common/cmm_wep.c index 05a921410caa..c72835504ecb 100644 --- a/drivers/staging/rt2860/common/cmm_wep.c +++ b/drivers/staging/rt2860/common/cmm_wep.c @@ -135,7 +135,7 @@ u8 WEPKEY[] = { ======================================================================== */ -void RTMPInitWepEngine(IN PRTMP_ADAPTER pAd, +void RTMPInitWepEngine(struct rt_rtmp_adapter *pAd, u8 *pKey, u8 KeyId, u8 KeyLen, IN u8 *pDest) { @@ -184,7 +184,7 @@ void RTMPInitWepEngine(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPEncryptData(IN PRTMP_ADAPTER pAd, +void RTMPEncryptData(struct rt_rtmp_adapter *pAd, u8 *pSrc, u8 *pDest, u32 Len) { pAd->PrivateInfo.FCSCRC32 = @@ -211,9 +211,9 @@ void RTMPEncryptData(IN PRTMP_ADAPTER pAd, ======================================================================== */ -BOOLEAN RTMPSoftDecryptWEP(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPSoftDecryptWEP(struct rt_rtmp_adapter *pAd, u8 *pData, - unsigned long DataByteCnt, IN PCIPHER_KEY pGroupKey) + unsigned long DataByteCnt, struct rt_cipher_key *pGroupKey) { u32 trailfcs; u32 crc32; @@ -255,10 +255,10 @@ BOOLEAN RTMPSoftDecryptWEP(IN PRTMP_ADAPTER pAd, ======================================================================== Routine Description: - The Stream Cipher Encryption Algorithm "ARCFOUR" initialize + The Stream Cipher Encryption Algorithm "struct rt_arcfour" initialize Arguments: - Ctx Pointer to ARCFOUR CONTEXT (SBOX) + Ctx Pointer to struct rt_arcfour CONTEXT (SBOX) pKey Pointer to the WEP KEY KeyLen Indicate the length fo the WEP KEY @@ -271,7 +271,7 @@ BOOLEAN RTMPSoftDecryptWEP(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void ARCFOUR_INIT(IN PARCFOURCONTEXT Ctx, u8 *pKey, u32 KeyLen) +void ARCFOUR_INIT(struct rt_arcfourcontext *Ctx, u8 *pKey, u32 KeyLen) { u8 t, u; u32 keyindex; @@ -301,19 +301,19 @@ void ARCFOUR_INIT(IN PARCFOURCONTEXT Ctx, u8 *pKey, u32 KeyLen) ======================================================================== Routine Description: - Get bytes from ARCFOUR CONTEXT (S-BOX) + Get bytes from struct rt_arcfour CONTEXT (S-BOX) Arguments: - Ctx Pointer to ARCFOUR CONTEXT (SBOX) + Ctx Pointer to struct rt_arcfour CONTEXT (SBOX) Return Value: - u8 - the value of the ARCFOUR CONTEXT (S-BOX) + u8 - the value of the struct rt_arcfour CONTEXT (S-BOX) Note: ======================================================================== */ -u8 ARCFOUR_BYTE(IN PARCFOURCONTEXT Ctx) +u8 ARCFOUR_BYTE(struct rt_arcfourcontext *Ctx) { u32 x; u32 y; @@ -341,7 +341,7 @@ u8 ARCFOUR_BYTE(IN PARCFOURCONTEXT Ctx) The Stream Cipher Decryption Algorithm Arguments: - Ctx Pointer to ARCFOUR CONTEXT (SBOX) + Ctx Pointer to struct rt_arcfour CONTEXT (SBOX) pDest Pointer to the Destination pSrc Pointer to the Source data Len Indicate the length of the Source data @@ -353,7 +353,7 @@ u8 ARCFOUR_BYTE(IN PARCFOURCONTEXT Ctx) ======================================================================== */ -void ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx, +void ARCFOUR_DECRYPT(struct rt_arcfourcontext *Ctx, u8 *pDest, u8 *pSrc, u32 Len) { u32 i; @@ -369,7 +369,7 @@ void ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx, The Stream Cipher Encryption Algorithm Arguments: - Ctx Pointer to ARCFOUR CONTEXT (SBOX) + Ctx Pointer to struct rt_arcfour CONTEXT (SBOX) pDest Pointer to the Destination pSrc Pointer to the Source data Len Indicate the length of the Source dta @@ -383,7 +383,7 @@ void ARCFOUR_DECRYPT(IN PARCFOURCONTEXT Ctx, ======================================================================== */ -void ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx, +void ARCFOUR_ENCRYPT(struct rt_arcfourcontext *Ctx, u8 *pDest, u8 *pSrc, u32 Len) { u32 i; @@ -399,7 +399,7 @@ void ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx, The Stream Cipher Encryption Algorithm which conform to the special requirement to encrypt GTK. Arguments: - Ctx Pointer to ARCFOUR CONTEXT (SBOX) + Ctx Pointer to struct rt_arcfour CONTEXT (SBOX) pDest Pointer to the Destination pSrc Pointer to the Source data Len Indicate the length of the Source dta @@ -407,7 +407,7 @@ void ARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx, ======================================================================== */ -void WPAARCFOUR_ENCRYPT(IN PARCFOURCONTEXT Ctx, +void WPAARCFOUR_ENCRYPT(struct rt_arcfourcontext *Ctx, u8 *pDest, u8 *pSrc, u32 Len) { u32 i; @@ -463,7 +463,7 @@ u32 RTMP_CALC_FCS32(u32 Fcs, u8 *Cp, int Len) ======================================================================== */ -void RTMPSetICV(IN PRTMP_ADAPTER pAd, u8 *pDest) +void RTMPSetICV(struct rt_rtmp_adapter *pAd, u8 *pDest) { pAd->PrivateInfo.FCSCRC32 ^= 0xffffffff; /* complement */ pAd->PrivateInfo.FCSCRC32 = cpu2le32(pAd->PrivateInfo.FCSCRC32); diff --git a/drivers/staging/rt2860/common/cmm_wpa.c b/drivers/staging/rt2860/common/cmm_wpa.c index 6daccd94e1e1..7b51be0e8dd3 100644 --- a/drivers/staging/rt2860/common/cmm_wpa.c +++ b/drivers/staging/rt2860/common/cmm_wpa.c @@ -54,30 +54,30 @@ u8 OUI_WPA2_8021X_AKM[4] = { 0x00, 0x0F, 0xAC, 0x01 }; u8 OUI_WPA2_PSK_AKM[4] = { 0x00, 0x0F, 0xAC, 0x02 }; u8 OUI_WPA2_WEP104[4] = { 0x00, 0x0F, 0xAC, 0x05 }; -static void ConstructEapolKeyData(IN PMAC_TABLE_ENTRY pEntry, +static void ConstructEapolKeyData(struct rt_mac_table_entry *pEntry, u8 GroupKeyWepStatus, u8 keyDescVer, u8 MsgType, u8 DefaultKeyIdx, u8 * GTK, u8 * RSNIE, - u8 RSNIE_LEN, OUT PEAPOL_PACKET pMsg); + u8 RSNIE_LEN, struct rt_eapol_packet * pMsg); static void CalculateMIC(u8 KeyDescVer, - u8 * PTK, OUT PEAPOL_PACKET pMsg); + u8 * PTK, struct rt_eapol_packet * pMsg); -static void WpaEAPPacketAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +static void WpaEAPPacketAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); -static void WpaEAPOLASFAlertAction(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem); +static void WpaEAPOLASFAlertAction(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem); -static void WpaEAPOLLogoffAction(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem); +static void WpaEAPOLLogoffAction(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem); -static void WpaEAPOLStartAction(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem); +static void WpaEAPOLStartAction(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem); -static void WpaEAPOLKeyAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); +static void WpaEAPOLKeyAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem); /* ========================================================================== @@ -87,8 +87,8 @@ static void WpaEAPOLKeyAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem); S - pointer to the association state machine ========================================================================== */ -void WpaStateMachineInit(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, OUT STATE_MACHINE_FUNC Trans[]) +void WpaStateMachineInit(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, OUT STATE_MACHINE_FUNC Trans[]) { StateMachineInit(S, (STATE_MACHINE_FUNC *) Trans, MAX_WPA_PTK_STATE, MAX_WPA_MSG, (STATE_MACHINE_FUNC) Drop, WPA_PTK, @@ -115,15 +115,15 @@ void WpaStateMachineInit(IN PRTMP_ADAPTER pAd, Return: ========================================================================== */ -void WpaEAPPacketAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void WpaEAPPacketAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } -void WpaEAPOLASFAlertAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void WpaEAPOLASFAlertAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } -void WpaEAPOLLogoffAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void WpaEAPOLLogoffAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } @@ -134,14 +134,14 @@ void WpaEAPOLLogoffAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Return: ========================================================================== */ -void WpaEAPOLStartAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void WpaEAPOLStartAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - MAC_TABLE_ENTRY *pEntry; - PHEADER_802_11 pHeader; + struct rt_mac_table_entry *pEntry; + struct rt_header_802_11 * pHeader; DBGPRINT(RT_DEBUG_TRACE, ("WpaEAPOLStartAction ===> \n")); - pHeader = (PHEADER_802_11) Elem->Msg; + pHeader = (struct rt_header_802_11 *) Elem->Msg; /*For normaol PSK, we enqueue an EAPOL-Start command to trigger the process. */ if (Elem->MsgLen == 6) @@ -187,23 +187,23 @@ void WpaEAPOLStartAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Return: ========================================================================== */ -void WpaEAPOLKeyAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void WpaEAPOLKeyAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - MAC_TABLE_ENTRY *pEntry; - PHEADER_802_11 pHeader; - PEAPOL_PACKET pEapol_packet; - KEY_INFO peerKeyInfo; + struct rt_mac_table_entry *pEntry; + struct rt_header_802_11 * pHeader; + struct rt_eapol_packet * pEapol_packet; + struct rt_key_info peerKeyInfo; DBGPRINT(RT_DEBUG_TRACE, ("WpaEAPOLKeyAction ===>\n")); - pHeader = (PHEADER_802_11) Elem->Msg; + pHeader = (struct rt_header_802_11 *) Elem->Msg; pEapol_packet = - (PEAPOL_PACKET) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; + (struct rt_eapol_packet *) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; NdisZeroMemory((u8 *)& peerKeyInfo, sizeof(peerKeyInfo)); NdisMoveMemory((u8 *)& peerKeyInfo, (u8 *)& pEapol_packet->KeyDesc.KeyInfo, - sizeof(KEY_INFO)); + sizeof(struct rt_key_info)); hex_dump("Received Eapol frame", (unsigned char *)pEapol_packet, (Elem->MsgLen - LENGTH_802_11 - LENGTH_802_1_H)); @@ -357,8 +357,8 @@ void WpaEAPOLKeyAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ======================================================================== */ -void RTMPToWirelessSta(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +void RTMPToWirelessSta(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 *pHeader802_3, u32 HdrLen, u8 *pData, u32 DataLen, IN BOOLEAN bClearFrame) @@ -433,11 +433,11 @@ void RTMPToWirelessSta(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void WPAStart4WayHS(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, unsigned long TimeInterval) +void WPAStart4WayHS(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, unsigned long TimeInterval) { u8 Header802_3[14]; - EAPOL_PACKET EAPOLPKT; + struct rt_eapol_packet EAPOLPKT; u8 *pBssid = NULL; u8 group_cipher = Ndis802_11WEPDisabled; @@ -472,7 +472,7 @@ void WPAStart4WayHS(IN PRTMP_ADAPTER pAd, /* Construct EAPoL message - Pairwise Msg 1 */ /* EAPOL-Key(0,0,1,0,P,0,0,ANonce,0,DataKD_M1) */ - NdisZeroMemory(&EAPOLPKT, sizeof(EAPOL_PACKET)); + NdisZeroMemory(&EAPOLPKT, sizeof(struct rt_eapol_packet)); ConstructEapolMsg(pEntry, group_cipher, EAPOL_PAIR_MSG_1, 0, /* Default key index */ pEntry->ANonce, NULL, /* TxRSC */ NULL, /* GTK */ @@ -516,14 +516,14 @@ void WPAStart4WayHS(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void PeerPairMsg1Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem) +void PeerPairMsg1Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem) { u8 PTK[80]; u8 Header802_3[14]; - PEAPOL_PACKET pMsg1; + struct rt_eapol_packet * pMsg1; u32 MsgLen; - EAPOL_PACKET EAPOLPKT; + struct rt_eapol_packet EAPOLPKT; u8 *pCurrentAddr = NULL; u8 *pmk_ptr = NULL; u8 group_cipher = Ndis802_11WEPDisabled; @@ -537,7 +537,7 @@ void PeerPairMsg1Action(IN PRTMP_ADAPTER pAd, if (Elem->MsgLen < (LENGTH_802_11 + LENGTH_802_1_H + LENGTH_EAPOL_H + - sizeof(KEY_DESCRIPTER) - MAX_LEN_OF_RSNIE - 2)) + sizeof(struct rt_key_descripter) - MAX_LEN_OF_RSNIE - 2)) return; { @@ -549,7 +549,7 @@ void PeerPairMsg1Action(IN PRTMP_ADAPTER pAd, } /* Store the received frame */ - pMsg1 = (PEAPOL_PACKET) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; + pMsg1 = (struct rt_eapol_packet *) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; MsgLen = Elem->MsgLen - LENGTH_802_11 - LENGTH_802_1_H; /* Sanity Check peer Pairwise message 1 - Replay Counter */ @@ -585,7 +585,7 @@ void PeerPairMsg1Action(IN PRTMP_ADAPTER pAd, /* Construct EAPoL message - Pairwise Msg 2 */ /* EAPOL-Key(0,1,0,0,P,0,0,SNonce,MIC,DataKD_M2) */ - NdisZeroMemory(&EAPOLPKT, sizeof(EAPOL_PACKET)); + NdisZeroMemory(&EAPOLPKT, sizeof(struct rt_eapol_packet)); ConstructEapolMsg(pEntry, group_cipher, EAPOL_PAIR_MSG_2, 0, /* DefaultKeyIdx */ pEntry->SNonce, NULL, /* TxRsc */ NULL, /* GTK */ @@ -609,14 +609,14 @@ void PeerPairMsg1Action(IN PRTMP_ADAPTER pAd, Return: ========================================================================== */ -void PeerPairMsg2Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem) +void PeerPairMsg2Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem) { u8 PTK[80]; BOOLEAN Cancelled; - PHEADER_802_11 pHeader; - EAPOL_PACKET EAPOLPKT; - PEAPOL_PACKET pMsg2; + struct rt_header_802_11 * pHeader; + struct rt_eapol_packet EAPOLPKT; + struct rt_eapol_packet * pMsg2; u32 MsgLen; u8 Header802_3[LENGTH_802_3]; u8 TxTsc[6]; @@ -635,7 +635,7 @@ void PeerPairMsg2Action(IN PRTMP_ADAPTER pAd, if (Elem->MsgLen < (LENGTH_802_11 + LENGTH_802_1_H + LENGTH_EAPOL_H + - sizeof(KEY_DESCRIPTER) - MAX_LEN_OF_RSNIE - 2)) + sizeof(struct rt_key_descripter) - MAX_LEN_OF_RSNIE - 2)) return; /* check Entry in valid State */ @@ -643,10 +643,10 @@ void PeerPairMsg2Action(IN PRTMP_ADAPTER pAd, return; /* pointer to 802.11 header */ - pHeader = (PHEADER_802_11) Elem->Msg; + pHeader = (struct rt_header_802_11 *) Elem->Msg; /* skip 802.11_header(24-byte) and LLC_header(8) */ - pMsg2 = (PEAPOL_PACKET) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; + pMsg2 = (struct rt_eapol_packet *) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; MsgLen = Elem->MsgLen - LENGTH_802_11 - LENGTH_802_1_H; /* Store SNonce */ @@ -678,7 +678,7 @@ void PeerPairMsg2Action(IN PRTMP_ADAPTER pAd, ADD_ONE_To_64BIT_VAR(pEntry->R_Counter); /* Construct EAPoL message - Pairwise Msg 3 */ - NdisZeroMemory(&EAPOLPKT, sizeof(EAPOL_PACKET)); + NdisZeroMemory(&EAPOLPKT, sizeof(struct rt_eapol_packet)); ConstructEapolMsg(pEntry, group_cipher, EAPOL_PAIR_MSG_3, @@ -724,13 +724,13 @@ void PeerPairMsg2Action(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem) +void PeerPairMsg3Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem) { - PHEADER_802_11 pHeader; + struct rt_header_802_11 * pHeader; u8 Header802_3[14]; - EAPOL_PACKET EAPOLPKT; - PEAPOL_PACKET pMsg3; + struct rt_eapol_packet EAPOLPKT; + struct rt_eapol_packet * pMsg3; u32 MsgLen; u8 *pCurrentAddr = NULL; u8 group_cipher = Ndis802_11WEPDisabled; @@ -742,7 +742,7 @@ void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, if (Elem->MsgLen < (LENGTH_802_11 + LENGTH_802_1_H + LENGTH_EAPOL_H + - sizeof(KEY_DESCRIPTER) - MAX_LEN_OF_RSNIE - 2)) + sizeof(struct rt_key_descripter) - MAX_LEN_OF_RSNIE - 2)) return; { @@ -752,8 +752,8 @@ void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, } /* Record 802.11 header & the received EAPOL packet Msg3 */ - pHeader = (PHEADER_802_11) Elem->Msg; - pMsg3 = (PEAPOL_PACKET) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; + pHeader = (struct rt_header_802_11 *) Elem->Msg; + pMsg3 = (struct rt_eapol_packet *) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; MsgLen = Elem->MsgLen - LENGTH_802_11 - LENGTH_802_1_H; /* Sanity Check peer Pairwise message 3 - Replay Counter, MIC, RSNIE */ @@ -771,7 +771,7 @@ void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, return; } /* Construct EAPoL message - Pairwise Msg 4 */ - NdisZeroMemory(&EAPOLPKT, sizeof(EAPOL_PACKET)); + NdisZeroMemory(&EAPOLPKT, sizeof(struct rt_eapol_packet)); ConstructEapolMsg(pEntry, group_cipher, EAPOL_PAIR_MSG_4, 0, /* group key index not used in message 4 */ NULL, /* Nonce not used in message 4 */ NULL, /* TxRSC not used in message 4 */ @@ -784,14 +784,14 @@ void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, /* Update pairwise key */ { - PCIPHER_KEY pSharedKey; + struct rt_cipher_key *pSharedKey; pSharedKey = &pAd->SharedKey[BSS0][0]; NdisMoveMemory(pAd->StaCfg.PTK, pEntry->PTK, LEN_PTK); /* Prepare pair-wise key information into shared key table */ - NdisZeroMemory(pSharedKey, sizeof(CIPHER_KEY)); + NdisZeroMemory(pSharedKey, sizeof(struct rt_cipher_key)); pSharedKey->KeyLen = LEN_TKIP_EK; NdisMoveMemory(pSharedKey->Key, &pAd->StaCfg.PTK[32], LEN_TKIP_EK); @@ -809,7 +809,7 @@ void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, else pSharedKey->CipherAlg = CIPHER_NONE; - /* Update these related information to MAC_TABLE_ENTRY */ + /* Update these related information to struct rt_mac_table_entry */ pEntry = &pAd->MacTab.Content[BSSID_WCID]; NdisMoveMemory(pEntry->PairwiseKey.Key, &pAd->StaCfg.PTK[32], LEN_TKIP_EK); @@ -871,11 +871,11 @@ void PeerPairMsg3Action(IN PRTMP_ADAPTER pAd, Return: ========================================================================== */ -void PeerPairMsg4Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem) +void PeerPairMsg4Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem) { - PEAPOL_PACKET pMsg4; - PHEADER_802_11 pHeader; + struct rt_eapol_packet * pMsg4; + struct rt_header_802_11 * pHeader; u32 MsgLen; BOOLEAN Cancelled; u8 group_cipher = Ndis802_11WEPDisabled; @@ -888,18 +888,18 @@ void PeerPairMsg4Action(IN PRTMP_ADAPTER pAd, if (Elem->MsgLen < (LENGTH_802_11 + LENGTH_802_1_H + LENGTH_EAPOL_H + - sizeof(KEY_DESCRIPTER) - MAX_LEN_OF_RSNIE - 2)) + sizeof(struct rt_key_descripter) - MAX_LEN_OF_RSNIE - 2)) break; if (pEntry->WpaState < AS_PTKINIT_NEGOTIATING) break; /* pointer to 802.11 header */ - pHeader = (PHEADER_802_11) Elem->Msg; + pHeader = (struct rt_header_802_11 *) Elem->Msg; /* skip 802.11_header(24-byte) and LLC_header(8) */ pMsg4 = - (PEAPOL_PACKET) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; + (struct rt_eapol_packet *) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; MsgLen = Elem->MsgLen - LENGTH_802_11 - LENGTH_802_1_H; /* Sanity Check peer Pairwise message 4 - Replay Counter, MIC */ @@ -908,7 +908,7 @@ void PeerPairMsg4Action(IN PRTMP_ADAPTER pAd, break; /* 3. uses the MLME.SETKEYS.request to configure PTK into MAC */ - NdisZeroMemory(&pEntry->PairwiseKey, sizeof(CIPHER_KEY)); + NdisZeroMemory(&pEntry->PairwiseKey, sizeof(struct rt_cipher_key)); /* reset IVEIV in Asic */ AsicUpdateWCIDIVEIV(pAd, pEntry->Aid, 1, 0); @@ -990,11 +990,11 @@ void PeerPairMsg4Action(IN PRTMP_ADAPTER pAd, ========================================================================== */ -void WPAStart2WayGroupHS(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry) +void WPAStart2WayGroupHS(struct rt_rtmp_adapter *pAd, struct rt_mac_table_entry *pEntry) { u8 Header802_3[14]; u8 TxTsc[6]; - EAPOL_PACKET EAPOLPKT; + struct rt_eapol_packet EAPOLPKT; u8 group_cipher = Ndis802_11WEPDisabled; u8 default_key = 0; u8 *gnonce_ptr = NULL; @@ -1011,7 +1011,7 @@ void WPAStart2WayGroupHS(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry) ADD_ONE_To_64BIT_VAR(pEntry->R_Counter); /* Construct EAPoL message - Group Msg 1 */ - NdisZeroMemory(&EAPOLPKT, sizeof(EAPOL_PACKET)); + NdisZeroMemory(&EAPOLPKT, sizeof(struct rt_eapol_packet)); ConstructEapolMsg(pEntry, group_cipher, EAPOL_GROUP_MSG_1, @@ -1052,12 +1052,12 @@ void WPAStart2WayGroupHS(IN PRTMP_ADAPTER pAd, IN MAC_TABLE_ENTRY * pEntry) ======================================================================== */ -void PeerGroupMsg1Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, IN MLME_QUEUE_ELEM * Elem) +void PeerGroupMsg1Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_mlme_queue_elem *Elem) { u8 Header802_3[14]; - EAPOL_PACKET EAPOLPKT; - PEAPOL_PACKET pGroup; + struct rt_eapol_packet EAPOLPKT; + struct rt_eapol_packet * pGroup; u32 MsgLen; BOOLEAN Cancelled; u8 default_key = 0; @@ -1076,7 +1076,7 @@ void PeerGroupMsg1Action(IN PRTMP_ADAPTER pAd, } /* Process Group Message 1 frame. skip 802.11 header(24) & LLC_SNAP header(8) */ - pGroup = (PEAPOL_PACKET) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; + pGroup = (struct rt_eapol_packet *) & Elem->Msg[LENGTH_802_11 + LENGTH_802_1_H]; MsgLen = Elem->MsgLen - LENGTH_802_11 - LENGTH_802_1_H; /* Sanity Check peer group message 1 - Replay Counter, MIC, RSNIE */ @@ -1092,7 +1092,7 @@ void PeerGroupMsg1Action(IN PRTMP_ADAPTER pAd, LEN_KEY_DESC_REPLAY); /* Construct EAPoL message - Group Msg 2 */ - NdisZeroMemory(&EAPOLPKT, sizeof(EAPOL_PACKET)); + NdisZeroMemory(&EAPOLPKT, sizeof(struct rt_eapol_packet)); ConstructEapolMsg(pEntry, group_cipher, EAPOL_GROUP_MSG_2, default_key, NULL, /* Nonce not used */ NULL, /* TxRSC not used */ NULL, /* GTK not used */ @@ -1131,14 +1131,14 @@ void PeerGroupMsg1Action(IN PRTMP_ADAPTER pAd, Return: ========================================================================== */ -void PeerGroupMsg2Action(IN PRTMP_ADAPTER pAd, - IN MAC_TABLE_ENTRY * pEntry, +void PeerGroupMsg2Action(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, void * Msg, u32 MsgLen) { u32 Len; u8 *pData; BOOLEAN Cancelled; - PEAPOL_PACKET pMsg2; + struct rt_eapol_packet * pMsg2; u8 group_cipher = Ndis802_11WEPDisabled; DBGPRINT(RT_DEBUG_TRACE, ("===> PeerGroupMsg2Action \n")); @@ -1148,7 +1148,7 @@ void PeerGroupMsg2Action(IN PRTMP_ADAPTER pAd, break; if (MsgLen < - (LENGTH_802_1_H + LENGTH_EAPOL_H + sizeof(KEY_DESCRIPTER) - + (LENGTH_802_1_H + LENGTH_EAPOL_H + sizeof(struct rt_key_descripter) - MAX_LEN_OF_RSNIE - 2)) break; @@ -1156,7 +1156,7 @@ void PeerGroupMsg2Action(IN PRTMP_ADAPTER pAd, break; pData = (u8 *)Msg; - pMsg2 = (PEAPOL_PACKET) (pData + LENGTH_802_1_H); + pMsg2 = (struct rt_eapol_packet *) (pData + LENGTH_802_1_H); Len = MsgLen - LENGTH_802_1_H; /* Sanity Check peer group message 2 - Replay Counter, MIC */ @@ -1399,7 +1399,7 @@ int PasswordHash(char *password, u8 *ssid, int ssidlength, u8 *output) ======================================================================== */ -void WpaDerivePTK(IN PRTMP_ADAPTER pAd, +void WpaDerivePTK(struct rt_rtmp_adapter *pAd, u8 * PMK, u8 * ANonce, u8 * AA, @@ -1478,7 +1478,7 @@ void WpaDerivePTK(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void GenRandom(IN PRTMP_ADAPTER pAd, u8 * macAddr, u8 * random) +void GenRandom(struct rt_rtmp_adapter *pAd, u8 * macAddr, u8 * random) { int i, curr; u8 local[80], KeyCounter[32]; @@ -1537,7 +1537,7 @@ void GenRandom(IN PRTMP_ADAPTER pAd, u8 * macAddr, u8 * random) ======================================================================== */ -static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, +static void RTMPMakeRsnIeCipher(struct rt_rtmp_adapter *pAd, u8 ElementID, u32 WepStatus, IN BOOLEAN bMixCipher, @@ -1550,7 +1550,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, /* decide WPA2 or WPA1 */ if (ElementID == Wpa2Ie) { - RSNIE2 *pRsnie_cipher = (RSNIE2 *) pRsnIe; + struct rt_rsnie2 *pRsnie_cipher = (struct rt_rsnie2 *)pRsnIe; /* Assign the verson as 1 */ pRsnie_cipher->version = 1; @@ -1562,7 +1562,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, pRsnie_cipher->ucount = 1; NdisMoveMemory(pRsnie_cipher->ucast[0].oui, OUI_WPA2_TKIP, 4); - *rsn_len = sizeof(RSNIE2); + *rsn_len = sizeof(struct rt_rsnie2); break; /* AES mode */ @@ -1576,7 +1576,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, pRsnie_cipher->ucount = 1; NdisMoveMemory(pRsnie_cipher->ucast[0].oui, OUI_WPA2_CCMP, 4); - *rsn_len = sizeof(RSNIE2); + *rsn_len = sizeof(struct rt_rsnie2); break; /* TKIP-AES mix mode */ @@ -1602,7 +1602,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, } pRsnie_cipher->ucount = PairwiseCnt; - *rsn_len = sizeof(RSNIE2) + (4 * (PairwiseCnt - 1)); + *rsn_len = sizeof(struct rt_rsnie2) + (4 * (PairwiseCnt - 1)); break; } @@ -1625,7 +1625,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, pRsnie_cipher->version = cpu2le16(pRsnie_cipher->version); pRsnie_cipher->ucount = cpu2le16(pRsnie_cipher->ucount); } else { - RSNIE *pRsnie_cipher = (RSNIE *) pRsnIe; + struct rt_rsnie *pRsnie_cipher = (struct rt_rsnie *)pRsnIe; /* Assign OUI and version */ NdisMoveMemory(pRsnie_cipher->oui, OUI_WPA_VERSION, 4); @@ -1638,7 +1638,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, pRsnie_cipher->ucount = 1; NdisMoveMemory(pRsnie_cipher->ucast[0].oui, OUI_WPA_TKIP, 4); - *rsn_len = sizeof(RSNIE); + *rsn_len = sizeof(struct rt_rsnie); break; /* AES mode */ @@ -1652,7 +1652,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, pRsnie_cipher->ucount = 1; NdisMoveMemory(pRsnie_cipher->ucast[0].oui, OUI_WPA_CCMP, 4); - *rsn_len = sizeof(RSNIE); + *rsn_len = sizeof(struct rt_rsnie); break; /* TKIP-AES mix mode */ @@ -1678,7 +1678,7 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, } pRsnie_cipher->ucount = PairwiseCnt; - *rsn_len = sizeof(RSNIE) + (4 * (PairwiseCnt - 1)); + *rsn_len = sizeof(struct rt_rsnie) + (4 * (PairwiseCnt - 1)); break; } @@ -1722,16 +1722,16 @@ static void RTMPMakeRsnIeCipher(IN PRTMP_ADAPTER pAd, ======================================================================== */ -static void RTMPMakeRsnIeAKM(IN PRTMP_ADAPTER pAd, +static void RTMPMakeRsnIeAKM(struct rt_rtmp_adapter *pAd, u8 ElementID, u32 AuthMode, u8 apidx, u8 *pRsnIe, u8 * rsn_len) { - RSNIE_AUTH *pRsnie_auth; + struct rt_rsnie_auth *pRsnie_auth; u8 AkmCnt = 1; /* default as 1 */ - pRsnie_auth = (RSNIE_AUTH *) (pRsnIe + (*rsn_len)); + pRsnie_auth = (struct rt_rsnie_auth *) (pRsnIe + (*rsn_len)); /* decide WPA2 or WPA1 */ if (ElementID == Wpa2Ie) { @@ -1781,7 +1781,7 @@ static void RTMPMakeRsnIeAKM(IN PRTMP_ADAPTER pAd, pRsnie_auth->acount = cpu2le16(pRsnie_auth->acount); /* update current RSNIE length */ - (*rsn_len) += (sizeof(RSNIE_AUTH) + (4 * (AkmCnt - 1))); + (*rsn_len) += (sizeof(struct rt_rsnie_auth) + (4 * (AkmCnt - 1))); } @@ -1803,7 +1803,7 @@ static void RTMPMakeRsnIeAKM(IN PRTMP_ADAPTER pAd, ======================================================================== */ -static void RTMPMakeRsnIeCap(IN PRTMP_ADAPTER pAd, +static void RTMPMakeRsnIeCap(struct rt_rtmp_adapter *pAd, u8 ElementID, u8 apidx, u8 *pRsnIe, u8 * rsn_len) @@ -1840,7 +1840,7 @@ static void RTMPMakeRsnIeCap(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPMakeRSNIE(IN PRTMP_ADAPTER pAd, +void RTMPMakeRSNIE(struct rt_rtmp_adapter *pAd, u32 AuthMode, u32 WepStatus, u8 apidx) { u8 *pRsnIe = NULL; /* primary RSNIE */ @@ -1932,8 +1932,8 @@ void RTMPMakeRSNIE(IN PRTMP_ADAPTER pAd, FALSE - otherwise ========================================================================== */ -BOOLEAN RTMPCheckWPAframe(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +BOOLEAN RTMPCheckWPAframe(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 *pData, unsigned long DataByteCount, u8 FromWhichBSSID) { @@ -2044,22 +2044,22 @@ char *GetEapolMsgType(char msg) ======================================================================== */ -BOOLEAN RTMPCheckRSNIE(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPCheckRSNIE(struct rt_rtmp_adapter *pAd, u8 *pData, u8 DataLen, - IN MAC_TABLE_ENTRY * pEntry, u8 * Offset) + struct rt_mac_table_entry *pEntry, u8 * Offset) { u8 *pVIE; u8 len; - PEID_STRUCT pEid; + struct rt_eid * pEid; BOOLEAN result = FALSE; pVIE = pData; len = DataLen; *Offset = 0; - while (len > sizeof(RSNIE2)) { - pEid = (PEID_STRUCT) pVIE; + while (len > sizeof(struct rt_rsnie2)) { + pEid = (struct rt_eid *) pVIE; /* WPA RSN IE */ if ((pEid->Eid == IE_WPA) && (NdisEqualMemory(pEid->Octet, WPA_OUI, 4))) { @@ -2118,14 +2118,14 @@ BOOLEAN RTMPCheckRSNIE(IN PRTMP_ADAPTER pAd, ======================================================================== */ -BOOLEAN RTMPParseEapolKeyData(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPParseEapolKeyData(struct rt_rtmp_adapter *pAd, u8 *pKeyData, u8 KeyDataLen, u8 GroupKeyIndex, u8 MsgType, - IN BOOLEAN bWPA2, IN MAC_TABLE_ENTRY * pEntry) + IN BOOLEAN bWPA2, struct rt_mac_table_entry *pEntry) { - PKDE_ENCAP pKDE = NULL; + struct rt_kde_encap * pKDE = NULL; u8 *pMyKeyData = pKeyData; u8 KeyDataLength = KeyDataLen; u8 GTKLEN = 0; @@ -2177,7 +2177,7 @@ BOOLEAN RTMPParseEapolKeyData(IN PRTMP_ADAPTER pAd, && (MsgType == EAPOL_PAIR_MSG_3 || MsgType == EAPOL_GROUP_MSG_1)) { if (KeyDataLength >= 8) /* KDE format exclude GTK length */ { - pKDE = (PKDE_ENCAP) pMyKeyData; + pKDE = (struct rt_kde_encap *) pMyKeyData; DefaultIdx = pKDE->GTKEncap.Kid; @@ -2224,7 +2224,7 @@ BOOLEAN RTMPParseEapolKeyData(IN PRTMP_ADAPTER pAd, } { - PCIPHER_KEY pSharedKey; + struct rt_cipher_key *pSharedKey; /* set key material, TxMic and RxMic */ NdisMoveMemory(pAd->StaCfg.GTK, pMyKeyData, 32); @@ -2233,7 +2233,7 @@ BOOLEAN RTMPParseEapolKeyData(IN PRTMP_ADAPTER pAd, pSharedKey = &pAd->SharedKey[BSS0][pAd->StaCfg.DefaultKeyId]; /* Prepare pair-wise key information into shared key table */ - NdisZeroMemory(pSharedKey, sizeof(CIPHER_KEY)); + NdisZeroMemory(pSharedKey, sizeof(struct rt_cipher_key)); pSharedKey->KeyLen = LEN_TKIP_EK; NdisMoveMemory(pSharedKey->Key, pAd->StaCfg.GTK, LEN_TKIP_EK); NdisMoveMemory(pSharedKey->RxMic, &pAd->StaCfg.GTK[16], @@ -2320,7 +2320,7 @@ BOOLEAN RTMPParseEapolKeyData(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void ConstructEapolMsg(IN PMAC_TABLE_ENTRY pEntry, +void ConstructEapolMsg(struct rt_mac_table_entry *pEntry, u8 GroupKeyWepStatus, u8 MsgType, u8 DefaultKeyIdx, @@ -2328,7 +2328,7 @@ void ConstructEapolMsg(IN PMAC_TABLE_ENTRY pEntry, u8 * TxRSC, u8 * GTK, u8 * RSNIE, - u8 RSNIE_Len, OUT PEAPOL_PACKET pMsg) + u8 RSNIE_Len, struct rt_eapol_packet * pMsg) { BOOLEAN bWPA2 = FALSE; u8 KeyDescVer; @@ -2483,20 +2483,20 @@ void ConstructEapolMsg(IN PMAC_TABLE_ENTRY pEntry, ======================================================================== */ -void ConstructEapolKeyData(IN PMAC_TABLE_ENTRY pEntry, +void ConstructEapolKeyData(struct rt_mac_table_entry *pEntry, u8 GroupKeyWepStatus, u8 keyDescVer, u8 MsgType, u8 DefaultKeyIdx, u8 * GTK, u8 * RSNIE, - u8 RSNIE_LEN, OUT PEAPOL_PACKET pMsg) + u8 RSNIE_LEN, struct rt_eapol_packet * pMsg) { u8 *mpool, *Key_Data, *Rc4GTK; u8 ekey[(LEN_KEY_DESC_IV + LEN_EAP_EK)]; unsigned long data_offset; BOOLEAN bWPA2Capable = FALSE; - PRTMP_ADAPTER pAd = pEntry->pAd; + struct rt_rtmp_adapter *pAd = pEntry->pAd; BOOLEAN GTK_Included = FALSE; /* Choose WPA2 or not */ @@ -2661,7 +2661,7 @@ void ConstructEapolKeyData(IN PMAC_TABLE_ENTRY pEntry, ======================================================================== */ static void CalculateMIC(u8 KeyDescVer, - u8 * PTK, OUT PEAPOL_PACKET pMsg) + u8 * PTK, struct rt_eapol_packet * pMsg) { u8 *OutBuffer; unsigned long FrameLen = 0; @@ -2714,12 +2714,12 @@ static void CalculateMIC(u8 KeyDescVer, ======================================================================== */ -int RTMPSoftDecryptBroadCastData(IN PRTMP_ADAPTER pAd, - IN RX_BLK * pRxBlk, +int RTMPSoftDecryptBroadCastData(struct rt_rtmp_adapter *pAd, + struct rt_rx_blk *pRxBlk, IN NDIS_802_11_ENCRYPTION_STATUS - GroupCipher, IN PCIPHER_KEY pShard_key) + GroupCipher, struct rt_cipher_key *pShard_key) { - PRXWI_STRUC pRxWI = pRxBlk->pRxWI; + struct rt_rxwi * pRxWI = pRxBlk->pRxWI; /* handle WEP decryption */ if (GroupCipher == Ndis802_11Encryption1Enabled) { @@ -2777,15 +2777,15 @@ int RTMPSoftDecryptBroadCastData(IN PRTMP_ADAPTER pAd, u8 *GetSuiteFromRSNIE(u8 *rsnie, u32 rsnie_len, u8 type, u8 * count) { - PEID_STRUCT pEid; + struct rt_eid * pEid; int len; u8 *pBuf; int offset = 0; - PRSNIE_AUTH pAkm; + struct rt_rsnie_auth *pAkm; u16 acount; BOOLEAN isWPA2 = FALSE; - pEid = (PEID_STRUCT) rsnie; + pEid = (struct rt_eid *) rsnie; len = rsnie_len - 2; /* exclude IE and length */ pBuf = (u8 *)& pEid->Octet[0]; @@ -2799,10 +2799,10 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, } /* Check WPA or WPA2 */ if (pEid->Eid == IE_WPA) { - PRSNIE pRsnie = (PRSNIE) pBuf; + struct rt_rsnie *pRsnie = (struct rt_rsnie *)pBuf; u16 ucount; - if (len < sizeof(RSNIE)) { + if (len < sizeof(struct rt_rsnie)) { DBGPRINT_ERR(("%s : The length is too short for WPA\n", __func__)); return NULL; @@ -2827,15 +2827,15 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, return pRsnie->ucast[0].oui; } - offset = sizeof(RSNIE) + (4 * (ucount - 1)); + offset = sizeof(struct rt_rsnie) + (4 * (ucount - 1)); } else if (pEid->Eid == IE_RSN) { - PRSNIE2 pRsnie = (PRSNIE2) pBuf; + struct rt_rsnie2 *pRsnie = (struct rt_rsnie2 *)pBuf; u16 ucount; isWPA2 = TRUE; - if (len < sizeof(RSNIE2)) { + if (len < sizeof(struct rt_rsnie2)) { DBGPRINT_ERR(("%s : The length is too short for WPA2\n", __func__)); return NULL; @@ -2860,7 +2860,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, return pRsnie->ucast[0].oui; } - offset = sizeof(RSNIE2) + (4 * (ucount - 1)); + offset = sizeof(struct rt_rsnie2) + (4 * (ucount - 1)); } else { DBGPRINT_ERR(("%s : Unknown IE (%d)\n", __func__, pEid->Eid)); @@ -2871,13 +2871,13 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, pBuf += offset; len -= offset; - if (len < sizeof(RSNIE_AUTH)) { + if (len < sizeof(struct rt_rsnie_auth)) { DBGPRINT_ERR(("%s : The length of RSNIE is too short\n", __func__)); return NULL; } /* pointer to AKM count */ - pAkm = (PRSNIE_AUTH) pBuf; + pAkm = (struct rt_rsnie_auth *)pBuf; /* Get the count of pairwise cipher */ acount = cpu2le16(pAkm->acount); @@ -2893,7 +2893,7 @@ u8 *GetSuiteFromRSNIE(u8 *rsnie, *count = acount; return pAkm->auth[0].oui; } - offset = sizeof(RSNIE_AUTH) + (4 * (acount - 1)); + offset = sizeof(struct rt_rsnie_auth) + (4 * (acount - 1)); pBuf += offset; len -= offset; diff --git a/drivers/staging/rt2860/common/crypt_hmac.c b/drivers/staging/rt2860/common/crypt_hmac.c index 6a086f92278a..d7ab08ec1a41 100644 --- a/drivers/staging/rt2860/common/crypt_hmac.c +++ b/drivers/staging/rt2860/common/crypt_hmac.c @@ -51,14 +51,14 @@ void HMAC_SHA1(IN const u8 Key[], IN const u8 Message[], u32 MessageLen, u8 MAC[], u32 MACLen) { - SHA1_CTX_STRUC sha_ctx1; - SHA1_CTX_STRUC sha_ctx2; + struct rt_sha1_ctx sha_ctx1; + struct rt_sha1_ctx sha_ctx2; u8 K0[SHA1_BLOCK_SIZE]; u8 Digest[SHA1_DIGEST_SIZE]; u32 index; - NdisZeroMemory(&sha_ctx1, sizeof(SHA1_CTX_STRUC)); - NdisZeroMemory(&sha_ctx2, sizeof(SHA1_CTX_STRUC)); + NdisZeroMemory(&sha_ctx1, sizeof(struct rt_sha1_ctx)); + NdisZeroMemory(&sha_ctx2, sizeof(struct rt_sha1_ctx)); /* * If the length of K = B(Block size): K0 = K. * If the length of K > B: hash K to obtain an L byte string, @@ -130,14 +130,14 @@ void HMAC_MD5(IN const u8 Key[], IN const u8 Message[], u32 MessageLen, u8 MAC[], u32 MACLen) { - MD5_CTX_STRUC md5_ctx1; - MD5_CTX_STRUC md5_ctx2; + struct rt_md5_ctx_struc md5_ctx1; + struct rt_md5_ctx_struc md5_ctx2; u8 K0[MD5_BLOCK_SIZE]; u8 Digest[MD5_DIGEST_SIZE]; u32 index; - NdisZeroMemory(&md5_ctx1, sizeof(MD5_CTX_STRUC)); - NdisZeroMemory(&md5_ctx2, sizeof(MD5_CTX_STRUC)); + NdisZeroMemory(&md5_ctx1, sizeof(struct rt_md5_ctx_struc)); + NdisZeroMemory(&md5_ctx2, sizeof(struct rt_md5_ctx_struc)); /* * If the length of K = B(Block size): K0 = K. * If the length of K > B: hash K to obtain an L byte string, diff --git a/drivers/staging/rt2860/common/crypt_md5.c b/drivers/staging/rt2860/common/crypt_md5.c index 433aaf27dfa3..6deab659c22b 100644 --- a/drivers/staging/rt2860/common/crypt_md5.c +++ b/drivers/staging/rt2860/common/crypt_md5.c @@ -79,7 +79,7 @@ Note: None ======================================================================== */ -void MD5_Init(IN MD5_CTX_STRUC * pMD5_CTX) +void MD5_Init(struct rt_md5_ctx_struc *pMD5_CTX) { NdisMoveMemory(pMD5_CTX->HashValue, MD5_DefaultHashValue, sizeof(MD5_DefaultHashValue)); @@ -103,7 +103,7 @@ Note: T[i] := floor(abs(sin(i + 1)) * (2 pow 32)), i is number of round ======================================================================== */ -void MD5_Hash(IN MD5_CTX_STRUC * pMD5_CTX) +void MD5_Hash(struct rt_md5_ctx_struc *pMD5_CTX) { u32 X_i; u32 X[16]; @@ -227,7 +227,7 @@ Routine Description: will be called. Arguments: - pMD5_CTX Pointer to MD5_CTX_STRUC + pMD5_CTX Pointer to struct rt_md5_ctx_struc message Message context messageLen The length of message in bytes @@ -238,7 +238,7 @@ Note: None ======================================================================== */ -void MD5_Append(IN MD5_CTX_STRUC * pMD5_CTX, +void MD5_Append(struct rt_md5_ctx_struc *pMD5_CTX, IN const u8 Message[], u32 MessageLen) { u32 appendLen = 0; @@ -271,7 +271,7 @@ Routine Description: 3. Transform the Hash Value to digest message Arguments: - pMD5_CTX Pointer to MD5_CTX_STRUC + pMD5_CTX Pointer to struct rt_md5_ctx_struc Return Value: digestMessage Digest message @@ -280,7 +280,7 @@ Note: None ======================================================================== */ -void MD5_End(IN MD5_CTX_STRUC * pMD5_CTX, u8 DigestMessage[]) +void MD5_End(struct rt_md5_ctx_struc *pMD5_CTX, u8 DigestMessage[]) { u32 index; u64 message_length_bits; @@ -326,9 +326,9 @@ Note: void RT_MD5(IN const u8 Message[], u32 MessageLen, u8 DigestMessage[]) { - MD5_CTX_STRUC md5_ctx; + struct rt_md5_ctx_struc md5_ctx; - NdisZeroMemory(&md5_ctx, sizeof(MD5_CTX_STRUC)); + NdisZeroMemory(&md5_ctx, sizeof(struct rt_md5_ctx_struc)); MD5_Init(&md5_ctx); MD5_Append(&md5_ctx, Message, MessageLen); MD5_End(&md5_ctx, DigestMessage); diff --git a/drivers/staging/rt2860/common/crypt_sha2.c b/drivers/staging/rt2860/common/crypt_sha2.c index 9166ea019eda..fa83fb287fe5 100644 --- a/drivers/staging/rt2860/common/crypt_sha2.c +++ b/drivers/staging/rt2860/common/crypt_sha2.c @@ -52,10 +52,10 @@ static const u32 SHA1_DefaultHashValue[5] = { /* ======================================================================== Routine Description: - Initial SHA1_CTX_STRUC + Initial struct rt_sha1_ctx Arguments: - pSHA_CTX Pointer to SHA1_CTX_STRUC + pSHA_CTX Pointer to struct rt_sha1_ctx Return Value: None @@ -64,7 +64,7 @@ Note: None ======================================================================== */ -void RT_SHA1_Init(IN SHA1_CTX_STRUC * pSHA_CTX) +void RT_SHA1_Init(struct rt_sha1_ctx *pSHA_CTX) { NdisMoveMemory(pSHA_CTX->HashValue, SHA1_DefaultHashValue, sizeof(SHA1_DefaultHashValue)); @@ -79,7 +79,7 @@ Routine Description: SHA1 computation for one block (512 bits) Arguments: - pSHA_CTX Pointer to SHA1_CTX_STRUC + pSHA_CTX Pointer to struct rt_sha1_ctx Return Value: None @@ -88,7 +88,7 @@ Note: None ======================================================================== */ -void SHA1_Hash(IN SHA1_CTX_STRUC * pSHA_CTX) +void SHA1_Hash(struct rt_sha1_ctx *pSHA_CTX) { u32 W_i, t, s; u32 W[16]; @@ -157,7 +157,7 @@ Routine Description: will be called. Arguments: - pSHA_CTX Pointer to SHA1_CTX_STRUC + pSHA_CTX Pointer to struct rt_sha1_ctx message Message context messageLen The length of message in bytes @@ -168,7 +168,7 @@ Note: None ======================================================================== */ -void SHA1_Append(IN SHA1_CTX_STRUC * pSHA_CTX, +void SHA1_Append(struct rt_sha1_ctx *pSHA_CTX, IN const u8 Message[], u32 MessageLen) { u32 appendLen = 0; @@ -201,7 +201,7 @@ Routine Description: 3. Transform the Hash Value to digest message Arguments: - pSHA_CTX Pointer to SHA1_CTX_STRUC + pSHA_CTX Pointer to struct rt_sha1_ctx Return Value: digestMessage Digest message @@ -210,7 +210,7 @@ Note: None ======================================================================== */ -void SHA1_End(IN SHA1_CTX_STRUC * pSHA_CTX, u8 DigestMessage[]) +void SHA1_End(struct rt_sha1_ctx *pSHA_CTX, u8 DigestMessage[]) { u32 index; u64 message_length_bits; @@ -257,9 +257,9 @@ void RT_SHA1(IN const u8 Message[], u32 MessageLen, u8 DigestMessage[]) { - SHA1_CTX_STRUC sha_ctx; + struct rt_sha1_ctx sha_ctx; - NdisZeroMemory(&sha_ctx, sizeof(SHA1_CTX_STRUC)); + NdisZeroMemory(&sha_ctx, sizeof(struct rt_sha1_ctx)); RT_SHA1_Init(&sha_ctx); SHA1_Append(&sha_ctx, Message, MessageLen); SHA1_End(&sha_ctx, DigestMessage); diff --git a/drivers/staging/rt2860/common/dfs.c b/drivers/staging/rt2860/common/dfs.c index 8bee5cf03e4b..71cbb2665243 100644 --- a/drivers/staging/rt2860/common/dfs.c +++ b/drivers/staging/rt2860/common/dfs.c @@ -52,7 +52,7 @@ ======================================================================== */ -BOOLEAN RadarChannelCheck(IN PRTMP_ADAPTER pAd, u8 Ch) +BOOLEAN RadarChannelCheck(struct rt_rtmp_adapter *pAd, u8 Ch) { int i; BOOLEAN result = FALSE; diff --git a/drivers/staging/rt2860/common/ee_efuse.c b/drivers/staging/rt2860/common/ee_efuse.c index b997151c25ff..03412f5bc990 100644 --- a/drivers/staging/rt2860/common/ee_efuse.c +++ b/drivers/staging/rt2860/common/ee_efuse.c @@ -73,7 +73,7 @@ typedef union _EFUSE_CTRL_STRUC { ======================================================================== */ -u8 eFuseReadRegisters(IN PRTMP_ADAPTER pAd, +u8 eFuseReadRegisters(struct rt_rtmp_adapter *pAd, u16 Offset, u16 Length, u16 * pData) { EFUSE_CTRL_STRUC eFuseCtrlStruc; @@ -149,7 +149,7 @@ u8 eFuseReadRegisters(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void eFusePhysicalReadRegisters(IN PRTMP_ADAPTER pAd, +void eFusePhysicalReadRegisters(struct rt_rtmp_adapter *pAd, u16 Offset, u16 Length, u16 * pData) { @@ -214,7 +214,7 @@ void eFusePhysicalReadRegisters(IN PRTMP_ADAPTER pAd, ======================================================================== */ -static void eFuseReadPhysical(IN PRTMP_ADAPTER pAd, +static void eFuseReadPhysical(struct rt_rtmp_adapter *pAd, u16 *lpInBuffer, unsigned long nInBufferSize, u16 *lpOutBuffer, unsigned long nOutBufferSize) @@ -244,7 +244,7 @@ static void eFuseReadPhysical(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int set_eFuseGetFreeBlockCount_Proc(IN PRTMP_ADAPTER pAd, char *arg) +int set_eFuseGetFreeBlockCount_Proc(struct rt_rtmp_adapter *pAd, char *arg) { u16 i; u16 LogicalAddress; @@ -268,7 +268,7 @@ int set_eFuseGetFreeBlockCount_Proc(IN PRTMP_ADAPTER pAd, char *arg) return TRUE; } -int set_eFusedump_Proc(IN PRTMP_ADAPTER pAd, char *arg) +int set_eFusedump_Proc(struct rt_rtmp_adapter *pAd, char *arg) { u16 InBuf[3]; int i = 0; @@ -287,14 +287,14 @@ int set_eFusedump_Proc(IN PRTMP_ADAPTER pAd, char *arg) return TRUE; } -int rtmp_ee_efuse_read16(IN RTMP_ADAPTER * pAd, +int rtmp_ee_efuse_read16(struct rt_rtmp_adapter *pAd, u16 Offset, u16 * pValue) { eFuseReadRegisters(pAd, Offset, 2, pValue); return (*pValue); } -int RtmpEfuseSupportCheck(IN RTMP_ADAPTER * pAd) +int RtmpEfuseSupportCheck(struct rt_rtmp_adapter *pAd) { u16 value; @@ -305,7 +305,7 @@ int RtmpEfuseSupportCheck(IN RTMP_ADAPTER * pAd) return 0; } -void eFuseGetFreeBlockCount(IN PRTMP_ADAPTER pAd, u32 *EfuseFreeBlock) +void eFuseGetFreeBlockCount(struct rt_rtmp_adapter *pAd, u32 *EfuseFreeBlock) { u16 i; u16 LogicalAddress; @@ -331,7 +331,7 @@ void eFuseGetFreeBlockCount(IN PRTMP_ADAPTER pAd, u32 *EfuseFreeBlock) ("eFuseGetFreeBlockCount is 0x%x\n", *EfuseFreeBlock)); } -int eFuse_init(IN PRTMP_ADAPTER pAd) +int eFuse_init(struct rt_rtmp_adapter *pAd) { u32 EfuseFreeBlock = 0; DBGPRINT(RT_DEBUG_ERROR, diff --git a/drivers/staging/rt2860/common/ee_prom.c b/drivers/staging/rt2860/common/ee_prom.c index 8cd654c4f99b..2083740a844b 100644 --- a/drivers/staging/rt2860/common/ee_prom.c +++ b/drivers/staging/rt2860/common/ee_prom.c @@ -38,7 +38,7 @@ #include "../rt_config.h" /* IRQL = PASSIVE_LEVEL */ -static inline void RaiseClock(IN PRTMP_ADAPTER pAd, u32 * x) +static inline void RaiseClock(struct rt_rtmp_adapter *pAd, u32 * x) { *x = *x | EESK; RTMP_IO_WRITE32(pAd, E2PROM_CSR, *x); @@ -46,7 +46,7 @@ static inline void RaiseClock(IN PRTMP_ADAPTER pAd, u32 * x) } /* IRQL = PASSIVE_LEVEL */ -static inline void LowerClock(IN PRTMP_ADAPTER pAd, u32 * x) +static inline void LowerClock(struct rt_rtmp_adapter *pAd, u32 * x) { *x = *x & ~EESK; RTMP_IO_WRITE32(pAd, E2PROM_CSR, *x); @@ -54,7 +54,7 @@ static inline void LowerClock(IN PRTMP_ADAPTER pAd, u32 * x) } /* IRQL = PASSIVE_LEVEL */ -static inline u16 ShiftInBits(IN PRTMP_ADAPTER pAd) +static inline u16 ShiftInBits(struct rt_rtmp_adapter *pAd) { u32 x, i; u16 data = 0; @@ -79,7 +79,7 @@ static inline u16 ShiftInBits(IN PRTMP_ADAPTER pAd) } /* IRQL = PASSIVE_LEVEL */ -static inline void ShiftOutBits(IN PRTMP_ADAPTER pAd, +static inline void ShiftOutBits(struct rt_rtmp_adapter *pAd, u16 data, u16 count) { u32 x, mask; @@ -107,7 +107,7 @@ static inline void ShiftOutBits(IN PRTMP_ADAPTER pAd, } /* IRQL = PASSIVE_LEVEL */ -static inline void EEpromCleanup(IN PRTMP_ADAPTER pAd) +static inline void EEpromCleanup(struct rt_rtmp_adapter *pAd) { u32 x; @@ -120,7 +120,7 @@ static inline void EEpromCleanup(IN PRTMP_ADAPTER pAd) LowerClock(pAd, &x); } -static inline void EWEN(IN PRTMP_ADAPTER pAd) +static inline void EWEN(struct rt_rtmp_adapter *pAd) { u32 x; @@ -141,7 +141,7 @@ static inline void EWEN(IN PRTMP_ADAPTER pAd) EEpromCleanup(pAd); } -static inline void EWDS(IN PRTMP_ADAPTER pAd) +static inline void EWDS(struct rt_rtmp_adapter *pAd) { u32 x; @@ -163,7 +163,7 @@ static inline void EWDS(IN PRTMP_ADAPTER pAd) } /* IRQL = PASSIVE_LEVEL */ -int rtmp_ee_prom_read16(IN PRTMP_ADAPTER pAd, +int rtmp_ee_prom_read16(struct rt_rtmp_adapter *pAd, u16 Offset, u16 * pValue) { u32 x; diff --git a/drivers/staging/rt2860/common/eeprom.c b/drivers/staging/rt2860/common/eeprom.c index 764de3a7807f..94670076d32b 100644 --- a/drivers/staging/rt2860/common/eeprom.c +++ b/drivers/staging/rt2860/common/eeprom.c @@ -36,9 +36,9 @@ */ #include "../rt_config.h" -int RtmpChipOpsEepromHook(IN RTMP_ADAPTER * pAd, int infType) +int RtmpChipOpsEepromHook(struct rt_rtmp_adapter *pAd, int infType) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; #ifdef RT30xx #ifdef RTMP_EFUSE_SUPPORT u32 eFuseCtrl, MacCsr0; diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c index fcf030b7db66..8cd8f53ed0e6 100644 --- a/drivers/staging/rt2860/common/mlme.c +++ b/drivers/staging/rt2860/common/mlme.c @@ -356,7 +356,7 @@ u8 ZeroSsid[32] = ========================================================================== */ -int MlmeInit(IN PRTMP_ADAPTER pAd) +int MlmeInit(struct rt_rtmp_adapter *pAd) { int Status = NDIS_STATUS_SUCCESS; @@ -453,9 +453,9 @@ int MlmeInit(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void MlmeHandler(IN PRTMP_ADAPTER pAd) +void MlmeHandler(struct rt_rtmp_adapter *pAd) { - MLME_QUEUE_ELEM *Elem = NULL; + struct rt_mlme_queue_elem *Elem = NULL; /* Only accept MLME and Frame from peer side, no other (control/data) frame should */ /* get into this state machine */ @@ -571,7 +571,7 @@ void MlmeHandler(IN PRTMP_ADAPTER pAd) ========================================================================== */ -void MlmeHalt(IN PRTMP_ADAPTER pAd) +void MlmeHalt(struct rt_rtmp_adapter *pAd) { BOOLEAN Cancelled; @@ -610,7 +610,7 @@ void MlmeHalt(IN PRTMP_ADAPTER pAd) RTMPCancelTimer(&pAd->Mlme.RxAntEvalTimer, &Cancelled); if (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; /* Set LED */ RTMPSetLED(pAd, LED_HALT); @@ -639,7 +639,7 @@ void MlmeHalt(IN PRTMP_ADAPTER pAd) DBGPRINT(RT_DEBUG_TRACE, ("<== MlmeHalt\n")); } -void MlmeResetRalinkCounters(IN PRTMP_ADAPTER pAd) +void MlmeResetRalinkCounters(struct rt_rtmp_adapter *pAd) { pAd->RalinkCounters.LastOneSecRxOkDataCnt = pAd->RalinkCounters.OneSecRxOkDataCnt; @@ -694,7 +694,7 @@ void MlmePeriodicExec(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3) { unsigned long TxTotalCnt; - PRTMP_ADAPTER pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; #ifdef RTMP_MAC_PCI { @@ -938,8 +938,8 @@ BOOLEAN MlmeValidateSSID(u8 *pSsid, u8 SsidLen) return (TRUE); } -void MlmeSelectTxRateTable(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, +void MlmeSelectTxRateTable(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, u8 ** ppTable, u8 *pTableSize, u8 *pInitTxRateIdx) { @@ -1144,7 +1144,7 @@ void MlmeSelectTxRateTable(IN PRTMP_ADAPTER pAd, } while (FALSE); } -void STAMlmePeriodicExec(PRTMP_ADAPTER pAd) +void STAMlmePeriodicExec(struct rt_rtmp_adapter *pAd) { unsigned long TxTotalCnt; int i; @@ -1385,7 +1385,7 @@ void STAMlmePeriodicExec(PRTMP_ADAPTER pAd) pAd->StaCfg.LastBeaconRxTime + ADHOC_BEACON_LOST_TIME) && OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)) { - MLME_START_REQ_STRUCT StartReq; + struct rt_mlme_start_req StartReq; DBGPRINT(RT_DEBUG_TRACE, ("MMCHK - excessive BEACON lost, last STA in this IBSS, MediaState=Disconnected\n")); @@ -1395,12 +1395,12 @@ void STAMlmePeriodicExec(PRTMP_ADAPTER pAd) (char *) pAd->MlmeAux.Ssid, pAd->MlmeAux.SsidLen); MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_MLME_START_REQ, - sizeof(MLME_START_REQ_STRUCT), &StartReq); + sizeof(struct rt_mlme_start_req), &StartReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_START; } for (i = 1; i < MAX_LEN_OF_MAC_TABLE; i++) { - MAC_TABLE_ENTRY *pEntry = &pAd->MacTab.Content[i]; + struct rt_mac_table_entry *pEntry = &pAd->MacTab.Content[i]; if (pEntry->ValidAsCLI == FALSE) continue; @@ -1429,7 +1429,7 @@ void STAMlmePeriodicExec(PRTMP_ADAPTER pAd) pAd->MlmeAux.AutoReconnectSsidLen) == TRUE)) { if ((pAd->ScanTab.BssNr == 0) && (pAd->Mlme.CntlMachine.CurrState == CNTL_IDLE)) { - MLME_SCAN_REQ_STRUCT ScanReq; + struct rt_mlme_scan_req ScanReq; if (RTMP_TIME_AFTER (pAd->Mlme.Now32, @@ -1447,7 +1447,7 @@ void STAMlmePeriodicExec(PRTMP_ADAPTER pAd) MlmeEnqueue(pAd, SYNC_STATE_MACHINE, MT2_MLME_SCAN_REQ, sizeof - (MLME_SCAN_REQ_STRUCT), + (struct rt_mlme_scan_req), &ScanReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_OID_LIST_SCAN; @@ -1491,10 +1491,10 @@ void LinkDownExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; if (pAd != NULL) { - MLME_DISASSOC_REQ_STRUCT DisassocReq; + struct rt_mlme_disassoc_req DisassocReq; if ((pAd->StaCfg.PortSecured == WPA_802_1X_PORT_NOT_SECURED) && (INFRA_ON(pAd))) { @@ -1505,7 +1505,7 @@ void LinkDownExec(void *SystemSpecific1, REASON_DISASSOC_STA_LEAVING); MlmeEnqueue(pAd, ASSOC_STATE_MACHINE, MT2_MLME_DISASSOC_REQ, - sizeof(MLME_DISASSOC_REQ_STRUCT), + sizeof(struct rt_mlme_disassoc_req), &DisassocReq); pAd->Mlme.CntlMachine.CurrState = CNTL_WAIT_DISASSOC; @@ -1517,7 +1517,7 @@ void LinkDownExec(void *SystemSpecific1, } /* IRQL = DISPATCH_LEVEL */ -void MlmeAutoScan(IN PRTMP_ADAPTER pAd) +void MlmeAutoScan(struct rt_rtmp_adapter *pAd) { /* check CntlMachine.CurrState to avoid collision with NDIS SetOID request */ if (pAd->Mlme.CntlMachine.CurrState == CNTL_IDLE) { @@ -1532,7 +1532,7 @@ void MlmeAutoScan(IN PRTMP_ADAPTER pAd) } /* IRQL = DISPATCH_LEVEL */ -void MlmeAutoReconnectLastSSID(IN PRTMP_ADAPTER pAd) +void MlmeAutoReconnectLastSSID(struct rt_rtmp_adapter *pAd) { if (pAd->StaCfg.bAutoConnectByBssid) { DBGPRINT(RT_DEBUG_TRACE, @@ -1555,7 +1555,7 @@ void MlmeAutoReconnectLastSSID(IN PRTMP_ADAPTER pAd) (MlmeValidateSSID (pAd->MlmeAux.AutoReconnectSsid, pAd->MlmeAux.AutoReconnectSsidLen) == TRUE)) { - NDIS_802_11_SSID OidSsid; + struct rt_ndis_802_11_ssid OidSsid; OidSsid.SsidLength = pAd->MlmeAux.AutoReconnectSsidLen; NdisMoveMemory(OidSsid.Ssid, pAd->MlmeAux.AutoReconnectSsid, pAd->MlmeAux.AutoReconnectSsidLen); @@ -1565,7 +1565,7 @@ void MlmeAutoReconnectLastSSID(IN PRTMP_ADAPTER pAd) pAd->MlmeAux.AutoReconnectSsid, pAd->MlmeAux.AutoReconnectSsidLen)); MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, OID_802_11_SSID, - sizeof(NDIS_802_11_SSID), &OidSsid); + sizeof(struct rt_ndis_802_11_ssid), &OidSsid); RTMP_MLME_HANDLER(pAd); } } @@ -1582,11 +1582,11 @@ void MlmeAutoReconnectLastSSID(IN PRTMP_ADAPTER pAd) Output: ========================================================================== */ -void MlmeCheckForRoaming(IN PRTMP_ADAPTER pAd, unsigned long Now32) +void MlmeCheckForRoaming(struct rt_rtmp_adapter *pAd, unsigned long Now32) { u16 i; - BSS_TABLE *pRoamTab = &pAd->MlmeAux.RoamTab; - BSS_ENTRY *pBss; + struct rt_bss_table *pRoamTab = &pAd->MlmeAux.RoamTab; + struct rt_bss_entry *pBss; DBGPRINT(RT_DEBUG_TRACE, ("==> MlmeCheckForRoaming\n")); /* put all roaming candidates into RoamTab, and sort in RSSI order */ @@ -1607,7 +1607,7 @@ void MlmeCheckForRoaming(IN PRTMP_ADAPTER pAd, unsigned long Now32) /* AP passing all above rules is put into roaming candidate table */ NdisMoveMemory(&pRoamTab->BssEntry[pRoamTab->BssNr], pBss, - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); pRoamTab->BssNr += 1; } @@ -1640,11 +1640,11 @@ void MlmeCheckForRoaming(IN PRTMP_ADAPTER pAd, unsigned long Now32) Output: ========================================================================== */ -BOOLEAN MlmeCheckForFastRoaming(IN PRTMP_ADAPTER pAd) +BOOLEAN MlmeCheckForFastRoaming(struct rt_rtmp_adapter *pAd) { u16 i; - BSS_TABLE *pRoamTab = &pAd->MlmeAux.RoamTab; - BSS_ENTRY *pBss; + struct rt_bss_table *pRoamTab = &pAd->MlmeAux.RoamTab; + struct rt_bss_entry *pBss; DBGPRINT(RT_DEBUG_TRACE, ("==> MlmeCheckForFastRoaming\n")); /* put all roaming candidates into RoamTab, and sort in RSSI order */ @@ -1676,7 +1676,7 @@ BOOLEAN MlmeCheckForFastRoaming(IN PRTMP_ADAPTER pAd) pBss->Rssi)); /* AP passing all above rules is put into roaming candidate table */ NdisMoveMemory(&pRoamTab->BssEntry[pRoamTab->BssNr], pBss, - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); pRoamTab->BssNr += 1; } @@ -1699,8 +1699,8 @@ BOOLEAN MlmeCheckForFastRoaming(IN PRTMP_ADAPTER pAd) return FALSE; } -void MlmeSetTxRate(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry, IN PRTMP_TX_RATE_SWITCH pTxRate) +void MlmeSetTxRate(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry, struct rt_rtmp_tx_rate_switch * pTxRate) { u8 MaxMode = MODE_OFDM; @@ -1840,13 +1840,13 @@ void MlmeSetTxRate(IN PRTMP_ADAPTER pAd, call this routine every second ========================================================================== */ -void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) +void MlmeDynamicTxRateSwitching(struct rt_rtmp_adapter *pAd) { u8 UpRateIdx = 0, DownRateIdx = 0, CurrRateIdx; unsigned long i, AccuTxTotalCnt = 0, TxTotalCnt; unsigned long TxErrorRatio = 0; BOOLEAN bTxRateChanged = FALSE, bUpgradeQuality = FALSE; - PRTMP_TX_RATE_SWITCH pCurrTxRate, pNextTxRate = NULL; + struct rt_rtmp_tx_rate_switch *pCurrTxRate, *pNextTxRate = NULL; u8 *pTable; u8 TableSize = 0; u8 InitTxRateIdx = 0, TrainUp, TrainDown; @@ -1854,8 +1854,8 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) TX_STA_CNT1_STRUC StaTx1; TX_STA_CNT0_STRUC TxStaCnt0; unsigned long TxRetransmit = 0, TxSuccess = 0, TxFailCount = 0; - MAC_TABLE_ENTRY *pEntry; - RSSI_SAMPLE *pRssi = &pAd->StaCfg.RssiSample; + struct rt_mac_table_entry *pEntry; + struct rt_rssi_sample *pRssi = &pAd->StaCfg.RssiSample; /* */ /* walk through MAC table, see if need to change AP's TX rate toward each entry */ @@ -1982,7 +1982,7 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) /* When switch from Fixed rate -> auto rate, the REAL TX rate might be different from pAd->CommonCfg.TxRateIndex. */ /* So need to sync here. */ pCurrTxRate = - (PRTMP_TX_RATE_SWITCH) & pTable[(CurrRateIdx + 1) * 5]; + (struct rt_rtmp_tx_rate_switch *) & pTable[(CurrRateIdx + 1) * 5]; if ((pEntry->HTPhyMode.field.MCS != pCurrTxRate->CurrMCS) /*&& (pAd->StaCfg.bAutoTxRateSwitch == TRUE) */ ) { @@ -1990,7 +1990,7 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) /* Need to sync Real Tx rate and our record. */ /* Then return for next DRS. */ pCurrTxRate = - (PRTMP_TX_RATE_SWITCH) & pTable[(InitTxRateIdx + 1) + (struct rt_rtmp_tx_rate_switch *) & pTable[(InitTxRateIdx + 1) * 5]; pEntry->CurrTxRateIndex = InitTxRateIdx; MlmeSetTxRate(pAd, pEntry, pCurrTxRate); @@ -2012,7 +2012,7 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) } pCurrTxRate = - (PRTMP_TX_RATE_SWITCH) & pTable[(CurrRateIdx + 1) * 5]; + (struct rt_rtmp_tx_rate_switch *) & pTable[(CurrRateIdx + 1) * 5]; if ((Rssi > -65) && (pCurrTxRate->Mode >= MODE_HTMIX)) { TrainUp = @@ -2049,7 +2049,7 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) /* check the existence and index of each needed MCS */ while (idx < pTable[0]) { pCurrTxRate = - (PRTMP_TX_RATE_SWITCH) & pTable[(idx + 1) * + (struct rt_rtmp_tx_rate_switch *) & pTable[(idx + 1) * 5]; if (pCurrTxRate->CurrMCS == MCS_0) { @@ -2192,7 +2192,7 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) { pEntry->CurrTxRateIndex = TxRateIdx; pNextTxRate = - (PRTMP_TX_RATE_SWITCH) & + (struct rt_rtmp_tx_rate_switch *) & pTable[(pEntry->CurrTxRateIndex + 1) * 5]; MlmeSetTxRate(pAd, pEntry, pNextTxRate); } @@ -2332,7 +2332,7 @@ void MlmeDynamicTxRateSwitching(IN PRTMP_ADAPTER pAd) } pNextTxRate = - (PRTMP_TX_RATE_SWITCH) & pTable[(tmpTxRate + 1) * + (struct rt_rtmp_tx_rate_switch *) & pTable[(tmpTxRate + 1) * 5]; } if (bTxRateChanged && pNextTxRate) { @@ -2364,12 +2364,12 @@ void StaQuickResponeForRateUpExec(void *SystemSpecific1, void *SystemSpecific2, void *SystemSpecific3) { - PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; u8 UpRateIdx = 0, DownRateIdx = 0, CurrRateIdx = 0; unsigned long TxTotalCnt; unsigned long TxErrorRatio = 0; BOOLEAN bTxRateChanged; /*, bUpgradeQuality = FALSE; */ - PRTMP_TX_RATE_SWITCH pCurrTxRate, pNextTxRate = NULL; + struct rt_rtmp_tx_rate_switch *pCurrTxRate, *pNextTxRate = NULL; u8 *pTable; u8 TableSize = 0; u8 InitTxRateIdx = 0, TrainUp, TrainDown; @@ -2377,7 +2377,7 @@ void StaQuickResponeForRateUpExec(void *SystemSpecific1, TX_STA_CNT0_STRUC TxStaCnt0; char Rssi, ratio; unsigned long TxRetransmit = 0, TxSuccess = 0, TxFailCount = 0; - MAC_TABLE_ENTRY *pEntry; + struct rt_mac_table_entry *pEntry; unsigned long i; pAd->StaCfg.StaQuickResponeForRateUpTimerRunning = FALSE; @@ -2421,7 +2421,7 @@ void StaQuickResponeForRateUpExec(void *SystemSpecific1, } pCurrTxRate = - (PRTMP_TX_RATE_SWITCH) & pTable[(CurrRateIdx + 1) * 5]; + (struct rt_rtmp_tx_rate_switch *) & pTable[(CurrRateIdx + 1) * 5]; if ((Rssi > -65) && (pCurrTxRate->Mode >= MODE_HTMIX)) { TrainUp = @@ -2574,7 +2574,7 @@ void StaQuickResponeForRateUpExec(void *SystemSpecific1, } pNextTxRate = - (PRTMP_TX_RATE_SWITCH) & + (struct rt_rtmp_tx_rate_switch *) & pTable[(pAd->CommonCfg.TxRateIndex + 1) * 5]; if (bTxRateChanged && pNextTxRate) { MlmeSetTxRate(pAd, pEntry, pNextTxRate); @@ -2601,7 +2601,7 @@ void StaQuickResponeForRateUpExec(void *SystemSpecific1, ========================================================================== */ -void MlmeCheckPsmChange(IN PRTMP_ADAPTER pAd, unsigned long Now32) +void MlmeCheckPsmChange(struct rt_rtmp_adapter *pAd, unsigned long Now32) { unsigned long PowerMode; @@ -2638,7 +2638,7 @@ void MlmeCheckPsmChange(IN PRTMP_ADAPTER pAd, unsigned long Now32) /* IRQL = PASSIVE_LEVEL */ /* IRQL = DISPATCH_LEVEL */ -void MlmeSetPsmBit(IN PRTMP_ADAPTER pAd, u16 psm) +void MlmeSetPsmBit(struct rt_rtmp_adapter *pAd, u16 psm) { AUTO_RSP_CFG_STRUC csr4; @@ -2669,14 +2669,14 @@ void MlmeSetPsmBit(IN PRTMP_ADAPTER pAd, u16 psm) channel quality based on the most up-to-date information ========================================================================== */ -void MlmeCalculateChannelQuality(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pMacEntry, unsigned long Now32) +void MlmeCalculateChannelQuality(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pMacEntry, unsigned long Now32) { unsigned long TxOkCnt, TxCnt, TxPER, TxPRR; unsigned long RxCnt, RxPER; u8 NorRssi; char MaxRssi; - RSSI_SAMPLE *pRssiSample = NULL; + struct rt_rssi_sample *pRssiSample = NULL; u32 OneSecTxNoRetryOkCount = 0; u32 OneSecTxRetryOkCount = 0; u32 OneSecTxFailCount = 0; @@ -2751,7 +2751,7 @@ void MlmeCalculateChannelQuality(IN PRTMP_ADAPTER pAd, } /* IRQL = DISPATCH_LEVEL */ -void MlmeSetTxPreamble(IN PRTMP_ADAPTER pAd, u16 TxPreamble) +void MlmeSetTxPreamble(struct rt_rtmp_adapter *pAd, u16 TxPreamble) { AUTO_RSP_CFG_STRUC csr4; @@ -2785,7 +2785,7 @@ void MlmeSetTxPreamble(IN PRTMP_ADAPTER pAd, u16 TxPreamble) ========================================================================== */ -void UpdateBasicRateBitmap(IN PRTMP_ADAPTER pAdapter) +void UpdateBasicRateBitmap(struct rt_rtmp_adapter *pAdapter) { int i, j; /* 1 2 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54 */ @@ -2831,7 +2831,7 @@ void UpdateBasicRateBitmap(IN PRTMP_ADAPTER pAdapter) /* IRQL = DISPATCH_LEVEL */ /* bLinkUp is to identify the inital link speed. */ /* TRUE indicates the rate update at linkup, we should not try to set the rate at 54Mbps. */ -void MlmeUpdateTxRates(IN PRTMP_ADAPTER pAd, IN BOOLEAN bLinkUp, u8 apidx) +void MlmeUpdateTxRates(struct rt_rtmp_adapter *pAd, IN BOOLEAN bLinkUp, u8 apidx) { int i, num; u8 Rate = RATE_6, MaxDesire = RATE_1, MaxSupport = RATE_1; @@ -3292,15 +3292,15 @@ void MlmeUpdateTxRates(IN PRTMP_ADAPTER pAd, IN BOOLEAN bLinkUp, u8 apidx) ========================================================================== */ -void MlmeUpdateHtTxRates(IN PRTMP_ADAPTER pAd, u8 apidx) +void MlmeUpdateHtTxRates(struct rt_rtmp_adapter *pAd, u8 apidx) { u8 StbcMcs; /*j, StbcMcs, bitmask; */ char i; /* 3*3 */ - RT_HT_CAPABILITY *pRtHtCap = NULL; - RT_HT_PHY_INFO *pActiveHtPhy = NULL; + struct rt_ht_capability *pRtHtCap = NULL; + struct rt_ht_phy_info *pActiveHtPhy = NULL; unsigned long BasicMCS; u8 j, bitmask; - PRT_HT_PHY_INFO pDesireHtPhy = NULL; + struct rt_ht_phy_info *pDesireHtPhy = NULL; PHTTRANSMIT_SETTING pHtPhy = NULL; PHTTRANSMIT_SETTING pMaxHtPhy = NULL; PHTTRANSMIT_SETTING pMinHtPhy = NULL; @@ -3444,7 +3444,7 @@ void MlmeUpdateHtTxRates(IN PRTMP_ADAPTER pAd, u8 apidx) DBGPRINT(RT_DEBUG_TRACE, ("MlmeUpdateHtTxRates<=== \n")); } -void BATableInit(IN PRTMP_ADAPTER pAd, IN BA_TABLE * Tab) +void BATableInit(struct rt_rtmp_adapter *pAd, struct rt_ba_table *Tab) { int i; @@ -3462,13 +3462,13 @@ void BATableInit(IN PRTMP_ADAPTER pAd, IN BA_TABLE * Tab) } /* IRQL = DISPATCH_LEVEL */ -void MlmeRadioOff(IN PRTMP_ADAPTER pAd) +void MlmeRadioOff(struct rt_rtmp_adapter *pAd) { RTMP_MLME_RADIO_OFF(pAd); } /* IRQL = DISPATCH_LEVEL */ -void MlmeRadioOn(IN PRTMP_ADAPTER pAd) +void MlmeRadioOn(struct rt_rtmp_adapter *pAd) { RTMP_MLME_RADIO_ON(pAd); } @@ -3487,14 +3487,14 @@ void MlmeRadioOn(IN PRTMP_ADAPTER pAd) IRQL = DISPATCH_LEVEL */ -void BssTableInit(IN BSS_TABLE * Tab) +void BssTableInit(struct rt_bss_table *Tab) { int i; Tab->BssNr = 0; Tab->BssOverlapNr = 0; for (i = 0; i < MAX_LEN_OF_BSS_TABLE; i++) { - NdisZeroMemory(&Tab->BssEntry[i], sizeof(BSS_ENTRY)); + NdisZeroMemory(&Tab->BssEntry[i], sizeof(struct rt_bss_entry)); Tab->BssEntry[i].Rssi = -127; /* initial the rssi as a minimum value */ } } @@ -3510,7 +3510,7 @@ void BssTableInit(IN BSS_TABLE * Tab) IRQL = DISPATCH_LEVEL */ -unsigned long BssTableSearch(IN BSS_TABLE * Tab, u8 *pBssid, u8 Channel) +unsigned long BssTableSearch(struct rt_bss_table *Tab, u8 *pBssid, u8 Channel) { u8 i; @@ -3528,7 +3528,7 @@ unsigned long BssTableSearch(IN BSS_TABLE * Tab, u8 *pBssid, u8 Channel) return (unsigned long)BSS_NOT_FOUND; } -unsigned long BssSsidTableSearch(IN BSS_TABLE * Tab, +unsigned long BssSsidTableSearch(struct rt_bss_table *Tab, u8 *pBssid, u8 *pSsid, u8 SsidLen, u8 Channel) { @@ -3550,7 +3550,7 @@ unsigned long BssSsidTableSearch(IN BSS_TABLE * Tab, return (unsigned long)BSS_NOT_FOUND; } -unsigned long BssTableSearchWithSSID(IN BSS_TABLE * Tab, +unsigned long BssTableSearchWithSSID(struct rt_bss_table *Tab, u8 *Bssid, u8 *pSsid, u8 SsidLen, u8 Channel) @@ -3575,7 +3575,7 @@ unsigned long BssTableSearchWithSSID(IN BSS_TABLE * Tab, return (unsigned long)BSS_NOT_FOUND; } -unsigned long BssSsidTableSearchBySSID(IN BSS_TABLE * Tab, +unsigned long BssSsidTableSearchBySSID(struct rt_bss_table *Tab, u8 *pSsid, u8 SsidLen) { u8 i; @@ -3591,7 +3591,7 @@ unsigned long BssSsidTableSearchBySSID(IN BSS_TABLE * Tab, } /* IRQL = DISPATCH_LEVEL */ -void BssTableDeleteEntry(IN OUT BSS_TABLE * Tab, +void BssTableDeleteEntry(struct rt_bss_table *Tab, u8 *pBssid, u8 Channel) { u8 i, j; @@ -3602,10 +3602,10 @@ void BssTableDeleteEntry(IN OUT BSS_TABLE * Tab, for (j = i; j < Tab->BssNr - 1; j++) { NdisMoveMemory(&(Tab->BssEntry[j]), &(Tab->BssEntry[j + 1]), - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); } NdisZeroMemory(&(Tab->BssEntry[Tab->BssNr - 1]), - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); Tab->BssNr -= 1; return; } @@ -3621,8 +3621,8 @@ void BssTableDeleteEntry(IN OUT BSS_TABLE * Tab, // IRQL = DISPATCH_LEVEL ======================================================================== */ -void BATableDeleteORIEntry(IN OUT PRTMP_ADAPTER pAd, - IN BA_ORI_ENTRY * pBAORIEntry) +void BATableDeleteORIEntry(struct rt_rtmp_adapter *pAd, + struct rt_ba_ori_entry *pBAORIEntry) { if (pBAORIEntry->ORI_BA_Status != Originator_NONE) { @@ -3652,7 +3652,7 @@ void BATableDeleteORIEntry(IN OUT PRTMP_ADAPTER pAd, IRQL = DISPATCH_LEVEL */ -void BssEntrySet(IN PRTMP_ADAPTER pAd, OUT BSS_ENTRY * pBss, u8 *pBssid, char Ssid[], u8 SsidLen, u8 BssType, u16 BeaconPeriod, IN PCF_PARM pCfParm, u16 AtimWin, u16 CapabilityInfo, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, IN HT_CAPABILITY_IE * pHtCapability, IN ADD_HT_INFO_IE * pAddHtInfo, /* AP might use this additional ht info IE */ +void BssEntrySet(struct rt_rtmp_adapter *pAd, struct rt_bss_entry *pBss, u8 *pBssid, char Ssid[], u8 SsidLen, u8 BssType, u16 BeaconPeriod, struct rt_cf_parm * pCfParm, u16 AtimWin, u16 CapabilityInfo, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, struct rt_ht_capability_ie * pHtCapability, struct rt_add_ht_info_ie * pAddHtInfo, /* AP might use this additional ht info IE */ u8 HtCapabilityLen, u8 AddHtInfoLen, u8 NewExtChanOffset, @@ -3660,10 +3660,10 @@ void BssEntrySet(IN PRTMP_ADAPTER pAd, OUT BSS_ENTRY * pBss, u8 *pBssid, char Ss char Rssi, IN LARGE_INTEGER TimeStamp, u8 CkipFlag, - IN PEDCA_PARM pEdcaParm, - IN PQOS_CAPABILITY_PARM pQosCapability, - IN PQBSS_LOAD_PARM pQbssLoad, - u16 LengthVIE, IN PNDIS_802_11_VARIABLE_IEs pVIE) + struct rt_edca_parm *pEdcaParm, + struct rt_qos_capability_parm *pQosCapability, + struct rt_qbss_load_parm *pQbssLoad, + u16 LengthVIE, struct rt_ndis_802_11_variable_ies *pVIE) { COPY_MAC_ADDR(pBss->Bssid, pBssid); /* Default Hidden SSID to be TRUE, it will be turned to FALSE after coping SSID */ @@ -3761,27 +3761,27 @@ void BssEntrySet(IN PRTMP_ADAPTER pAd, OUT BSS_ENTRY * pBss, u8 *pBssid, char Ss /* new for QOS */ if (pEdcaParm) - NdisMoveMemory(&pBss->EdcaParm, pEdcaParm, sizeof(EDCA_PARM)); + NdisMoveMemory(&pBss->EdcaParm, pEdcaParm, sizeof(struct rt_edca_parm)); else pBss->EdcaParm.bValid = FALSE; if (pQosCapability) NdisMoveMemory(&pBss->QosCapability, pQosCapability, - sizeof(QOS_CAPABILITY_PARM)); + sizeof(struct rt_qos_capability_parm)); else pBss->QosCapability.bValid = FALSE; if (pQbssLoad) NdisMoveMemory(&pBss->QbssLoad, pQbssLoad, - sizeof(QBSS_LOAD_PARM)); + sizeof(struct rt_qbss_load_parm)); else pBss->QbssLoad.bValid = FALSE; { - PEID_STRUCT pEid; + struct rt_eid * pEid; u16 Length = 0; NdisZeroMemory(&pBss->WpaIE.IE[0], MAX_CUSTOM_LEN); NdisZeroMemory(&pBss->RsnIE.IE[0], MAX_CUSTOM_LEN); - pEid = (PEID_STRUCT) pVIE; + pEid = (struct rt_eid *) pVIE; while ((Length + 2 + (u16)pEid->Len) <= LengthVIE) { switch (pEid->Eid) { case IE_WPA: @@ -3809,7 +3809,7 @@ void BssEntrySet(IN PRTMP_ADAPTER pAd, OUT BSS_ENTRY * pBss, u8 *pBssid, char Ss break; } Length = Length + 2 + (u16)pEid->Len; /* Eid[1] + Len[1]+ content[Len] */ - pEid = (PEID_STRUCT) ((u8 *) pEid + 2 + pEid->Len); + pEid = (struct rt_eid *) ((u8 *) pEid + 2 + pEid->Len); } } } @@ -3837,7 +3837,7 @@ void BssEntrySet(IN PRTMP_ADAPTER pAd, OUT BSS_ENTRY * pBss, u8 *pBssid, char Ss IRQL = DISPATCH_LEVEL */ -unsigned long BssTableSetEntry(IN PRTMP_ADAPTER pAd, OUT BSS_TABLE * Tab, u8 *pBssid, char Ssid[], u8 SsidLen, u8 BssType, u16 BeaconPeriod, IN CF_PARM * CfParm, u16 AtimWin, u16 CapabilityInfo, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, IN HT_CAPABILITY_IE * pHtCapability, IN ADD_HT_INFO_IE * pAddHtInfo, /* AP might use this additional ht info IE */ +unsigned long BssTableSetEntry(struct rt_rtmp_adapter *pAd, struct rt_bss_table *Tab, u8 *pBssid, char Ssid[], u8 SsidLen, u8 BssType, u16 BeaconPeriod, struct rt_cf_parm * CfParm, u16 AtimWin, u16 CapabilityInfo, u8 SupRate[], u8 SupRateLen, u8 ExtRate[], u8 ExtRateLen, struct rt_ht_capability_ie * pHtCapability, struct rt_add_ht_info_ie * pAddHtInfo, /* AP might use this additional ht info IE */ u8 HtCapabilityLen, u8 AddHtInfoLen, u8 NewExtChanOffset, @@ -3845,10 +3845,10 @@ unsigned long BssTableSetEntry(IN PRTMP_ADAPTER pAd, OUT BSS_TABLE * Tab, u8 *pB char Rssi, IN LARGE_INTEGER TimeStamp, u8 CkipFlag, - IN PEDCA_PARM pEdcaParm, - IN PQOS_CAPABILITY_PARM pQosCapability, - IN PQBSS_LOAD_PARM pQbssLoad, - u16 LengthVIE, IN PNDIS_802_11_VARIABLE_IEs pVIE) + struct rt_edca_parm *pEdcaParm, + struct rt_qos_capability_parm *pQosCapability, + struct rt_qbss_load_parm *pQbssLoad, + u16 LengthVIE, struct rt_ndis_802_11_variable_ies *pVIE) { unsigned long Idx; @@ -3924,14 +3924,14 @@ unsigned long BssTableSetEntry(IN PRTMP_ADAPTER pAd, OUT BSS_TABLE * Tab, u8 *pB } /* IRQL = DISPATCH_LEVEL */ -void BssTableSsidSort(IN PRTMP_ADAPTER pAd, - OUT BSS_TABLE * OutTab, char Ssid[], u8 SsidLen) +void BssTableSsidSort(struct rt_rtmp_adapter *pAd, + struct rt_bss_table *OutTab, char Ssid[], u8 SsidLen) { int i; BssTableInit(OutTab); for (i = 0; i < pAd->ScanTab.BssNr; i++) { - BSS_ENTRY *pInBss = &pAd->ScanTab.BssEntry[i]; + struct rt_bss_entry *pInBss = &pAd->ScanTab.BssEntry[i]; BOOLEAN bIsHiddenApIncluded = FALSE; if (((pAd->CommonCfg.bIEEE80211H == 1) && @@ -3945,7 +3945,7 @@ void BssTableSsidSort(IN PRTMP_ADAPTER pAd, if ((pInBss->BssType == pAd->StaCfg.BssType) && (SSID_EQUAL(Ssid, SsidLen, pInBss->Ssid, pInBss->SsidLen) || bIsHiddenApIncluded)) { - BSS_ENTRY *pOutBss = &OutTab->BssEntry[OutTab->BssNr]; + struct rt_bss_entry *pOutBss = &OutTab->BssEntry[OutTab->BssNr]; /* 2.4G/5G N only mode */ if ((pInBss->HtCapabilityLen == 0) && @@ -4067,12 +4067,12 @@ void BssTableSsidSort(IN PRTMP_ADAPTER pAd, } } /* copy matching BSS from InTab to OutTab */ - NdisMoveMemory(pOutBss, pInBss, sizeof(BSS_ENTRY)); + NdisMoveMemory(pOutBss, pInBss, sizeof(struct rt_bss_entry)); OutTab->BssNr++; } else if ((pInBss->BssType == pAd->StaCfg.BssType) && (SsidLen == 0)) { - BSS_ENTRY *pOutBss = &OutTab->BssEntry[OutTab->BssNr]; + struct rt_bss_entry *pOutBss = &OutTab->BssEntry[OutTab->BssNr]; /* 2.4G/5G N only mode */ if ((pInBss->HtCapabilityLen == 0) && @@ -4167,7 +4167,7 @@ void BssTableSsidSort(IN PRTMP_ADAPTER pAd, } } /* copy matching BSS from InTab to OutTab */ - NdisMoveMemory(pOutBss, pInBss, sizeof(BSS_ENTRY)); + NdisMoveMemory(pOutBss, pInBss, sizeof(struct rt_bss_entry)); OutTab->BssNr++; } @@ -4180,33 +4180,33 @@ void BssTableSsidSort(IN PRTMP_ADAPTER pAd, } /* IRQL = DISPATCH_LEVEL */ -void BssTableSortByRssi(IN OUT BSS_TABLE * OutTab) +void BssTableSortByRssi(struct rt_bss_table *OutTab) { int i, j; - BSS_ENTRY TmpBss; + struct rt_bss_entry TmpBss; for (i = 0; i < OutTab->BssNr - 1; i++) { for (j = i + 1; j < OutTab->BssNr; j++) { if (OutTab->BssEntry[j].Rssi > OutTab->BssEntry[i].Rssi) { NdisMoveMemory(&TmpBss, &OutTab->BssEntry[j], - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); NdisMoveMemory(&OutTab->BssEntry[j], &OutTab->BssEntry[i], - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); NdisMoveMemory(&OutTab->BssEntry[i], &TmpBss, - sizeof(BSS_ENTRY)); + sizeof(struct rt_bss_entry)); } } } } -void BssCipherParse(IN OUT PBSS_ENTRY pBss) +void BssCipherParse(struct rt_bss_entry *pBss) { - PEID_STRUCT pEid; + struct rt_eid * pEid; u8 *pTmp; - PRSN_IE_HEADER_STRUCT pRsnHeader; - PCIPHER_SUITE_STRUCT pCipher; - PAKM_SUITE_STRUCT pAKM; + struct rt_rsn_ie_header * pRsnHeader; + struct rt_cipher_suite_struct * pCipher; + struct rt_akm_suite * pAKM; u16 Count; int Length; NDIS_802_11_ENCRYPTION_STATUS TmpCipher; @@ -4242,7 +4242,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) while (Length > 0) { /* Parse cipher suite base on WPA1 & WPA2, they should be parsed differently */ pTmp = ((u8 *)pBss->VarIEs) + pBss->VarIELen - Length; - pEid = (PEID_STRUCT) pTmp; + pEid = (struct rt_eid *) pTmp; switch (pEid->Eid) { case IE_WPA: if (NdisEqualMemory(pEid->Octet, SES_OUI, 3) @@ -4380,15 +4380,15 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) break; case IE_RSN: - pRsnHeader = (PRSN_IE_HEADER_STRUCT) pTmp; + pRsnHeader = (struct rt_rsn_ie_header *) pTmp; /* 0. Version must be 1 */ if (le2cpu16(pRsnHeader->Version) != 1) break; - pTmp += sizeof(RSN_IE_HEADER_STRUCT); + pTmp += sizeof(struct rt_rsn_ie_header); /* 1. Check group cipher */ - pCipher = (PCIPHER_SUITE_STRUCT) pTmp; + pCipher = (struct rt_cipher_suite_struct *) pTmp; if (!RTMPEqualMemory(pTmp, RSN_OUI, 3)) break; @@ -4414,7 +4414,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) break; } /* set to correct offset for next parsing */ - pTmp += sizeof(CIPHER_SUITE_STRUCT); + pTmp += sizeof(struct rt_cipher_suite_struct); /* 2. Get pairwise cipher counts */ /*Count = *(u16 *)pTmp; */ @@ -4425,7 +4425,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) /* Parsing all unicast cipher suite */ while (Count > 0) { /* Skip OUI */ - pCipher = (PCIPHER_SUITE_STRUCT) pTmp; + pCipher = (struct rt_cipher_suite_struct *) pTmp; TmpCipher = Ndis802_11WEPDisabled; switch (pCipher->Type) { case 1: @@ -4452,7 +4452,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) } else { pBss->WPA2.PairCipherAux = TmpCipher; } - pTmp += sizeof(CIPHER_SUITE_STRUCT); + pTmp += sizeof(struct rt_cipher_suite_struct); Count--; } @@ -4464,7 +4464,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) /* 5. Get AKM ciphers */ /* Parsing all AKM ciphers */ while (Count > 0) { - pAKM = (PAKM_SUITE_STRUCT) pTmp; + pAKM = (struct rt_akm_suite *) pTmp; if (!RTMPEqualMemory(pTmp, RSN_OUI, 3)) break; @@ -4499,7 +4499,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) Ndis802_11AuthModeMax; break; } - pTmp += (Count * sizeof(AKM_SUITE_STRUCT)); + pTmp += (Count * sizeof(struct rt_akm_suite)); Count--; } @@ -4546,7 +4546,7 @@ void BssCipherParse(IN OUT PBSS_ENTRY pBss) * \pre * \post */ -void MacAddrRandomBssid(IN PRTMP_ADAPTER pAd, u8 *pAddr) +void MacAddrRandomBssid(struct rt_rtmp_adapter *pAd, u8 *pAddr) { int i; @@ -4572,12 +4572,12 @@ void MacAddrRandomBssid(IN PRTMP_ADAPTER pAd, u8 *pAddr) IRQL = DISPATCH_LEVEL */ -void MgtMacHeaderInit(IN PRTMP_ADAPTER pAd, - IN OUT PHEADER_802_11 pHdr80211, +void MgtMacHeaderInit(struct rt_rtmp_adapter *pAd, + struct rt_header_802_11 * pHdr80211, u8 SubType, u8 ToDs, u8 *pDA, u8 *pBssid) { - NdisZeroMemory(pHdr80211, sizeof(HEADER_802_11)); + NdisZeroMemory(pHdr80211, sizeof(struct rt_header_802_11)); pHdr80211->FC.Type = BTYPE_MGMT; pHdr80211->FC.SubType = SubType; @@ -4650,7 +4650,7 @@ unsigned long MakeOutgoingFrame(u8 * Buffer, unsigned long * FrameLen, ...) IRQL = PASSIVE_LEVEL */ -int MlmeQueueInit(IN MLME_QUEUE * Queue) +int MlmeQueueInit(struct rt_mlme_queue *Queue) { int i; @@ -4684,12 +4684,12 @@ int MlmeQueueInit(IN MLME_QUEUE * Queue) IRQL = DISPATCH_LEVEL */ -BOOLEAN MlmeEnqueue(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeEnqueue(struct rt_rtmp_adapter *pAd, unsigned long Machine, unsigned long MsgType, unsigned long MsgLen, void * Msg) { int Tail; - MLME_QUEUE *Queue = (MLME_QUEUE *) & pAd->Mlme.Queue; + struct rt_mlme_queue *Queue = (struct rt_mlme_queue *)& pAd->Mlme.Queue; /* Do nothing if the driver is starting halt state. */ /* This might happen when timer already been fired before cancel timer with mlmehalt */ @@ -4744,7 +4744,7 @@ BOOLEAN MlmeEnqueue(IN PRTMP_ADAPTER pAd, IRQL = DISPATCH_LEVEL */ -BOOLEAN MlmeEnqueueForRecv(IN PRTMP_ADAPTER pAd, +BOOLEAN MlmeEnqueueForRecv(struct rt_rtmp_adapter *pAd, unsigned long Wcid, unsigned long TimeStampHigh, unsigned long TimeStampLow, @@ -4754,9 +4754,9 @@ BOOLEAN MlmeEnqueueForRecv(IN PRTMP_ADAPTER pAd, unsigned long MsgLen, void * Msg, u8 Signal) { int Tail, Machine; - PFRAME_802_11 pFrame = (PFRAME_802_11) Msg; + struct rt_frame_802_11 * pFrame = (struct rt_frame_802_11 *) Msg; int MsgType; - MLME_QUEUE *Queue = (MLME_QUEUE *) & pAd->Mlme.Queue; + struct rt_mlme_queue *Queue = (struct rt_mlme_queue *)& pAd->Mlme.Queue; /* Do nothing if the driver is starting halt state. */ /* This might happen when timer already been fired before cancel timer with mlmehalt */ @@ -4826,7 +4826,7 @@ BOOLEAN MlmeEnqueueForRecv(IN PRTMP_ADAPTER pAd, IRQL = DISPATCH_LEVEL */ -BOOLEAN MlmeDequeue(IN MLME_QUEUE * Queue, OUT MLME_QUEUE_ELEM ** Elem) +BOOLEAN MlmeDequeue(struct rt_mlme_queue *Queue, struct rt_mlme_queue_elem ** Elem) { NdisAcquireSpinLock(&(Queue->Lock)); *Elem = &(Queue->Entry[Queue->Head]); @@ -4840,10 +4840,10 @@ BOOLEAN MlmeDequeue(IN MLME_QUEUE * Queue, OUT MLME_QUEUE_ELEM ** Elem) } /* IRQL = DISPATCH_LEVEL */ -void MlmeRestartStateMachine(IN PRTMP_ADAPTER pAd) +void MlmeRestartStateMachine(struct rt_rtmp_adapter *pAd) { #ifdef RTMP_MAC_PCI - MLME_QUEUE_ELEM *Elem = NULL; + struct rt_mlme_queue_elem *Elem = NULL; #endif /* RTMP_MAC_PCI // */ BOOLEAN Cancelled; @@ -4919,7 +4919,7 @@ void MlmeRestartStateMachine(IN PRTMP_ADAPTER pAd) IRQL = DISPATCH_LEVEL */ -BOOLEAN MlmeQueueEmpty(IN MLME_QUEUE * Queue) +BOOLEAN MlmeQueueEmpty(struct rt_mlme_queue *Queue) { BOOLEAN Ans; @@ -4940,7 +4940,7 @@ BOOLEAN MlmeQueueEmpty(IN MLME_QUEUE * Queue) IRQL = DISPATCH_LEVEL */ -BOOLEAN MlmeQueueFull(IN MLME_QUEUE * Queue) +BOOLEAN MlmeQueueFull(struct rt_mlme_queue *Queue) { BOOLEAN Ans; @@ -4962,7 +4962,7 @@ BOOLEAN MlmeQueueFull(IN MLME_QUEUE * Queue) IRQL = PASSIVE_LEVEL */ -void MlmeQueueDestroy(IN MLME_QUEUE * pQueue) +void MlmeQueueDestroy(struct rt_mlme_queue *pQueue) { NdisAcquireSpinLock(&(pQueue->Lock)); pQueue->Num = 0; @@ -4983,8 +4983,8 @@ void MlmeQueueDestroy(IN MLME_QUEUE * pQueue) IRQL = DISPATCH_LEVEL */ -BOOLEAN MsgTypeSubst(IN PRTMP_ADAPTER pAd, - IN PFRAME_802_11 pFrame, +BOOLEAN MsgTypeSubst(struct rt_rtmp_adapter *pAd, + struct rt_frame_802_11 * pFrame, int * Machine, int * MsgType) { u16 Seq, Alg; @@ -5097,7 +5097,7 @@ BOOLEAN MsgTypeSubst(IN PRTMP_ADAPTER pAd, IRQL = PASSIVE_LEVEL */ -void StateMachineInit(IN STATE_MACHINE * S, +void StateMachineInit(struct rt_state_machine *S, IN STATE_MACHINE_FUNC Trans[], unsigned long StNr, unsigned long MsgNr, @@ -5135,7 +5135,7 @@ void StateMachineInit(IN STATE_MACHINE * S, IRQL = PASSIVE_LEVEL */ -void StateMachineSetAction(IN STATE_MACHINE * S, +void StateMachineSetAction(struct rt_state_machine *S, unsigned long St, unsigned long Msg, IN STATE_MACHINE_FUNC Func) { @@ -5158,8 +5158,8 @@ void StateMachineSetAction(IN STATE_MACHINE * S, IRQL = DISPATCH_LEVEL */ -void StateMachinePerformAction(IN PRTMP_ADAPTER pAd, - IN STATE_MACHINE * S, IN MLME_QUEUE_ELEM * Elem) +void StateMachinePerformAction(struct rt_rtmp_adapter *pAd, + struct rt_state_machine *S, struct rt_mlme_queue_elem *Elem) { (*(S->TransFunc[S->CurrState * S->NrMsg + Elem->MsgType - S->Base])) (pAd, Elem); @@ -5173,7 +5173,7 @@ void StateMachinePerformAction(IN PRTMP_ADAPTER pAd, StateMachinePerformAction() ========================================================================== */ -void Drop(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void Drop(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { } @@ -5189,7 +5189,7 @@ void Drop(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ========================================================================== */ -void LfsrInit(IN PRTMP_ADAPTER pAd, unsigned long Seed) +void LfsrInit(struct rt_rtmp_adapter *pAd, unsigned long Seed) { if (Seed == 0) pAd->Mlme.ShiftReg = 1; @@ -5202,7 +5202,7 @@ void LfsrInit(IN PRTMP_ADAPTER pAd, unsigned long Seed) Description: ========================================================================== */ -u8 RandomByte(IN PRTMP_ADAPTER pAd) +u8 RandomByte(struct rt_rtmp_adapter *pAd) { unsigned long i; u8 R, Result; @@ -5244,7 +5244,7 @@ u8 RandomByte(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPCheckRates(IN PRTMP_ADAPTER pAd, +void RTMPCheckRates(struct rt_rtmp_adapter *pAd, IN u8 SupRate[], IN u8 * SupRateLen) { u8 RateIdx, i, j; @@ -5267,7 +5267,7 @@ void RTMPCheckRates(IN PRTMP_ADAPTER pAd, NdisMoveMemory(SupRate, NewRate, NewRateLen); } -BOOLEAN RTMPCheckChannel(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPCheckChannel(struct rt_rtmp_adapter *pAd, u8 CentralChannel, u8 Channel) { u8 k; @@ -5320,10 +5320,10 @@ BOOLEAN RTMPCheckChannel(IN PRTMP_ADAPTER pAd, ======================================================================== */ -BOOLEAN RTMPCheckHt(IN PRTMP_ADAPTER pAd, +BOOLEAN RTMPCheckHt(struct rt_rtmp_adapter *pAd, u8 Wcid, - IN HT_CAPABILITY_IE * pHtCapability, - IN ADD_HT_INFO_IE * pAddHtInfo) + struct rt_ht_capability_ie * pHtCapability, + struct rt_add_ht_info_ie * pAddHtInfo) { if (Wcid >= MAX_LEN_OF_MAC_TABLE) return FALSE; @@ -5449,7 +5449,7 @@ BOOLEAN RTMPCheckHt(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPUpdateMlmeRate(IN PRTMP_ADAPTER pAd) +void RTMPUpdateMlmeRate(struct rt_rtmp_adapter *pAd) { u8 MinimumRate; u8 ProperMlmeRate; /*= RATE_54; */ @@ -5558,7 +5558,7 @@ void RTMPUpdateMlmeRate(IN PRTMP_ADAPTER pAd) pAd->CommonCfg.MlmeTransmit.word)); } -char RTMPMaxRssi(IN PRTMP_ADAPTER pAd, +char RTMPMaxRssi(struct rt_rtmp_adapter *pAd, char Rssi0, char Rssi1, char Rssi2) { char larger = -127; @@ -5594,7 +5594,7 @@ char RTMPMaxRssi(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void AsicEvaluateRxAnt(IN PRTMP_ADAPTER pAd) +void AsicEvaluateRxAnt(struct rt_rtmp_adapter *pAd) { u8 BBPR3 = 0; @@ -5677,7 +5677,7 @@ void AsicRxAntEvalTimeout(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; u8 BBPR3 = 0; char larger = -127, rssi0, rssi1, rssi2; @@ -5749,7 +5749,7 @@ void APSDPeriodicExec(void *SystemSpecific1, void *FunctionContext, void *SystemSpecific2, void *SystemSpecific3) { - RTMP_ADAPTER *pAd = (RTMP_ADAPTER *) FunctionContext; + struct rt_rtmp_adapter *pAd = (struct rt_rtmp_adapter *)FunctionContext; if (!OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_MEDIA_STATE_CONNECTED)) return; @@ -5784,7 +5784,7 @@ void APSDPeriodicExec(void *SystemSpecific1, ======================================================================== */ -void RTMPSetPiggyBack(IN PRTMP_ADAPTER pAd, IN BOOLEAN bPiggyBack) +void RTMPSetPiggyBack(struct rt_rtmp_adapter *pAd, IN BOOLEAN bPiggyBack) { TX_LINK_CFG_STRUC TxLinkCfg; @@ -5809,8 +5809,8 @@ void RTMPSetPiggyBack(IN PRTMP_ADAPTER pAd, IN BOOLEAN bPiggyBack) ======================================================================== */ -BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(IN PRTMP_ADAPTER pAd, - IN PMAC_TABLE_ENTRY pEntry) +BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(struct rt_rtmp_adapter *pAd, + struct rt_mac_table_entry *pEntry) { BOOLEAN result = TRUE; @@ -5826,7 +5826,7 @@ BOOLEAN RTMPCheckEntryEnableAutoRateSwitch(IN PRTMP_ADAPTER pAd, return result; } -BOOLEAN RTMPAutoRateSwitchCheck(IN PRTMP_ADAPTER pAd) +BOOLEAN RTMPAutoRateSwitchCheck(struct rt_rtmp_adapter *pAd) { { if (pAd->StaCfg.bAutoTxRateSwitch) @@ -5850,7 +5850,7 @@ BOOLEAN RTMPAutoRateSwitchCheck(IN PRTMP_ADAPTER pAd) ======================================================================== */ -u8 RTMPStaFixedTxMode(IN PRTMP_ADAPTER pAd, IN PMAC_TABLE_ENTRY pEntry) +u8 RTMPStaFixedTxMode(struct rt_rtmp_adapter *pAd, struct rt_mac_table_entry *pEntry) { u8 tx_mode = FIXED_TXMODE_HT; @@ -5878,7 +5878,7 @@ u8 RTMPStaFixedTxMode(IN PRTMP_ADAPTER pAd, IN PMAC_TABLE_ENTRY pEntry) ======================================================================== */ -void RTMPUpdateLegacyTxSetting(u8 fixed_tx_mode, PMAC_TABLE_ENTRY pEntry) +void RTMPUpdateLegacyTxSetting(u8 fixed_tx_mode, struct rt_mac_table_entry *pEntry) { HTTRANSMIT_SETTING TransmitSetting; @@ -5921,7 +5921,7 @@ void RTMPUpdateLegacyTxSetting(u8 fixed_tx_mode, PMAC_TABLE_ENTRY pEntry) ========================================================================== */ -void AsicStaBbpTuning(IN PRTMP_ADAPTER pAd) +void AsicStaBbpTuning(struct rt_rtmp_adapter *pAd) { u8 OrigR66Value = 0, R66; /*, R66UpperBound = 0x30, R66LowerBound = 0x30; */ char Rssi; @@ -6033,7 +6033,7 @@ void AsicStaBbpTuning(IN PRTMP_ADAPTER pAd) } } -void RTMPSetAGCInitValue(IN PRTMP_ADAPTER pAd, u8 BandWidth) +void RTMPSetAGCInitValue(struct rt_rtmp_adapter *pAd, u8 BandWidth) { u8 R66 = 0x30; diff --git a/drivers/staging/rt2860/common/rt_channel.c b/drivers/staging/rt2860/common/rt_channel.c index 3fe5d9762b2c..538798981177 100644 --- a/drivers/staging/rt2860/common/rt_channel.c +++ b/drivers/staging/rt2860/common/rt_channel.c @@ -26,7 +26,7 @@ */ #include "../rt_config.h" -CH_FREQ_MAP CH_HZ_ID_MAP[] = { +struct rt_ch_freq_map CH_HZ_ID_MAP[] = { {1, 2412} , {2, 2417} @@ -144,9 +144,9 @@ CH_FREQ_MAP CH_HZ_ID_MAP[] = { , /* Japan, means J16 */ }; -int CH_HZ_ID_MAP_NUM = (sizeof(CH_HZ_ID_MAP) / sizeof(CH_FREQ_MAP)); +int CH_HZ_ID_MAP_NUM = (sizeof(CH_HZ_ID_MAP) / sizeof(struct rt_ch_freq_map)); -CH_REGION ChRegion[] = { +struct rt_ch_region ChRegion[] = { { /* Antigua and Berbuda */ "AG", CE, @@ -1422,10 +1422,10 @@ CH_REGION ChRegion[] = { , }; -static PCH_REGION GetChRegion(u8 *CntryCode) +static struct rt_ch_region *GetChRegion(u8 *CntryCode) { int loop = 0; - PCH_REGION pChRegion = NULL; + struct rt_ch_region *pChRegion = NULL; while (strcmp((char *)ChRegion[loop].CountReg, "") != 0) { if (strncmp @@ -1461,8 +1461,8 @@ static void ChBandCheck(u8 PhyMode, u8 *pChType) } } -static u8 FillChList(IN PRTMP_ADAPTER pAd, - IN PCH_DESP pChDesp, +static u8 FillChList(struct rt_rtmp_adapter *pAd, + struct rt_ch_desp *pChDesp, u8 Offset, u8 increment) { int i, j, l; @@ -1494,12 +1494,12 @@ static u8 FillChList(IN PRTMP_ADAPTER pAd, return j; } -static inline void CreateChList(IN PRTMP_ADAPTER pAd, - IN PCH_REGION pChRegion, u8 Geography) +static inline void CreateChList(struct rt_rtmp_adapter *pAd, + struct rt_ch_region *pChRegion, u8 Geography) { int i; u8 offset = 0; - PCH_DESP pChDesp; + struct rt_ch_desp *pChDesp; u8 ChType; u8 increment; @@ -1532,21 +1532,21 @@ static inline void CreateChList(IN PRTMP_ADAPTER pAd, } } -void BuildChannelListEx(IN PRTMP_ADAPTER pAd) +void BuildChannelListEx(struct rt_rtmp_adapter *pAd) { - PCH_REGION pChReg; + struct rt_ch_region *pChReg; pChReg = GetChRegion(pAd->CommonCfg.CountryCode); CreateChList(pAd, pChReg, pAd->CommonCfg.Geography); } -void BuildBeaconChList(IN PRTMP_ADAPTER pAd, +void BuildBeaconChList(struct rt_rtmp_adapter *pAd, u8 *pBuf, unsigned long *pBufLen) { int i; unsigned long TmpLen; - PCH_REGION pChRegion; - PCH_DESP pChDesp; + struct rt_ch_region *pChRegion; + struct rt_ch_desp *pChDesp; u8 ChType; pChRegion = GetChRegion(pAd->CommonCfg.CountryCode); @@ -1581,7 +1581,7 @@ void BuildBeaconChList(IN PRTMP_ADAPTER pAd, } } -static BOOLEAN IsValidChannel(IN PRTMP_ADAPTER pAd, u8 channel) +static BOOLEAN IsValidChannel(struct rt_rtmp_adapter *pAd, u8 channel) { int i; @@ -1608,7 +1608,7 @@ static u8 GetExtCh(u8 Channel, u8 Direction) return ExtCh; } -void N_ChannelCheck(IN PRTMP_ADAPTER pAd) +void N_ChannelCheck(struct rt_rtmp_adapter *pAd) { /*u8 ChannelNum = pAd->ChannelListNum; */ u8 Channel = pAd->CommonCfg.Channel; @@ -1670,7 +1670,7 @@ void N_ChannelCheck(IN PRTMP_ADAPTER pAd) } -void N_SetCenCh(IN PRTMP_ADAPTER pAd) +void N_SetCenCh(struct rt_rtmp_adapter *pAd) { if (pAd->CommonCfg.RegTransmitSetting.field.BW == BW_40) { if (pAd->CommonCfg.RegTransmitSetting.field.EXTCHA == @@ -1690,7 +1690,7 @@ void N_SetCenCh(IN PRTMP_ADAPTER pAd) } } -u8 GetCuntryMaxTxPwr(IN PRTMP_ADAPTER pAd, u8 channel) +u8 GetCuntryMaxTxPwr(struct rt_rtmp_adapter *pAd, u8 channel) { int i; for (i = 0; i < pAd->ChannelListNum; i++) { diff --git a/drivers/staging/rt2860/common/rt_rf.c b/drivers/staging/rt2860/common/rt_rf.c index 6d6ca32691ff..fb0ca88fa3ea 100644 --- a/drivers/staging/rt2860/common/rt_rf.c +++ b/drivers/staging/rt2860/common/rt_rf.c @@ -53,7 +53,7 @@ ======================================================================== */ -int RT30xxWriteRFRegister(IN PRTMP_ADAPTER pAd, +int RT30xxWriteRFRegister(struct rt_rtmp_adapter *pAd, u8 regID, u8 value) { RF_CSR_CFG_STRUC rfcsr; @@ -101,7 +101,7 @@ int RT30xxWriteRFRegister(IN PRTMP_ADAPTER pAd, ======================================================================== */ -int RT30xxReadRFRegister(IN PRTMP_ADAPTER pAd, +int RT30xxReadRFRegister(struct rt_rtmp_adapter *pAd, u8 regID, u8 *pValue) { RF_CSR_CFG_STRUC rfcsr; @@ -139,15 +139,15 @@ int RT30xxReadRFRegister(IN PRTMP_ADAPTER pAd, return STATUS_SUCCESS; } -void NICInitRFRegisters(IN RTMP_ADAPTER * pAd) +void NICInitRFRegisters(struct rt_rtmp_adapter *pAd) { if (pAd->chipOps.AsicRfInit) pAd->chipOps.AsicRfInit(pAd); } -void RtmpChipOpsRFHook(IN RTMP_ADAPTER * pAd) +void RtmpChipOpsRFHook(struct rt_rtmp_adapter *pAd) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; pChipOps->pRFRegTable = NULL; pChipOps->AsicRfInit = NULL; diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c index 5cda0ea53f3b..46e7a2a41125 100644 --- a/drivers/staging/rt2860/common/rtmp_init.c +++ b/drivers/staging/rt2860/common/rtmp_init.c @@ -43,7 +43,7 @@ char *CipherName[] = /* */ /* BBP register initialization set */ /* */ -REG_PAIR BBPRegTable[] = { +struct rt_reg_pair BBPRegTable[] = { {BBP_R65, 0x2C}, /* fix rssi issue */ {BBP_R66, 0x38}, /* Also set this default value to pAd->BbpTuning.R66CurrentValue at initial */ {BBP_R69, 0x12}, @@ -61,13 +61,13 @@ REG_PAIR BBPRegTable[] = { {BBP_R106, 0x35}, /* for ShortGI throughput */ }; -#define NUM_BBP_REG_PARMS (sizeof(BBPRegTable) / sizeof(REG_PAIR)) +#define NUM_BBP_REG_PARMS (sizeof(BBPRegTable) / sizeof(struct rt_reg_pair)) /* */ /* ASIC register initialization sets */ /* */ -RTMP_REG_PAIR MACRegTable[] = { +struct rt_rtmp_reg_pair MACRegTable[] = { #if defined(HW_BEACON_OFFSET) && (HW_BEACON_OFFSET == 0x200) {BCN_OFFSET0, 0xf8f0e8e0}, /* 0x3800(e0), 0x3A00(e8), 0x3C00(f0), 0x3E00(f8), 512B for each beacon */ {BCN_OFFSET1, 0x6f77d0c8}, /* 0x3200(c8), 0x3400(d0), 0x1DC0(77), 0x1BC0(6f), 512B for each beacon */ @@ -124,20 +124,20 @@ RTMP_REG_PAIR MACRegTable[] = { {PWR_PIN_CFG, 0x00000003}, /* patch for 2880-E */ }; -RTMP_REG_PAIR STAMACRegTable[] = { +struct rt_rtmp_reg_pair STAMACRegTable[] = { {WMM_AIFSN_CFG, 0x00002273}, {WMM_CWMIN_CFG, 0x00002344}, {WMM_CWMAX_CFG, 0x000034aa}, }; -#define NUM_MAC_REG_PARMS (sizeof(MACRegTable) / sizeof(RTMP_REG_PAIR)) -#define NUM_STA_MAC_REG_PARMS (sizeof(STAMACRegTable) / sizeof(RTMP_REG_PAIR)) +#define NUM_MAC_REG_PARMS (sizeof(MACRegTable) / sizeof(struct rt_rtmp_reg_pair)) +#define NUM_STA_MAC_REG_PARMS (sizeof(STAMACRegTable) / sizeof(struct rt_rtmp_reg_pair)) /* ======================================================================== Routine Description: - Allocate RTMP_ADAPTER data block and do some initialization + Allocate struct rt_rtmp_adapter data block and do some initialization Arguments: Adapter Pointer to our adapter @@ -153,9 +153,9 @@ RTMP_REG_PAIR STAMACRegTable[] = { ======================================================================== */ int RTMPAllocAdapterBlock(void *handle, - OUT PRTMP_ADAPTER * ppAdapter) + struct rt_rtmp_adapter * * ppAdapter) { - PRTMP_ADAPTER pAd; + struct rt_rtmp_adapter *pAd; int Status; int index; u8 *pBeaconBuf = NULL; @@ -165,7 +165,7 @@ int RTMPAllocAdapterBlock(void *handle, *ppAdapter = NULL; do { - /* Allocate RTMP_ADAPTER memory block */ + /* Allocate struct rt_rtmp_adapter memory block */ pBeaconBuf = kmalloc(MAX_BEACON_SIZE, MEM_ALLOC_FLAG); if (pBeaconBuf == NULL) { Status = NDIS_STATUS_FAILURE; @@ -182,7 +182,7 @@ int RTMPAllocAdapterBlock(void *handle, pAd->BeaconBuf = pBeaconBuf; DBGPRINT(RT_DEBUG_OFF, ("\n\n=== pAd = %p, size = %d ===\n\n", pAd, - (u32)sizeof(RTMP_ADAPTER))); + (u32)sizeof(struct rt_rtmp_adapter))); /* Init spin locks */ NdisAllocateSpinLock(&pAd->MgmtRingLock); @@ -230,7 +230,7 @@ int RTMPAllocAdapterBlock(void *handle, ======================================================================== */ -void RTMPReadTxPwrPerRate(IN PRTMP_ADAPTER pAd) +void RTMPReadTxPwrPerRate(struct rt_rtmp_adapter *pAd) { unsigned long data, Adata, Gdata; u16 i, value, value2; @@ -441,7 +441,7 @@ void RTMPReadTxPwrPerRate(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void RTMPReadChannelPwr(IN PRTMP_ADAPTER pAd) +void RTMPReadChannelPwr(struct rt_rtmp_adapter *pAd) { u8 i, choffset; EEPROM_TX_PWR_STRUC Power; @@ -650,7 +650,7 @@ void RTMPReadChannelPwr(IN PRTMP_ADAPTER pAd) ======================================================================== */ -int NICReadRegParameters(IN PRTMP_ADAPTER pAd, +int NICReadRegParameters(struct rt_rtmp_adapter *pAd, void *WrapperConfigurationContext) { int Status = NDIS_STATUS_SUCCESS; @@ -676,7 +676,7 @@ int NICReadRegParameters(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void NICReadEEPROMParameters(IN PRTMP_ADAPTER pAd, u8 *mac_addr) +void NICReadEEPROMParameters(struct rt_rtmp_adapter *pAd, u8 *mac_addr) { u32 data = 0; u16 i, value, value2; @@ -1133,7 +1133,7 @@ void NICReadEEPROMParameters(IN PRTMP_ADAPTER pAd, u8 *mac_addr) ======================================================================== */ -void NICInitAsicFromEEPROM(IN PRTMP_ADAPTER pAd) +void NICInitAsicFromEEPROM(struct rt_rtmp_adapter *pAd) { u32 data = 0; u8 BBPR1 = 0; @@ -1242,7 +1242,7 @@ void NICInitAsicFromEEPROM(IN PRTMP_ADAPTER pAd) #ifdef RTMP_MAC_PCI #ifdef RT30xx if (IS_RT3090(pAd) || IS_RT3572(pAd) || IS_RT3390(pAd)) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; if (pChipOps->AsicReverseRfFromSleepMode) pChipOps->AsicReverseRfFromSleepMode(pAd); } @@ -1366,7 +1366,7 @@ void NICInitAsicFromEEPROM(IN PRTMP_ADAPTER pAd) ======================================================================== */ -int NICInitializeAdapter(IN PRTMP_ADAPTER pAd, IN BOOLEAN bHardReset) +int NICInitializeAdapter(struct rt_rtmp_adapter *pAd, IN BOOLEAN bHardReset) { int Status = NDIS_STATUS_SUCCESS; WPDMA_GLO_CFG_STRUC GloCfg; @@ -1562,7 +1562,7 @@ retry: ======================================================================== */ -int NICInitializeAsic(IN PRTMP_ADAPTER pAd, IN BOOLEAN bHardReset) +int NICInitializeAsic(struct rt_rtmp_adapter *pAd, IN BOOLEAN bHardReset) { unsigned long Index = 0; u8 R0 = 0xff; @@ -1929,7 +1929,7 @@ int NICInitializeAsic(IN PRTMP_ADAPTER pAd, IN BOOLEAN bHardReset) ======================================================================== */ -void NICIssueReset(IN PRTMP_ADAPTER pAd) +void NICIssueReset(struct rt_rtmp_adapter *pAd) { u32 Value = 0; DBGPRINT(RT_DEBUG_TRACE, ("--> NICIssueReset\n")); @@ -1965,15 +1965,15 @@ void NICIssueReset(IN PRTMP_ADAPTER pAd) ======================================================================== */ -BOOLEAN NICCheckForHang(IN PRTMP_ADAPTER pAd) +BOOLEAN NICCheckForHang(struct rt_rtmp_adapter *pAd) { return (FALSE); } -void NICUpdateFifoStaCounters(IN PRTMP_ADAPTER pAd) +void NICUpdateFifoStaCounters(struct rt_rtmp_adapter *pAd) { TX_STA_FIFO_STRUC StaFifo; - MAC_TABLE_ENTRY *pEntry; + struct rt_mac_table_entry *pEntry; u8 i = 0; u8 pid = 0, wcid = 0; char reTry; @@ -2094,7 +2094,7 @@ void NICUpdateFifoStaCounters(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void NICUpdateRawCounters(IN PRTMP_ADAPTER pAd) +void NICUpdateRawCounters(struct rt_rtmp_adapter *pAd) { u32 OldValue; /*, Value2; */ /*unsigned long PageSum, OneSecTransmitCount; */ @@ -2114,7 +2114,7 @@ void NICUpdateRawCounters(IN PRTMP_ADAPTER pAd) TX_AGG_CNT5_STRUC TxAggCnt5; TX_AGG_CNT6_STRUC TxAggCnt6; TX_AGG_CNT7_STRUC TxAggCnt7; - COUNTER_RALINK *pRalinkCounters; + struct rt_counter_ralink *pRalinkCounters; pRalinkCounters = &pAd->RalinkCounters; @@ -2299,7 +2299,7 @@ void NICUpdateRawCounters(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void NICResetFromError(IN PRTMP_ADAPTER pAd) +void NICResetFromError(struct rt_rtmp_adapter *pAd) { /* Reset BBP (according to alex, reset ASIC will force reset BBP */ /* Therefore, skip the reset BBP */ @@ -2317,7 +2317,7 @@ void NICResetFromError(IN PRTMP_ADAPTER pAd) AsicLockChannel(pAd, pAd->CommonCfg.CentralChannel); } -int NICLoadFirmware(IN PRTMP_ADAPTER pAd) +int NICLoadFirmware(struct rt_rtmp_adapter *pAd) { int status = NDIS_STATUS_SUCCESS; if (pAd->chipOps.loadFirmware) @@ -2339,7 +2339,7 @@ int NICLoadFirmware(IN PRTMP_ADAPTER pAd) ======================================================================== */ -void NICEraseFirmware(IN PRTMP_ADAPTER pAd) +void NICEraseFirmware(struct rt_rtmp_adapter *pAd) { if (pAd->chipOps.eraseFirmware) pAd->chipOps.eraseFirmware(pAd); @@ -2367,7 +2367,7 @@ void NICEraseFirmware(IN PRTMP_ADAPTER pAd) ======================================================================== */ -int NICLoadRateSwitchingParams(IN PRTMP_ADAPTER pAd) +int NICLoadRateSwitchingParams(struct rt_rtmp_adapter *pAd) { return NDIS_STATUS_SUCCESS; } @@ -2500,7 +2500,7 @@ void RTMPMoveMemory(void *pDest, void *pSrc, unsigned long Length) ======================================================================== */ -void UserCfgInit(IN PRTMP_ADAPTER pAd) +void UserCfgInit(struct rt_rtmp_adapter *pAd) { u32 key_index, bss_index; @@ -2673,7 +2673,7 @@ void UserCfgInit(IN PRTMP_ADAPTER pAd) pAd->CommonCfg.NdisRadioStateOff = FALSE; /* New to support microsoft disable radio with OID command */ pAd->StaCfg.RssiTrigger = 0; - NdisZeroMemory(&pAd->StaCfg.RssiSample, sizeof(RSSI_SAMPLE)); + NdisZeroMemory(&pAd->StaCfg.RssiSample, sizeof(struct rt_rssi_sample)); pAd->StaCfg.RssiTriggerMode = RSSI_TRIGGERED_UPON_BELOW_THRESHOLD; pAd->StaCfg.AtimWin = 0; @@ -2793,7 +2793,7 @@ void UserCfgInit(IN PRTMP_ADAPTER pAd) /*pAd->bTest1 = FALSE; */ /* initialize MAC table and allocate spin lock */ - NdisZeroMemory(&pAd->MacTab, sizeof(MAC_TABLE)); + NdisZeroMemory(&pAd->MacTab, sizeof(struct rt_mac_table)); InitializeQueueHeader(&pAd->MacTab.McastPsQueue); NdisAllocateSpinLock(&pAd->MacTabLock); @@ -2875,8 +2875,8 @@ void AtoH(char *src, u8 *dest, int destlen) ======================================================================== */ -void RTMPInitTimer(IN PRTMP_ADAPTER pAd, - IN PRALINK_TIMER_STRUCT pTimer, +void RTMPInitTimer(struct rt_rtmp_adapter *pAd, + struct rt_ralink_timer *pTimer, void *pTimerFunc, void *pData, IN BOOLEAN Repeat) { /* */ @@ -2915,7 +2915,7 @@ void RTMPInitTimer(IN PRTMP_ADAPTER pAd, ======================================================================== */ -void RTMPSetTimer(IN PRALINK_TIMER_STRUCT pTimer, unsigned long Value) +void RTMPSetTimer(struct rt_ralink_timer *pTimer, unsigned long Value) { if (pTimer->Valid) { pTimer->TimerValue = Value; @@ -2950,7 +2950,7 @@ void RTMPSetTimer(IN PRALINK_TIMER_STRUCT pTimer, unsigned long Value) ======================================================================== */ -void RTMPModTimer(IN PRALINK_TIMER_STRUCT pTimer, unsigned long Value) +void RTMPModTimer(struct rt_ralink_timer *pTimer, unsigned long Value) { BOOLEAN Cancel; @@ -2989,7 +2989,7 @@ void RTMPModTimer(IN PRALINK_TIMER_STRUCT pTimer, unsigned long Value) ======================================================================== */ -void RTMPCancelTimer(IN PRALINK_TIMER_STRUCT pTimer, OUT BOOLEAN * pCancelled) +void RTMPCancelTimer(struct rt_ralink_timer *pTimer, OUT BOOLEAN * pCancelled) { if (pTimer->Valid) { if (pTimer->State == FALSE) @@ -3030,7 +3030,7 @@ void RTMPCancelTimer(IN PRALINK_TIMER_STRUCT pTimer, OUT BOOLEAN * pCancelled) ======================================================================== */ -void RTMPSetLED(IN PRTMP_ADAPTER pAd, u8 Status) +void RTMPSetLED(struct rt_rtmp_adapter *pAd, u8 Status) { /*unsigned long data; */ u8 HighByte = 0; @@ -3117,7 +3117,7 @@ void RTMPSetLED(IN PRTMP_ADAPTER pAd, u8 Status) > -57 Excellent ======================================================================== */ -void RTMPSetSignalLED(IN PRTMP_ADAPTER pAd, IN NDIS_802_11_RSSI Dbm) +void RTMPSetSignalLED(struct rt_rtmp_adapter *pAd, IN NDIS_802_11_RSSI Dbm) { u8 nLed = 0; @@ -3164,7 +3164,7 @@ void RTMPSetSignalLED(IN PRTMP_ADAPTER pAd, IN NDIS_802_11_RSSI Dbm) Before Enable RX, make sure you have enabled Interrupt. ======================================================================== */ -void RTMPEnableRxTx(IN PRTMP_ADAPTER pAd) +void RTMPEnableRxTx(struct rt_rtmp_adapter *pAd) { /* WPDMA_GLO_CFG_STRUC GloCfg; */ /* unsigned long i = 0; */ @@ -3193,12 +3193,12 @@ void RTMPEnableRxTx(IN PRTMP_ADAPTER pAd) } /*+++Add by shiang, move from os/linux/rt_main_dev.c */ -void CfgInitHook(PRTMP_ADAPTER pAd) +void CfgInitHook(struct rt_rtmp_adapter *pAd) { pAd->bBroadComHT = TRUE; } -int rt28xx_init(IN PRTMP_ADAPTER pAd, +int rt28xx_init(struct rt_rtmp_adapter *pAd, char *pDefaultMac, char *pHostName) { u32 index; @@ -3476,12 +3476,12 @@ err0: /*---Add by shiang, move from os/linux/rt_main_dev.c */ -static int RtmpChipOpsRegister(IN RTMP_ADAPTER * pAd, int infType) +static int RtmpChipOpsRegister(struct rt_rtmp_adapter *pAd, int infType) { - RTMP_CHIP_OP *pChipOps = &pAd->chipOps; + struct rt_rtmp_chip_op *pChipOps = &pAd->chipOps; int status; - memset(pChipOps, 0, sizeof(RTMP_CHIP_OP)); + memset(pChipOps, 0, sizeof(struct rt_rtmp_chip_op)); /* set eeprom related hook functions */ status = RtmpChipOpsEepromHook(pAd, infType); @@ -3508,7 +3508,7 @@ static int RtmpChipOpsRegister(IN RTMP_ADAPTER * pAd, int infType) return status; } -int RtmpRaDevCtrlInit(IN RTMP_ADAPTER * pAd, IN RTMP_INF_TYPE infType) +int RtmpRaDevCtrlInit(struct rt_rtmp_adapter *pAd, IN RTMP_INF_TYPE infType) { /*void *handle; */ @@ -3535,7 +3535,7 @@ int RtmpRaDevCtrlInit(IN RTMP_ADAPTER * pAd, IN RTMP_INF_TYPE infType) return 0; } -BOOLEAN RtmpRaDevCtrlExit(IN RTMP_ADAPTER * pAd) +BOOLEAN RtmpRaDevCtrlExit(struct rt_rtmp_adapter *pAd) { RTMPFreeAdapter(pAd); @@ -3544,7 +3544,7 @@ BOOLEAN RtmpRaDevCtrlExit(IN RTMP_ADAPTER * pAd) } /* not yet support MBSS */ -struct net_device *get_netdev_from_bssid(IN PRTMP_ADAPTER pAd, u8 FromWhichBSSID) +struct net_device *get_netdev_from_bssid(struct rt_rtmp_adapter *pAd, u8 FromWhichBSSID) { struct net_device *dev_p = NULL; diff --git a/drivers/staging/rt2860/common/rtmp_mcu.c b/drivers/staging/rt2860/common/rtmp_mcu.c index 3d695278afea..683abad30f66 100644 --- a/drivers/staging/rt2860/common/rtmp_mcu.c +++ b/drivers/staging/rt2860/common/rtmp_mcu.c @@ -80,7 +80,7 @@ ======================================================================== */ -int RtmpAsicEraseFirmware(IN PRTMP_ADAPTER pAd) +int RtmpAsicEraseFirmware(struct rt_rtmp_adapter *pAd) { unsigned long i; @@ -107,7 +107,7 @@ int RtmpAsicEraseFirmware(IN PRTMP_ADAPTER pAd) ======================================================================== */ -int RtmpAsicLoadFirmware(IN PRTMP_ADAPTER pAd) +int RtmpAsicLoadFirmware(struct rt_rtmp_adapter *pAd) { int Status = NDIS_STATUS_SUCCESS; @@ -172,7 +172,7 @@ int RtmpAsicLoadFirmware(IN PRTMP_ADAPTER pAd) return Status; } -int RtmpAsicSendCommandToMcu(IN PRTMP_ADAPTER pAd, +int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd, u8 Command, u8 Token, u8 Arg0, u8 Arg1) { diff --git a/drivers/staging/rt2860/common/rtmp_timer.c b/drivers/staging/rt2860/common/rtmp_timer.c index d5648d8967d9..42e47d9dc2c9 100644 --- a/drivers/staging/rt2860/common/rtmp_timer.c +++ b/drivers/staging/rt2860/common/rtmp_timer.c @@ -74,15 +74,15 @@ BUILD_TIMER_FUNCTION(LedCtrlMain); #endif #ifdef RTMP_TIMER_TASK_SUPPORT -static void RtmpTimerQHandle(RTMP_ADAPTER * pAd) +static void RtmpTimerQHandle(struct rt_rtmp_adapter *pAd) { #ifndef KTHREAD_SUPPORT int status; #endif - RALINK_TIMER_STRUCT *pTimer; - RTMP_TIMER_TASK_ENTRY *pEntry; + struct rt_ralink_timer *pTimer; + struct rt_rtmp_timer_task_entry *pEntry; unsigned long irqFlag; - RTMP_OS_TASK *pTask; + struct rt_rtmp_os_task *pTask; pTask = &pAd->timerTask; while (!pTask->task_killed) { @@ -140,11 +140,11 @@ static void RtmpTimerQHandle(RTMP_ADAPTER * pAd) int RtmpTimerQThread(IN void *Context) { - RTMP_OS_TASK *pTask; - PRTMP_ADAPTER pAd; + struct rt_rtmp_os_task *pTask; + struct rt_rtmp_adapter *pAd; - pTask = (RTMP_OS_TASK *) Context; - pAd = (PRTMP_ADAPTER) pTask->priv; + pTask = (struct rt_rtmp_os_task *)Context; + pAd = (struct rt_rtmp_adapter *)pTask->priv; RtmpOSTaskCustomize(pTask); @@ -174,12 +174,12 @@ int RtmpTimerQThread(IN void *Context) } -RTMP_TIMER_TASK_ENTRY *RtmpTimerQInsert(IN RTMP_ADAPTER * pAd, - IN RALINK_TIMER_STRUCT * pTimer) +struct rt_rtmp_timer_task_entry *RtmpTimerQInsert(struct rt_rtmp_adapter *pAd, + struct rt_ralink_timer *pTimer) { - RTMP_TIMER_TASK_ENTRY *pQNode = NULL, *pQTail; + struct rt_rtmp_timer_task_entry *pQNode = NULL, *pQTail; unsigned long irqFlags; - RTMP_OS_TASK *pTask = &pAd->timerTask; + struct rt_rtmp_os_task *pTask = &pAd->timerTask; RTMP_INT_LOCK(&pAd->TimerQLock, irqFlags); if (pAd->TimerQ.status & RTMP_TASK_CAN_DO_INSERT) { @@ -211,9 +211,9 @@ RTMP_TIMER_TASK_ENTRY *RtmpTimerQInsert(IN RTMP_ADAPTER * pAd, return pQNode; } -BOOLEAN RtmpTimerQRemove(IN RTMP_ADAPTER * pAd, IN RALINK_TIMER_STRUCT * pTimer) +BOOLEAN RtmpTimerQRemove(struct rt_rtmp_adapter *pAd, struct rt_ralink_timer *pTimer) { - RTMP_TIMER_TASK_ENTRY *pNode, *pPrev = NULL; + struct rt_rtmp_timer_task_entry *pNode, *pPrev = NULL; unsigned long irqFlags; RTMP_INT_LOCK(&pAd->TimerQLock, irqFlags); @@ -245,9 +245,9 @@ BOOLEAN RtmpTimerQRemove(IN RTMP_ADAPTER * pAd, IN RALINK_TIMER_STRUCT * pTimer) return TRUE; } -void RtmpTimerQExit(RTMP_ADAPTER * pAd) +void RtmpTimerQExit(struct rt_rtmp_adapter *pAd) { - RTMP_TIMER_TASK_ENTRY *pTimerQ; + struct rt_rtmp_timer_task_entry *pTimerQ; unsigned long irqFlags; RTMP_INT_LOCK(&pAd->TimerQLock, irqFlags); @@ -267,10 +267,10 @@ void RtmpTimerQExit(RTMP_ADAPTER * pAd) } -void RtmpTimerQInit(RTMP_ADAPTER * pAd) +void RtmpTimerQInit(struct rt_rtmp_adapter *pAd) { int i; - RTMP_TIMER_TASK_ENTRY *pQNode, *pEntry; + struct rt_rtmp_timer_task_entry *pQNode, *pEntry; unsigned long irqFlags; NdisAllocateSpinLock(&pAd->TimerQLock); @@ -278,12 +278,12 @@ void RtmpTimerQInit(RTMP_ADAPTER * pAd) NdisZeroMemory(&pAd->TimerQ, sizeof(pAd->TimerQ)); os_alloc_mem(pAd, &pAd->TimerQ.pTimerQPoll, - sizeof(RTMP_TIMER_TASK_ENTRY) * TIMER_QUEUE_SIZE_MAX); + sizeof(struct rt_rtmp_timer_task_entry) * TIMER_QUEUE_SIZE_MAX); if (pAd->TimerQ.pTimerQPoll) { pEntry = NULL; - pQNode = (RTMP_TIMER_TASK_ENTRY *) pAd->TimerQ.pTimerQPoll; + pQNode = (struct rt_rtmp_timer_task_entry *)pAd->TimerQ.pTimerQPoll; NdisZeroMemory(pAd->TimerQ.pTimerQPoll, - sizeof(RTMP_TIMER_TASK_ENTRY) * + sizeof(struct rt_rtmp_timer_task_entry) * TIMER_QUEUE_SIZE_MAX); RTMP_INT_LOCK(&pAd->TimerQLock, irqFlags); diff --git a/drivers/staging/rt2860/common/spectrum.c b/drivers/staging/rt2860/common/spectrum.c index b89ad5f5a462..51e38d809333 100644 --- a/drivers/staging/rt2860/common/spectrum.c +++ b/drivers/staging/rt2860/common/spectrum.c @@ -40,7 +40,7 @@ #include "action.h" /* The regulatory information in the USA (US) */ -DOT11_REGULATORY_INFORMATION USARegulatoryInfo[] = { +struct rt_dot11_regulatory_information USARegulatoryInfo[] = { /* "regulatory class" "number of channels" "Max Tx Pwr" "channel list" */ {0, {0, 0, {0} } @@ -95,10 +95,10 @@ DOT11_REGULATORY_INFORMATION USARegulatoryInfo[] = { } }; -#define USA_REGULATORY_INFO_SIZE (sizeof(USARegulatoryInfo) / sizeof(DOT11_REGULATORY_INFORMATION)) +#define USA_REGULATORY_INFO_SIZE (sizeof(USARegulatoryInfo) / sizeof(struct rt_dot11_regulatory_information)) /* The regulatory information in Europe */ -DOT11_REGULATORY_INFORMATION EuropeRegulatoryInfo[] = { +struct rt_dot11_regulatory_information EuropeRegulatoryInfo[] = { /* "regulatory class" "number of channels" "Max Tx Pwr" "channel list" */ {0, {0, 0, {0} } @@ -121,10 +121,10 @@ DOT11_REGULATORY_INFORMATION EuropeRegulatoryInfo[] = { } }; -#define EU_REGULATORY_INFO_SIZE (sizeof(EuropeRegulatoryInfo) / sizeof(DOT11_REGULATORY_INFORMATION)) +#define EU_REGULATORY_INFO_SIZE (sizeof(EuropeRegulatoryInfo) / sizeof(struct rt_dot11_regulatory_information)) /* The regulatory information in Japan */ -DOT11_REGULATORY_INFORMATION JapanRegulatoryInfo[] = { +struct rt_dot11_regulatory_information JapanRegulatoryInfo[] = { /* "regulatory class" "number of channels" "Max Tx Pwr" "channel list" */ {0, {0, 0, {0} } @@ -259,17 +259,17 @@ DOT11_REGULATORY_INFORMATION JapanRegulatoryInfo[] = { } }; -#define JP_REGULATORY_INFO_SIZE (sizeof(JapanRegulatoryInfo) / sizeof(DOT11_REGULATORY_INFORMATION)) +#define JP_REGULATORY_INFO_SIZE (sizeof(JapanRegulatoryInfo) / sizeof(struct rt_dot11_regulatory_information)) -char RTMP_GetTxPwr(IN PRTMP_ADAPTER pAd, IN HTTRANSMIT_SETTING HTTxMode) +char RTMP_GetTxPwr(struct rt_rtmp_adapter *pAd, IN HTTRANSMIT_SETTING HTTxMode) { - typedef struct __TX_PWR_CFG { + struct tx_pwr_cfg { u8 Mode; u8 MCS; u16 req; u8 shift; u32 BitMask; - } TX_PWR_CFG; + }; u32 Value; int Idx; @@ -279,7 +279,7 @@ char RTMP_GetTxPwr(IN PRTMP_ADAPTER pAd, IN HTTRANSMIT_SETTING HTTxMode) char DaltaPwr; unsigned long TxPwr[5]; - TX_PWR_CFG TxPwrCfg[] = { + struct tx_pwr_cfg TxPwrCfg[] = { {MODE_CCK, 0, 0, 4, 0x000000f0}, {MODE_CCK, 1, 0, 0, 0x0000000f}, {MODE_CCK, 2, 0, 12, 0x0000f000}, @@ -310,7 +310,7 @@ char RTMP_GetTxPwr(IN PRTMP_ADAPTER pAd, IN HTTRANSMIT_SETTING HTTxMode) {MODE_HTMIX, 14, 3, 12, 0x0000f000}, {MODE_HTMIX, 15, 3, 8, 0x00000f00} }; -#define MAX_TXPWR_TAB_SIZE (sizeof(TxPwrCfg) / sizeof(TX_PWR_CFG)) +#define MAX_TXPWR_TAB_SIZE (sizeof(TxPwrCfg) / sizeof(struct tx_pwr_cfg)) CurTxPwr = 19; @@ -395,15 +395,15 @@ char RTMP_GetTxPwr(IN PRTMP_ADAPTER pAd, IN HTTRANSMIT_SETTING HTTxMode) return CurTxPwr; } -void MeasureReqTabInit(IN PRTMP_ADAPTER pAd) +void MeasureReqTabInit(struct rt_rtmp_adapter *pAd) { NdisAllocateSpinLock(&pAd->CommonCfg.MeasureReqTabLock); pAd->CommonCfg.pMeasureReqTab = - kmalloc(sizeof(MEASURE_REQ_TAB), GFP_ATOMIC); + kmalloc(sizeof(struct rt_measure_req_tab), GFP_ATOMIC); if (pAd->CommonCfg.pMeasureReqTab) NdisZeroMemory(pAd->CommonCfg.pMeasureReqTab, - sizeof(MEASURE_REQ_TAB)); + sizeof(struct rt_measure_req_tab)); else DBGPRINT(RT_DEBUG_ERROR, ("%s Fail to alloc memory for pAd->CommonCfg.pMeasureReqTab.\n", @@ -412,7 +412,7 @@ void MeasureReqTabInit(IN PRTMP_ADAPTER pAd) return; } -void MeasureReqTabExit(IN PRTMP_ADAPTER pAd) +void MeasureReqTabExit(struct rt_rtmp_adapter *pAd) { NdisFreeSpinLock(&pAd->CommonCfg.MeasureReqTabLock); @@ -423,12 +423,12 @@ void MeasureReqTabExit(IN PRTMP_ADAPTER pAd) return; } -PMEASURE_REQ_ENTRY MeasureReqLookUp(IN PRTMP_ADAPTER pAd, u8 DialogToken) +struct rt_measure_req_entry *MeasureReqLookUp(struct rt_rtmp_adapter *pAd, u8 DialogToken) { u32 HashIdx; - PMEASURE_REQ_TAB pTab = pAd->CommonCfg.pMeasureReqTab; - PMEASURE_REQ_ENTRY pEntry = NULL; - PMEASURE_REQ_ENTRY pPrevEntry = NULL; + struct rt_measure_req_tab *pTab = pAd->CommonCfg.pMeasureReqTab; + struct rt_measure_req_entry *pEntry = NULL; + struct rt_measure_req_entry *pPrevEntry = NULL; if (pTab == NULL) { DBGPRINT(RT_DEBUG_ERROR, @@ -455,12 +455,12 @@ PMEASURE_REQ_ENTRY MeasureReqLookUp(IN PRTMP_ADAPTER pAd, u8 DialogToken) return pEntry; } -PMEASURE_REQ_ENTRY MeasureReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) +struct rt_measure_req_entry *MeasureReqInsert(struct rt_rtmp_adapter *pAd, u8 DialogToken) { int i; unsigned long HashIdx; - PMEASURE_REQ_TAB pTab = pAd->CommonCfg.pMeasureReqTab; - PMEASURE_REQ_ENTRY pEntry = NULL, pCurrEntry; + struct rt_measure_req_tab *pTab = pAd->CommonCfg.pMeasureReqTab; + struct rt_measure_req_entry *pEntry = NULL, *pCurrEntry; unsigned long Now; if (pTab == NULL) { @@ -482,11 +482,11 @@ PMEASURE_REQ_ENTRY MeasureReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) lastTime + MQ_REQ_AGE_OUT))) { - PMEASURE_REQ_ENTRY pPrevEntry = NULL; + struct rt_measure_req_entry *pPrevEntry = NULL; unsigned long HashIdx = MQ_DIALOGTOKEN_HASH_INDEX(pEntry-> DialogToken); - PMEASURE_REQ_ENTRY pProbeEntry = + struct rt_measure_req_entry *pProbeEntry = pTab->Hash[HashIdx]; /* update Hash list */ @@ -507,7 +507,7 @@ PMEASURE_REQ_ENTRY MeasureReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) } while (pProbeEntry); NdisZeroMemory(pEntry, - sizeof(MEASURE_REQ_ENTRY)); + sizeof(struct rt_measure_req_entry)); pTab->Size--; break; @@ -548,10 +548,10 @@ PMEASURE_REQ_ENTRY MeasureReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) return pEntry; } -void MeasureReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) +void MeasureReqDelete(struct rt_rtmp_adapter *pAd, u8 DialogToken) { - PMEASURE_REQ_TAB pTab = pAd->CommonCfg.pMeasureReqTab; - PMEASURE_REQ_ENTRY pEntry = NULL; + struct rt_measure_req_tab *pTab = pAd->CommonCfg.pMeasureReqTab; + struct rt_measure_req_entry *pEntry = NULL; if (pTab == NULL) { DBGPRINT(RT_DEBUG_ERROR, @@ -566,9 +566,9 @@ void MeasureReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) pEntry = MeasureReqLookUp(pAd, DialogToken); if (pEntry != NULL) { - PMEASURE_REQ_ENTRY pPrevEntry = NULL; + struct rt_measure_req_entry *pPrevEntry = NULL; unsigned long HashIdx = MQ_DIALOGTOKEN_HASH_INDEX(pEntry->DialogToken); - PMEASURE_REQ_ENTRY pProbeEntry = pTab->Hash[HashIdx]; + struct rt_measure_req_entry *pProbeEntry = pTab->Hash[HashIdx]; RTMP_SEM_LOCK(&pAd->CommonCfg.MeasureReqTabLock); /* update Hash list */ @@ -586,7 +586,7 @@ void MeasureReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) pProbeEntry = pProbeEntry->pNext; } while (pProbeEntry); - NdisZeroMemory(pEntry, sizeof(MEASURE_REQ_ENTRY)); + NdisZeroMemory(pEntry, sizeof(struct rt_measure_req_entry)); pTab->Size--; RTMP_SEM_UNLOCK(&pAd->CommonCfg.MeasureReqTabLock); @@ -595,13 +595,13 @@ void MeasureReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) return; } -void TpcReqTabInit(IN PRTMP_ADAPTER pAd) +void TpcReqTabInit(struct rt_rtmp_adapter *pAd) { NdisAllocateSpinLock(&pAd->CommonCfg.TpcReqTabLock); - pAd->CommonCfg.pTpcReqTab = kmalloc(sizeof(TPC_REQ_TAB), GFP_ATOMIC); + pAd->CommonCfg.pTpcReqTab = kmalloc(sizeof(struct rt_tpc_req_tab), GFP_ATOMIC); if (pAd->CommonCfg.pTpcReqTab) - NdisZeroMemory(pAd->CommonCfg.pTpcReqTab, sizeof(TPC_REQ_TAB)); + NdisZeroMemory(pAd->CommonCfg.pTpcReqTab, sizeof(struct rt_tpc_req_tab)); else DBGPRINT(RT_DEBUG_ERROR, ("%s Fail to alloc memory for pAd->CommonCfg.pTpcReqTab.\n", @@ -610,7 +610,7 @@ void TpcReqTabInit(IN PRTMP_ADAPTER pAd) return; } -void TpcReqTabExit(IN PRTMP_ADAPTER pAd) +void TpcReqTabExit(struct rt_rtmp_adapter *pAd) { NdisFreeSpinLock(&pAd->CommonCfg.TpcReqTabLock); @@ -621,12 +621,12 @@ void TpcReqTabExit(IN PRTMP_ADAPTER pAd) return; } -static PTPC_REQ_ENTRY TpcReqLookUp(IN PRTMP_ADAPTER pAd, u8 DialogToken) +static struct rt_tpc_req_entry *TpcReqLookUp(struct rt_rtmp_adapter *pAd, u8 DialogToken) { u32 HashIdx; - PTPC_REQ_TAB pTab = pAd->CommonCfg.pTpcReqTab; - PTPC_REQ_ENTRY pEntry = NULL; - PTPC_REQ_ENTRY pPrevEntry = NULL; + struct rt_tpc_req_tab *pTab = pAd->CommonCfg.pTpcReqTab; + struct rt_tpc_req_entry *pEntry = NULL; + struct rt_tpc_req_entry *pPrevEntry = NULL; if (pTab == NULL) { DBGPRINT(RT_DEBUG_ERROR, @@ -653,12 +653,12 @@ static PTPC_REQ_ENTRY TpcReqLookUp(IN PRTMP_ADAPTER pAd, u8 DialogToken) return pEntry; } -static PTPC_REQ_ENTRY TpcReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) +static struct rt_tpc_req_entry *TpcReqInsert(struct rt_rtmp_adapter *pAd, u8 DialogToken) { int i; unsigned long HashIdx; - PTPC_REQ_TAB pTab = pAd->CommonCfg.pTpcReqTab; - PTPC_REQ_ENTRY pEntry = NULL, pCurrEntry; + struct rt_tpc_req_tab *pTab = pAd->CommonCfg.pTpcReqTab; + struct rt_tpc_req_entry *pEntry = NULL, *pCurrEntry; unsigned long Now; if (pTab == NULL) { @@ -680,11 +680,11 @@ static PTPC_REQ_ENTRY TpcReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) lastTime + TPC_REQ_AGE_OUT))) { - PTPC_REQ_ENTRY pPrevEntry = NULL; + struct rt_tpc_req_entry *pPrevEntry = NULL; unsigned long HashIdx = TPC_DIALOGTOKEN_HASH_INDEX(pEntry-> DialogToken); - PTPC_REQ_ENTRY pProbeEntry = + struct rt_tpc_req_entry *pProbeEntry = pTab->Hash[HashIdx]; /* update Hash list */ @@ -704,7 +704,7 @@ static PTPC_REQ_ENTRY TpcReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) pProbeEntry = pProbeEntry->pNext; } while (pProbeEntry); - NdisZeroMemory(pEntry, sizeof(TPC_REQ_ENTRY)); + NdisZeroMemory(pEntry, sizeof(struct rt_tpc_req_entry)); pTab->Size--; break; @@ -745,10 +745,10 @@ static PTPC_REQ_ENTRY TpcReqInsert(IN PRTMP_ADAPTER pAd, u8 DialogToken) return pEntry; } -static void TpcReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) +static void TpcReqDelete(struct rt_rtmp_adapter *pAd, u8 DialogToken) { - PTPC_REQ_TAB pTab = pAd->CommonCfg.pTpcReqTab; - PTPC_REQ_ENTRY pEntry = NULL; + struct rt_tpc_req_tab *pTab = pAd->CommonCfg.pTpcReqTab; + struct rt_tpc_req_entry *pEntry = NULL; if (pTab == NULL) { DBGPRINT(RT_DEBUG_ERROR, @@ -763,9 +763,9 @@ static void TpcReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) pEntry = TpcReqLookUp(pAd, DialogToken); if (pEntry != NULL) { - PTPC_REQ_ENTRY pPrevEntry = NULL; + struct rt_tpc_req_entry *pPrevEntry = NULL; unsigned long HashIdx = TPC_DIALOGTOKEN_HASH_INDEX(pEntry->DialogToken); - PTPC_REQ_ENTRY pProbeEntry = pTab->Hash[HashIdx]; + struct rt_tpc_req_entry *pProbeEntry = pTab->Hash[HashIdx]; RTMP_SEM_LOCK(&pAd->CommonCfg.TpcReqTabLock); /* update Hash list */ @@ -783,7 +783,7 @@ static void TpcReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) pProbeEntry = pProbeEntry->pNext; } while (pProbeEntry); - NdisZeroMemory(pEntry, sizeof(TPC_REQ_ENTRY)); + NdisZeroMemory(pEntry, sizeof(struct rt_tpc_req_entry)); pTab->Size--; RTMP_SEM_UNLOCK(&pAd->CommonCfg.TpcReqTabLock); @@ -802,7 +802,7 @@ static void TpcReqDelete(IN PRTMP_ADAPTER pAd, u8 DialogToken) Return : Current Time Stamp. ========================================================================== */ -static u64 GetCurrentTimeStamp(IN PRTMP_ADAPTER pAd) +static u64 GetCurrentTimeStamp(struct rt_rtmp_adapter *pAd) { /* get current time stamp. */ return 0; @@ -818,7 +818,7 @@ static u64 GetCurrentTimeStamp(IN PRTMP_ADAPTER pAd) Return : Current Time Stamp. ========================================================================== */ -static u8 GetCurTxPwr(IN PRTMP_ADAPTER pAd, u8 Wcid) +static u8 GetCurTxPwr(struct rt_rtmp_adapter *pAd, u8 Wcid) { return 16; /* 16 dBm */ } @@ -833,7 +833,7 @@ static u8 GetCurTxPwr(IN PRTMP_ADAPTER pAd, u8 Wcid) Return : Current Time Stamp. ========================================================================== */ -void InsertChannelRepIE(IN PRTMP_ADAPTER pAd, +void InsertChannelRepIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, char *pCountry, u8 RegulatoryClass) @@ -900,7 +900,7 @@ void InsertChannelRepIE(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void InsertDialogToken(IN PRTMP_ADAPTER pAd, +void InsertDialogToken(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, u8 DialogToken) { @@ -924,7 +924,7 @@ void InsertDialogToken(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void InsertTpcReqIE(IN PRTMP_ADAPTER pAd, +static void InsertTpcReqIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen) { unsigned long TempLen; @@ -953,15 +953,15 @@ static void InsertTpcReqIE(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void InsertTpcReportIE(IN PRTMP_ADAPTER pAd, +void InsertTpcReportIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, u8 TxPwr, u8 LinkMargin) { unsigned long TempLen; - unsigned long Len = sizeof(TPC_REPORT_INFO); + unsigned long Len = sizeof(struct rt_tpc_report_info); u8 ElementID = IE_TPC_REPORT; - TPC_REPORT_INFO TpcReportIE; + struct rt_tpc_report_info TpcReportIE; TpcReportIE.TxPwr = TxPwr; TpcReportIE.LinkMargin = LinkMargin; @@ -990,16 +990,16 @@ void InsertTpcReportIE(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void InsertChSwAnnIE(IN PRTMP_ADAPTER pAd, +static void InsertChSwAnnIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, u8 ChSwMode, u8 NewChannel, u8 ChSwCnt) { unsigned long TempLen; - unsigned long Len = sizeof(CH_SW_ANN_INFO); + unsigned long Len = sizeof(struct rt_ch_sw_ann_info); u8 ElementID = IE_CHANNEL_SWITCH_ANNOUNCEMENT; - CH_SW_ANN_INFO ChSwAnnIE; + struct rt_ch_sw_ann_info ChSwAnnIE; ChSwAnnIE.ChSwMode = ChSwMode; ChSwAnnIE.Channel = NewChannel; @@ -1031,10 +1031,10 @@ static void InsertChSwAnnIE(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void InsertMeasureReqIE(IN PRTMP_ADAPTER pAd, +static void InsertMeasureReqIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, - u8 Len, IN PMEASURE_REQ_INFO pMeasureReqIE) + u8 Len, struct rt_measure_req_info * pMeasureReqIE) { unsigned long TempLen; u8 ElementID = IE_MEASUREMENT_REQUEST; @@ -1042,7 +1042,7 @@ static void InsertMeasureReqIE(IN PRTMP_ADAPTER pAd, MakeOutgoingFrame(pFrameBuf, &TempLen, 1, &ElementID, 1, &Len, - sizeof(MEASURE_REQ_INFO), pMeasureReqIE, END_OF_ARGS); + sizeof(struct rt_measure_req_info), pMeasureReqIE, END_OF_ARGS); *pFrameLen = *pFrameLen + TempLen; @@ -1066,17 +1066,17 @@ static void InsertMeasureReqIE(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void InsertMeasureReportIE(IN PRTMP_ADAPTER pAd, +static void InsertMeasureReportIE(struct rt_rtmp_adapter *pAd, u8 *pFrameBuf, unsigned long *pFrameLen, - IN PMEASURE_REPORT_INFO pMeasureReportIE, + struct rt_measure_report_info * pMeasureReportIE, u8 ReportLnfoLen, u8 *pReportInfo) { unsigned long TempLen; unsigned long Len; u8 ElementID = IE_MEASUREMENT_REPORT; - Len = sizeof(MEASURE_REPORT_INFO) + ReportLnfoLen; + Len = sizeof(struct rt_measure_report_info) + ReportLnfoLen; MakeOutgoingFrame(pFrameBuf, &TempLen, 1, &ElementID, @@ -1105,7 +1105,7 @@ static void InsertMeasureReportIE(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void MakeMeasurementReqFrame(IN PRTMP_ADAPTER pAd, +void MakeMeasurementReqFrame(struct rt_rtmp_adapter *pAd, u8 *pOutBuffer, unsigned long *pFrameLen, u8 TotalLen, @@ -1116,7 +1116,7 @@ void MakeMeasurementReqFrame(IN PRTMP_ADAPTER pAd, u8 MeasureReqType, u8 NumOfRepetitions) { unsigned long TempLen; - MEASURE_REQ_INFO MeasureReqIE; + struct rt_measure_req_info MeasureReqIE; InsertActField(pAd, (pOutBuffer + *pFrameLen), pFrameLen, Category, Action); @@ -1133,7 +1133,7 @@ void MakeMeasurementReqFrame(IN PRTMP_ADAPTER pAd, *pFrameLen += TempLen; } /* prepare Measurement IE. */ - NdisZeroMemory(&MeasureReqIE, sizeof(MEASURE_REQ_INFO)); + NdisZeroMemory(&MeasureReqIE, sizeof(struct rt_measure_req_info)); MeasureReqIE.Token = MeasureToken; MeasureReqIE.ReqMode.word = MeasureReqMode; MeasureReqIE.ReqType = MeasureReqType; @@ -1155,7 +1155,7 @@ void MakeMeasurementReqFrame(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd, +void EnqueueMeasurementRep(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 DialogToken, u8 MeasureToken, @@ -1166,8 +1166,8 @@ void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd, u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen; - HEADER_802_11 ActHdr; - MEASURE_REPORT_INFO MeasureRepIE; + struct rt_header_802_11 ActHdr; + struct rt_measure_report_info MeasureRepIE; /* build action frame header. */ MgtMacHeaderInit(pAd, &ActHdr, SUBTYPE_ACTION, 0, pDA, @@ -1179,8 +1179,8 @@ void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd, ("%s() allocate memory failed \n", __func__)); return; } - NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(HEADER_802_11)); - FrameLen = sizeof(HEADER_802_11); + NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(struct rt_header_802_11)); + FrameLen = sizeof(struct rt_header_802_11); InsertActField(pAd, (pOutBuffer + FrameLen), &FrameLen, CATEGORY_SPECTRUM, SPEC_MRP); @@ -1189,7 +1189,7 @@ void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd, InsertDialogToken(pAd, (pOutBuffer + FrameLen), &FrameLen, DialogToken); /* prepare Measurement IE. */ - NdisZeroMemory(&MeasureRepIE, sizeof(MEASURE_REPORT_INFO)); + NdisZeroMemory(&MeasureRepIE, sizeof(struct rt_measure_report_info)); MeasureRepIE.Token = MeasureToken; MeasureRepIE.ReportMode = MeasureReqMode; MeasureRepIE.ReportType = MeasureReqType; @@ -1214,13 +1214,13 @@ void EnqueueMeasurementRep(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void EnqueueTPCReq(IN PRTMP_ADAPTER pAd, u8 *pDA, u8 DialogToken) +void EnqueueTPCReq(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 DialogToken) { u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen; - HEADER_802_11 ActHdr; + struct rt_header_802_11 ActHdr; /* build action frame header. */ MgtMacHeaderInit(pAd, &ActHdr, SUBTYPE_ACTION, 0, pDA, @@ -1232,8 +1232,8 @@ void EnqueueTPCReq(IN PRTMP_ADAPTER pAd, u8 *pDA, u8 DialogToken) ("%s() allocate memory failed \n", __func__)); return; } - NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(HEADER_802_11)); - FrameLen = sizeof(HEADER_802_11); + NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(struct rt_header_802_11)); + FrameLen = sizeof(struct rt_header_802_11); InsertActField(pAd, (pOutBuffer + FrameLen), &FrameLen, CATEGORY_SPECTRUM, SPEC_TPCRQ); @@ -1262,7 +1262,7 @@ void EnqueueTPCReq(IN PRTMP_ADAPTER pAd, u8 *pDA, u8 DialogToken) Return : None. ========================================================================== */ -void EnqueueTPCRep(IN PRTMP_ADAPTER pAd, +void EnqueueTPCRep(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 DialogToken, u8 TxPwr, u8 LinkMargin) { @@ -1270,7 +1270,7 @@ void EnqueueTPCRep(IN PRTMP_ADAPTER pAd, int NStatus; unsigned long FrameLen; - HEADER_802_11 ActHdr; + struct rt_header_802_11 ActHdr; /* build action frame header. */ MgtMacHeaderInit(pAd, &ActHdr, SUBTYPE_ACTION, 0, pDA, @@ -1282,8 +1282,8 @@ void EnqueueTPCRep(IN PRTMP_ADAPTER pAd, ("%s() allocate memory failed \n", __func__)); return; } - NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(HEADER_802_11)); - FrameLen = sizeof(HEADER_802_11); + NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(struct rt_header_802_11)); + FrameLen = sizeof(struct rt_header_802_11); InsertActField(pAd, (pOutBuffer + FrameLen), &FrameLen, CATEGORY_SPECTRUM, SPEC_TPCRP); @@ -1315,14 +1315,14 @@ void EnqueueTPCRep(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -void EnqueueChSwAnn(IN PRTMP_ADAPTER pAd, +void EnqueueChSwAnn(struct rt_rtmp_adapter *pAd, u8 *pDA, u8 ChSwMode, u8 NewCh) { u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen; - HEADER_802_11 ActHdr; + struct rt_header_802_11 ActHdr; /* build action frame header. */ MgtMacHeaderInit(pAd, &ActHdr, SUBTYPE_ACTION, 0, pDA, @@ -1334,8 +1334,8 @@ void EnqueueChSwAnn(IN PRTMP_ADAPTER pAd, ("%s() allocate memory failed \n", __func__)); return; } - NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(HEADER_802_11)); - FrameLen = sizeof(HEADER_802_11); + NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(struct rt_header_802_11)); + FrameLen = sizeof(struct rt_header_802_11); InsertActField(pAd, (pOutBuffer + FrameLen), &FrameLen, CATEGORY_SPECTRUM, SPEC_CHANNEL_SWITCH); @@ -1349,7 +1349,7 @@ void EnqueueChSwAnn(IN PRTMP_ADAPTER pAd, return; } -static BOOLEAN DfsRequirementCheck(IN PRTMP_ADAPTER pAd, u8 Channel) +static BOOLEAN DfsRequirementCheck(struct rt_rtmp_adapter *pAd, u8 Channel) { BOOLEAN Result = FALSE; int i; @@ -1376,13 +1376,13 @@ static BOOLEAN DfsRequirementCheck(IN PRTMP_ADAPTER pAd, u8 Channel) return Result; } -void NotifyChSwAnnToPeerAPs(IN PRTMP_ADAPTER pAd, +void NotifyChSwAnnToPeerAPs(struct rt_rtmp_adapter *pAd, u8 *pRA, u8 *pTA, u8 ChSwMode, u8 Channel) { } -static void StartDFSProcedure(IN PRTMP_ADAPTER pAd, +static void StartDFSProcedure(struct rt_rtmp_adapter *pAd, u8 Channel, u8 ChSwMode) { /* start DFS procedure */ @@ -1415,18 +1415,18 @@ static void StartDFSProcedure(IN PRTMP_ADAPTER pAd, +----+-----+-----------+------------+-----------+ 1 1 1 1 1 */ -static BOOLEAN PeerChSwAnnSanity(IN PRTMP_ADAPTER pAd, +static BOOLEAN PeerChSwAnnSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, - OUT PCH_SW_ANN_INFO pChSwAnnInfo) + struct rt_ch_sw_ann_info * pChSwAnnInfo) { - PFRAME_802_11 Fr = (PFRAME_802_11) pMsg; + struct rt_frame_802_11 * Fr = (struct rt_frame_802_11 *) pMsg; u8 *pFramePtr = Fr->Octet; BOOLEAN result = FALSE; - PEID_STRUCT eid_ptr; + struct rt_eid * eid_ptr; /* skip 802.11 header. */ - MsgLen -= sizeof(HEADER_802_11); + MsgLen -= sizeof(struct rt_header_802_11); /* skip category and action code. */ pFramePtr += 2; @@ -1435,7 +1435,7 @@ static BOOLEAN PeerChSwAnnSanity(IN PRTMP_ADAPTER pAd, if (pChSwAnnInfo == NULL) return result; - eid_ptr = (PEID_STRUCT) pFramePtr; + eid_ptr = (struct rt_eid *) pFramePtr; while (((u8 *) eid_ptr + eid_ptr->Len + 1) < ((u8 *)pFramePtr + MsgLen)) { switch (eid_ptr->Eid) { @@ -1453,7 +1453,7 @@ static BOOLEAN PeerChSwAnnSanity(IN PRTMP_ADAPTER pAd, default: break; } - eid_ptr = (PEID_STRUCT) ((u8 *) eid_ptr + 2 + eid_ptr->Len); + eid_ptr = (struct rt_eid *) ((u8 *) eid_ptr + 2 + eid_ptr->Len); } return result; @@ -1472,23 +1472,23 @@ static BOOLEAN PeerChSwAnnSanity(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static BOOLEAN PeerMeasureReqSanity(IN PRTMP_ADAPTER pAd, +static BOOLEAN PeerMeasureReqSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pDialogToken, - OUT PMEASURE_REQ_INFO pMeasureReqInfo, - OUT PMEASURE_REQ pMeasureReq) + struct rt_measure_req_info * pMeasureReqInfo, + struct rt_measure_req * pMeasureReq) { - PFRAME_802_11 Fr = (PFRAME_802_11) pMsg; + struct rt_frame_802_11 * Fr = (struct rt_frame_802_11 *) pMsg; u8 *pFramePtr = Fr->Octet; BOOLEAN result = FALSE; - PEID_STRUCT eid_ptr; + struct rt_eid * eid_ptr; u8 *ptr; u64 MeasureStartTime; u16 MeasureDuration; /* skip 802.11 header. */ - MsgLen -= sizeof(HEADER_802_11); + MsgLen -= sizeof(struct rt_header_802_11); /* skip category and action code. */ pFramePtr += 2; @@ -1501,7 +1501,7 @@ static BOOLEAN PeerMeasureReqSanity(IN PRTMP_ADAPTER pAd, pFramePtr += 1; MsgLen -= 1; - eid_ptr = (PEID_STRUCT) pFramePtr; + eid_ptr = (struct rt_eid *) pFramePtr; while (((u8 *) eid_ptr + eid_ptr->Len + 1) < ((u8 *)pFramePtr + MsgLen)) { switch (eid_ptr->Eid) { @@ -1526,7 +1526,7 @@ static BOOLEAN PeerMeasureReqSanity(IN PRTMP_ADAPTER pAd, default: break; } - eid_ptr = (PEID_STRUCT) ((u8 *) eid_ptr + 2 + eid_ptr->Len); + eid_ptr = (struct rt_eid *) ((u8 *) eid_ptr + 2 + eid_ptr->Len); } return result; @@ -1566,22 +1566,22 @@ static BOOLEAN PeerMeasureReqSanity(IN PRTMP_ADAPTER pAd, +-----+---------------+---------------------+-------+------------+----------+ 0 1 2 3 4 5-7 */ -static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, +static BOOLEAN PeerMeasureReportSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pDialogToken, - OUT PMEASURE_REPORT_INFO + struct rt_measure_report_info * pMeasureReportInfo, u8 *pReportBuf) { - PFRAME_802_11 Fr = (PFRAME_802_11) pMsg; + struct rt_frame_802_11 * Fr = (struct rt_frame_802_11 *) pMsg; u8 *pFramePtr = Fr->Octet; BOOLEAN result = FALSE; - PEID_STRUCT eid_ptr; + struct rt_eid * eid_ptr; u8 *ptr; /* skip 802.11 header. */ - MsgLen -= sizeof(HEADER_802_11); + MsgLen -= sizeof(struct rt_header_802_11); /* skip category and action code. */ pFramePtr += 2; @@ -1594,7 +1594,7 @@ static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, pFramePtr += 1; MsgLen -= 1; - eid_ptr = (PEID_STRUCT) pFramePtr; + eid_ptr = (struct rt_eid *) pFramePtr; while (((u8 *) eid_ptr + eid_ptr->Len + 1) < ((u8 *)pFramePtr + MsgLen)) { switch (eid_ptr->Eid) { @@ -1606,8 +1606,8 @@ static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, NdisMoveMemory(&pMeasureReportInfo->ReportType, eid_ptr->Octet + 2, 1); if (pMeasureReportInfo->ReportType == RM_BASIC) { - PMEASURE_BASIC_REPORT pReport = - (PMEASURE_BASIC_REPORT) pReportBuf; + struct rt_measure_basic_report * pReport = + (struct rt_measure_basic_report *) pReportBuf; ptr = (u8 *)(eid_ptr->Octet + 3); NdisMoveMemory(&pReport->ChNum, ptr, 1); NdisMoveMemory(&pReport->MeasureStartTime, @@ -1617,8 +1617,8 @@ static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, NdisMoveMemory(&pReport->Map, ptr + 11, 1); } else if (pMeasureReportInfo->ReportType == RM_CCA) { - PMEASURE_CCA_REPORT pReport = - (PMEASURE_CCA_REPORT) pReportBuf; + struct rt_measure_cca_report * pReport = + (struct rt_measure_cca_report *) pReportBuf; ptr = (u8 *)(eid_ptr->Octet + 3); NdisMoveMemory(&pReport->ChNum, ptr, 1); NdisMoveMemory(&pReport->MeasureStartTime, @@ -1630,8 +1630,8 @@ static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, } else if (pMeasureReportInfo->ReportType == RM_RPI_HISTOGRAM) { - PMEASURE_RPI_REPORT pReport = - (PMEASURE_RPI_REPORT) pReportBuf; + struct rt_measure_rpi_report * pReport = + (struct rt_measure_rpi_report *) pReportBuf; ptr = (u8 *)(eid_ptr->Octet + 3); NdisMoveMemory(&pReport->ChNum, ptr, 1); NdisMoveMemory(&pReport->MeasureStartTime, @@ -1647,7 +1647,7 @@ static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, default: break; } - eid_ptr = (PEID_STRUCT) ((u8 *) eid_ptr + 2 + eid_ptr->Len); + eid_ptr = (struct rt_eid *) ((u8 *) eid_ptr + 2 + eid_ptr->Len); } return result; @@ -1666,16 +1666,16 @@ static BOOLEAN PeerMeasureReportSanity(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static BOOLEAN PeerTpcReqSanity(IN PRTMP_ADAPTER pAd, +static BOOLEAN PeerTpcReqSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pDialogToken) { - PFRAME_802_11 Fr = (PFRAME_802_11) pMsg; + struct rt_frame_802_11 * Fr = (struct rt_frame_802_11 *) pMsg; u8 *pFramePtr = Fr->Octet; BOOLEAN result = FALSE; - PEID_STRUCT eid_ptr; + struct rt_eid * eid_ptr; - MsgLen -= sizeof(HEADER_802_11); + MsgLen -= sizeof(struct rt_header_802_11); /* skip category and action code. */ pFramePtr += 2; @@ -1688,7 +1688,7 @@ static BOOLEAN PeerTpcReqSanity(IN PRTMP_ADAPTER pAd, pFramePtr += 1; MsgLen -= 1; - eid_ptr = (PEID_STRUCT) pFramePtr; + eid_ptr = (struct rt_eid *) pFramePtr; while (((u8 *) eid_ptr + eid_ptr->Len + 1) < ((u8 *)pFramePtr + MsgLen)) { switch (eid_ptr->Eid) { @@ -1699,7 +1699,7 @@ static BOOLEAN PeerTpcReqSanity(IN PRTMP_ADAPTER pAd, default: break; } - eid_ptr = (PEID_STRUCT) ((u8 *) eid_ptr + 2 + eid_ptr->Len); + eid_ptr = (struct rt_eid *) ((u8 *) eid_ptr + 2 + eid_ptr->Len); } return result; @@ -1719,18 +1719,18 @@ static BOOLEAN PeerTpcReqSanity(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static BOOLEAN PeerTpcRepSanity(IN PRTMP_ADAPTER pAd, +static BOOLEAN PeerTpcRepSanity(struct rt_rtmp_adapter *pAd, void * pMsg, unsigned long MsgLen, u8 *pDialogToken, - OUT PTPC_REPORT_INFO pTpcRepInfo) + struct rt_tpc_report_info * pTpcRepInfo) { - PFRAME_802_11 Fr = (PFRAME_802_11) pMsg; + struct rt_frame_802_11 * Fr = (struct rt_frame_802_11 *) pMsg; u8 *pFramePtr = Fr->Octet; BOOLEAN result = FALSE; - PEID_STRUCT eid_ptr; + struct rt_eid * eid_ptr; - MsgLen -= sizeof(HEADER_802_11); + MsgLen -= sizeof(struct rt_header_802_11); /* skip category and action code. */ pFramePtr += 2; @@ -1743,7 +1743,7 @@ static BOOLEAN PeerTpcRepSanity(IN PRTMP_ADAPTER pAd, pFramePtr += 1; MsgLen -= 1; - eid_ptr = (PEID_STRUCT) pFramePtr; + eid_ptr = (struct rt_eid *) pFramePtr; while (((u8 *) eid_ptr + eid_ptr->Len + 1) < ((u8 *)pFramePtr + MsgLen)) { switch (eid_ptr->Eid) { @@ -1757,7 +1757,7 @@ static BOOLEAN PeerTpcRepSanity(IN PRTMP_ADAPTER pAd, default: break; } - eid_ptr = (PEID_STRUCT) ((u8 *) eid_ptr + 2 + eid_ptr->Len); + eid_ptr = (struct rt_eid *) ((u8 *) eid_ptr + 2 + eid_ptr->Len); } return result; @@ -1774,14 +1774,14 @@ static BOOLEAN PeerTpcRepSanity(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void PeerChSwAnnAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +static void PeerChSwAnnAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - CH_SW_ANN_INFO ChSwAnnInfo; - PFRAME_802_11 pFr = (PFRAME_802_11) Elem->Msg; + struct rt_ch_sw_ann_info ChSwAnnInfo; + struct rt_frame_802_11 * pFr = (struct rt_frame_802_11 *) Elem->Msg; u8 index = 0, Channel = 0, NewChannel = 0; unsigned long Bssidx = 0; - NdisZeroMemory(&ChSwAnnInfo, sizeof(CH_SW_ANN_INFO)); + NdisZeroMemory(&ChSwAnnInfo, sizeof(struct rt_ch_sw_ann_info)); if (!PeerChSwAnnSanity(pAd, Elem->Msg, Elem->MsgLen, &ChSwAnnInfo)) { DBGPRINT(RT_DEBUG_TRACE, ("Invalid Channel Switch Action Frame.\n")); @@ -1856,13 +1856,13 @@ static void PeerChSwAnnAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Return : None. ========================================================================== */ -static void PeerMeasureReqAction(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem) +static void PeerMeasureReqAction(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem) { - PFRAME_802_11 pFr = (PFRAME_802_11) Elem->Msg; + struct rt_frame_802_11 * pFr = (struct rt_frame_802_11 *) Elem->Msg; u8 DialogToken; - MEASURE_REQ_INFO MeasureReqInfo; - MEASURE_REQ MeasureReq; + struct rt_measure_req_info MeasureReqInfo; + struct rt_measure_req MeasureReq; MEASURE_REPORT_MODE ReportMode; if (PeerMeasureReqSanity @@ -1889,11 +1889,11 @@ static void PeerMeasureReqAction(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void PeerMeasureReportAction(IN PRTMP_ADAPTER pAd, - IN MLME_QUEUE_ELEM * Elem) +static void PeerMeasureReportAction(struct rt_rtmp_adapter *pAd, + struct rt_mlme_queue_elem *Elem) { - MEASURE_REPORT_INFO MeasureReportInfo; - PFRAME_802_11 pFr = (PFRAME_802_11) Elem->Msg; + struct rt_measure_report_info MeasureReportInfo; + struct rt_frame_802_11 * pFr = (struct rt_frame_802_11 *) Elem->Msg; u8 DialogToken; u8 *pMeasureReportInfo; @@ -1901,20 +1901,20 @@ static void PeerMeasureReportAction(IN PRTMP_ADAPTER pAd, /* return; */ if ((pMeasureReportInfo = - kmalloc(sizeof(MEASURE_RPI_REPORT), GFP_ATOMIC)) == NULL) { + kmalloc(sizeof(struct rt_measure_rpi_report), GFP_ATOMIC)) == NULL) { DBGPRINT(RT_DEBUG_ERROR, ("%s unable to alloc memory for measure report buffer (size=%zu).\n", - __func__, sizeof(MEASURE_RPI_REPORT))); + __func__, sizeof(struct rt_measure_rpi_report))); return; } - NdisZeroMemory(&MeasureReportInfo, sizeof(MEASURE_REPORT_INFO)); - NdisZeroMemory(pMeasureReportInfo, sizeof(MEASURE_RPI_REPORT)); + NdisZeroMemory(&MeasureReportInfo, sizeof(struct rt_measure_report_info)); + NdisZeroMemory(pMeasureReportInfo, sizeof(struct rt_measure_rpi_report)); if (PeerMeasureReportSanity (pAd, Elem->Msg, Elem->MsgLen, &DialogToken, &MeasureReportInfo, pMeasureReportInfo)) { do { - PMEASURE_REQ_ENTRY pEntry = NULL; + struct rt_measure_req_entry *pEntry = NULL; /* Not a autonomous measure report. */ /* check the dialog token field. drop it if the dialog token doesn't match. */ @@ -1927,8 +1927,8 @@ static void PeerMeasureReportAction(IN PRTMP_ADAPTER pAd, MeasureReqDelete(pAd, pEntry->DialogToken); if (MeasureReportInfo.ReportType == RM_BASIC) { - PMEASURE_BASIC_REPORT pBasicReport = - (PMEASURE_BASIC_REPORT) pMeasureReportInfo; + struct rt_measure_basic_report * pBasicReport = + (struct rt_measure_basic_report *) pMeasureReportInfo; if ((pBasicReport->Map.field.Radar) && (DfsRequirementCheck @@ -1965,9 +1965,9 @@ static void PeerMeasureReportAction(IN PRTMP_ADAPTER pAd, Return : None. ========================================================================== */ -static void PeerTpcReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +static void PeerTpcReqAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { - PFRAME_802_11 pFr = (PFRAME_802_11) Elem->Msg; + struct rt_frame_802_11 * pFr = (struct rt_frame_802_11 *) Elem->Msg; u8 *pFramePtr = pFr->Octet; u8 DialogToken; u8 TxPwr = GetCurTxPwr(pAd, Elem->Wcid); @@ -2007,13 +2007,13 @@ static void PeerTpcReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Return : None. ========================================================================== */ -static void PeerTpcRepAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +static void PeerTpcRepAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 DialogToken; - TPC_REPORT_INFO TpcRepInfo; - PTPC_REQ_ENTRY pEntry = NULL; + struct rt_tpc_report_info TpcRepInfo; + struct rt_tpc_req_entry *pEntry = NULL; - NdisZeroMemory(&TpcRepInfo, sizeof(TPC_REPORT_INFO)); + NdisZeroMemory(&TpcRepInfo, sizeof(struct rt_tpc_report_info)); if (PeerTpcRepSanity (pAd, Elem->Msg, Elem->MsgLen, &DialogToken, &TpcRepInfo)) { if ((pEntry = TpcReqLookUp(pAd, DialogToken)) != NULL) { @@ -2040,7 +2040,7 @@ static void PeerTpcRepAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Return : None. ========================================================================== */ -void PeerSpectrumAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) +void PeerSpectrumAction(struct rt_rtmp_adapter *pAd, struct rt_mlme_queue_elem *Elem) { u8 Action = Elem->Msg[LENGTH_802_11 + 1]; @@ -2085,7 +2085,7 @@ void PeerSpectrumAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) Return : None. ========================================================================== */ -int Set_MeasureReq_Proc(IN PRTMP_ADAPTER pAd, char *arg) +int Set_MeasureReq_Proc(struct rt_rtmp_adapter *pAd, char *arg) { u32 Aid = 1; u32 ArgIdx; @@ -2096,10 +2096,10 @@ int Set_MeasureReq_Proc(IN PRTMP_ADAPTER pAd, char *arg) u8 MeasureReqType = RM_BASIC; u8 MeasureCh = 1; u64 MeasureStartTime = GetCurrentTimeStamp(pAd); - MEASURE_REQ MeasureReq; + struct rt_measure_req MeasureReq; u8 TotalLen; - HEADER_802_11 ActHdr; + struct rt_header_802_11 ActHdr; u8 *pOutBuffer = NULL; int NStatus; unsigned long FrameLen; @@ -2153,13 +2153,13 @@ int Set_MeasureReq_Proc(IN PRTMP_ADAPTER pAd, char *arg) MgtMacHeaderInit(pAd, &ActHdr, SUBTYPE_ACTION, 0, pAd->MacTab.Content[Aid].Addr, pAd->CurrentAddress); - NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(HEADER_802_11)); - FrameLen = sizeof(HEADER_802_11); + NdisMoveMemory(pOutBuffer, (char *)& ActHdr, sizeof(struct rt_header_802_11)); + FrameLen = sizeof(struct rt_header_802_11); - TotalLen = sizeof(MEASURE_REQ_INFO) + sizeof(MEASURE_REQ); + TotalLen = sizeof(struct rt_measure_req_info) + sizeof(struct rt_measure_req); MakeMeasurementReqFrame(pAd, pOutBuffer, &FrameLen, - sizeof(MEASURE_REQ_INFO), CATEGORY_RM, RM_BASIC, + sizeof(struct rt_measure_req_info), CATEGORY_RM, RM_BASIC, MeasureReqToken, MeasureReqMode.word, MeasureReqType, 0); @@ -2170,7 +2170,7 @@ int Set_MeasureReq_Proc(IN PRTMP_ADAPTER pAd, char *arg) { unsigned long TempLen; MakeOutgoingFrame(pOutBuffer + FrameLen, &TempLen, - sizeof(MEASURE_REQ), &MeasureReq, + sizeof(struct rt_measure_req), &MeasureReq, END_OF_ARGS); FrameLen += TempLen; } @@ -2183,7 +2183,7 @@ END_OF_MEASURE_REQ: return TRUE; } -int Set_TpcReq_Proc(IN PRTMP_ADAPTER pAd, char *arg) +int Set_TpcReq_Proc(struct rt_rtmp_adapter *pAd, char *arg) { u32 Aid; |