Commit 5ebc46d6 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: camel case cleanup vUpdateIFS

camel case changes
pDevice -> priv
byMaxMin -> max_min
byData -> data
pItemRates -> item_rates
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 652d0f00
...@@ -385,95 +385,92 @@ void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type) ...@@ -385,95 +385,92 @@ void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type)
* *
* Parameters: * Parameters:
* In: * In:
* pDevice - The adapter to be set * priv - The adapter to be set
* Out: * Out:
* none * none
* *
* Return Value: None. * Return Value: None.
* *
*/ */
void vUpdateIFS(struct vnt_private *pDevice) void vUpdateIFS(struct vnt_private *priv)
{ {
u8 byMaxMin = 0; u8 max_min = 0;
u8 byData[4]; u8 data[4];
if (pDevice->byPacketType==PK_TYPE_11A) {//0000 0000 0000 0000,11a if (priv->byPacketType == PK_TYPE_11A) {
pDevice->uSlot = C_SLOT_SHORT; priv->uSlot = C_SLOT_SHORT;
pDevice->uSIFS = C_SIFS_A; priv->uSIFS = C_SIFS_A;
pDevice->uDIFS = C_SIFS_A + 2*C_SLOT_SHORT; priv->uDIFS = C_SIFS_A + 2 * C_SLOT_SHORT;
pDevice->uCwMin = C_CWMIN_A; priv->uCwMin = C_CWMIN_A;
byMaxMin = 4; max_min = 4;
} } else if (priv->byPacketType == PK_TYPE_11B) {
else if (pDevice->byPacketType==PK_TYPE_11B) {//0000 0001 0000 0000,11b priv->uSlot = C_SLOT_LONG;
pDevice->uSlot = C_SLOT_LONG; priv->uSIFS = C_SIFS_BG;
pDevice->uSIFS = C_SIFS_BG; priv->uDIFS = C_SIFS_BG + 2 * C_SLOT_LONG;
pDevice->uDIFS = C_SIFS_BG + 2*C_SLOT_LONG; priv->uCwMin = C_CWMIN_B;
pDevice->uCwMin = C_CWMIN_B; max_min = 5;
byMaxMin = 5; } else {/* PK_TYPE_11GA & PK_TYPE_11GB */
} u8 rate = 0;
else {// PK_TYPE_11GA & PK_TYPE_11GB bool ofdm_rate = false;
u8 byRate = 0; unsigned int ii = 0;
bool bOFDMRate = false; PWLAN_IE_SUPP_RATES item_rates = NULL;
unsigned int ii = 0;
PWLAN_IE_SUPP_RATES pItemRates = NULL; priv->uSIFS = C_SIFS_BG;
pDevice->uSIFS = C_SIFS_BG; if (priv->bShortSlotTime)
if (pDevice->bShortSlotTime) { priv->uSlot = C_SLOT_SHORT;
pDevice->uSlot = C_SLOT_SHORT; else
} else { priv->uSlot = C_SLOT_LONG;
pDevice->uSlot = C_SLOT_LONG;
} priv->uDIFS = C_SIFS_BG + 2 * priv->uSlot;
pDevice->uDIFS = C_SIFS_BG + 2*pDevice->uSlot;
item_rates =
pItemRates = (PWLAN_IE_SUPP_RATES)pDevice->vnt_mgmt.abyCurrSuppRates; (PWLAN_IE_SUPP_RATES)priv->vnt_mgmt.abyCurrSuppRates;
for (ii = 0; ii < pItemRates->len; ii++) {
byRate = (u8)(pItemRates->abyRates[ii]&0x7F); for (ii = 0; ii < item_rates->len; ii++) {
if (RATEwGetRateIdx(byRate) > RATE_11M) { rate = (u8)(item_rates->abyRates[ii] & 0x7f);
bOFDMRate = true; if (RATEwGetRateIdx(rate) > RATE_11M) {
break; ofdm_rate = true;
} break;
} }
if (bOFDMRate == false) { }
pItemRates = (PWLAN_IE_SUPP_RATES)pDevice->vnt_mgmt
.abyCurrExtSuppRates;
for (ii = 0; ii < pItemRates->len; ii++) {
byRate = (u8)(pItemRates->abyRates[ii]&0x7F);
if (RATEwGetRateIdx(byRate) > RATE_11M) {
bOFDMRate = true;
break;
}
}
}
if (bOFDMRate == true) {
pDevice->uCwMin = C_CWMIN_A;
byMaxMin = 4;
} else {
pDevice->uCwMin = C_CWMIN_B;
byMaxMin = 5;
}
}
pDevice->uCwMax = C_CWMAX; if (ofdm_rate == false) {
pDevice->uEIFS = C_EIFS; item_rates = (PWLAN_IE_SUPP_RATES)priv->vnt_mgmt
.abyCurrExtSuppRates;
for (ii = 0; ii < item_rates->len; ii++) {
rate = (u8)(item_rates->abyRates[ii] & 0x7f);
if (RATEwGetRateIdx(rate) > RATE_11M) {
ofdm_rate = true;
break;
}
}
}
byData[0] = (u8)pDevice->uSIFS; if (ofdm_rate == true) {
byData[1] = (u8)pDevice->uDIFS; priv->uCwMin = C_CWMIN_A;
byData[2] = (u8)pDevice->uEIFS; max_min = 4;
byData[3] = (u8)pDevice->uSlot; } else {
CONTROLnsRequestOut(pDevice, priv->uCwMin = C_CWMIN_B;
MESSAGE_TYPE_WRITE, max_min = 5;
MAC_REG_SIFS, }
MESSAGE_REQUEST_MACREG, }
4,
&byData[0]);
byMaxMin |= 0xA0;//1010 1111,C_CWMAX = 1023 priv->uCwMax = C_CWMAX;
CONTROLnsRequestOut(pDevice, priv->uEIFS = C_EIFS;
MESSAGE_TYPE_WRITE,
MAC_REG_CWMAXMIN0, data[0] = (u8)priv->uSIFS;
MESSAGE_REQUEST_MACREG, data[1] = (u8)priv->uDIFS;
1, data[2] = (u8)priv->uEIFS;
&byMaxMin); data[3] = (u8)priv->uSlot;
CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE, MAC_REG_SIFS,
MESSAGE_REQUEST_MACREG, 4, &data[0]);
max_min |= 0xa0;
CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE, MAC_REG_CWMAXMIN0,
MESSAGE_REQUEST_MACREG, 1, &max_min);
} }
void CARDvUpdateBasicTopRate(struct vnt_private *pDevice) void CARDvUpdateBasicTopRate(struct vnt_private *pDevice)
......
...@@ -47,7 +47,7 @@ struct vnt_private; ...@@ -47,7 +47,7 @@ struct vnt_private;
void CARDbSetMediaChannel(struct vnt_private *pDevice, u32 uConnectionChannel); void CARDbSetMediaChannel(struct vnt_private *pDevice, u32 uConnectionChannel);
void CARDvSetRSPINF(struct vnt_private *, u8); void CARDvSetRSPINF(struct vnt_private *, u8);
void vUpdateIFS(struct vnt_private *pDevice); void vUpdateIFS(struct vnt_private *);
void CARDvUpdateBasicTopRate(struct vnt_private *pDevice); void CARDvUpdateBasicTopRate(struct vnt_private *pDevice);
void CARDbAddBasicRate(struct vnt_private *pDevice, u16 wRateIdx); void CARDbAddBasicRate(struct vnt_private *pDevice, u16 wRateIdx);
int CARDbIsOFDMinBasicRate(struct vnt_private *pDevice); int CARDbIsOFDMinBasicRate(struct vnt_private *pDevice);
......
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