summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2020-05-06 00:15:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-13 14:53:57 +0300
commit7a83f736455eb22be31ea86a84c54842a29b8a3f (patch)
treeb32af224daa145f53fba940a36f28349f5f859ce /drivers/staging/vt6656
parent57b4b0e68d668ad048bf5f1b8166396fe45ba5b0 (diff)
downloadlinux-7a83f736455eb22be31ea86a84c54842a29b8a3f.tar.xz
staging: vt6656: vnt_get_rtscts_duration_le use ieee80211_ctstoself_duration
use the mac80211 ieee80211_ctstoself_duration for CTS to self frames. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/f12b3d71-eb61-340b-e473-83509d9bc38a@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r--drivers/staging/vt6656/rxtx.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 48fe16c27d3f..27069ac60b15 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -195,27 +195,6 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate)
[rate % MAX_RATE]);
}
-static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,
- u32 frame_length, u16 rate, int need_ack)
-{
- u32 data_time, ack_time;
-
- data_time = vnt_get_frame_time(priv->preamble_type, pkt_type,
- frame_length, rate);
-
- if (pkt_type == PK_TYPE_11B)
- ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type, 14,
- (u16)priv->top_cck_basic_rate);
- else
- ack_time = vnt_get_frame_time(priv->preamble_type, pkt_type, 14,
- (u16)priv->top_ofdm_basic_rate);
-
- if (need_ack)
- return data_time + priv->sifs + ack_time;
-
- return data_time;
-}
-
static __le16 vnt_rxtx_rsvtime_le16(struct vnt_usb_send_context *context)
{
struct vnt_private *priv = context->priv;
@@ -285,9 +264,6 @@ 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 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) {
@@ -298,15 +274,13 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_usb_send_context *context,
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);
- break;
-
+ return ieee80211_ctstoself_duration(priv->hw, priv->vif,
+ context->frame_len, info);
default:
break;
}
- return cpu_to_le16((u16)dur_time);
+ return cpu_to_le16(0);
}
static u16 vnt_mac_hdr_pos(struct vnt_usb_send_context *tx_context,