浏览代码

qcacmn: Update the Detector ID to mode table based on FW_PARAMS event

Currently, we are hardcoding the detector ID to mode table for different
chipsets. Starting QCN9224, the target sends information regarding the
detectors participating in that Spectral session in the FW_PARAMS event.
Use that to update the Detector ID to mode table.

Change-Id: Ic09358e0c3b9ac0166b39f5ce445a83697146d4a
CRs-Fixed: 3253076
Shiva Krishna Pittala 2 年之前
父节点
当前提交
caa7965659
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      target_if/spectral/target_if_spectral.c

+ 8 - 2
target_if/spectral/target_if_spectral.c

@@ -7490,13 +7490,15 @@ target_if_wmi_extract_spectral_fft_size_caps(
  * information in spectral scan session
  * @spectral: Spectral LMAC object
  * @det_info: Pointer to spectral session detector information
+ * @smode: Spectral scan mode
  *
  * Return: QDF_STATUS of operation
  */
 static QDF_STATUS
 target_if_update_det_info_in_spectral_session(
 	struct target_if_spectral *spectral,
-	const struct spectral_session_det_info *det_info)
+	const struct spectral_session_det_info *det_info,
+	enum spectral_scan_mode smode)
 {
 	struct per_session_det_map *det_map;
 	struct per_session_dest_det_info *dest_det_info;
@@ -7518,6 +7520,9 @@ target_if_update_det_info_in_spectral_session(
 
 	qdf_spin_unlock_bh(&spectral->session_det_map_lock);
 
+	/* This detector will be used for this smode throughout this session */
+	spectral->rparams.detid_mode_table[det_info->det_id] = smode;
+
 	return QDF_STATUS_SUCCESS;
 }
 
@@ -7722,7 +7727,8 @@ target_if_spectral_fw_param_event_handler(ol_scn_t scn, uint8_t *data_buf,
 			}
 
 			status = target_if_update_det_info_in_spectral_session(
-					spectral, &det_info);
+					spectral, &det_info,
+					event_params.smode);
 			if (QDF_IS_STATUS_ERROR(status)) {
 				spectral_err("Unable to update detector info");
 				goto release_pdev_ref;