These are just noise in the code so remove them.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
PSDevice pDevice
)
{
-
-#ifdef PLICE_DEBUG
- //printk("Enter s_vChangeAntenna:original RxMode is %d,TxMode is %d\n",pDevice->byRxAntennaMode,pDevice->byTxAntennaMode);
-#endif
if (pDevice->dwRxAntennaSel == 0) {
pDevice->dwRxAntennaSel = 1;
if (pDevice->bTxRxAntInv == true)
{
unsigned char byBBTxConf;
-#ifdef PLICE_DEBUG
- //printk("Enter BBvSetTxAntennaMode\n");
-#endif
BBbReadEmbedded(dwIoBase, 0x09, &byBBTxConf);//CR09
if (byAntennaMode == ANT_DIVERSITY) {
// bit 1 is diversity
// bit 2 is ANTSEL
byBBTxConf &= 0xF9; // 1111 1001
} else if (byAntennaMode == ANT_B) {
-#ifdef PLICE_DEBUG
- //printk("BBvSetTxAntennaMode:ANT_B\n");
-#endif
byBBTxConf &= 0xFD; // 1111 1101
byBBTxConf |= 0x04;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "1.[%08x], uNumSQ3[%d]=%d, %d\n",
(int)pDevice->ulRatio_State0, (int)pDevice->wAntDiversityMaxRate,
(int)pDevice->uNumSQ3[(int)pDevice->wAntDiversityMaxRate], (int)pDevice->uDiversityCnt);
-#ifdef PLICE_DEBUG
- //printk("BBvAntennaDiversity1:call s_vChangeAntenna\n");
-#endif
+
s_vChangeAntenna(pDevice);
pDevice->byAntennaState = 1;
del_timer(&pDevice->TimerSQ3Tmax3);
(int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1,
(int)pDevice->wAntDiversityMaxRate,
(int)pDevice->uNumSQ3[(int)pDevice->wAntDiversityMaxRate], (int)pDevice->uDiversityCnt);
-#ifdef PLICE_DEBUG
- //printk("BBvAntennaDiversity2:call s_vChangeAntenna\n");
-#endif
+
s_vChangeAntenna(pDevice);
pDevice->TimerSQ3Tmax3.expires = RUN_AT(pDevice->byTMax3 * HZ);
pDevice->TimerSQ3Tmax2.expires = RUN_AT(pDevice->byTMax2 * HZ);
spin_lock_irq(&pDevice->lock);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "3.[%08x][%08x], %d\n", (int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1, (int)pDevice->uDiversityCnt);
-#ifdef PLICE_DEBUG
- //printk("TimerSQ3CallBack1:call s_vChangeAntenna\n");
-#endif
s_vChangeAntenna(pDevice);
pDevice->byAntennaState = 0;
spin_lock_irq(&pDevice->lock);
if (pDevice->uDiversityCnt < pDevice->ulDiversityMValue/100) {
-#ifdef PLICE_DEBUG
- //printk("TimerSQ3CallBack2:call s_vChangeAntenna\n");
-#endif
s_vChangeAntenna(pDevice);
pDevice->TimerSQ3Tmax3.expires = RUN_AT(pDevice->byTMax3 * HZ);
(int)pDevice->ulRatio_State0, (int)pDevice->ulRatio_State1,
(int)pDevice->wAntDiversityMaxRate,
(int)pDevice->uNumSQ3[(int)pDevice->wAntDiversityMaxRate], (int)pDevice->uDiversityCnt);
-#ifdef PLICE_DEBUG
- //printk("TimerSQ3CallBack3:call s_vChangeAntenna\n");
-#endif
s_vChangeAntenna(pDevice);
byFallBack = AUTO_FB_NONE;
}
wRate = pTxBufHead->wReserved; //?wRate
- //printk("BSSvUpdateNodeTxCounter:byTxRetry is %d\n",byTxRetry);
-//printk("BSSvUpdateNodeTx:wRate is %d,byFallback is %d\n",wRate,byFallBack);
-//#ifdef PLICE_DEBUG
- //printk("BSSvUpdateNodeTx: wRate is %d\n",wRate);
-////#endif
// Only Unicast using support rates
if (pTxBufHead->wFIFOCtl & FIFOCTL_NEEDACK) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wRate %04X, byTsr0 %02X, byTsr1 %02X\n", wRate, byTsr0, byTsr1);
//PLICE_DEBUG
wFallBackRate = awHWRetry0[wRate-RATE_18M][ii];
- //printk(" II is %d:BSSvUpdateNodeTx:wFallBackRate is %d\n",ii,wFallBackRate);
//wFallBackRate = awHWRetry0[wRate-RATE_12M][ii];
}
else
{
wFallBackRate = awHWRetry0[wRate-RATE_18M][4];
- //printk("ii is %d BSSvUpdateNodeTx:wFallBackRate is %d\n",ii,wFallBackRate);
//wFallBackRate = awHWRetry0[wRate-RATE_12M][4];
}
pMgmt->sNodeDBTable[0].uTxFail[wFallBackRate]++;
//decide link quality
if (pDevice->bLinkPass != true)
{
- // printk("s_uCalculateLinkQual-->Link disconnect and Poor quality**\n");
pDevice->scStatistic.LinkQuality = 0;
pDevice->scStatistic.SignalStren = 0;
}
case RF_AL2230S:
case RF_UW2451:
case RF_VT3226:
- //printk("chester-false\n");
bMultiBand = false;
break;
case RF_AIROHA7230:
}
if (pDevice->eCurrentPHYType == PHY_TYPE_11B) {
-#ifdef PLICE_DEBUG
- //printk("Func:ChbSetChannel:call RFbSetPower:11B\n");
-#endif
RFbSetPower(pDevice, RATE_1M, pDevice->byCurrentCh);
} else {
-#ifdef PLICE_DEBUG
- //printk("Func:ChbSetChannel:call RFbSetPower\n");
-#endif
RFbSetPower(pDevice, RATE_6M, pDevice->byCurrentCh);
}
inline static void EnQueue(PSDevice pDevice, PSRxMgmtPacket pRxMgmtPacket)
{
- //printk("Enter EnQueue:tail is %d\n",pDevice->rxManeQueue.tail);
if ((pDevice->rxManeQueue.tail+1) % NUM == pDevice->rxManeQueue.head)
{
- //printk("Queue is Full,tail is %d\n",pDevice->rxManeQueue.tail);
return;
}
else
pDevice->rxManeQueue.tail = (pDevice->rxManeQueue.tail + 1) % NUM;
pDevice->rxManeQueue.Q[pDevice->rxManeQueue.tail] = pRxMgmtPacket;
pDevice->rxManeQueue.packet_num++;
- //printk("packet num is %d\n",pDevice->rxManeQueue.packet_num);
}
}
//x=pDevice->rxManeQueue.head = (pDevice->rxManeQueue.head+1)%NUM;
pDevice->rxManeQueue.head = (pDevice->rxManeQueue.head+1)%NUM;
x = pDevice->rxManeQueue.head;
- //printk("Enter DeQueue:head is %d\n",x);
pRxMgmtPacket = pDevice->rxManeQueue.Q[x];
pDevice->rxManeQueue.packet_num--;
return pRxMgmtPacket;
pDevice->bTxRxAntInv = true;
else
pDevice->bTxRxAntInv = false;
-#ifdef PLICE_DEBUG
- //printk("init_register:TxRxAntInv is %d,byValue is %d\n",pDevice->bTxRxAntInv,byValue);
-#endif
byValue &= (EEP_ANTENNA_AUX | EEP_ANTENNA_MAIN);
if (byValue == 0) // if not set default is All
byValue = (EEP_ANTENNA_AUX | EEP_ANTENNA_MAIN);
-#ifdef PLICE_DEBUG
- //printk("init_register:byValue is %d\n",byValue);
-#endif
+
pDevice->ulDiversityNValue = 100*260;//100*SROMbyReadEmbedded(pDevice->PortOffset, 0x51);
pDevice->ulDiversityMValue = 100*16;//SROMbyReadEmbedded(pDevice->PortOffset, 0x52);
pDevice->byTMax = 1;//SROMbyReadEmbedded(pDevice->PortOffset, 0x53);
pDevice->bDiversityEnable = false;//SROMbyReadEmbedded(pDevice->PortOffset, 0x50);
else
pDevice->bDiversityEnable = true;
-#ifdef PLICE_DEBUG
- //printk("aux |main antenna: RxAntennaMode is %d\n",pDevice->byRxAntennaMode);
-#endif
} else {
pDevice->bDiversityEnable = false;
pDevice->byAntennaCount = 1;
pDevice->byRxAntennaMode = ANT_B;
}
}
-#ifdef PLICE_DEBUG
- //printk("init registers: TxAntennaMode is %d\n",pDevice->byTxAntennaMode);
-#endif
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bDiversityEnable=[%d],NValue=[%d],MValue=[%d],TMax=[%d],TMax2=[%d]\n",
pDevice->bDiversityEnable, (int)pDevice->ulDiversityNValue, (int)pDevice->ulDiversityMValue, pDevice->byTMax, pDevice->byTMax2);
//byCCKPwrdBm = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_CCK_PWR_dBm);
//byOFDMPwrdBm = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_OFDM_PWR_dBm);
-//printk("CCKPwrdBm is 0x%x,byOFDMPwrdBm is 0x%x\n",byCCKPwrdBm,byOFDMPwrdBm);
+
// Load power Table
pDevice->byBBVGANew = pDevice->byBBVGACurrent;
BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]);
}
-#ifdef PLICE_DEBUG
- //printk("init registers:RxAntennaMode is %x,TxAntennaMode is %x\n",pDevice->byRxAntennaMode,pDevice->byTxAntennaMode);
-#endif
BBvSetRxAntennaMode(pDevice->PortOffset, pDevice->byRxAntennaMode);
BBvSetTxAntennaMode(pDevice->PortOffset, pDevice->byTxAntennaMode);
#ifdef PLICE_DEBUG
//pci_read_config_word(pcid,PCI_MAX_LAT,&max_lat);
- //printk("max lat is %x,SubSystemID is %x\n",max_lat,pDevice->SubSystemID);
//for (ii=0;ii<0xFF;ii++)
//pci_read_config_word(pcid,PCI_MAX_LAT,&max_lat);
//max_lat = 0x20;
//pci_write_config_word(pcid,PCI_MAX_LAT,max_lat);
//pci_read_config_word(pcid,PCI_MAX_LAT,&max_lat);
- //printk("max lat is %x\n",max_lat);
for (ii = 0; ii < 0xFF; ii++)
{
pRDInfo->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
-#ifdef PLICE_DEBUG
- //printk("device_alloc_rx_buf:skb is %x\n",pRDInfo->skb);
-#endif
if (pRDInfo->skb == NULL)
return false;
ASSERT(pRDInfo->skb);
PSRxMgmtPacket pRxMgmtPacket;
// int i;
//complete(&pDevice->notify);
-//printk("Enter MngWorkItem,Queue packet num is %d\n",pDevice->rxManeQueue.packet_num);
- //printk("Enter MlmeThread,packet _num is %d\n",pDevice->rxManeQueue.packet_num);
//i = 0;
#if 1
while (1)
{
- //printk("DDDD\n");
//down(&pDevice->mlme_semaphore);
// pRxMgmtPacket = DeQueue(pDevice);
#if 1
//pDevice;
//DequeueManageObject(pDevice->FirstRecvMngList, pDevice->LastRecvMngList);
vMgrRxManagePacket(pDevice, pDevice->pMgmt, pRxMgmtPacket);
- //printk("packet_num is %d\n",pDevice->rxManeQueue.packet_num);
-
}
spin_unlock_irq(&pDevice->lock);
if (mlme_kill == 0)
break;
//udelay(200);
#endif
- //printk("Before schedule thread jiffies is %x\n",jiffies);
schedule();
- //printk("after schedule thread jiffies is %x\n",jiffies);
if (mlme_kill == 0)
break;
- //printk("i is %d\n",i);
}
#endif
i = request_irq(pDevice->pcid->irq, &device_intr, IRQF_SHARED, dev->name, dev);
if (i)
return i;
- //printk("DEBUG1\n");
+
#ifdef WPA_SM_Transtatus
memset(wpa_Result.ifname, 0, sizeof(wpa_Result.ifname));
wpa_Result.proto = 0;
- //printk("thread id is %d\n",pDevice->MLMEThr_pid);
- //printk("Create thread time is %x\n",jiffies);
//wait_for_completion(&pDevice->notify);
pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
}
-//printk("DEBUG2\n");
-
-
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call MACvIntEnable\n");
MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE);
}
else
{
- //printk("Auto Rate:Rate is %d,TxPower is %d\n",pDevice->wCurrentRate,pDevice->byCurPwr);
}
//#endif
{
PSRxMgmtPacket pRxMgmtPacket;
PSDevice pDevice = (PSDevice) Context;
- //printk("Enter MngWorkItem,Queue packet num is %d\n",pDevice->rxManeQueue.packet_num);
+
spin_lock_irq(&pDevice->lock);
while (pDevice->rxManeQueue.packet_num != 0)
{
{
PDEVICE_RD_INFO pRDInfo = pCurrRD->pRDInfo;
-#ifdef PLICE_DEBUG
- //printk("device_receive_frame:pCurrRD is %x,pRDInfo is %x\n",pCurrRD,pCurrRD->pRDInfo);
-#endif
struct net_device_stats *pStats = &pDevice->stats;
struct sk_buff *skb;
PSMgmtObject pMgmt = pDevice->pMgmt;
#ifdef THREAD
EnQueue(pDevice, pRxPacket);
- //printk("enque time is %x\n",jiffies);
//up(&pDevice->mlme_semaphore);
//Enque (pDevice->FirstRecvMngList,pDevice->LastRecvMngList,pMgmt);
#else
EnQueue(pDevice, pRxPacket);
tasklet_schedule(&pDevice->RxMngWorkItem);
#else
-//printk("RxMan\n");
vMgrRxManagePacket((void *)pDevice, pDevice->pMgmt, pRxPacket);
//tasklet_schedule(&pDevice->RxMngWorkItem);
#endif
if (pDevice->bDiversityEnable && (FrameSize > 50) &&
(pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) &&
(pDevice->bLinkPass == true)) {
- //printk("device_receive_frame: RxRate is %d\n",*pbyRxRate);
BBvAntennaDiversity(pDevice, s_byGetRateIdx(*pbyRxRate), 0);
}
}
return false;
}
-
-// if (pDevice->bRxMICFail == false) {
-// for (ii =0; ii < 100; ii++)
-// printk(" %02x", *(skb->data + ii));
-// printk("\n");
-// }
-
}
skb->data += cbHeaderOffset;
}
pMgmt->eScanType = WMAC_SCAN_PASSIVE;
- //printk("SIOCSIWSCAN:WLAN_CMD_BSSID_SCAN\n");
bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, NULL);
spin_unlock_irq(&pDevice->lock);
//PLICE_DEBUG->
//byPwr+=5;
//PLICE_DEBUG <-
-
-//printk("Rate <11:byPwr is %d\n",byPwr);
break;
case RATE_6M:
case RATE_9M:
//PLICE_DEBUG->
//byPwr+=5;
//PLICE_DEBUG<-
-
-//printk("Rate <24:byPwr is %d\n",byPwr);
break;
case RATE_24M:
case RATE_36M:
//PLICE_DEBUG->
//byPwr+=5;
//PLICE_DEBUG<-
-//printk("Rate < 54:byPwr is %d\n",byPwr);
break;
}
unsigned int uDataTime, uAckTime;
uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, cbFrameLength, wRate);
-#ifdef PLICE_DEBUG
- //printk("s_uGetTxRsvTime is %d\n",uDataTime);
-#endif
if (byPktType == PK_TYPE_11B) {//llb,CCK mode
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, (unsigned short)pDevice->byTopCCKBasicRate);
} else {//11g 2.4G OFDM mode & 11a 5G OFDM mode
}
#ifdef PLICE_DEBUG
- //printk("Func:vGenerateFIFOHeader:TxDataRate is %d,TxPower is %d\n",pDevice->wCurrentRate,pDevice->byCurPwr);
-
//if (pDevice->wCurrentRate <= 3)
//{
// RFbRawSetPower(pDevice,36,pDevice->wCurrentRate);
}
pDevice->apCurrTD[TYPE_TXDMA0] = pFrstTD->next;
-#ifdef PLICE_DEBUG
- //printk("SCAN:CurrentRate is %d,TxPower is %d\n",wCurrentRate,pTxBufHead->byTxPower);
-#endif
#ifdef TxInSleep
pDevice->nTxDataTimeCout = 0; //2008-8-21 chester <add> for send null packet
spin_unlock_irq(&pDevice->lock);
return;
}
-//printk("chester-pMgmt->uScanChannel=%d,pDevice->byMaxChannel=%d\n",pMgmt->uScanChannel,pDevice->byMaxChannel);
if (pMgmt->uScanChannel == pDevice->byMinChannel) {
//pMgmt->eScanType = WMAC_SCAN_ACTIVE;
pMgmt->abyScanBSSID[0] = 0xFF;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "SET SCAN Channel Fail: %d\n", pMgmt->uScanChannel);
}
CARDbSetBSSID(pMgmt->pAdapter, pMgmt->abyCurrBSSID, OP_MODE_UNKNOWN);
-// printk("chester-mxch=%d\n",pDevice->byMaxChannel);
- // printk("chester-ch=%d\n",pMgmt->uScanChannel);
pMgmt->uScanChannel++;
//2008-8-4 <modify> by chester
if (!is_channel_valid(pMgmt->uScanChannel) &&
spin_unlock_irq(&pDevice->lock);
return;
}
-//printk("chester-currmode=%d\n",pMgmt->eCurrMode);
printk("chester-abyDesireSSID=%s\n", ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySSID);
//memcpy(pMgmt->abyAdHocSSID,pMgmt->abyDesireSSID,
//((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len + WLAN_IEHDR_LEN);
}
#ifdef TxInSleep
if (pDevice->IsTxDataTrigger != false) { //TxDataTimer is not triggered at the first time
- // printk("Re-initial TxDataTimer****\n");
del_timer(&pDevice->sTimerTxData);
init_timer(&pDevice->sTimerTxData);
pDevice->sTimerTxData.data = (unsigned long) pDevice;
pDevice->nTxDataTimeCout = 0;
}
else {
- // printk("mike:-->First time trigger TimerTxData InSleep\n");
}
pDevice->IsTxDataTrigger = true;
add_timer(&pDevice->sTimerTxData);
if (pDevice->nTxDataTimeCout < 4) //don't tx data if timer less than 40s
{
- // printk("mike:%s-->no data Tx not exceed the desired Time as %d\n",__FUNCTION__,
- // (int)pDevice->nTxDataTimeCout);
pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback
add_timer(&pDevice->sTimerTxData);
return;
#else
if (pDevice->bLinkPass == true) {
#endif
-
- // printk("mike:%s-->InSleep Tx Data Procedure\n",__FUNCTION__);
pDevice->fTxDataInSleep = true;
PSbSendNullPacket(pDevice); //send null packet
pDevice->fTxDataInSleep = false;
&(pMgmt->sNodeDBTable[0].byTopCCKBasicRate),
&(pMgmt->sNodeDBTable[0].byTopOFDMBasicRate)
);
-#ifdef PLICE_DEBUG
- //printk("RxBeacon:MaxSuppRate is %d\n",pMgmt->sNodeDBTable[0].wMaxSuppRate);
-#endif
if (bUpdatePhyParameter == true) {
CARDbSetPhyParameter(pMgmt->pAdapter,
pMgmt->eCurrentPHYMode,
}
kfree(ptempBSS);
-
- // printk("bubble sort result:\n");
-
- //for (ii = 0; ii < MAX_BSS_NUM; ii++)
-
- // printk("%d [%s]:RSSI=%d\n",ii,((PWLAN_IE_SSID)(pMgmt->sBSSList[ii].abySSID))->abySSID,
-
- // pMgmt->sBSSList[ii].uRSSI);
-
#endif
//******mike:bubble sort by stronger RSSI*****//