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);