]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
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, 24 Jul 2014 22:10:42 +0000 (15:10 -0700)
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/bssdb.c

index 59679cd46816c6b725298944ec9b73eabf593552..69b80e80b0110b3cf0ea4ec793d8311620f2cd5e 100644 (file)
@@ -981,7 +981,7 @@ start:
                pDevice->byERPFlag &= ~(WLAN_SET_ERP_USE_PROTECTION(1));
        }
 
-       {
+       if (pDevice->eCommandState == WLAN_ASSOCIATE_WAIT) {
                pDevice->byReAssocCount++;
                /* 10 sec timeout */
                if ((pDevice->byReAssocCount > 10) && (!pDevice->bLinkPass)) {