]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/vt6656/wcmd.c
Merge remote-tracking branch 'staging/staging-next'
[karo-tx-linux.git] / drivers / staging / vt6656 / wcmd.c
index debb87a6aba7997d2fe2db61e90101bb7a47dc26..2f8e2a87533182a8f9bfa4fd3f62857067d8a731 100644 (file)
@@ -286,6 +286,9 @@ void vRunCommand(struct work_struct *work)
        u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
        u8 byData;
 
+       if (pDevice->Flags & fMP_DISCONNECTED)
+               return;
+
     if (pDevice->dwDiagRefCount != 0)
         return;
     if (pDevice->bCmdRunning != true)
@@ -654,22 +657,6 @@ void vRunCommand(struct work_struct *work)
                     netif_wake_queue(pDevice->dev);
                 }
 
-                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->sTimerTxData.function = (TimerFunction)BSSvSecondTxData;
-                      pDevice->sTimerTxData.expires = RUN_AT(10*HZ);      //10s callback
-                      pDevice->fTxDataInSleep = false;
-                      pDevice->nTxDataTimeCout = 0;
-                }
-                else {
-                  // printk("mike:-->First time trigger TimerTxData InSleep\n");
-                }
-               pDevice->IsTxDataTrigger = true;
-                add_timer(&pDevice->sTimerTxData);
-
             }
           else if(pMgmt->eCurrState < WMAC_STATE_ASSOCPENDING) {
                printk("WLAN_ASSOCIATE_WAIT:Association Fail???\n");
@@ -681,7 +668,6 @@ void vRunCommand(struct work_struct *work)
               vCommandTimerWait((void *) pDevice, ASSOCIATE_TIMEOUT/2);
               return;
           }
-                 pDevice->byLinkWaitCount = 0;
 
             s_bCommandComplete(pDevice);
             break;
@@ -1159,33 +1145,3 @@ void vResetCommandTimer(struct vnt_private *pDevice)
        pDevice->bCmdRunning = false;
        pDevice->bCmdClear = false;
 }
-
-void BSSvSecondTxData(struct vnt_private *pDevice)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-
-       pDevice->nTxDataTimeCout++;
-
-       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;
-       }
-
-       spin_lock_irq(&pDevice->lock);
-       //is wap_supplicant running successful OR only open && sharekey mode!
-       if (((pDevice->bLinkPass == true) &&
-               (pMgmt->eAuthenMode < WMAC_AUTH_WPA)) ||  //open && sharekey linking
-               (pDevice->fWPA_Authened == true)) {   //wpa linking
-               //   printk("mike:%s-->InSleep Tx Data Procedure\n",__FUNCTION__);
-               pDevice->fTxDataInSleep = true;
-               PSbSendNullPacket(pDevice);      //send null packet
-               pDevice->fTxDataInSleep = false;
-       }
-       spin_unlock_irq(&pDevice->lock);
-
-       pDevice->sTimerTxData.expires = RUN_AT(10 * HZ);      //10s callback
-       add_timer(&pDevice->sTimerTxData);
-}