staging: vt6655: Fix disassociated messages every 10 seconds
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 23 Jul 2014 20:35:12 +0000 (21:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Aug 2014 21:30:26 +0000 (14:30 -0700)
commit 4aa0abed3a2a11b7d71ad560c1a3e7631c5a31cd upstream.

byReAssocCount is incremented every second resulting in
disassociated message being send every 10 seconds whether
connection or not.

byReAssocCount should only advance while eCommandState
is in WLAN_ASSOCIATE_WAIT

Change existing scope to if condition.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/bssdb.c

index f983915168b7883c30a435c4561b8571abb77f75..3496a77612bac6b335964ed014a3748415923425 100644 (file)
@@ -1026,7 +1026,7 @@ start:
                pDevice->byERPFlag &= ~(WLAN_SET_ERP_USE_PROTECTION(1));
        }
 
-       {
+       if (pDevice->eCommandState == WLAN_ASSOCIATE_WAIT) {
                pDevice->byReAssocCount++;
                if ((pDevice->byReAssocCount > 10) && (pDevice->bLinkPass != true)) {  //10 sec timeout
                        printk("Re-association timeout!!!\n");