mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: update Rx timestamp every time
Host fill netbuf with qtime instead of tsf. In function "hdd_get_soctime_from_tsf64time", when Host check RX packet tsf value less than last_target_global_tsf_time, it will return error. Then, Host will the default value 0 to upper layer.Sometimes, User will found some packets FW recvTime is not increasing compared with last packets. So modify it to calculate qtime from tsf all the time. Change-Id: Icc53f22b4213fb46ff3bfc3e3df940cb28c632f5 CRs-Fixed: 2485600
This commit is contained in:
parent
553ded9e40
commit
45e45e7aff
1 changed files with 15 additions and 11 deletions
|
|
@ -709,20 +709,24 @@ static inline int32_t hdd_get_soctime_from_tsf64time(
|
|||
qdf_spin_lock_bh(&adapter->host_target_sync_lock);
|
||||
|
||||
/* at present, target_time is 64bit (g_tsf64), us*/
|
||||
if (tsf64_time > adapter->last_target_global_tsf_time)
|
||||
if (tsf64_time > adapter->last_target_global_tsf_time) {
|
||||
delta64_tsf64time = tsf64_time -
|
||||
adapter->last_target_global_tsf_time;
|
||||
else {
|
||||
if (in_cap_state)
|
||||
qdf_spin_unlock_bh(&adapter->host_target_sync_lock);
|
||||
return -EINVAL;
|
||||
adapter->last_target_global_tsf_time;
|
||||
delta64_soctime = delta64_tsf64time * NSEC_PER_USEC;
|
||||
|
||||
/* soc_time (ns)*/
|
||||
ret = hdd_uint64_plus(adapter->last_tsf_sync_soc_time,
|
||||
delta64_soctime, soc_time);
|
||||
} else {
|
||||
delta64_tsf64time = adapter->last_target_global_tsf_time -
|
||||
tsf64_time;
|
||||
delta64_soctime = delta64_tsf64time * NSEC_PER_USEC;
|
||||
|
||||
/* soc_time (ns)*/
|
||||
ret = hdd_uint64_minus(adapter->last_tsf_sync_soc_time,
|
||||
delta64_soctime, soc_time);
|
||||
}
|
||||
|
||||
delta64_soctime = delta64_tsf64time * NSEC_PER_USEC;
|
||||
|
||||
/* soc_time (ns)*/
|
||||
ret = hdd_uint64_plus(adapter->last_tsf_sync_soc_time,
|
||||
delta64_soctime, soc_time);
|
||||
if (in_cap_state)
|
||||
qdf_spin_unlock_bh(&adapter->host_target_sync_lock);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue