summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6655/rxtx.c
diff options
context:
space:
mode:
authorBriana Oursler <briana.oursler@gmail.com>2020-04-01 11:03:39 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-13 08:55:26 +0200
commit5b0578364fb875366de08686593f9fc6ce2ce564 (patch)
tree1d9ef4db6752927db0878116a2b051cb7e706df8 /drivers/staging/vt6655/rxtx.c
parent6f5ec72252d1d40a7e23976eb1b3c7bb9073e433 (diff)
Staging: vt6655: Limit return statements.
Limit return statements within context of switch case to improve readability. Signed-off-by: Briana Oursler <briana.oursler@gmail.com> Reviewed-by: Stefano Brivio <sbrivio@redhat.com> Link: https://lore.kernel.org/r/fe417533b66d29ef6ea19128b38b8c8de7757ae2.1585763457.git.briana.oursler@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655/rxtx.c')
-rw-r--r--drivers/staging/vt6655/rxtx.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index a1ddd7990e81..30777d6368ba 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -263,12 +263,9 @@ s_uGetDataDuration(
else
uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck);
- if (bNeedAck) {
+ if (bNeedAck)
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate);
- return pDevice->uSIFS + uAckTime + uNextPktTime;
- } else {
- return pDevice->uSIFS + uNextPktTime;
- }
+ return pDevice->uSIFS + uAckTime + uNextPktTime;
}
break;
@@ -286,12 +283,9 @@ s_uGetDataDuration(
else
uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck);
- if (bNeedAck) {
+ if (bNeedAck)
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate);
- return pDevice->uSIFS + uAckTime + uNextPktTime;
- } else {
- return pDevice->uSIFS + uNextPktTime;
- }
+ return pDevice->uSIFS + uAckTime + uNextPktTime;
}
break;
@@ -327,12 +321,9 @@ s_uGetDataDuration(
uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE0][wRate-RATE_18M], bNeedAck);
}
- if (bNeedAck) {
+ if (bNeedAck)
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate);
- return pDevice->uSIFS + uAckTime + uNextPktTime;
- } else {
- return pDevice->uSIFS + uNextPktTime;
- }
+ return pDevice->uSIFS + uAckTime + uNextPktTime;
}
break;
@@ -367,12 +358,10 @@ s_uGetDataDuration(
else
uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE1][wRate-RATE_18M], bNeedAck);
}
- if (bNeedAck) {
+
+ if (bNeedAck)
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate);
- return pDevice->uSIFS + uAckTime + uNextPktTime;
- } else {
- return pDevice->uSIFS + uNextPktTime;
- }
+ return pDevice->uSIFS + uAckTime + uNextPktTime;
}
break;