mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-17 17:36:50 +07:00
staging: vt6655: CARDbUpdateTSF bss timestamp correct tsf counter value.
The TSF counter is not set correctly. Use sync_tsf for last beacon value and get tsf local value. Remove qwLocalTSF variable and call CARDbGetCurrentTSF. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d65d2b25d2
commit
032ed34a84
@ -362,12 +362,16 @@ bool CARDbSetPhyParameter(struct vnt_private *pDevice, u8 bb_type)
|
||||
* Return Value: none
|
||||
*/
|
||||
bool CARDbUpdateTSF(struct vnt_private *pDevice, unsigned char byRxRate,
|
||||
u64 qwBSSTimestamp, u64 qwLocalTSF)
|
||||
u64 qwBSSTimestamp)
|
||||
{
|
||||
u64 local_tsf;
|
||||
u64 qwTSFOffset = 0;
|
||||
|
||||
if (qwBSSTimestamp != qwLocalTSF) {
|
||||
qwTSFOffset = CARDqGetTSFOffset(byRxRate, qwBSSTimestamp, qwLocalTSF);
|
||||
CARDbGetCurrentTSF(pDevice, &local_tsf);
|
||||
|
||||
if (qwBSSTimestamp != local_tsf) {
|
||||
qwTSFOffset = CARDqGetTSFOffset(byRxRate, qwBSSTimestamp,
|
||||
local_tsf);
|
||||
/* adjust TSF, HW's TSF add TSF Offset reg */
|
||||
VNSvOutPortD(pDevice->PortOffset + MAC_REG_TSFOFST, (u32)qwTSFOffset);
|
||||
VNSvOutPortD(pDevice->PortOffset + MAC_REG_TSFOFST + 4, (u32)(qwTSFOffset >> 32));
|
||||
|
@ -83,7 +83,7 @@ bool CARDbRadioPowerOff(struct vnt_private *);
|
||||
bool CARDbRadioPowerOn(struct vnt_private *);
|
||||
bool CARDbSetPhyParameter(struct vnt_private *, u8);
|
||||
bool CARDbUpdateTSF(struct vnt_private *, unsigned char byRxRate,
|
||||
u64 qwBSSTimestamp, u64 qwLocalTSF);
|
||||
u64 qwBSSTimestamp);
|
||||
bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval);
|
||||
|
||||
#endif /* __CARD_H__ */
|
||||
|
@ -1478,7 +1478,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
|
||||
if (changed & BSS_CHANGED_ASSOC && priv->op_mode != NL80211_IFTYPE_AP) {
|
||||
if (conf->assoc) {
|
||||
CARDbUpdateTSF(priv, conf->beacon_rate->hw_value,
|
||||
conf->sync_device_ts, conf->sync_tsf);
|
||||
conf->sync_tsf);
|
||||
|
||||
CARDbSetBeaconPeriod(priv, conf->beacon_int);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user