diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2014-05-19 20:32:58 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-19 15:23:21 -0700 |
commit | 4d99952df1d6a4ef14013fe315a44fcd6bdd9f59 (patch) | |
tree | f5aa0438a6cd1cb60389e4f441fe26f3014cb8d8 /drivers/staging/vt6656/baseband.c | |
parent | 2a4ee86f044ca0c39e9633d9f40e36a1a7df1180 (diff) | |
download | op-kernel-dev-4d99952df1d6a4ef14013fe315a44fcd6bdd9f59.zip op-kernel-dev-4d99952df1d6a4ef14013fe315a44fcd6bdd9f59.tar.gz |
staging: vt6656: checkpatch cleanup BBuGetFrameTime.
clean up white space.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/baseband.c')
-rw-r--r-- | drivers/staging/vt6656/baseband.c | 78 |
1 files changed, 36 insertions, 42 deletions
diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index a70b278..dbe06f9 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -663,53 +663,47 @@ s_vClearSQ3Value(PSDevice pDevice); * Return Value: FrameTime * */ -unsigned int -BBuGetFrameTime( - u8 byPreambleType, - u8 byPktType, - unsigned int cbFrameLength, - u16 wRate - ) +unsigned int BBuGetFrameTime(u8 byPreambleType, u8 byPktType, + unsigned int cbFrameLength, u16 wRate) { - unsigned int uFrameTime; - unsigned int uPreamble; - unsigned int uTmp; - unsigned int uRateIdx = (unsigned int)wRate; - unsigned int uRate = 0; - - if (uRateIdx > RATE_54M) { - return 0; - } + unsigned int uFrameTime; + unsigned int uPreamble; + unsigned int uTmp; + unsigned int uRateIdx = (unsigned int)wRate; + unsigned int uRate = 0; - uRate = (unsigned int)awcFrameTime[uRateIdx]; + if (uRateIdx > RATE_54M) + return 0; - if (uRateIdx <= 3) { //CCK mode + uRate = (unsigned int)awcFrameTime[uRateIdx]; - if (byPreambleType == 1) {//Short - uPreamble = 96; - } else { - uPreamble = 192; - } - uFrameTime = (cbFrameLength * 80) / uRate; //????? - uTmp = (uFrameTime * uRate) / 80; - if (cbFrameLength != uTmp) { - uFrameTime ++; - } + if (uRateIdx <= 3) { + if (byPreambleType == 1) + uPreamble = 96; + else + uPreamble = 192; - return (uPreamble + uFrameTime); - } - else { - uFrameTime = (cbFrameLength * 8 + 22) / uRate; //???????? - uTmp = ((uFrameTime * uRate) - 22) / 8; - if(cbFrameLength != uTmp) { - uFrameTime ++; - } - uFrameTime = uFrameTime * 4; //??????? - if(byPktType != PK_TYPE_11A) { - uFrameTime += 6; - } - return (20 + uFrameTime); //?????? - } + uFrameTime = (cbFrameLength * 80) / uRate; + uTmp = (uFrameTime * uRate) / 80; + + if (cbFrameLength != uTmp) + uFrameTime++; + + return uPreamble + uFrameTime; + } else { + uFrameTime = (cbFrameLength * 8 + 22) / uRate; + uTmp = ((uFrameTime * uRate) - 22) / 8; + + if (cbFrameLength != uTmp) + uFrameTime++; + + uFrameTime = uFrameTime * 4; + + if (byPktType != PK_TYPE_11A) + uFrameTime += 6; + + return 20 + uFrameTime; + } } /* |