summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2020-04-18 17:43:24 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-29 16:31:33 +0200
commitd60fdefc1b0e0478fb0966ea974ead74b698250f (patch)
tree869c41e6439153d560ddf07f0aacdc9eac8bcc79 /drivers/staging
parent6eb9ad6d64b152fad3d4cc10f2c999145cb970bc (diff)
downloadlinux-stable-d60fdefc1b0e0478fb0966ea974ead74b698250f.tar.gz
linux-stable-d60fdefc1b0e0478fb0966ea974ead74b698250f.tar.bz2
linux-stable-d60fdefc1b0e0478fb0966ea974ead74b698250f.zip
staging: vt6656: Fix drivers TBTT timing counter.
commit 09057742af98a39ebffa27fac4f889dc873132de upstream. The drivers TBTT counter is not synchronized with mac80211 timestamp. Reorder the functions and use vnt_update_next_tbtt to do the final synchronize. Fixes: c15158797df6 ("staging: vt6656: implement TSF counter") Cc: stable <stable@vger.kernel.org> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/375d0b25-e8bc-c8f7-9b10-6cc705d486ee@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/vt6656/main_usb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index c04f2a7a5890..a6f207c65586 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -740,12 +740,15 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
vnt_mac_reg_bits_on(priv, MAC_REG_TFTCTL,
TFTCTL_TSFCNTREN);
- vnt_adjust_tsf(priv, conf->beacon_rate->hw_value,
- conf->sync_tsf, priv->current_tsf);
-
vnt_mac_set_beacon_interval(priv, conf->beacon_int);
vnt_reset_next_tbtt(priv, conf->beacon_int);
+
+ vnt_adjust_tsf(priv, conf->beacon_rate->hw_value,
+ conf->sync_tsf, priv->current_tsf);
+
+ vnt_update_next_tbtt(priv,
+ conf->sync_tsf, conf->beacon_int);
} else {
vnt_clear_current_tsf(priv);