Commit 9cade5ac authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: Remove always true bUpdateBBVGA

Remove true if statements.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c729b0a4
...@@ -455,16 +455,14 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, ...@@ -455,16 +455,14 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice,
} }
} }
if (pDevice->bUpdateBBVGA) { /* Monitor if RSSI is too strong. */
/* Monitor if RSSI is too strong. */ pBSSList->byRSSIStatCnt = 0;
pBSSList->byRSSIStatCnt = 0; RFvRSSITodBm(pDevice, (u8) (pRxPacket->uRSSI),
RFvRSSITodBm(pDevice, (u8) (pRxPacket->uRSSI),
&pBSSList->ldBmMAX); &pBSSList->ldBmMAX);
pBSSList->ldBmAverage[0] = pBSSList->ldBmMAX; pBSSList->ldBmAverage[0] = pBSSList->ldBmMAX;
pBSSList->ldBmAverRange = pBSSList->ldBmMAX; pBSSList->ldBmAverRange = pBSSList->ldBmMAX;
for (ii = 1; ii < RSSI_STAT_COUNT; ii++) for (ii = 1; ii < RSSI_STAT_COUNT; ii++)
pBSSList->ldBmAverage[ii] = 0; pBSSList->ldBmAverage[ii] = 0;
}
pBSSList->uIELength = uIELength; pBSSList->uIELength = uIELength;
if (pBSSList->uIELength > WLAN_BEACON_FR_MAXLEN) if (pBSSList->uIELength > WLAN_BEACON_FR_MAXLEN)
...@@ -998,10 +996,8 @@ void BSSvSecondCallBack(struct work_struct *work) ...@@ -998,10 +996,8 @@ void BSSvSecondCallBack(struct work_struct *work)
if (pMgmt->sNodeDBTable[0].bActive) { /* Assoc with BSS */ if (pMgmt->sNodeDBTable[0].bActive) { /* Assoc with BSS */
if (pDevice->bUpdateBBVGA) { s_vCheckSensitivity(pDevice);
s_vCheckSensitivity(pDevice); s_vCheckPreEDThreshold(pDevice);
s_vCheckPreEDThreshold(pDevice);
}
if (pMgmt->sNodeDBTable[0].uInActiveCount >= if (pMgmt->sNodeDBTable[0].uInActiveCount >=
(LOST_BEACON_COUNT/2) && (LOST_BEACON_COUNT/2) &&
...@@ -1118,10 +1114,9 @@ void BSSvSecondCallBack(struct work_struct *work) ...@@ -1118,10 +1114,9 @@ void BSSvSecondCallBack(struct work_struct *work)
} }
if (pMgmt->eCurrState == WMAC_STATE_JOINTED) { if (pMgmt->eCurrState == WMAC_STATE_JOINTED) {
if (pDevice->bUpdateBBVGA) { s_vCheckSensitivity(pDevice);
s_vCheckSensitivity(pDevice); s_vCheckPreEDThreshold(pDevice);
s_vCheckPreEDThreshold(pDevice);
}
if (pMgmt->sNodeDBTable[0].uInActiveCount >= if (pMgmt->sNodeDBTable[0].uInActiveCount >=
ADHOC_LOST_BEACON_COUNT) { ADHOC_LOST_BEACON_COUNT) {
DBG_PRT(MSG_LEVEL_NOTICE, DBG_PRT(MSG_LEVEL_NOTICE,
......
...@@ -660,7 +660,6 @@ struct vnt_private { ...@@ -660,7 +660,6 @@ struct vnt_private {
int bRxMICFail; int bRxMICFail;
/* For Update BaseBand VGA Gain Offset */ /* For Update BaseBand VGA Gain Offset */
int bUpdateBBVGA;
u32 uBBVGADiffCount; u32 uBBVGADiffCount;
u8 byBBVGANew; u8 byBBVGANew;
u8 byBBVGACurrent; u8 byBBVGACurrent;
......
...@@ -262,7 +262,6 @@ device_set_options(struct vnt_private *pDevice) { ...@@ -262,7 +262,6 @@ device_set_options(struct vnt_private *pDevice) {
pDevice->byBBType = BBP_TYPE_DEF; pDevice->byBBType = BBP_TYPE_DEF;
pDevice->byPacketType = pDevice->byBBType; pDevice->byPacketType = pDevice->byBBType;
pDevice->byAutoFBCtrl = AUTO_FB_0; pDevice->byAutoFBCtrl = AUTO_FB_0;
pDevice->bUpdateBBVGA = true;
pDevice->byPreambleType = 0; pDevice->byPreambleType = 0;
pDevice->bExistSWNetAddr = false; pDevice->bExistSWNetAddr = false;
/* pDevice->bDiversityRegCtlON = true; */ /* pDevice->bDiversityRegCtlON = true; */
...@@ -566,12 +565,10 @@ static int device_init_registers(struct vnt_private *pDevice) ...@@ -566,12 +565,10 @@ static int device_init_registers(struct vnt_private *pDevice)
BBvSetShortSlotTime(pDevice); BBvSetShortSlotTime(pDevice);
CARDvSetBSSMode(pDevice); CARDvSetBSSMode(pDevice);
if (pDevice->bUpdateBBVGA) { pDevice->byBBVGACurrent = pDevice->abyBBVGA[0];
pDevice->byBBVGACurrent = pDevice->abyBBVGA[0]; pDevice->byBBVGANew = pDevice->byBBVGACurrent;
pDevice->byBBVGANew = pDevice->byBBVGACurrent;
BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]); BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]);
}
pDevice->byRadioCtl = pDevice->abyEEPROM[EEP_OFS_RADIOCTL]; pDevice->byRadioCtl = pDevice->abyEEPROM[EEP_OFS_RADIOCTL];
pDevice->bHWRadioOff = false; pDevice->bHWRadioOff = false;
......
...@@ -344,11 +344,10 @@ void vRunCommand(struct work_struct *work) ...@@ -344,11 +344,10 @@ void vRunCommand(struct work_struct *work)
CARDbSetMediaChannel(pDevice, pMgmt->uScanChannel); CARDbSetMediaChannel(pDevice, pMgmt->uScanChannel);
// Set Baseband to be more sensitive. // Set Baseband to be more sensitive.
if (pDevice->bUpdateBBVGA) { BBvSetShortSlotTime(pDevice);
BBvSetShortSlotTime(pDevice); BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]);
BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]); BBvUpdatePreEDThreshold(pDevice, true);
BBvUpdatePreEDThreshold(pDevice, true);
}
pMgmt->uScanChannel++; pMgmt->uScanChannel++;
while (!ChannelValid(pDevice->byZoneType, pMgmt->uScanChannel) && while (!ChannelValid(pDevice->byZoneType, pMgmt->uScanChannel) &&
...@@ -381,11 +380,9 @@ void vRunCommand(struct work_struct *work) ...@@ -381,11 +380,9 @@ void vRunCommand(struct work_struct *work)
CARDvSetBSSMode(pDevice); CARDvSetBSSMode(pDevice);
} }
if (pDevice->bUpdateBBVGA) { BBvSetShortSlotTime(pDevice);
BBvSetShortSlotTime(pDevice); BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent);
BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent); BBvUpdatePreEDThreshold(pDevice, false);
BBvUpdatePreEDThreshold(pDevice, false);
}
// Set channel back // Set channel back
vAdHocBeaconRestart(pDevice); vAdHocBeaconRestart(pDevice);
......
...@@ -2653,8 +2653,7 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode, ...@@ -2653,8 +2653,7 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode,
pMgmt->uCurrChannel = pCurr->uChannel; pMgmt->uCurrChannel = pCurr->uChannel;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Channel [%d]\n", pCurr->uChannel); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Channel [%d]\n", pCurr->uChannel);
if ((pDevice->bUpdateBBVGA) && if (pDevice->byBBVGACurrent != pDevice->abyBBVGA[0]) {
(pDevice->byBBVGACurrent != pDevice->abyBBVGA[0])) {
pDevice->byBBVGACurrent = pDevice->abyBBVGA[0]; pDevice->byBBVGACurrent = pDevice->abyBBVGA[0];
BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent); BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent);
BBvSetShortSlotTime(pDevice); BBvSetShortSlotTime(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