unsigned int __cpuinit get_c0_compare_int(void) { if ((get_current_vpe()) && !vpe1_timer_installed) { tc3162_enable_irq(SI_TIMER1_INT); vpe1_timer_installed++; } if (vpe1_timer_installed == 0) { if (cpu_has_veic) set_vi_handler(SI_TIMER_INT, mips_timer_dispatch); } mips_cpu_timer_irq = SI_TIMER_INT; return mips_cpu_timer_irq; }
VOID PeriodicPollingModeDetect( IN PVOID SystemSpecific1, IN PVOID FunctionContext, IN PVOID SystemSpecific2, IN PVOID SystemSpecific3){ unsigned long irqFlags; UCHAR modem_status=0; RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)FunctionContext; POS_COOKIE _pObj = (POS_COOKIE)(pAd->OS_Cookie); os_TCIfQuery(0x0002, &modem_status, NULL); if ((modem_status==0x08)||(modem_status==0x10)) { if(!(dslStateChg & (1<<0))){ // printk("Detect DSL status:0x%02x into polling mode!!\r\n", modem_status); RTMP_INT_LOCK(&pAd->irq_lock, irqFlags); dslStateChg|=(1<<0); RTMP_INT_UNLOCK(&pAd->irq_lock, irqFlags); // disable enterrupt tc3162_disable_irq(_pObj->pci_dev->irq); } schedule_work(&pAd->Pollingmode.PollingDataBH); //slow down the POLLING MODE DETECT while the dmt in wait init state //pAd->PollingModeDetect.expires = jiffies + POLLING_MODE_DETECT_INTV; RTMPModTimer(&pAd->Pollingmode.PollingModeDetect, 10); pAd->Pollingmode.PollingModeDetectRunning = TRUE; return; } else{ if(dslStateChg & (1<<0)){ tc3162_enable_irq(_pObj->pci_dev->irq); // printk("Detect DSL status:0x%02x into INT mode!!\r\n", modem_status); RTMP_INT_LOCK(&pAd->irq_lock, irqFlags); dslStateChg &=~(1<<0); RTMP_INT_UNLOCK(&pAd->irq_lock, irqFlags); } } RTMPModTimer(&pAd->Pollingmode.PollingModeDetect, POLLING_MODE_DETECT_INTV); pAd->Pollingmode.PollingModeDetectRunning = TRUE; #ifdef WSC_AP_SUPPORT { static int lastWscStatus=0; PWSC_CTRL pWscControl= &pAd->ApCfg.MBSSID[MAIN_MBSSID].WscControl; wscTimerRunning=pWscControl->Wsc2MinsTimerRunning; wscStatus=pWscControl->WscStatus; if((wscStatus==STATUS_WSC_CONFIGURED)&&(lastWscStatus!=STATUS_WSC_CONFIGURED)){ #ifndef LED_WPSSPEC_COMPLY wsc_done = 10; #else wsc_done = 600; #endif //ledTurnOff(LED_WLAN_WPS_ACT_STATUS);//xyyou??? //ledTurnOn(LED_WLAN_WPS_STATUS); //ledTurnOn(LED_WLAN_WPS_NOACT_STATUS); } lastWscStatus=wscStatus; } #endif return; }