]> Pileus Git - ~andy/linux/blobdiff - drivers/staging/vt6656/bssdb.c
Merge branch 'acpi-config'
[~andy/linux] / drivers / staging / vt6656 / bssdb.c
index ed1d609cc25fbc2bf06ce684dcdd5902dfb6aef2..dad3f8c78e21d196540c62741af4fbbbe305819b 100644 (file)
@@ -57,6 +57,7 @@
 #include "control.h"
 #include "rndis.h"
 #include "iowpa.h"
+#include "power.h"
 
 static int          msglevel                =MSG_LEVEL_INFO;
 //static int          msglevel                =MSG_LEVEL_DEBUG;
@@ -813,8 +814,10 @@ void BSSvAddMulticastNode(struct vnt_private *pDevice)
  *
 -*/
 
-void BSSvSecondCallBack(struct vnt_private *pDevice)
+void BSSvSecondCallBack(struct work_struct *work)
 {
+       struct vnt_private *pDevice = container_of(work,
+                       struct vnt_private, second_callback_work.work);
        struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
        int ii;
        PWLAN_IE_SSID pItemSSID, pCurrSSID;
@@ -822,6 +825,9 @@ void BSSvSecondCallBack(struct vnt_private *pDevice)
        u32 uNonShortSlotSTACnt = 0;
        u32 uLongPreambleSTACnt = 0;
 
+       if (pDevice->Flags & fMP_DISCONNECTED)
+               return;
+
     spin_lock_irq(&pDevice->lock);
 
     pDevice->uAssocCount = 0;
@@ -1119,15 +1125,26 @@ else {
         }
     }
 
-    if (pDevice->bLinkPass == true) {
-        if (netif_queue_stopped(pDevice->dev))
-            netif_wake_queue(pDevice->dev);
-    }
+       if (pDevice->bLinkPass == true) {
+               if (pMgmt->eAuthenMode < WMAC_AUTH_WPA ||
+                       pDevice->fWPA_Authened == true) {
+                       if (++pDevice->tx_data_time_out > 40) {
+                               pDevice->tx_trigger = true;
+
+                               PSbSendNullPacket(pDevice);
+
+                               pDevice->tx_trigger = false;
+                               pDevice->tx_data_time_out = 0;
+                       }
+               }
+
+               if (netif_queue_stopped(pDevice->dev))
+                       netif_wake_queue(pDevice->dev);
+       }
 
     spin_unlock_irq(&pDevice->lock);
 
-    pMgmt->sTimerSecondCallback.expires = RUN_AT(HZ);
-    add_timer(&pMgmt->sTimerSecondCallback);
+       schedule_delayed_work(&pDevice->second_callback_work, HZ);
 }
 
 /*+