Commit 8281958b authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: rt28x0: fix comments in sta/*.c files

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ec278fa2
This diff is collapsed.
...@@ -62,11 +62,11 @@ void AuthStateMachineInit(IN PRTMP_ADAPTER pAd, ...@@ -62,11 +62,11 @@ void AuthStateMachineInit(IN PRTMP_ADAPTER pAd,
(STATE_MACHINE_FUNC) Drop, AUTH_REQ_IDLE, (STATE_MACHINE_FUNC) Drop, AUTH_REQ_IDLE,
AUTH_MACHINE_BASE); AUTH_MACHINE_BASE);
// the first column /* the first column */
StateMachineSetAction(Sm, AUTH_REQ_IDLE, MT2_MLME_AUTH_REQ, StateMachineSetAction(Sm, AUTH_REQ_IDLE, MT2_MLME_AUTH_REQ,
(STATE_MACHINE_FUNC) MlmeAuthReqAction); (STATE_MACHINE_FUNC) MlmeAuthReqAction);
// the second column /* the second column */
StateMachineSetAction(Sm, AUTH_WAIT_SEQ2, MT2_MLME_AUTH_REQ, StateMachineSetAction(Sm, AUTH_WAIT_SEQ2, MT2_MLME_AUTH_REQ,
(STATE_MACHINE_FUNC) InvalidStateWhenAuth); (STATE_MACHINE_FUNC) InvalidStateWhenAuth);
StateMachineSetAction(Sm, AUTH_WAIT_SEQ2, MT2_PEER_AUTH_EVEN, StateMachineSetAction(Sm, AUTH_WAIT_SEQ2, MT2_PEER_AUTH_EVEN,
...@@ -74,7 +74,7 @@ void AuthStateMachineInit(IN PRTMP_ADAPTER pAd, ...@@ -74,7 +74,7 @@ void AuthStateMachineInit(IN PRTMP_ADAPTER pAd,
StateMachineSetAction(Sm, AUTH_WAIT_SEQ2, MT2_AUTH_TIMEOUT, StateMachineSetAction(Sm, AUTH_WAIT_SEQ2, MT2_AUTH_TIMEOUT,
(STATE_MACHINE_FUNC) AuthTimeoutAction); (STATE_MACHINE_FUNC) AuthTimeoutAction);
// the third column /* the third column */
StateMachineSetAction(Sm, AUTH_WAIT_SEQ4, MT2_MLME_AUTH_REQ, StateMachineSetAction(Sm, AUTH_WAIT_SEQ4, MT2_MLME_AUTH_REQ,
(STATE_MACHINE_FUNC) InvalidStateWhenAuth); (STATE_MACHINE_FUNC) InvalidStateWhenAuth);
StateMachineSetAction(Sm, AUTH_WAIT_SEQ4, MT2_PEER_AUTH_EVEN, StateMachineSetAction(Sm, AUTH_WAIT_SEQ4, MT2_PEER_AUTH_EVEN,
...@@ -103,13 +103,13 @@ VOID AuthTimeout(IN PVOID SystemSpecific1, ...@@ -103,13 +103,13 @@ VOID AuthTimeout(IN PVOID SystemSpecific1,
DBGPRINT(RT_DEBUG_TRACE, ("AUTH - AuthTimeout\n")); DBGPRINT(RT_DEBUG_TRACE, ("AUTH - AuthTimeout\n"));
// Do nothing if the driver is starting halt state. /* Do nothing if the driver is starting halt state. */
// This might happen when timer already been fired before cancel timer with mlmehalt /* This might happen when timer already been fired before cancel timer with mlmehalt */
if (RTMP_TEST_FLAG if (RTMP_TEST_FLAG
(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS | fRTMP_ADAPTER_NIC_NOT_EXIST)) (pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS | fRTMP_ADAPTER_NIC_NOT_EXIST))
return; return;
// send a de-auth to reset AP's state machine (Patch AP-Dir635) /* send a de-auth to reset AP's state machine (Patch AP-Dir635) */
if (pAd->Mlme.AuthMachine.CurrState == AUTH_WAIT_SEQ2) if (pAd->Mlme.AuthMachine.CurrState == AUTH_WAIT_SEQ2)
Cls2errAction(pAd, pAd->MlmeAux.Bssid); Cls2errAction(pAd, pAd->MlmeAux.Bssid);
...@@ -173,7 +173,7 @@ VOID PeerAuthRspAtSeq2Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ...@@ -173,7 +173,7 @@ VOID PeerAuthRspAtSeq2Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem)
&TimerCancelled); &TimerCancelled);
if (Status == MLME_SUCCESS) { if (Status == MLME_SUCCESS) {
// Authentication Mode "LEAP" has allow for CCX 1.X /* Authentication Mode "LEAP" has allow for CCX 1.X */
if (pAd->MlmeAux.Alg == Ndis802_11AuthModeOpen) { if (pAd->MlmeAux.Alg == Ndis802_11AuthModeOpen) {
pAd->Mlme.AuthMachine.CurrState = pAd->Mlme.AuthMachine.CurrState =
AUTH_REQ_IDLE; AUTH_REQ_IDLE;
...@@ -181,11 +181,11 @@ VOID PeerAuthRspAtSeq2Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ...@@ -181,11 +181,11 @@ VOID PeerAuthRspAtSeq2Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem)
MLME_CNTL_STATE_MACHINE, MLME_CNTL_STATE_MACHINE,
MT2_AUTH_CONF, 2, &Status); MT2_AUTH_CONF, 2, &Status);
} else { } else {
// 2. shared key, need to be challenged /* 2. shared key, need to be challenged */
Seq++; Seq++;
RemoteStatus = MLME_SUCCESS; RemoteStatus = MLME_SUCCESS;
// Get an unused nonpaged memory /* Get an unused nonpaged memory */
NStatus = NStatus =
MlmeAllocateMemory(pAd, MlmeAllocateMemory(pAd,
&pOutBuffer); &pOutBuffer);
...@@ -208,7 +208,7 @@ VOID PeerAuthRspAtSeq2Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ...@@ -208,7 +208,7 @@ VOID PeerAuthRspAtSeq2Action(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem)
SUBTYPE_AUTH, 0, Addr2, SUBTYPE_AUTH, 0, Addr2,
pAd->MlmeAux.Bssid); pAd->MlmeAux.Bssid);
AuthHdr.FC.Wep = 1; AuthHdr.FC.Wep = 1;
// Encrypt challenge text & auth information /* Encrypt challenge text & auth information */
RTMPInitWepEngine(pAd, RTMPInitWepEngine(pAd,
pAd-> pAd->
SharedKey[BSS0][pAd-> SharedKey[BSS0][pAd->
...@@ -332,7 +332,7 @@ VOID MlmeDeauthReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ...@@ -332,7 +332,7 @@ VOID MlmeDeauthReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem)
pInfo = (MLME_DEAUTH_REQ_STRUCT *) Elem->Msg; pInfo = (MLME_DEAUTH_REQ_STRUCT *) Elem->Msg;
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); //Get an unused nonpaged memory NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */
if (NStatus != NDIS_STATUS_SUCCESS) { if (NStatus != NDIS_STATUS_SUCCESS) {
DBGPRINT(RT_DEBUG_TRACE, DBGPRINT(RT_DEBUG_TRACE,
("AUTH - MlmeDeauthReqAction() allocate memory fail\n")); ("AUTH - MlmeDeauthReqAction() allocate memory fail\n"));
...@@ -359,7 +359,7 @@ VOID MlmeDeauthReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem) ...@@ -359,7 +359,7 @@ VOID MlmeDeauthReqAction(IN PRTMP_ADAPTER pAd, IN MLME_QUEUE_ELEM * Elem)
Status = MLME_SUCCESS; Status = MLME_SUCCESS;
MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_DEAUTH_CONF, 2, &Status); MlmeEnqueue(pAd, MLME_CNTL_STATE_MACHINE, MT2_DEAUTH_CONF, 2, &Status);
// send wireless event - for deauthentication /* send wireless event - for deauthentication */
if (pAd->CommonCfg.bWirelessEvent) if (pAd->CommonCfg.bWirelessEvent)
RTMPSendWirelessEvent(pAd, IW_DEAUTH_EVENT_FLAG, RTMPSendWirelessEvent(pAd, IW_DEAUTH_EVENT_FLAG,
pAd->MacTab.Content[BSSID_WCID].Addr, pAd->MacTab.Content[BSSID_WCID].Addr,
...@@ -422,7 +422,7 @@ VOID Cls2errAction(IN PRTMP_ADAPTER pAd, IN PUCHAR pAddr) ...@@ -422,7 +422,7 @@ VOID Cls2errAction(IN PRTMP_ADAPTER pAd, IN PUCHAR pAddr)
ULONG FrameLen = 0; ULONG FrameLen = 0;
USHORT Reason = REASON_CLS2ERR; USHORT Reason = REASON_CLS2ERR;
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); //Get an unused nonpaged memory NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */
if (NStatus != NDIS_STATUS_SUCCESS) if (NStatus != NDIS_STATUS_SUCCESS)
return; return;
...@@ -455,7 +455,7 @@ BOOLEAN AUTH_ReqSend(IN PRTMP_ADAPTER pAd, ...@@ -455,7 +455,7 @@ BOOLEAN AUTH_ReqSend(IN PRTMP_ADAPTER pAd,
PUCHAR pOutBuffer = NULL; PUCHAR pOutBuffer = NULL;
ULONG FrameLen = 0, tmp = 0; ULONG FrameLen = 0, tmp = 0;
// Block all authentication request durning WPA block period /* Block all authentication request durning WPA block period */
if (pAd->StaCfg.bBlockAssoc == TRUE) { if (pAd->StaCfg.bBlockAssoc == TRUE) {
DBGPRINT(RT_DEBUG_TRACE, DBGPRINT(RT_DEBUG_TRACE,
("%s - Block Auth request durning WPA block period!\n", ("%s - Block Auth request durning WPA block period!\n",
...@@ -475,7 +475,7 @@ BOOLEAN AUTH_ReqSend(IN PRTMP_ADAPTER pAd, ...@@ -475,7 +475,7 @@ BOOLEAN AUTH_ReqSend(IN PRTMP_ADAPTER pAd,
Seq = SeqNo; Seq = SeqNo;
Status = MLME_SUCCESS; Status = MLME_SUCCESS;
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); //Get an unused nonpaged memory NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); /*Get an unused nonpaged memory */
if (NStatus != NDIS_STATUS_SUCCESS) { if (NStatus != NDIS_STATUS_SUCCESS) {
DBGPRINT(RT_DEBUG_TRACE, DBGPRINT(RT_DEBUG_TRACE,
("%s - MlmeAuthReqAction(Alg:%d) allocate memory failed\n", ("%s - MlmeAuthReqAction(Alg:%d) allocate memory failed\n",
......
...@@ -55,11 +55,11 @@ VOID AuthRspStateMachineInit(IN PRTMP_ADAPTER pAd, ...@@ -55,11 +55,11 @@ VOID AuthRspStateMachineInit(IN PRTMP_ADAPTER pAd,
(STATE_MACHINE_FUNC) Drop, AUTH_RSP_IDLE, (STATE_MACHINE_FUNC) Drop, AUTH_RSP_IDLE,
AUTH_RSP_MACHINE_BASE); AUTH_RSP_MACHINE_BASE);
// column 1 /* column 1 */
StateMachineSetAction(Sm, AUTH_RSP_IDLE, MT2_PEER_DEAUTH, StateMachineSetAction(Sm, AUTH_RSP_IDLE, MT2_PEER_DEAUTH,
(STATE_MACHINE_FUNC) PeerDeauthAction); (STATE_MACHINE_FUNC) PeerDeauthAction);
// column 2 /* column 2 */
StateMachineSetAction(Sm, AUTH_RSP_WAIT_CHAL, MT2_PEER_DEAUTH, StateMachineSetAction(Sm, AUTH_RSP_WAIT_CHAL, MT2_PEER_DEAUTH,
(STATE_MACHINE_FUNC) PeerDeauthAction); (STATE_MACHINE_FUNC) PeerDeauthAction);
...@@ -88,7 +88,7 @@ VOID PeerAuthSimpleRspGenAndSend(IN PRTMP_ADAPTER pAd, ...@@ -88,7 +88,7 @@ VOID PeerAuthSimpleRspGenAndSend(IN PRTMP_ADAPTER pAd,
DBGPRINT(RT_DEBUG_TRACE, ("Peer AUTH fail...\n")); DBGPRINT(RT_DEBUG_TRACE, ("Peer AUTH fail...\n"));
return; return;
} }
//Get an unused nonpaged memory /*Get an unused nonpaged memory */
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); NStatus = MlmeAllocateMemory(pAd, &pOutBuffer);
if (NStatus != NDIS_STATUS_SUCCESS) if (NStatus != NDIS_STATUS_SUCCESS)
return; return;
...@@ -126,7 +126,7 @@ VOID PeerDeauthAction(IN PRTMP_ADAPTER pAd, IN PMLME_QUEUE_ELEM Elem) ...@@ -126,7 +126,7 @@ VOID PeerDeauthAction(IN PRTMP_ADAPTER pAd, IN PMLME_QUEUE_ELEM Elem)
RtmpOSWrielessEventSend(pAd, SIOCGIWAP, -1, NULL, NULL, RtmpOSWrielessEventSend(pAd, SIOCGIWAP, -1, NULL, NULL,
0); 0);
// send wireless event - for deauthentication /* send wireless event - for deauthentication */
if (pAd->CommonCfg.bWirelessEvent) if (pAd->CommonCfg.bWirelessEvent)
RTMPSendWirelessEvent(pAd, IW_DEAUTH_EVENT_FLAG, RTMPSendWirelessEvent(pAd, IW_DEAUTH_EVENT_FLAG,
pAd->MacTab. pAd->MacTab.
......
This diff is collapsed.
This diff is collapsed.
...@@ -86,7 +86,7 @@ BOOLEAN MlmeStartReqSanity(IN PRTMP_ADAPTER pAd, ...@@ -86,7 +86,7 @@ BOOLEAN MlmeStartReqSanity(IN PRTMP_ADAPTER pAd,
========================================================================== ==========================================================================
*/ */
BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, IN VOID * pMsg, IN ULONG MsgLen, OUT PUCHAR pAddr2, OUT USHORT * pCapabilityInfo, OUT USHORT * pStatus, OUT USHORT * pAid, OUT UCHAR SupRate[], OUT UCHAR * pSupRateLen, OUT UCHAR ExtRate[], OUT UCHAR * pExtRateLen, OUT HT_CAPABILITY_IE * pHtCapability, OUT ADD_HT_INFO_IE * pAddHtInfo, // AP might use this additional ht info IE BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, IN VOID * pMsg, IN ULONG MsgLen, OUT PUCHAR pAddr2, OUT USHORT * pCapabilityInfo, OUT USHORT * pStatus, OUT USHORT * pAid, OUT UCHAR SupRate[], OUT UCHAR * pSupRateLen, OUT UCHAR ExtRate[], OUT UCHAR * pExtRateLen, OUT HT_CAPABILITY_IE * pHtCapability, OUT ADD_HT_INFO_IE * pAddHtInfo, /* AP might use this additional ht info IE */
OUT UCHAR * pHtCapabilityLen, OUT UCHAR * pHtCapabilityLen,
OUT UCHAR * pAddHtInfoLen, OUT UCHAR * pAddHtInfoLen,
OUT UCHAR * pNewExtChannelOffset, OUT UCHAR * pNewExtChannelOffset,
...@@ -118,10 +118,10 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, IN VOID * pMsg, IN ULONG MsgLen ...@@ -118,10 +118,10 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, IN VOID * pMsg, IN ULONG MsgLen
NdisMoveMemory(pAid, &pFrame->Octet[4], 2); NdisMoveMemory(pAid, &pFrame->Octet[4], 2);
Length += 2; Length += 2;
// Aid already swaped byte order in RTMPFrameEndianChange() for big endian platform /* Aid already swaped byte order in RTMPFrameEndianChange() for big endian platform */
*pAid = (*pAid) & 0x3fff; // AID is low 14-bit *pAid = (*pAid) & 0x3fff; /* AID is low 14-bit */
// -- get supported rates from payload and advance the pointer /* -- get supported rates from payload and advance the pointer */
IeType = pFrame->Octet[6]; IeType = pFrame->Octet[6];
*pSupRateLen = pFrame->Octet[7]; *pSupRateLen = pFrame->Octet[7];
if ((IeType != IE_SUPP_RATES) if ((IeType != IE_SUPP_RATES)
...@@ -134,11 +134,11 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, IN VOID * pMsg, IN ULONG MsgLen ...@@ -134,11 +134,11 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, IN VOID * pMsg, IN ULONG MsgLen
Length = Length + 2 + *pSupRateLen; Length = Length + 2 + *pSupRateLen;
// many AP implement proprietary IEs in non-standard order, we'd better /* many AP implement proprietary IEs in non-standard order, we'd better */
// tolerate mis-ordered IEs to get best compatibility /* tolerate mis-ordered IEs to get best compatibility */
pEid = (PEID_STRUCT) & pFrame->Octet[8 + (*pSupRateLen)]; pEid = (PEID_STRUCT) & pFrame->Octet[8 + (*pSupRateLen)];
// get variable fields from payload and advance the pointer /* get variable fields from payload and advance the pointer */
while ((Length + 2 + pEid->Len) <= MsgLen) { while ((Length + 2 + pEid->Len) <= MsgLen) {
switch (pEid->Eid) { switch (pEid->Eid) {
case IE_EXT_SUPP_RATES: case IE_EXT_SUPP_RATES:
...@@ -150,7 +150,7 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, IN VOID * pMsg, IN ULONG MsgLen ...@@ -150,7 +150,7 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, IN VOID * pMsg, IN ULONG MsgLen
case IE_HT_CAP: case IE_HT_CAP:
case IE_HT_CAP2: case IE_HT_CAP2:
if (pEid->Len >= SIZE_HT_CAP_IE) //Note: allow extension.!! if (pEid->Len >= SIZE_HT_CAP_IE) /*Note: allow extension.!! */
{ {
NdisMoveMemory(pHtCapability, pEid->Octet, NdisMoveMemory(pHtCapability, pEid->Octet,
SIZE_HT_CAP_IE); SIZE_HT_CAP_IE);
...@@ -172,8 +172,8 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, IN VOID * pMsg, IN ULONG MsgLen ...@@ -172,8 +172,8 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, IN VOID * pMsg, IN ULONG MsgLen
case IE_ADD_HT: case IE_ADD_HT:
case IE_ADD_HT2: case IE_ADD_HT2:
if (pEid->Len >= sizeof(ADD_HT_INFO_IE)) { if (pEid->Len >= sizeof(ADD_HT_INFO_IE)) {
// This IE allows extension, but we can ignore extra bytes beyond our knowledge , so only /* 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(ADD_HT_INFO_IE) */
NdisMoveMemory(pAddHtInfo, pEid->Octet, NdisMoveMemory(pAddHtInfo, pEid->Octet,
sizeof(ADD_HT_INFO_IE)); sizeof(ADD_HT_INFO_IE));
...@@ -201,31 +201,31 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, IN VOID * pMsg, IN ULONG MsgLen ...@@ -201,31 +201,31 @@ BOOLEAN PeerAssocRspSanity(IN PRTMP_ADAPTER pAd, IN VOID * pMsg, IN ULONG MsgLen
break; break;
case IE_VENDOR_SPECIFIC: case IE_VENDOR_SPECIFIC:
// handle WME PARAMTER ELEMENT /* handle WME PARAMTER ELEMENT */
if (NdisEqualMemory(pEid->Octet, WME_PARM_ELEM, 6) if (NdisEqualMemory(pEid->Octet, WME_PARM_ELEM, 6)
&& (pEid->Len == 24)) { && (pEid->Len == 24)) {
PUCHAR ptr; PUCHAR ptr;
int i; int i;
// parsing EDCA parameters /* parsing EDCA parameters */
pEdcaParm->bValid = TRUE; pEdcaParm->bValid = TRUE;
pEdcaParm->bQAck = FALSE; // pEid->Octet[0] & 0x10; pEdcaParm->bQAck = FALSE; /* pEid->Octet[0] & 0x10; */
pEdcaParm->bQueueRequest = FALSE; // pEid->Octet[0] & 0x20; pEdcaParm->bQueueRequest = FALSE; /* pEid->Octet[0] & 0x20; */
pEdcaParm->bTxopRequest = FALSE; // pEid->Octet[0] & 0x40; pEdcaParm->bTxopRequest = FALSE; /* pEid->Octet[0] & 0x40; */
//pEdcaParm->bMoreDataAck = FALSE; // pEid->Octet[0] & 0x80; /*pEdcaParm->bMoreDataAck = FALSE; // pEid->Octet[0] & 0x80; */
pEdcaParm->EdcaUpdateCount = pEdcaParm->EdcaUpdateCount =
pEid->Octet[6] & 0x0f; pEid->Octet[6] & 0x0f;
pEdcaParm->bAPSDCapable = pEdcaParm->bAPSDCapable =
(pEid->Octet[6] & 0x80) ? 1 : 0; (pEid->Octet[6] & 0x80) ? 1 : 0;
ptr = (PUCHAR) & pEid->Octet[8]; ptr = (PUCHAR) & pEid->Octet[8];
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
UCHAR aci = (*ptr & 0x60) >> 5; // b5~6 is AC INDEX UCHAR aci = (*ptr & 0x60) >> 5; /* b5~6 is AC INDEX */
pEdcaParm->bACM[aci] = (((*ptr) & 0x10) == 0x10); // b5 is ACM pEdcaParm->bACM[aci] = (((*ptr) & 0x10) == 0x10); /* b5 is ACM */
pEdcaParm->Aifsn[aci] = (*ptr) & 0x0f; // b0~3 is AIFSN pEdcaParm->Aifsn[aci] = (*ptr) & 0x0f; /* b0~3 is AIFSN */
pEdcaParm->Cwmin[aci] = *(ptr + 1) & 0x0f; // b0~4 is Cwmin pEdcaParm->Cwmin[aci] = *(ptr + 1) & 0x0f; /* b0~4 is Cwmin */
pEdcaParm->Cwmax[aci] = *(ptr + 1) >> 4; // b5~8 is Cwmax pEdcaParm->Cwmax[aci] = *(ptr + 1) >> 4; /* b5~8 is Cwmax */
pEdcaParm->Txop[aci] = *(ptr + 2) + 256 * (*(ptr + 3)); // in unit of 32-us pEdcaParm->Txop[aci] = *(ptr + 2) + 256 * (*(ptr + 3)); /* in unit of 32-us */
ptr += 4; // point to next AC ptr += 4; /* point to next AC */
} }
} }
break; break;
...@@ -280,7 +280,7 @@ BOOLEAN PeerProbeReqSanity(IN PRTMP_ADAPTER pAd, ...@@ -280,7 +280,7 @@ BOOLEAN PeerProbeReqSanity(IN PRTMP_ADAPTER pAd,
Idx = *pSsidLen + 2; Idx = *pSsidLen + 2;
// -- get supported rates from payload and advance the pointer /* -- get supported rates from payload and advance the pointer */
IeType = pFrame->Octet[Idx]; IeType = pFrame->Octet[Idx];
RateLen = pFrame->Octet[Idx + 1]; RateLen = pFrame->Octet[Idx + 1];
if (IeType != IE_SUPP_RATES) { if (IeType != IE_SUPP_RATES) {
...@@ -319,15 +319,15 @@ BOOLEAN GetTimBit(IN CHAR * Ptr, ...@@ -319,15 +319,15 @@ BOOLEAN GetTimBit(IN CHAR * Ptr,
IdxPtr++; IdxPtr++;
*TimLen = *IdxPtr; *TimLen = *IdxPtr;
// get DTIM Count from TIM element /* get DTIM Count from TIM element */
IdxPtr++; IdxPtr++;
*DtimCount = *IdxPtr; *DtimCount = *IdxPtr;
// get DTIM Period from TIM element /* get DTIM Period from TIM element */
IdxPtr++; IdxPtr++;
*DtimPeriod = *IdxPtr; *DtimPeriod = *IdxPtr;
// get Bitmap Control from TIM element /* get Bitmap Control from TIM element */
IdxPtr++; IdxPtr++;
BitCntl = *IdxPtr; BitCntl = *IdxPtr;
...@@ -336,20 +336,20 @@ BOOLEAN GetTimBit(IN CHAR * Ptr, ...@@ -336,20 +336,20 @@ BOOLEAN GetTimBit(IN CHAR * Ptr,
else else
*BcastFlag = FALSE; *BcastFlag = FALSE;
// Parse Partial Virtual Bitmap from TIM element /* Parse Partial Virtual Bitmap from TIM element */
N1 = BitCntl & 0xfe; // N1 is the first bitmap byte# N1 = BitCntl & 0xfe; /* N1 is the first bitmap byte# */
N2 = *TimLen - 4 + N1; // N2 is the last bitmap byte# N2 = *TimLen - 4 + N1; /* N2 is the last bitmap byte# */
if ((Aid < (N1 << 3)) || (Aid >= ((N2 + 1) << 3))) if ((Aid < (N1 << 3)) || (Aid >= ((N2 + 1) << 3)))
*MessageToMe = FALSE; *MessageToMe = FALSE;
else { else {
MyByte = (Aid >> 3) - N1; // my byte position in the bitmap byte-stream MyByte = (Aid >> 3) - N1; /* my byte position in the bitmap byte-stream */
MyBit = Aid % 16 - ((MyByte & 0x01) ? 8 : 0); MyBit = Aid % 16 - ((MyByte & 0x01) ? 8 : 0);
IdxPtr += (MyByte + 1); IdxPtr += (MyByte + 1);
//if (*IdxPtr) /*if (*IdxPtr) */
// DBGPRINT(RT_DEBUG_WARN, ("TIM bitmap = 0x%02x\n", *IdxPtr)); /* DBGPRINT(RT_DEBUG_WARN, ("TIM bitmap = 0x%02x\n", *IdxPtr)); */
if (*IdxPtr & (0x01 << MyBit)) if (*IdxPtr & (0x01 << MyBit))
*MessageToMe = TRUE; *MessageToMe = TRUE;
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment