]> Git Repo - linux.git/commitdiff
staging: vt6656: Power save stop wake_up_count wrap around.
authorMalcolm Priestley <[email protected]>
Tue, 14 Apr 2020 10:39:23 +0000 (11:39 +0100)
committerGreg Kroah-Hartman <[email protected]>
Thu, 16 Apr 2020 11:45:15 +0000 (13:45 +0200)
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 <[email protected]>
Signed-off-by: Malcolm Priestley <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/staging/vt6656/usbpipe.c

index eae211e5860f1e16e673224c5f557cca912750c3..91b62c3dff7b8cda86fca34c6dde783106231f36 100644 (file)
@@ -207,7 +207,8 @@ static 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)
This page took 0.053214 seconds and 4 git commands to generate.