From: Malcolm Priestley Date: Wed, 23 Jul 2014 20:35:12 +0000 (+0100) Subject: staging: vt6655: Fix disassociated messages every 10 seconds X-Git-Tag: firefly_0821_release~176^2~3527^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4aa0abed3a2a11b7d71ad560c1a3e7631c5a31cd;p=firefly-linux-kernel-4.4.55.git staging: vt6655: Fix disassociated messages every 10 seconds 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 Cc: Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index 59679cd46816..69b80e80b011 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -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)) {