//byFreqType: 0=>5GHZ 1=>2.4GHZ
static
-unsigned int
+__le16
s_uGetRTSCTSDuration(
struct vnt_private *pDevice,
unsigned char byDurType,
break;
}
- return uDurTime;
+ return cpu_to_le16((u16)uDurTime);
}
static
byPktType, &buf->a);
/* Get Duration */
buf->duration_bb =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength,
- PK_TYPE_11B, pDevice->byTopCCKBasicRate,
- bNeedAck, byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_BB,
+ cbFrameLength, PK_TYPE_11B,
+ pDevice->byTopCCKBasicRate,
+ bNeedAck, byFBOption);
buf->duration_aa =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength,
- byPktType, wCurrentRate, bNeedAck,
- byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_AA,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
buf->duration_ba =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength,
- byPktType, wCurrentRate, bNeedAck,
- byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_BA,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
buf->data.duration = buf->duration_aa;
/* Get RTS Frame body */
byPktType, &buf->a);
/* Get Duration */
buf->duration_bb =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength,
- PK_TYPE_11B, pDevice->byTopCCKBasicRate,
- bNeedAck, byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_BB,
+ cbFrameLength, PK_TYPE_11B,
+ pDevice->byTopCCKBasicRate,
+ bNeedAck, byFBOption);
buf->duration_aa =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength,
- byPktType, wCurrentRate, bNeedAck,
- byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_AA,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
buf->duration_ba =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength,
- byPktType, wCurrentRate, bNeedAck,
- byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_BA,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
buf->rts_duration_ba_f0 =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F0, cbFrameLength,
- byPktType, wCurrentRate, bNeedAck,
- byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F0,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
buf->rts_duration_aa_f0 =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength,
- byPktType, wCurrentRate, bNeedAck,
- byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
buf->rts_duration_ba_f1 =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F1, cbFrameLength,
- byPktType, wCurrentRate, bNeedAck,
- byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F1,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
buf->rts_duration_aa_f1 =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength,
- byPktType, wCurrentRate, bNeedAck,
- byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
buf->data.duration = buf->duration_aa;
/* Get RTS Frame body */
buf->data.frame_control =
byPktType, &buf->ab);
/* Get Duration */
buf->duration =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength,
- byPktType, wCurrentRate, bNeedAck,
- byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_AA,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
buf->data.duration = buf->duration;
/* Get RTS Frame body */
buf->data.frame_control =
byPktType, &buf->a);
/* Get Duration */
buf->duration =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength,
- byPktType, wCurrentRate,
- bNeedAck, byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_AA,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
buf->rts_duration_f0 =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength,
- byPktType, wCurrentRate,
- bNeedAck, byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
buf->rts_duration_f1 =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength,
- byPktType, wCurrentRate,
- bNeedAck, byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
buf->data.duration = buf->duration;
/* Get RTS Frame body */
buf->data.frame_control =
PK_TYPE_11B, &buf->ab);
/* Get Duration */
buf->duration =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength,
- byPktType, wCurrentRate, bNeedAck,
- byFBOption));
+ s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength,
+ byPktType, wCurrentRate, bNeedAck,
+ byFBOption);
+
buf->data.duration = buf->duration;
/* Get RTS Frame body */
buf->data.frame_control =
pDevice->byTopCCKBasicRate,
PK_TYPE_11B, &buf->b);
- buf->duration_ba = (u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength,
- byPktType, wCurrentRate, bNeedAck, byFBOption);
- buf->duration_ba = cpu_to_le16(buf->duration_ba);
- /* Get CTSDuration_ba_f0 */
- buf->cts_duration_ba_f0 = (u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F0, cbFrameLength,
- byPktType, wCurrentRate,
- bNeedAck, byFBOption);
+ buf->duration_ba =
+ s_uGetRTSCTSDuration(pDevice, CTSDUR_BA,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
- buf->cts_duration_ba_f0 = cpu_to_le16(buf->cts_duration_ba_f0);
- //Get CTSDuration_ba_f1
- buf->cts_duration_ba_f1 = (u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F1, cbFrameLength,
- byPktType, wCurrentRate,
- bNeedAck, byFBOption);
+ /* Get CTSDuration_ba_f0 */
+ buf->cts_duration_ba_f0 =
+ s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F0,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
+
+ /* Get CTSDuration_ba_f1 */
+ buf->cts_duration_ba_f1 =
+ s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F1,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
- buf->cts_duration_ba_f1 = cpu_to_le16(buf->cts_duration_ba_f1);
/* Get CTS Frame body */
buf->data.duration = buf->duration_ba;
/* Get CTSDuration_ba */
buf->duration_ba =
- cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength,
- byPktType, wCurrentRate, bNeedAck,
- byFBOption));
-
- buf->duration_ba = cpu_to_le16(buf->duration_ba);
+ s_uGetRTSCTSDuration(pDevice, CTSDUR_BA,
+ cbFrameLength, byPktType,
+ wCurrentRate, bNeedAck,
+ byFBOption);
/* Get CTS Frame body */
buf->data.duration = buf->duration_ba;