Commit 342e2e20 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: rxtx.c Camel case and clean up s_uGetRTSCTSRsvTime

White space clean

Remove unneeded comments.

Camel case changes

pDevice,
byRTSRsvType
byPktType
cbFrameLength
wCurrentRate

uRrvTime
uRTSTime
uCTSTime
uAckTime
uDataTime

} -> {

priv,
rsv_type
pkt_type
frame_lenght
current_rate

rrv_time
rts_time
cts_time
ack_time
data_time
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3fd5620f
...@@ -118,8 +118,8 @@ static void s_vSWencryption(struct vnt_private *pDevice, ...@@ -118,8 +118,8 @@ static void s_vSWencryption(struct vnt_private *pDevice,
static unsigned int s_uGetTxRsvTime(struct vnt_private *pDevice, u8 byPktType, static unsigned int s_uGetTxRsvTime(struct vnt_private *pDevice, u8 byPktType,
u32 cbFrameLength, u16 wRate, int bNeedAck); u32 cbFrameLength, u16 wRate, int bNeedAck);
static u16 s_uGetRTSCTSRsvTime(struct vnt_private *pDevice, u8 byRTSRsvType, static u16 s_uGetRTSCTSRsvTime(struct vnt_private *priv,
u8 byPktType, u32 cbFrameLength, u16 wCurrentRate); u8 rsv_type, u8 pkt_type, u32 frame_lenght, u16 current_rate);
static u16 s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx, static u16 s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx,
u8 byPktType, union vnt_tx_data_head *head, u32 cbFrameLength, u8 byPktType, union vnt_tx_data_head *head, u32 cbFrameLength,
...@@ -367,37 +367,47 @@ static u16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8 pkt_type, ...@@ -367,37 +367,47 @@ static u16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8 pkt_type,
} }
//byFreqType: 0=>5GHZ 1=>2.4GHZ //byFreqType: 0=>5GHZ 1=>2.4GHZ
static u16 s_uGetRTSCTSRsvTime(struct vnt_private *pDevice, static u16 s_uGetRTSCTSRsvTime(struct vnt_private *priv,
u8 byRTSRsvType, u8 byPktType, u32 cbFrameLength, u16 wCurrentRate) u8 rsv_type, u8 pkt_type, u32 frame_lenght, u16 current_rate)
{ {
u32 uRrvTime, uRTSTime, uCTSTime, uAckTime, uDataTime; u32 rrv_time, rts_time, cts_time, ack_time, data_time;
uRrvTime = uRTSTime = uCTSTime = uAckTime = uDataTime = 0; rrv_time = rts_time = cts_time = ack_time = data_time = 0;
uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, cbFrameLength, wCurrentRate); data_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
if (byRTSRsvType == 0) { //RTSTxRrvTime_bb frame_lenght, current_rate);
uRTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 20, pDevice->byTopCCKBasicRate);
uCTSTime = uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate); if (rsv_type == 0) {
} rts_time = BBuGetFrameTime(priv->byPreambleType,
else if (byRTSRsvType == 1){ //RTSTxRrvTime_ba, only in 2.4GHZ pkt_type, 20, priv->byTopCCKBasicRate);
uRTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 20, pDevice->byTopCCKBasicRate); cts_time = ack_time = BBuGetFrameTime(priv->byPreambleType,
uCTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate); pkt_type, 14, priv->byTopCCKBasicRate);
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); } else if (rsv_type == 1) {
} rts_time = BBuGetFrameTime(priv->byPreambleType,
else if (byRTSRsvType == 2) { //RTSTxRrvTime_aa pkt_type, 20, priv->byTopCCKBasicRate);
uRTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 20, pDevice->byTopOFDMBasicRate); cts_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
uCTSTime = uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); 14, priv->byTopCCKBasicRate);
} ack_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
else if (byRTSRsvType == 3) { //CTSTxRrvTime_ba, only in 2.4GHZ 14, priv->byTopOFDMBasicRate);
uCTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate); } else if (rsv_type == 2) {
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); rts_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
uRrvTime = uCTSTime + uAckTime + uDataTime + 2*pDevice->uSIFS; 20, priv->byTopOFDMBasicRate);
return uRrvTime; cts_time = ack_time = BBuGetFrameTime(priv->byPreambleType,
} pkt_type, 14, priv->byTopOFDMBasicRate);
} else if (rsv_type == 3) {
//RTSRrvTime cts_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
uRrvTime = uRTSTime + uCTSTime + uAckTime + uDataTime + 3*pDevice->uSIFS; 14, priv->byTopCCKBasicRate);
return cpu_to_le16((u16)uRrvTime); ack_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
14, priv->byTopOFDMBasicRate);
rrv_time = cts_time + ack_time + data_time + 2 * priv->uSIFS;
return rrv_time;
}
rrv_time = rts_time + cts_time + ack_time + data_time + 3 * priv->uSIFS;
return cpu_to_le16((u16)rrv_time);
} }
//byFreqType 0: 5GHz, 1:2.4Ghz //byFreqType 0: 5GHz, 1:2.4Ghz
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment