Skip to content

Commit ea81c34

Browse files
Malcolm Priestleygregkh
authored andcommitted
staging: vt6656: Power save stop wake_up_count wrap around.
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: 43c93d9 ("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]>
1 parent ed87d33 commit ea81c34

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/staging/vt6656/usbpipe.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ static void vnt_int_process_data(struct vnt_private *priv)
207207
priv->wake_up_count =
208208
priv->hw->conf.listen_interval;
209209

210-
--priv->wake_up_count;
210+
if (priv->wake_up_count)
211+
--priv->wake_up_count;
211212

212213
/* Turn on wake up to listen next beacon */
213214
if (priv->wake_up_count == 1)

0 commit comments

Comments
 (0)