From e4a34ef772576a782f2f76b9fd1d7a4ccd488981 Mon Sep 17 00:00:00 2001 From: Matej Dujava Date: Sun, 3 May 2020 15:29:08 +0200 Subject: [PATCH] staging: vt6655: merge two switch cases in s_uGetDataDuration This patch will reuse code for two cases. Signed-off-by: Matej Dujava Link: https://lore.kernel.org/r/1588512552-12297-2-git-send-email-mdujava@kocurkovo.cz Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/rxtx.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 2f9c2ead3cb8..28f0cda36dec 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -296,40 +296,6 @@ s_uGetDataDuration( break; case DATADUR_A_F0: /* DATADUR_A_F0 */ - if (((uMACfragNum == 1)) || bLastFrag) {/* Non Frag or Last Frag */ - if (bNeedAck) { - uAckTime = bb_get_frame_time(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); - return pDevice->uSIFS + uAckTime; - } else { - return 0; - } - } else { /* First Frag or Mid Frag */ - if (wRate < RATE_18M) - wRate = RATE_18M; - else if (wRate > RATE_54M) - wRate = RATE_54M; - - if (byFBOption == AUTO_FB_0) { - uNextPktTime = s_uGetTxRsvTime(pDevice, - byPktType, len, - wFB_Opt0[FB_RATE0][wRate - RATE_18M], - bNeedAck); - } else { - uNextPktTime = s_uGetTxRsvTime(pDevice, - byPktType, len, - wFB_Opt1[FB_RATE0][wRate - RATE_18M], - bNeedAck); - } - - if (bNeedAck) { - uAckTime = bb_get_frame_time(pDevice->byPreambleType, - byPktType, 14, - pDevice->byTopOFDMBasicRate); - } - return pDevice->uSIFS + uAckTime + uNextPktTime; - } - break; - case DATADUR_A_F1: /* DATADUR_A_F1 */ if (((uMACfragNum == 1)) || bLastFrag) { /* Non Frag or Last Frag */ if (bNeedAck) {