qcacmn: Log Spectral FFT timestamp WAR parametrs
Log Spectral FFT timestamp WAR related parameters Change-Id: I11e3107f41049e9fb05c3f9f7960279b88392598 CRs-Fixed: 2556803
Tento commit je obsažen v:
@@ -2147,6 +2147,7 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
|
||||
target_if_init_spectral_ops(spectral);
|
||||
|
||||
/* Spectral mode specific init */
|
||||
spectral->target_reset_count = 0;
|
||||
for (; smode < SPECTRAL_SCAN_MODE_MAX; smode++) {
|
||||
spectral->last_fft_timestamp[smode] = 0;
|
||||
spectral->timestamp_war_offset[smode] = 0;
|
||||
|
@@ -843,6 +843,7 @@ struct spectral_param_properties {
|
||||
* @direct_dma_support: Whether Direct-DMA is supported on the current radio
|
||||
* @prev_tstamp: Timestamp of the previously received sample, which has to be
|
||||
* compared with the current tstamp to check descrepancy
|
||||
* @target_reset_count: Number of times target excercised the reset routine
|
||||
*/
|
||||
struct target_if_spectral {
|
||||
struct wlan_objmgr_pdev *pdev_obj;
|
||||
@@ -957,10 +958,11 @@ struct target_if_spectral {
|
||||
uint32_t timestamp_war_offset[SPECTRAL_SCAN_MODE_MAX];
|
||||
uint16_t fft_size_min;
|
||||
uint16_t fft_size_max;
|
||||
bool dbr_ring_debug;
|
||||
bool dbr_buff_debug;
|
||||
bool dbr_ring_debug;
|
||||
bool dbr_buff_debug;
|
||||
bool direct_dma_support;
|
||||
uint32_t prev_tstamp;
|
||||
uint32_t target_reset_count;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1012,6 +1014,17 @@ struct target_if_spectral {
|
||||
* channel switch - Software may choose to ignore the sample if this is set.
|
||||
* Applicable only if smode = SPECTRAL_SCAN_MODE_NORMAL and for 160/80+80 MHz
|
||||
* Spectral operation.
|
||||
* @last_raw_timestamp: Previous FFT report's raw timestamp. In case of 160MHz
|
||||
* it will be primary 80 segment's timestamp as both primary & secondary
|
||||
* segment's timestamps are expected to be almost equal
|
||||
* @timestamp_war_offset: Offset calculated based on reset_delay and
|
||||
* last_raw_stamp. It will be added to raw_timestamp to get tstamp.
|
||||
* @raw_timestamp: FFT timestamp reported by HW on primary segment.
|
||||
* @raw_timestamp_sec80: FFT timestamp reported by HW on secondary 80 segment.
|
||||
* @reset_delay: Time gap between the last spectral report before reset and the
|
||||
* end of reset.
|
||||
* @target_reset_count: Indicates the the number of times the target went
|
||||
* through reset routine after spectral was enabled.
|
||||
*/
|
||||
struct target_if_samp_msg_params {
|
||||
int8_t rssi;
|
||||
@@ -1056,6 +1069,12 @@ struct target_if_samp_msg_params {
|
||||
enum spectral_scan_mode smode;
|
||||
uint8_t pri80ind;
|
||||
uint8_t pri80ind_sec80;
|
||||
uint32_t last_raw_timestamp;
|
||||
uint32_t timestamp_war_offset;
|
||||
uint32_t raw_timestamp;
|
||||
uint32_t raw_timestamp_sec80;
|
||||
uint32_t reset_delay;
|
||||
uint32_t target_reset_count;
|
||||
};
|
||||
|
||||
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||
|
@@ -82,6 +82,11 @@ target_if_spectral_create_samp_msg(struct target_if_spectral *spectral,
|
||||
samp_data->spectral_agc_total_gain = params->agc_total_gain;
|
||||
samp_data->spectral_gainchange = params->gainchange;
|
||||
samp_data->spectral_pri80ind = params->pri80ind;
|
||||
samp_data->last_raw_timestamp = params->last_raw_timestamp;
|
||||
samp_data->timestamp_war_offset = params->timestamp_war_offset;
|
||||
samp_data->raw_timestamp = params->raw_timestamp;
|
||||
samp_data->reset_delay = params->reset_delay;
|
||||
samp_data->target_reset_count = params->target_reset_count;
|
||||
|
||||
samp_data->spectral_combined_rssi =
|
||||
(uint8_t)params->rssi;
|
||||
@@ -192,6 +197,8 @@ target_if_spectral_create_samp_msg(struct target_if_spectral *spectral,
|
||||
samp_data->spectral_max_mag_sec80 =
|
||||
params->max_mag_sec80;
|
||||
|
||||
samp_data->raw_timestamp_sec80 = params->raw_timestamp_sec80;
|
||||
|
||||
/*
|
||||
* Currently, we compute pwr_count_sec80 considering the size of
|
||||
* the samp_data->bin_pwr_sec80 array rather than the number of
|
||||
|
@@ -1792,6 +1792,10 @@ target_if_consume_spectral_report_gen3(
|
||||
}
|
||||
}
|
||||
|
||||
params.last_raw_timestamp =
|
||||
spectral->last_fft_timestamp[params.smode];
|
||||
params.reset_delay = 0;
|
||||
|
||||
if (report->reset_delay) {
|
||||
enum spectral_scan_mode mode =
|
||||
SPECTRAL_SCAN_MODE_NORMAL;
|
||||
@@ -1805,8 +1809,14 @@ target_if_consume_spectral_report_gen3(
|
||||
spectral->timestamp_war_offset[mode] +=
|
||||
(report->reset_delay +
|
||||
spectral->last_fft_timestamp[mode]);
|
||||
params.reset_delay = report->reset_delay;
|
||||
spectral->target_reset_count++;
|
||||
}
|
||||
params.target_reset_count = spectral->target_reset_count;
|
||||
params.timestamp_war_offset =
|
||||
spectral->timestamp_war_offset[params.smode];
|
||||
tsf64 = p_sfft->timestamp;
|
||||
params.raw_timestamp = tsf64;
|
||||
spectral->last_fft_timestamp[params.smode] = p_sfft->timestamp;
|
||||
tsf64 += spectral->timestamp_war_offset[params.smode];
|
||||
|
||||
@@ -1952,6 +1962,8 @@ target_if_consume_spectral_report_gen3(
|
||||
}
|
||||
}
|
||||
|
||||
params.raw_timestamp_sec80 = p_sfft->timestamp;
|
||||
|
||||
/* Take care of state transitions for 160 MHz and 80p80 */
|
||||
if (spectral->ch_width == CH_WIDTH_160MHZ) {
|
||||
ret = target_if_160mhz_delivery_state_change(
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele