qcacmn: Add support to process spectral scan detector info tlv
FW sends Spectral scan detector info TLV in WMI_PDEV_SSCAN_FW_PARAM event to indicate the information of a detector participating in a sscan session. FW sends one TLV of this type for each detector participating in a spectral scan session. Add support to process the TLV and update the spectral host data structures accordingly. CRs-Fixed: 3044193 Change-Id: Ie17b6ea9336ada7a00e4594fa2f7f49ef3d443e5
This commit is contained in:

committed by
Madan Koyyalamudi

parent
e991ce3cdd
commit
61f4418d7a
@@ -2222,6 +2222,22 @@ QDF_STATUS wmi_extract_pdev_sscan_fft_bin_index(
|
||||
QDF_STATUS wmi_extract_pdev_spectral_session_chan_info(
|
||||
wmi_unified_t wmi_handle, void *event,
|
||||
struct spectral_session_chan_info *chan_info);
|
||||
|
||||
/**
|
||||
* wmi_extract_pdev_spectral_session_detector_info() - Extract detector
|
||||
* information for a spectral scan session
|
||||
* @wmi_handle: handle to WMI.
|
||||
* @evt_buf: Event buffer
|
||||
* @det_info: Spectral session detector information data structure to be filled
|
||||
* by this API
|
||||
* @det_info_idx: index in the array of spectral scan detector info TLVs
|
||||
*
|
||||
* Return: QDF_STATUS of operation
|
||||
*/
|
||||
QDF_STATUS wmi_extract_pdev_spectral_session_detector_info(
|
||||
wmi_unified_t wmi_handle, void *event,
|
||||
struct spectral_session_det_info *det_info,
|
||||
uint8_t det_info_idx);
|
||||
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||
|
||||
#if defined(WLAN_SUPPORT_FILS) || defined(CONFIG_BAND_6GHZ)
|
||||
|
@@ -2939,11 +2939,13 @@ struct spectral_fft_bin_markers_160_165mhz {
|
||||
* @pdev_id: Pdev id
|
||||
* @smode: Spectral scan mode
|
||||
* @num_fft_bin_index: Number of TLVs with FFT bin start and end indices
|
||||
* @num_det_info: Number of detector info TLVs
|
||||
*/
|
||||
struct spectral_startscan_resp_params {
|
||||
uint32_t pdev_id;
|
||||
enum spectral_scan_mode smode;
|
||||
uint8_t num_fft_bin_index;
|
||||
uint8_t num_det_info;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2981,6 +2983,18 @@ struct spectral_session_chan_info {
|
||||
enum phy_ch_width sscan_bw;
|
||||
uint16_t sscan_puncture_20mhz_bitmap;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct spectral_session_det_info - Detector info for a spectral scan session
|
||||
* @det_id: detector ID
|
||||
* @start_freq: start frequency (in MHz) of this detector
|
||||
* @end_freq: end frequency (in MHz) of this detector
|
||||
*/
|
||||
struct spectral_session_det_info {
|
||||
uint8_t det_id;
|
||||
qdf_freq_t start_freq;
|
||||
qdf_freq_t end_freq;
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -1480,6 +1480,11 @@ QDF_STATUS (*extract_pdev_sscan_fft_bin_index)(
|
||||
QDF_STATUS (*extract_pdev_spectral_session_chan_info)(
|
||||
wmi_unified_t wmi_handle, void *event,
|
||||
struct spectral_session_chan_info *chan_info);
|
||||
|
||||
QDF_STATUS (*extract_pdev_spectral_session_detector_info)(
|
||||
wmi_unified_t wmi_handle, void *event,
|
||||
struct spectral_session_det_info *det_info,
|
||||
uint8_t det_info_idx);
|
||||
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||
|
||||
QDF_STATUS (*send_vdev_spectral_configure_cmd)(wmi_unified_t wmi_handle,
|
||||
|
@@ -2596,6 +2596,19 @@ QDF_STATUS wmi_extract_pdev_spectral_session_chan_info(
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS wmi_extract_pdev_spectral_session_detector_info(
|
||||
wmi_unified_t wmi_handle, void *event,
|
||||
struct spectral_session_det_info *det_info, uint8_t idx)
|
||||
{
|
||||
if (wmi_handle->ops->extract_pdev_spectral_session_detector_info)
|
||||
return wmi_handle->ops->
|
||||
extract_pdev_spectral_session_detector_info(
|
||||
wmi_handle, event,
|
||||
det_info, idx);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||
|
||||
QDF_STATUS wmi_extract_spectral_scaling_params_service_ready_ext(
|
||||
|
@@ -7265,6 +7265,44 @@ extract_pdev_spectral_session_chan_info_tlv(
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS
|
||||
extract_pdev_spectral_session_detector_info_tlv(
|
||||
wmi_unified_t wmi_handle, void *event,
|
||||
struct spectral_session_det_info *det_info, uint8_t idx)
|
||||
{
|
||||
WMI_PDEV_SSCAN_FW_PARAM_EVENTID_param_tlvs *param_buf = event;
|
||||
wmi_pdev_sscan_detector_info *det_info_tlv;
|
||||
|
||||
if (!param_buf) {
|
||||
wmi_err("param_buf is NULL");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
if (!det_info) {
|
||||
wmi_err("chan_info is NULL");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
if (!param_buf->det_info) {
|
||||
wmi_err("det_info tlv is not present in the event");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
if (idx >= param_buf->num_det_info) {
|
||||
wmi_err("det_info index(%u) is greater than or equal to %u",
|
||||
idx, param_buf->num_det_info);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
det_info_tlv = ¶m_buf->det_info[idx];
|
||||
|
||||
det_info->det_id = det_info_tlv->detector_id;
|
||||
det_info->start_freq = (qdf_freq_t)det_info_tlv->start_freq;
|
||||
det_info->end_freq = (qdf_freq_t)det_info_tlv->end_freq;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* SPECTRAL_BERYLLIUM */
|
||||
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||
|
||||
@@ -16304,6 +16342,8 @@ struct wmi_ops tlv_ops = {
|
||||
#ifdef SPECTRAL_BERYLLIUM
|
||||
.extract_pdev_spectral_session_chan_info =
|
||||
extract_pdev_spectral_session_chan_info_tlv,
|
||||
.extract_pdev_spectral_session_detector_info =
|
||||
extract_pdev_spectral_session_detector_info_tlv,
|
||||
#endif /* SPECTRAL_BERYLLIUM */
|
||||
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||
.send_thermal_mitigation_param_cmd =
|
||||
|
Reference in New Issue
Block a user