• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/staging/vt6655/

Lines Matching refs:pDevice

72     PSDevice pDevice
79 PSDevice pDevice,
91 PSDevice pDevice
107 * pDevice - Pointer to the adapter
116 vAdHocBeaconStop(PSDevice pDevice)
119 PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
150 MACvRegBitsOff(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX);
162 * pDevice - Pointer to the adapter
171 vAdHocBeaconRestart(PSDevice pDevice)
173 PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
184 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX);
208 PSDevice pDevice
219 PSMgmtObject pMgmt = pDevice->pMgmt;
223 if (pDevice->eCurrentPHYType == PHY_TYPE_11A) {
225 } else if (pDevice->eCurrentPHYType == PHY_TYPE_11B) {
233 pDevice,
243 if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
271 PSDevice pDevice,
306 if (pDevice->eCurrentPHYType == PHY_TYPE_11G) {
327 PSDevice pDevice = (PSDevice)hDeviceContext;
329 init_timer(&pDevice->sTimerCommand);
330 pDevice->sTimerCommand.data = (unsigned long) pDevice;
331 pDevice->sTimerCommand.function = (TimerFunction)vCommandTimer;
333 pDevice->sTimerCommand.expires = (unsigned int)RUN_AT((MSecond * HZ) >> 10);
334 add_timer(&pDevice->sTimerCommand);
346 PSDevice pDevice = (PSDevice)hDeviceContext;
347 PSMgmtObject pMgmt = pDevice->pMgmt;
356 if (pDevice->dwDiagRefCount != 0)
358 if (pDevice->bCmdRunning != true)
361 spin_lock_irq(&pDevice->lock);
363 switch ( pDevice->eCommandState ) {
367 pDevice->byReAssocCount = 0;
368 if (pDevice->bRadioOff == true) {
369 s_bCommandComplete(pDevice);
370 spin_unlock_irq(&pDevice->lock);
375 s_bCommandComplete(pDevice);
377 spin_unlock_irq(&pDevice->lock);
384 if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){
385 spin_unlock_irq(&pDevice->lock);
386 vCommandTimerWait((void *)pDevice, 10);
391 pMgmt->uScanChannel = pDevice->byMinChannel;
395 if (pMgmt->uScanChannel > pDevice->byMaxChannel) {
407 vAdHocBeaconRestart(pDevice);
408 s_bCommandComplete(pDevice);
414 s_bCommandComplete(pDevice);
417 //printk("chester-pMgmt->uScanChannel=%d,pDevice->byMaxChannel=%d\n",pMgmt->uScanChannel,pDevice->byMaxChannel);
418 if (pMgmt->uScanChannel == pDevice->byMinChannel) {
428 // BSSvClearBSSList((void *)pDevice, pDevice->bLinkPass);
433 vAdHocBeaconStop(pDevice);
441 // printk("chester-mxch=%d\n",pDevice->byMaxChannel);
446 pMgmt->uScanChannel <= pDevice->byMaxChannel ){
447 pMgmt->uScanChannel=pDevice->byMaxChannel+1;
455 s_vProbeChannel(pDevice);
456 spin_unlock_irq(&pDevice->lock);
457 vCommandTimerWait((void *)pDevice, WCMD_ACTIVE_SCAN_TIME);
460 spin_unlock_irq(&pDevice->lock);
461 vCommandTimerWait((void *)pDevice, WCMD_PASSIVE_SCAN_TIME);
482 vAdHocBeaconRestart(pDevice);
489 wireless_send_event(pDevice->dev, SIOCGIWSCAN, &wrqu, NULL);
492 s_bCommandComplete(pDevice);
496 pDevice->byReAssocCount = 0;
499 s_bCommandComplete(pDevice);
500 spin_unlock_irq(&pDevice->lock);
505 vMgrDisassocBeginSta((void *)pDevice, pMgmt, pMgmt->abyCurrBSSID, (8), &Status);
506 pDevice->bLinkPass = false;
513 // pDevice->bBeaconBufReady = false;
515 netif_stop_queue(pDevice->dev);
516 pDevice->eCommandState = WLAN_DISASSOCIATE_WAIT;
518 if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){
519 vCommandTimerWait((void *)pDevice, 10);
520 spin_unlock_irq(&pDevice->lock);
525 // CARDbRadioPowerOff(pDevice);
526 s_bCommandComplete(pDevice);
531 if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){
532 vCommandTimerWait((void *)pDevice, 10);
533 spin_unlock_irq(&pDevice->lock);
537 // CARDbRadioPowerOff(pDevice);
538 s_bCommandComplete(pDevice);
542 pDevice->byReAssocCount = 0;
543 if (pDevice->bRadioOff == true) {
544 s_bCommandComplete(pDevice);
545 spin_unlock_irq(&pDevice->lock);
570 s_bCommandComplete(pDevice);
571 spin_unlock_irq(&pDevice->lock);
576 netif_stop_queue(pDevice->dev);
577 pDevice->bLinkPass = false;
582 PSvDisablePowerSaving((void *)pDevice);
583 BSSvClearNodeDBTable(pDevice, 0);
585 vMgrJoinBSSBegin((void *)pDevice, &Status);
592 vMgrDeAuthenBeginSta((void *)pDevice, pMgmt, pMgmt->abyCurrBSSID, (3), &Status);
595 vMgrAuthenBeginSta((void *)pDevice, pMgmt, &Status);
597 pDevice->byLinkWaitCount = 0;
598 pDevice->eCommandState = WLAN_AUTHENTICATE_WAIT;
599 vCommandTimerWait((void *)pDevice, AUTHENTICATE_TIMEOUT);
600 spin_unlock_irq(&pDevice->lock);
608 if (netif_queue_stopped(pDevice->dev)){
609 netif_wake_queue(pDevice->dev);
611 pDevice->bLinkPass = true;
615 bClearBSSID_SCAN(pDevice);
619 vMgrCreateOwnIBSS((void *)pDevice, &Status);
623 BSSvAddMulticastNode(pDevice);
631 vMgrCreateOwnIBSS((void *)pDevice, &Status);
635 BSSvAddMulticastNode(pDevice);
636 if (netif_queue_stopped(pDevice->dev)){
637 netif_wake_queue(pDevice->dev);
639 pDevice->bLinkPass = true;
644 // if(pDevice->bWPASuppWextEnabled == true)
650 wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL);
656 s_bCommandComplete(pDevice);
663 pDevice->byLinkWaitCount = 0;
665 vMgrAssocBeginSta((void *)pDevice, pMgmt, &Status);
667 pDevice->byLinkWaitCount = 0;
669 pDevice->eCommandState = WLAN_ASSOCIATE_WAIT;
670 vCommandTimerWait((void *)pDevice, ASSOCIATE_TIMEOUT);
671 spin_unlock_irq(&pDevice->lock);
679 else if(pDevice->byLinkWaitCount <= 4){ //mike add:wait another 2 sec if authenticated_frame delay!
680 pDevice->byLinkWaitCount ++;
681 printk("WLAN_AUTHENTICATE_WAIT:wait %d times!!\n",pDevice->byLinkWaitCount);
682 spin_unlock_irq(&pDevice->lock);
683 vCommandTimerWait((void *)pDevice, AUTHENTICATE_TIMEOUT/2);
686 pDevice->byLinkWaitCount = 0;
687 s_bCommandComplete(pDevice);
693 if (pDevice->ePSMode != WMAC_POWER_CAM) {
694 PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval);
697 KeybRemoveAllKey(&(pDevice->sKey), pDevice->abyBSSID, pDevice->PortOffset);
699 pDevice->bLinkPass = true;
700 pDevice->byLinkWaitCount = 0;
701 pDevice->byReAssocCount = 0;
702 bClearBSSID_SCAN(pDevice);
703 if (pDevice->byFOETuning) {
704 BBvSetFOE(pDevice->PortOffset);
705 PSbSendNullPacket(pDevice);
707 if (netif_queue_stopped(pDevice->dev)){
708 netif_wake_queue(pDevice->dev);
711 if(pDevice->IsTxDataTrigger != false) { //TxDataTimer is not triggered at the first time
713 del_timer(&pDevice->sTimerTxData);
714 init_timer(&pDevice->sTimerTxData);
715 pDevice->sTimerTxData.data = (unsigned long) pDevice;
716 pDevice->sTimerTxData.function = (TimerFunction)BSSvSecondTxData;
717 pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback
718 pDevice->fTxDataInSleep = false;
719 pDevice->nTxDataTimeCout = 0;
724 pDevice->IsTxDataTrigger = true;
725 add_timer(&pDevice->sTimerTxData);
731 else if(pDevice->byLinkWaitCount <= 4){ //mike add:wait another 2 sec if associated_frame delay!
732 pDevice->byLinkWaitCount ++;
733 printk("WLAN_ASSOCIATE_WAIT:wait %d times!!\n",pDevice->byLinkWaitCount);
734 spin_unlock_irq(&pDevice->lock);
735 vCommandTimerWait((void *)pDevice, ASSOCIATE_TIMEOUT/2);
738 pDevice->byLinkWaitCount = 0;
740 s_bCommandComplete(pDevice);
750 pDevice->bLinkPass = false;
751 if (pDevice->bEnableHostWEP == true)
752 BSSvClearNodeDBTable(pDevice, 1);
754 BSSvClearNodeDBTable(pDevice, 0);
755 pDevice->uAssocCount = 0;
757 pDevice->bFixRate = false;
759 vMgrCreateOwnIBSS((void *)pDevice, &Status);
764 MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_UNICAST);
765 pDevice->byRxMode &= ~RCR_UNICAST;
766 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wcmd: rx_mode = %x\n", pDevice->byRxMode );
767 BSSvAddMulticastNode(pDevice);
768 if (netif_queue_stopped(pDevice->dev)){
769 netif_wake_queue(pDevice->dev);
771 pDevice->bLinkPass = true;
774 s_bCommandComplete(pDevice);
783 pDevice->bMoreData = false;
786 pDevice->bMoreData = true;
788 if (!device_dma0_xmit(pDevice, skb, 0)) {
806 pDevice->bMoreData = false;
809 pDevice->bMoreData = true;
811 if (!device_dma0_xmit(pDevice, skb, ii)) {
830 s_bCommandComplete(pDevice);
836 if (pDevice->bRadioCmd == true)
837 CARDbRadioPowerOn(pDevice);
839 CARDbRadioPowerOff(pDevice);
841 s_bCommandComplete(pDevice);
848 if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){
849 vCommandTimerWait((void *)pDevice, 10);
850 spin_unlock_irq(&pDevice->lock);
853 if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){
854 vCommandTimerWait((void *)pDevice, 10);
855 spin_unlock_irq(&pDevice->lock);
858 pDevice->byBBVGACurrent = pDevice->byBBVGANew;
859 BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent);
860 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SetVGAGainOffset %02X\n", pDevice->byBBVGACurrent);
861 s_bCommandComplete(pDevice);
865 s_bCommandComplete(pDevice);
869 spin_unlock_irq(&pDevice->lock);
878 PSDevice pDevice
885 PSMgmtObject pMgmt = pDevice->pMgmt;
888 pDevice->eCommandState = WLAN_CMD_IDLE;
889 if (pDevice->cbFreeCmdQueue == CMD_Q_SIZE) {
891 pDevice->bCmdRunning = false;
895 pDevice->eCommand = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].eCmd;
896 pSSID = (PWLAN_IE_SSID)pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].abyCmdDesireSSID;
897 bRadioCmd = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].bRadioCmd;
898 bForceSCAN = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].bForceSCAN;
899 ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdDequeueIdx, CMD_Q_SIZE);
900 pDevice->cbFreeCmdQueue++;
901 pDevice->bCmdRunning = true;
902 switch ( pDevice->eCommand ) {
905 pDevice->eCommandState = WLAN_CMD_SCAN_START;
913 if ((bForceSCAN == false) && (pDevice->bLinkPass == true)) {
916 pDevice->eCommandState = WLAN_CMD_IDLE;
922 pDevice->eCommandState = WLAN_CMD_SSID_START;
926 memcpy(pDevice->pMgmt->abyDesireSSID, pSSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
930 pDevice->eCommandState = WLAN_CMD_DISASSOCIATE_START;
933 pDevice->eCommandState = WLAN_CMD_TX_PSPACKET_START;
936 pDevice->eCommandState = WLAN_CMD_AP_MODE_START;
939 pDevice->eCommandState = WLAN_CMD_RADIO_START;
940 pDevice->bRadioCmd = bRadioCmd;
943 pDevice->eCommandState = WLAN_CMD_CHECK_BBSENSITIVITY_CHANGE;
951 vCommandTimerWait((void *)pDevice, 0);
965 PSDevice pDevice = (PSDevice)hDeviceContext;
968 if (pDevice->cbFreeCmdQueue == 0) {
971 pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].eCmd = eCommand;
972 pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = true;
973 memset(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID, 0 , WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
979 memcpy(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID,
981 pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = false;
985 memcpy(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID,
990 pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bNeedRadioOFF = *((int *)pbyItem0);
994 pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].wDeAuthenReason = *((unsigned short *)pbyItem0);
1002 pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bRadioCmd = *((int *)pbyItem0);
1006 pDevice->eCommandState = WLAN_CMD_CHECK_BBSENSITIVITY_CHANGE;
1014 ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdEnqueueIdx, CMD_Q_SIZE);
1015 pDevice->cbFreeCmdQueue--;
1017 if (pDevice->bCmdRunning == false) {
1018 s_bCommandComplete(pDevice);
1044 PSDevice pDevice = (PSDevice)hDeviceContext;
1045 unsigned int uCmdDequeueIdx = pDevice->uCmdDequeueIdx;
1048 if ((pDevice->cbFreeCmdQueue < CMD_Q_SIZE) && (uCmdDequeueIdx != pDevice->uCmdEnqueueIdx)) {
1049 for (ii = 0; ii < (CMD_Q_SIZE - pDevice->cbFreeCmdQueue); ii ++) {
1050 if (pDevice->eCmdQueue[uCmdDequeueIdx].eCmd == WLAN_CMD_BSSID_SCAN)
1051 pDevice->eCmdQueue[uCmdDequeueIdx].eCmd = WLAN_CMD_IDLE;
1053 if (uCmdDequeueIdx == pDevice->uCmdEnqueueIdx)
1066 PSDevice pDevice = (PSDevice)hDeviceContext;
1069 del_timer(&pDevice->sTimerCommand);
1071 init_timer(&pDevice->sTimerCommand);
1072 pDevice->sTimerCommand.data = (unsigned long) pDevice;
1073 pDevice->sTimerCommand.function = (TimerFunction)vCommandTimer;
1074 pDevice->sTimerCommand.expires = RUN_AT(HZ);
1075 pDevice->cbFreeCmdQueue = CMD_Q_SIZE;
1076 pDevice->uCmdDequeueIdx = 0;
1077 pDevice->uCmdEnqueueIdx = 0;
1078 pDevice->eCommandState = WLAN_CMD_IDLE;
1079 pDevice->bCmdRunning = false;
1080 pDevice->bCmdClear = false;
1090 PSDevice pDevice = (PSDevice)hDeviceContext;
1091 PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
1092 pDevice->nTxDataTimeCout++;
1094 if(pDevice->nTxDataTimeCout<4) //don't tx data if timer less than 40s
1097 // (int)pDevice->nTxDataTimeCout);
1098 pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback
1099 add_timer(&pDevice->sTimerTxData);
1103 spin_lock_irq(&pDevice->lock);
1104 if(((pDevice->bLinkPass ==true)&&(pMgmt->eAuthenMode < WMAC_AUTH_WPA)) || //open && sharekey linking
1105 (pDevice->fWPA_Authened == true)) { //wpa linking
1108 pDevice->fTxDataInSleep = true;
1109 PSbSendNullPacket(pDevice); //send null packet
1110 pDevice->fTxDataInSleep = false;
1112 spin_unlock_irq(&pDevice->lock);
1114 pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback
1115 add_timer(&pDevice->sTimerTxData);