aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2020-04-14 11:39:23 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-29 16:31:33 +0200
commit90fbd0773ba25f99c144e5042bddbbd70a599db1 (patch)
tree76d869cdb6d8b1355986ac88af56fff09a1ef206
parent2179f148b7e6244977e8614229e35a5809e1b758 (diff)
downloadlinux-yocto-90fbd0773ba25f99c144e5042bddbbd70a599db1.tar.gz
linux-yocto-90fbd0773ba25f99c144e5042bddbbd70a599db1.tar.bz2
linux-yocto-90fbd0773ba25f99c144e5042bddbbd70a599db1.zip
staging: vt6656: Power save stop wake_up_count wrap around.
commit ea81c3486442f4643fc9825a2bb1b430b829bccd upstream. conf.listen_interval can sometimes be zero causing wake_up_count to wrap around up to many beacons too late causing CTRL-EVENT-BEACON-LOSS as in. wpa_supplicant[795]: message repeated 45 times: [..CTRL-EVENT-BEACON-LOSS ] Fixes: 43c93d9bf5e2 ("staging: vt6656: implement power saving code.") Cc: stable <stable@vger.kernel.org> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/fce47bb5-7ca6-7671-5094-5c6107302f2b@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/vt6656/int.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c
index af0060c74530..43f461f75b97 100644
--- a/drivers/staging/vt6656/int.c
+++ b/drivers/staging/vt6656/int.c
@@ -143,7 +143,8 @@ void vnt_int_process_data(struct vnt_private *priv)
priv->wake_up_count =
priv->hw->conf.listen_interval;
- --priv->wake_up_count;
+ if (priv->wake_up_count)
+ --priv->wake_up_count;
/* Turn on wake up to listen next beacon */
if (priv->wake_up_count == 1)