summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2020-05-05 22:13:54 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-13 13:53:07 +0200
commitc5de40e58f2f6cba9a11efcc5f4ef0ccf5be9729 (patch)
tree227623b199a463cf09da6cc43bd76faf9163e494 /drivers/staging/vt6656
parentd92e6991616daf4cb6e677a742282ceffb7ecfd4 (diff)
staging: vt6656: vnt_get_rtscts_duration_le use ieee80211_rts_duration
use the mac80211 ieee80211_rts_duration for RTS frames. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/377a4cc3-cfe3-91aa-cf71-1063f311426a@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r--drivers/staging/vt6656/rxtx.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 68be0fa7b201..a9c71aed9c08 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -280,28 +280,18 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_usb_send_context *context,
u8 dur_type, u8 pkt_type, u16 rate)
{
struct vnt_private *priv = context->priv;
- u32 cts_time = 0, dur_time = 0;
+ u32 dur_time = 0;
u32 frame_length = context->frame_len;
u8 need_ack = context->need_ack;
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(context->skb);
switch (dur_type) {
+ /* fall through */
case RTSDUR_BB:
case RTSDUR_BA:
- cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_cck_basic_rate);
- dur_time = cts_time + 2 * priv->sifs +
- vnt_get_rsvtime(priv, pkt_type,
- frame_length, rate, need_ack);
- break;
-
case RTSDUR_AA:
- cts_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- 14, priv->top_ofdm_basic_rate);
- dur_time = cts_time + 2 * priv->sifs +
- vnt_get_rsvtime(priv, pkt_type,
- frame_length, rate, need_ack);
- break;
-
+ return ieee80211_rts_duration(priv->hw, priv->vif,
+ context->frame_len, info);
case CTSDUR_BA:
dur_time = priv->sifs + vnt_get_rsvtime(priv,
pkt_type, frame_length, rate, need_ack);