staging: vt6655: merge two switch cases in s_uGetDataDuration
This patch will reuse code for two cases. Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz> Link: https://lore.kernel.org/r/1588512552-12297-2-git-send-email-mdujava@kocurkovo.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9adbb49e90
commit
e4a34ef772
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue