From b3a66311cc1b5ad399206298d28eafc72d4a8e8e Mon Sep 17 00:00:00 2001 From: Edayilliam Jayadev Date: Mon, 9 Dec 2019 19:28:20 +0530 Subject: [PATCH] qcacmn: Add Agile channel width to SAMP message Add a new member to SAMP structure describing the channel width of Agile Spectral scan. Change-Id: Ib27fe9ed63bf8f89c59762150fb58943e6bcf7ea CRs-Fixed: 2582670 --- spectral/dispatcher/inc/spectral_ioctl.h | 1 + target_if/spectral/target_if_spectral.c | 3 +++ target_if/spectral/target_if_spectral.h | 1 + target_if/spectral/target_if_spectral_netlink.c | 1 + 4 files changed, 6 insertions(+) diff --git a/spectral/dispatcher/inc/spectral_ioctl.h b/spectral/dispatcher/inc/spectral_ioctl.h index c9165c3050..2cb951bbcf 100644 --- a/spectral/dispatcher/inc/spectral_ioctl.h +++ b/spectral/dispatcher/inc/spectral_ioctl.h @@ -444,6 +444,7 @@ struct spectral_samp_data { uint32_t raw_timestamp_sec80; uint32_t reset_delay; uint32_t target_reset_count; + uint32_t agile_ch_width; } __packed; /** diff --git a/target_if/spectral/target_if_spectral.c b/target_if/spectral/target_if_spectral.c index 9f26fe9efb..0296fa1701 100644 --- a/target_if/spectral/target_if_spectral.c +++ b/target_if/spectral/target_if_spectral.c @@ -2954,6 +2954,9 @@ target_if_spectral_scan_enable_params(struct target_if_spectral *spectral, if (spectral->ch_width == CH_WIDTH_INVALID) return 1; + spectral->agile_ch_width = + target_if_spectral_find_agile_width(spectral->ch_width); + if (spectral->capability.advncd_spectral_cap) { spectral->lb_edge_extrabins = 0; spectral->rb_edge_extrabins = 0; diff --git a/target_if/spectral/target_if_spectral.h b/target_if/spectral/target_if_spectral.h index 433fe17611..d50f9bfa4e 100644 --- a/target_if/spectral/target_if_spectral.h +++ b/target_if/spectral/target_if_spectral.h @@ -932,6 +932,7 @@ struct target_if_spectral { param_info[SPECTRAL_SCAN_MODE_MAX]; #endif uint32_t ch_width; + uint32_t agile_ch_width; struct spectral_diag_stats diag_stats; bool is_160_format; bool is_lb_edge_extrabins_format; diff --git a/target_if/spectral/target_if_spectral_netlink.c b/target_if/spectral/target_if_spectral_netlink.c index 65050766b6..e1482487c0 100644 --- a/target_if/spectral/target_if_spectral_netlink.c +++ b/target_if/spectral/target_if_spectral_netlink.c @@ -79,6 +79,7 @@ target_if_spectral_create_samp_msg(struct target_if_spectral *spectral, samp_data->spectral_data_len = params->datalen; samp_data->spectral_rssi = params->rssi; samp_data->ch_width = spectral->ch_width; + samp_data->agile_ch_width = spectral->agile_ch_width; samp_data->spectral_agc_total_gain = params->agc_total_gain; samp_data->spectral_gainchange = params->gainchange; samp_data->spectral_pri80ind = params->pri80ind;