Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363516
b: refs/heads/master
c: b776000
h: refs/heads/master
v: v3
  • Loading branch information
Joe Perches authored and Greg Kroah-Hartman committed Mar 19, 2013
1 parent 3db71ac commit a5683a8
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab4622cca5fb9667b8bacc36cd59e4b2eea3aacd
refs/heads/master: b7760002277a32d427d0bf8167c45ecbbe1260d9
104 changes: 52 additions & 52 deletions trunk/drivers/staging/vt6655/IEEE11h.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,24 +99,24 @@ typedef struct _WLAN_FRAME_TPCREP {

/*--------------------- Static Functions --------------------------*/
static bool s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq,
unsigned int uLength)
unsigned int uLength)
{
size_t uNumOfEIDs = 0;
bool bResult = true;

if (uLength <= WLAN_A3FR_MAXLEN)
memcpy(pMgmt->abyCurrentMSRReq, pMSRReq, uLength);
uNumOfEIDs = ((uLength - offsetof(WLAN_FRAME_MSRREQ,
sMSRReqEIDs))/
(sizeof(WLAN_IE_MEASURE_REQ)));
sMSRReqEIDs))/
(sizeof(WLAN_IE_MEASURE_REQ)));
pMgmt->pCurrMeasureEIDRep = &(((PWLAN_FRAME_MSRREP)
(pMgmt->abyCurrentMSRRep))->sMSRRepEIDs[0]);
(pMgmt->abyCurrentMSRRep))->sMSRRepEIDs[0]);
pMgmt->uLengthOfRepEIDs = 0;
bResult = CARDbStartMeasure(pMgmt->pAdapter,
((PWLAN_FRAME_MSRREQ)
(pMgmt->abyCurrentMSRReq))->sMSRReqEIDs,
uNumOfEIDs
);
((PWLAN_FRAME_MSRREQ)
(pMgmt->abyCurrentMSRReq))->sMSRReqEIDs,
uNumOfEIDs
);
return bResult;
}

Expand All @@ -132,29 +132,29 @@ static bool s_bRxTPCReq(PSMgmtObject pMgmt,
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket +
sizeof(STxMgmtPacket));
sizeof(STxMgmtPacket));

pFrame = (PWLAN_FRAME_TPCREP)((unsigned char *)pTxPacket +
sizeof(STxMgmtPacket));
sizeof(STxMgmtPacket));

pFrame->Header.wFrameCtl = (WLAN_SET_FC_FTYPE(WLAN_FTYPE_MGMT) |
WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_ACTION)
);
WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_ACTION)
);

memcpy(pFrame->Header.abyAddr1,
pTPCReq->Header.abyAddr2,
WLAN_ADDR_LEN);
pTPCReq->Header.abyAddr2,
WLAN_ADDR_LEN);
memcpy(pFrame->Header.abyAddr2,
CARDpGetCurrentAddress(pMgmt->pAdapter),
WLAN_ADDR_LEN);
CARDpGetCurrentAddress(pMgmt->pAdapter),
WLAN_ADDR_LEN);
memcpy(pFrame->Header.abyAddr3,
pMgmt->abyCurrBSSID,
WLAN_BSSID_LEN);
pMgmt->abyCurrBSSID,
WLAN_BSSID_LEN);

pFrame->byCategory = 0;
pFrame->byAction = 3;
pFrame->byDialogToken = ((PWLAN_FRAME_MSRREQ)
(pMgmt->abyCurrentMSRReq))->byDialogToken;
(pMgmt->abyCurrentMSRReq))->byDialogToken;

pFrame->sTPCRepEIDs.byElementID = WLAN_EID_TPC_REP;
pFrame->sTPCRepEIDs.len = 2;
Expand Down Expand Up @@ -185,16 +185,16 @@ sizeof(STxMgmtPacket));
default:
pFrame->sTPCRepEIDs.byLinkMargin = 82 - byRSSI;
break;
}
}

pTxPacket->cbMPDULen = sizeof(WLAN_FRAME_TPCREP);
pTxPacket->cbPayloadLen = sizeof(WLAN_FRAME_TPCREP) -
WLAN_HDR_ADDR3_LEN;
WLAN_HDR_ADDR3_LEN;
if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING)
return false;
return true;
/* return (CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG,
sizeof(WLAN_FRAME_TPCREP))); */
sizeof(WLAN_FRAME_TPCREP))); */

}

Expand All @@ -218,7 +218,7 @@ sizeof(WLAN_FRAME_TPCREP))); */
*
* Return Value: None.
*
-*/
-*/
bool
IEEE11hbMgrRxAction(void *pMgmtHandle, void *pRxPacket)
{
Expand All @@ -233,54 +233,54 @@ IEEE11hbMgrRxAction(void *pMgmtHandle, void *pRxPacket)
return false;

pAction = (PWLAN_FRAME_ACTION)
(((PSRxMgmtPacket)pRxPacket)->p80211Header);
(((PSRxMgmtPacket)pRxPacket)->p80211Header);

if (pAction->byCategory == 0) {
switch (pAction->byAction) {
case ACTION_MSRREQ:
return s_bRxMSRReq(pMgmt,
(PWLAN_FRAME_MSRREQ)
pAction,
uLength);
(PWLAN_FRAME_MSRREQ)
pAction,
uLength);
break;
case ACTION_MSRREP:
break;
case ACTION_TPCREQ:
return s_bRxTPCReq(pMgmt,
(PWLAN_FRAME_TPCREQ) pAction,
((PSRxMgmtPacket)pRxPacket)->byRxRate,
(unsigned char)
((PSRxMgmtPacket)pRxPacket)->uRSSI);
(PWLAN_FRAME_TPCREQ) pAction,
((PSRxMgmtPacket)pRxPacket)->byRxRate,
(unsigned char)
((PSRxMgmtPacket)pRxPacket)->uRSSI);
break;
case ACTION_TPCREP:
break;
case ACTION_CHSW:
pChannelSwitch = (PWLAN_IE_CH_SW) (pAction->abyVars);
if ((pChannelSwitch->byElementID == WLAN_EID_CH_SWITCH)
&& (pChannelSwitch->len == 3)) {
&& (pChannelSwitch->len == 3)) {
/* valid element id */
CARDbChannelSwitch(pMgmt->pAdapter,
pChannelSwitch->byMode,
get_channel_mapping(pMgmt->pAdapter,
pChannelSwitch->byChannel,
pMgmt->eCurrentPHYMode),
pChannelSwitch->byCount);
pChannelSwitch->byMode,
get_channel_mapping(pMgmt->pAdapter,
pChannelSwitch->byChannel,
pMgmt->eCurrentPHYMode),
pChannelSwitch->byCount);
}
break;
default:
DBG_PRT(MSG_LEVEL_DEBUG,
KERN_INFO"Unknown Action = %d\n",
KERN_INFO "Unknown Action = %d\n",
pAction->byAction);
break;
}
} else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Unknown Category = %d\n",
pAction->byCategory);
pAction->byCategory |= 0x80;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unknown Category = %d\n",
pAction->byCategory);
pAction->byCategory |= 0x80;

/*return (CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG,
uLength));*/
return true;
/*return (CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG,
uLength));*/
return true;
}
return true;
}
Expand All @@ -290,29 +290,29 @@ bool IEEE11hbMSRRepTx(void *pMgmtHandle)
{
PSMgmtObject pMgmt = (PSMgmtObject) pMgmtHandle;
PWLAN_FRAME_MSRREP pMSRRep = (PWLAN_FRAME_MSRREP)
(pMgmt->abyCurrentMSRRep + sizeof(STxMgmtPacket));
(pMgmt->abyCurrentMSRRep + sizeof(STxMgmtPacket));
size_t uLength = 0;
PSTxMgmtPacket pTxPacket = NULL;

pTxPacket = (PSTxMgmtPacket)pMgmt->abyCurrentMSRRep;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket +
sizeof(STxMgmtPacket));
sizeof(STxMgmtPacket));

pMSRRep->Header.wFrameCtl = (WLAN_SET_FC_FTYPE(WLAN_FTYPE_MGMT) |
WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_ACTION)
);
WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_ACTION)
);

memcpy(pMSRRep->Header.abyAddr1, ((PWLAN_FRAME_MSRREQ)
(pMgmt->abyCurrentMSRReq))->Header.abyAddr2, WLAN_ADDR_LEN);
(pMgmt->abyCurrentMSRReq))->Header.abyAddr2, WLAN_ADDR_LEN);
memcpy(pMSRRep->Header.abyAddr2,
CARDpGetCurrentAddress(pMgmt->pAdapter), WLAN_ADDR_LEN);
CARDpGetCurrentAddress(pMgmt->pAdapter), WLAN_ADDR_LEN);
memcpy(pMSRRep->Header.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);

pMSRRep->byCategory = 0;
pMSRRep->byAction = 1;
pMSRRep->byDialogToken = ((PWLAN_FRAME_MSRREQ)
(pMgmt->abyCurrentMSRReq))->byDialogToken;
(pMgmt->abyCurrentMSRReq))->byDialogToken;

uLength = pMgmt->uLengthOfRepEIDs + offsetof(WLAN_FRAME_MSRREP,
sMSRRepEIDs);
Expand All @@ -323,7 +323,7 @@ sizeof(STxMgmtPacket));
return false;
return true;
/* return (CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG,
uLength)); */
uLength)); */

}

6 changes: 3 additions & 3 deletions trunk/drivers/staging/vt6655/IEEE11h.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@

/*--------------------- Export Functions --------------------------*/

bool IEEE11hbMSRRepTx (
void *pMgmtHandle
);
bool IEEE11hbMSRRepTx(
void *pMgmtHandle
);

#endif // __IEEE11h_H__

0 comments on commit a5683a8

Please sign in to comment.