diff options
author | Matej Dujava <mdujava@kocurkovo.cz> | 2020-05-03 18:42:49 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-05 13:32:59 +0300 |
commit | 3fc29573cf3e38624962f1a74ee18cbec2a2556e (patch) | |
tree | 86c0cb3f860752511dbf2a81dd1182ec4aff2745 /drivers/staging/vt6655 | |
parent | e3b8577aa167ca5612b7723b6949dc888921ac8d (diff) | |
download | linux-3fc29573cf3e38624962f1a74ee18cbec2a2556e.tar.xz |
staging: vt6655: return early if not bNeedAck
This patch will check for bNeedAck before making bb_get_frame_time call, so
in case we dont need uAckTime, we can return early.
Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz>
Link: https://lore.kernel.org/r/1588520570-14388-2-git-send-email-mdujava@kocurkovo.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r-- | drivers/staging/vt6655/rxtx.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 1e025bb72810..afecebe286a4 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -166,15 +166,16 @@ s_uGetTxRsvTime( unsigned int uDataTime, uAckTime; uDataTime = bb_get_frame_time(pDevice->byPreambleType, byPktType, cbFrameLength, wRate); + + if (!bNeedAck) + return uDataTime; + if (byPktType == PK_TYPE_11B) /* llb,CCK mode */ uAckTime = bb_get_frame_time(pDevice->byPreambleType, byPktType, 14, (unsigned short)pDevice->byTopCCKBasicRate); else /* 11g 2.4G OFDM mode & 11a 5G OFDM mode */ uAckTime = bb_get_frame_time(pDevice->byPreambleType, byPktType, 14, (unsigned short)pDevice->byTopOFDMBasicRate); - if (bNeedAck) - return uDataTime + pDevice->uSIFS + uAckTime; - else - return uDataTime; + return uDataTime + pDevice->uSIFS + uAckTime; } static __le16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8 pkt_type, |