mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacmn: Extend timestamp WAR for agile mode
Target will be sharing the time taken for reset in the first Spectral report after reset. The reset delay value is common for all the Spectral modes. Host updates the timestamp WAR offset variable for all the Spectral modes. CRs-Fixed: 2504798 Change-Id: If7d47a434054f220b0717f7d8939f9f8922af30f
This commit is contained in:
parent
5d3475b985
commit
151c4bb3d6
3 changed files with 20 additions and 11 deletions
|
|
@ -2013,8 +2013,6 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
|
|||
spectral->inband_fftbin_size_adj = 0;
|
||||
spectral->null_fftbin_adj = 0;
|
||||
}
|
||||
spectral->last_fft_timestamp = 0;
|
||||
spectral->timestamp_war_offset = 0;
|
||||
|
||||
if ((target_type == TARGET_TYPE_QCA8074) ||
|
||||
(target_type == TARGET_TYPE_QCA8074V2) ||
|
||||
|
|
@ -2053,6 +2051,8 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
|
|||
|
||||
/* Spectral mode specific init */
|
||||
for (; smode < SPECTRAL_SCAN_MODE_MAX; smode++) {
|
||||
spectral->last_fft_timestamp[smode] = 0;
|
||||
spectral->timestamp_war_offset[smode] = 0;
|
||||
spectral->params_valid[smode] = false;
|
||||
qdf_spinlock_create(&spectral->param_info[smode].osps_lock);
|
||||
spectral->param_info[smode].osps_cache.osc_is_valid = 0;
|
||||
|
|
@ -2655,9 +2655,8 @@ target_if_spectral_scan_enable_params(struct target_if_spectral *spectral,
|
|||
if (!p_sops->is_spectral_active(spectral, smode)) {
|
||||
p_sops->configure_spectral(spectral, spectral_params, smode);
|
||||
p_sops->start_spectral_scan(spectral, smode, err);
|
||||
spectral->timestamp_war_offset = 0;
|
||||
spectral->last_fft_timestamp = 0;
|
||||
} else {
|
||||
spectral->timestamp_war_offset[smode] = 0;
|
||||
spectral->last_fft_timestamp[smode] = 0;
|
||||
}
|
||||
|
||||
/* get current spectral configuration */
|
||||
|
|
|
|||
|
|
@ -911,8 +911,8 @@ struct target_if_spectral {
|
|||
u_int8_t null_fftbin_adj;
|
||||
enum spectral_160mhz_report_delivery_state state_160mhz_delivery;
|
||||
void *spectral_report_cache;
|
||||
uint32_t last_fft_timestamp;
|
||||
uint32_t timestamp_war_offset;
|
||||
uint32_t last_fft_timestamp[SPECTRAL_SCAN_MODE_MAX];
|
||||
uint32_t timestamp_war_offset[SPECTRAL_SCAN_MODE_MAX];
|
||||
uint16_t fft_size_min;
|
||||
uint16_t fft_size_max;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1654,12 +1654,22 @@ target_if_consume_spectral_report_gen3(
|
|||
}
|
||||
|
||||
if (report->reset_delay) {
|
||||
spectral->timestamp_war_offset += (report->reset_delay +
|
||||
spectral->last_fft_timestamp);
|
||||
enum spectral_scan_mode mode =
|
||||
SPECTRAL_SCAN_MODE_NORMAL;
|
||||
|
||||
/* Adjust the offset for all the Spectral modes.
|
||||
* Target will be sending the non zero reset delay for
|
||||
* the first Spectral report after reset. This delay is
|
||||
* common for all the Spectral modes.
|
||||
*/
|
||||
for (; mode < SPECTRAL_SCAN_MODE_MAX; mode++)
|
||||
spectral->timestamp_war_offset[mode] +=
|
||||
(report->reset_delay +
|
||||
spectral->last_fft_timestamp[mode]);
|
||||
}
|
||||
tsf64 = p_sfft->timestamp;
|
||||
spectral->last_fft_timestamp = p_sfft->timestamp;
|
||||
tsf64 += spectral->timestamp_war_offset;
|
||||
spectral->last_fft_timestamp[params.smode] = p_sfft->timestamp;
|
||||
tsf64 += spectral->timestamp_war_offset[params.smode];
|
||||
|
||||
/* Take care of state transitions for 160 MHz and 80p80 */
|
||||
if (spectral->ch_width == CH_WIDTH_160MHZ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue