Commit b7760002 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

staging:vt6655:IEEE11h: Whitespace cleanups

Neatening only.
git diff -w shows no differences.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ab4622cc
...@@ -99,7 +99,7 @@ typedef struct _WLAN_FRAME_TPCREP { ...@@ -99,7 +99,7 @@ typedef struct _WLAN_FRAME_TPCREP {
/*--------------------- Static Functions --------------------------*/ /*--------------------- Static Functions --------------------------*/
static bool s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq, static bool s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq,
unsigned int uLength) unsigned int uLength)
{ {
size_t uNumOfEIDs = 0; size_t uNumOfEIDs = 0;
bool bResult = true; bool bResult = true;
...@@ -107,16 +107,16 @@ static bool s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq, ...@@ -107,16 +107,16 @@ static bool s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq,
if (uLength <= WLAN_A3FR_MAXLEN) if (uLength <= WLAN_A3FR_MAXLEN)
memcpy(pMgmt->abyCurrentMSRReq, pMSRReq, uLength); memcpy(pMgmt->abyCurrentMSRReq, pMSRReq, uLength);
uNumOfEIDs = ((uLength - offsetof(WLAN_FRAME_MSRREQ, uNumOfEIDs = ((uLength - offsetof(WLAN_FRAME_MSRREQ,
sMSRReqEIDs))/ sMSRReqEIDs))/
(sizeof(WLAN_IE_MEASURE_REQ))); (sizeof(WLAN_IE_MEASURE_REQ)));
pMgmt->pCurrMeasureEIDRep = &(((PWLAN_FRAME_MSRREP) pMgmt->pCurrMeasureEIDRep = &(((PWLAN_FRAME_MSRREP)
(pMgmt->abyCurrentMSRRep))->sMSRRepEIDs[0]); (pMgmt->abyCurrentMSRRep))->sMSRRepEIDs[0]);
pMgmt->uLengthOfRepEIDs = 0; pMgmt->uLengthOfRepEIDs = 0;
bResult = CARDbStartMeasure(pMgmt->pAdapter, bResult = CARDbStartMeasure(pMgmt->pAdapter,
((PWLAN_FRAME_MSRREQ) ((PWLAN_FRAME_MSRREQ)
(pMgmt->abyCurrentMSRReq))->sMSRReqEIDs, (pMgmt->abyCurrentMSRReq))->sMSRReqEIDs,
uNumOfEIDs uNumOfEIDs
); );
return bResult; return bResult;
} }
...@@ -132,29 +132,29 @@ static bool s_bRxTPCReq(PSMgmtObject pMgmt, ...@@ -132,29 +132,29 @@ static bool s_bRxTPCReq(PSMgmtObject pMgmt,
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool; pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN); memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket +
sizeof(STxMgmtPacket)); sizeof(STxMgmtPacket));
pFrame = (PWLAN_FRAME_TPCREP)((unsigned char *)pTxPacket + pFrame = (PWLAN_FRAME_TPCREP)((unsigned char *)pTxPacket +
sizeof(STxMgmtPacket)); sizeof(STxMgmtPacket));
pFrame->Header.wFrameCtl = (WLAN_SET_FC_FTYPE(WLAN_FTYPE_MGMT) | 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, memcpy(pFrame->Header.abyAddr1,
pTPCReq->Header.abyAddr2, pTPCReq->Header.abyAddr2,
WLAN_ADDR_LEN); WLAN_ADDR_LEN);
memcpy(pFrame->Header.abyAddr2, memcpy(pFrame->Header.abyAddr2,
CARDpGetCurrentAddress(pMgmt->pAdapter), CARDpGetCurrentAddress(pMgmt->pAdapter),
WLAN_ADDR_LEN); WLAN_ADDR_LEN);
memcpy(pFrame->Header.abyAddr3, memcpy(pFrame->Header.abyAddr3,
pMgmt->abyCurrBSSID, pMgmt->abyCurrBSSID,
WLAN_BSSID_LEN); WLAN_BSSID_LEN);
pFrame->byCategory = 0; pFrame->byCategory = 0;
pFrame->byAction = 3; pFrame->byAction = 3;
pFrame->byDialogToken = ((PWLAN_FRAME_MSRREQ) pFrame->byDialogToken = ((PWLAN_FRAME_MSRREQ)
(pMgmt->abyCurrentMSRReq))->byDialogToken; (pMgmt->abyCurrentMSRReq))->byDialogToken;
pFrame->sTPCRepEIDs.byElementID = WLAN_EID_TPC_REP; pFrame->sTPCRepEIDs.byElementID = WLAN_EID_TPC_REP;
pFrame->sTPCRepEIDs.len = 2; pFrame->sTPCRepEIDs.len = 2;
...@@ -185,16 +185,16 @@ sizeof(STxMgmtPacket)); ...@@ -185,16 +185,16 @@ sizeof(STxMgmtPacket));
default: default:
pFrame->sTPCRepEIDs.byLinkMargin = 82 - byRSSI; pFrame->sTPCRepEIDs.byLinkMargin = 82 - byRSSI;
break; break;
} }
pTxPacket->cbMPDULen = sizeof(WLAN_FRAME_TPCREP); pTxPacket->cbMPDULen = sizeof(WLAN_FRAME_TPCREP);
pTxPacket->cbPayloadLen = 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) if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING)
return false; return false;
return true; return true;
/* return (CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG, /* return (CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG,
sizeof(WLAN_FRAME_TPCREP))); */ sizeof(WLAN_FRAME_TPCREP))); */
} }
...@@ -218,7 +218,7 @@ sizeof(WLAN_FRAME_TPCREP))); */ ...@@ -218,7 +218,7 @@ sizeof(WLAN_FRAME_TPCREP))); */
* *
* Return Value: None. * Return Value: None.
* *
-*/ -*/
bool bool
IEEE11hbMgrRxAction(void *pMgmtHandle, void *pRxPacket) IEEE11hbMgrRxAction(void *pMgmtHandle, void *pRxPacket)
{ {
...@@ -233,54 +233,54 @@ IEEE11hbMgrRxAction(void *pMgmtHandle, void *pRxPacket) ...@@ -233,54 +233,54 @@ IEEE11hbMgrRxAction(void *pMgmtHandle, void *pRxPacket)
return false; return false;
pAction = (PWLAN_FRAME_ACTION) pAction = (PWLAN_FRAME_ACTION)
(((PSRxMgmtPacket)pRxPacket)->p80211Header); (((PSRxMgmtPacket)pRxPacket)->p80211Header);
if (pAction->byCategory == 0) { if (pAction->byCategory == 0) {
switch (pAction->byAction) { switch (pAction->byAction) {
case ACTION_MSRREQ: case ACTION_MSRREQ:
return s_bRxMSRReq(pMgmt, return s_bRxMSRReq(pMgmt,
(PWLAN_FRAME_MSRREQ) (PWLAN_FRAME_MSRREQ)
pAction, pAction,
uLength); uLength);
break; break;
case ACTION_MSRREP: case ACTION_MSRREP:
break; break;
case ACTION_TPCREQ: case ACTION_TPCREQ:
return s_bRxTPCReq(pMgmt, return s_bRxTPCReq(pMgmt,
(PWLAN_FRAME_TPCREQ) pAction, (PWLAN_FRAME_TPCREQ) pAction,
((PSRxMgmtPacket)pRxPacket)->byRxRate, ((PSRxMgmtPacket)pRxPacket)->byRxRate,
(unsigned char) (unsigned char)
((PSRxMgmtPacket)pRxPacket)->uRSSI); ((PSRxMgmtPacket)pRxPacket)->uRSSI);
break; break;
case ACTION_TPCREP: case ACTION_TPCREP:
break; break;
case ACTION_CHSW: case ACTION_CHSW:
pChannelSwitch = (PWLAN_IE_CH_SW) (pAction->abyVars); pChannelSwitch = (PWLAN_IE_CH_SW) (pAction->abyVars);
if ((pChannelSwitch->byElementID == WLAN_EID_CH_SWITCH) if ((pChannelSwitch->byElementID == WLAN_EID_CH_SWITCH)
&& (pChannelSwitch->len == 3)) { && (pChannelSwitch->len == 3)) {
/* valid element id */ /* valid element id */
CARDbChannelSwitch(pMgmt->pAdapter, CARDbChannelSwitch(pMgmt->pAdapter,
pChannelSwitch->byMode, pChannelSwitch->byMode,
get_channel_mapping(pMgmt->pAdapter, get_channel_mapping(pMgmt->pAdapter,
pChannelSwitch->byChannel, pChannelSwitch->byChannel,
pMgmt->eCurrentPHYMode), pMgmt->eCurrentPHYMode),
pChannelSwitch->byCount); pChannelSwitch->byCount);
} }
break; break;
default: default:
DBG_PRT(MSG_LEVEL_DEBUG, DBG_PRT(MSG_LEVEL_DEBUG,
KERN_INFO"Unknown Action = %d\n", KERN_INFO "Unknown Action = %d\n",
pAction->byAction); pAction->byAction);
break; break;
} }
} else { } else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Unknown Category = %d\n", DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unknown Category = %d\n",
pAction->byCategory); pAction->byCategory);
pAction->byCategory |= 0x80; pAction->byCategory |= 0x80;
/*return (CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG, /*return (CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG,
uLength));*/ uLength));*/
return true; return true;
} }
return true; return true;
} }
...@@ -290,29 +290,29 @@ bool IEEE11hbMSRRepTx(void *pMgmtHandle) ...@@ -290,29 +290,29 @@ bool IEEE11hbMSRRepTx(void *pMgmtHandle)
{ {
PSMgmtObject pMgmt = (PSMgmtObject) pMgmtHandle; PSMgmtObject pMgmt = (PSMgmtObject) pMgmtHandle;
PWLAN_FRAME_MSRREP pMSRRep = (PWLAN_FRAME_MSRREP) PWLAN_FRAME_MSRREP pMSRRep = (PWLAN_FRAME_MSRREP)
(pMgmt->abyCurrentMSRRep + sizeof(STxMgmtPacket)); (pMgmt->abyCurrentMSRRep + sizeof(STxMgmtPacket));
size_t uLength = 0; size_t uLength = 0;
PSTxMgmtPacket pTxPacket = NULL; PSTxMgmtPacket pTxPacket = NULL;
pTxPacket = (PSTxMgmtPacket)pMgmt->abyCurrentMSRRep; pTxPacket = (PSTxMgmtPacket)pMgmt->abyCurrentMSRRep;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN); memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket +
sizeof(STxMgmtPacket)); sizeof(STxMgmtPacket));
pMSRRep->Header.wFrameCtl = (WLAN_SET_FC_FTYPE(WLAN_FTYPE_MGMT) | 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) 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, 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); memcpy(pMSRRep->Header.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
pMSRRep->byCategory = 0; pMSRRep->byCategory = 0;
pMSRRep->byAction = 1; pMSRRep->byAction = 1;
pMSRRep->byDialogToken = ((PWLAN_FRAME_MSRREQ) pMSRRep->byDialogToken = ((PWLAN_FRAME_MSRREQ)
(pMgmt->abyCurrentMSRReq))->byDialogToken; (pMgmt->abyCurrentMSRReq))->byDialogToken;
uLength = pMgmt->uLengthOfRepEIDs + offsetof(WLAN_FRAME_MSRREP, uLength = pMgmt->uLengthOfRepEIDs + offsetof(WLAN_FRAME_MSRREP,
sMSRRepEIDs); sMSRRepEIDs);
...@@ -323,7 +323,7 @@ sizeof(STxMgmtPacket)); ...@@ -323,7 +323,7 @@ sizeof(STxMgmtPacket));
return false; return false;
return true; return true;
/* return (CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG, /* return (CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG,
uLength)); */ uLength)); */
} }
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
bool IEEE11hbMSRRepTx ( bool IEEE11hbMSRRepTx(
void *pMgmtHandle void *pMgmtHandle
); );
#endif // __IEEE11h_H__ #endif // __IEEE11h_H__
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