qcacmn: Add Agile Spectral frequency to Spectral SAMP message

Add Agile Spectral frequency to Spectral SAMP message and populate the
same. This coexists with the pre-existing operational frequency in
SAMP message for the sake of flexibility.

Change-Id: Iadb8efeaac924df5b0ac9a83f630206b2ef93052
CRs-Fixed: 2545763
diff --git a/spectral/dispatcher/inc/spectral_ioctl.h b/spectral/dispatcher/inc/spectral_ioctl.h
index f270bc5..d8d1037 100644
--- a/spectral/dispatcher/inc/spectral_ioctl.h
+++ b/spectral/dispatcher/inc/spectral_ioctl.h
@@ -427,6 +427,9 @@
  * @freq:               Operating frequency in MHz
  * @vhtop_ch_freq_seg1: VHT Segment 1 centre frequency in MHz
  * @vhtop_ch_freq_seg2: VHT Segment 2 centre frequency in MHz
+ * @agile_freq:         Center frequency in MHz of the entire span across which
+ *                      Agile Spectral is carried out. Applicable only for Agile
+ *                      Spectral samples.
  * @freq_loading:       How busy was the channel
  * @dcs_enabled:        Whether DCS is enabled
  * @int_type:           Interference type indicated by DCS
@@ -438,6 +441,7 @@
 	uint16_t freq;
 	uint16_t vhtop_ch_freq_seg1;
 	uint16_t vhtop_ch_freq_seg2;
+	uint16_t agile_freq;
 	uint16_t freq_loading;
 	uint16_t dcs_enabled;
 	enum dcs_int_type int_type;
diff --git a/target_if/spectral/target_if_spectral.h b/target_if/spectral/target_if_spectral.h
index 20f18a8..86274ac 100644
--- a/target_if/spectral/target_if_spectral.h
+++ b/target_if/spectral/target_if_spectral.h
@@ -980,6 +980,8 @@
  * @freq: Center frequency of primary 20MHz channel in MHz
  * @vhtop_ch_freq_seg1: VHT operation first segment center frequency in MHz
  * @vhtop_ch_freq_seg2: VHT operation second segment center frequency in MHz
+ * @agile_freq: Center frequency in MHz of the entire span across which Agile
+ * Spectral is carried out. Applicable only for Agile Spectral samples.
  * @freq_loading: spectral control duty cycles
  * @noise_floor:  current noise floor (except for secondary 80 segment)
  * @noise_floor_sec80:  current noise floor for secondary 80 segment
@@ -1026,6 +1028,7 @@
 	uint16_t   freq;
 	uint16_t   vhtop_ch_freq_seg1;
 	uint16_t   vhtop_ch_freq_seg2;
+	uint16_t   agile_freq;
 	uint16_t   freq_loading;
 	int16_t     noise_floor;
 	int16_t     noise_floor_sec80;
diff --git a/target_if/spectral/target_if_spectral_netlink.c b/target_if/spectral/target_if_spectral_netlink.c
index 32538b7..225a7a2 100644
--- a/target_if/spectral/target_if_spectral_netlink.c
+++ b/target_if/spectral/target_if_spectral_netlink.c
@@ -72,6 +72,8 @@
 
 		spec_samp_msg->signature = SPECTRAL_SIGNATURE;
 		spec_samp_msg->freq = params->freq;
+		if (params->smode == SPECTRAL_SCAN_MODE_AGILE)
+			spec_samp_msg->agile_freq = params->agile_freq;
 		spec_samp_msg->freq_loading = params->freq_loading;
 		samp_data->spectral_mode = params->smode;
 		samp_data->spectral_data_len = params->datalen;
diff --git a/target_if/spectral/target_if_spectral_phyerr.c b/target_if/spectral/target_if_spectral_phyerr.c
index 90814ec..36f697a 100644
--- a/target_if/spectral/target_if_spectral_phyerr.c
+++ b/target_if/spectral/target_if_spectral_phyerr.c
@@ -1753,6 +1753,10 @@
 						   SPECTRAL_FFT_BINS_POS);
 		params.freq = p_sops->get_current_channel(spectral);
 
+		if (params.smode == SPECTRAL_SCAN_MODE_AGILE)
+			params.agile_freq =
+				spectral->params[params.smode].ss_frequency;
+
 		/*
 		 * For modes upto VHT80, the noise floor is populated with
 		 * the one corresponding