qcacmn: Add support for chan RF info from service_ready_ext event

Channel RF info contains metrics that signify the throughput
availability of all the supported channels. This information
is sent in as discrete TLVs (per channel) as part of the WMI
extended service ready event.

Each TLV contains the frequency, bandwidth represented and
the actual channel metric.

Add support to read the above-mentioned TLVs from the extended
service ready event

Change-Id: If947e179c1ca41466997cc48840a8d36b6236780
CRs-Fixed: 2441921
Этот коммит содержится в:
Aditya Sathish
2019-05-09 11:18:43 +05:30
коммит произвёл nshrivas
родитель 85de96c698
Коммит ce928dcd67
9 изменённых файлов: 219 добавлений и 0 удалений

Просмотреть файл

@@ -24,6 +24,10 @@
#define _SERVICE_READY_PARAM_H_
#include "qdf_types.h"
#ifdef WLAN_SUPPORT_RF_CHARACTERIZATION
#include "wmi_unified_param.h"
#endif
/**
* struct wlan_psoc_hal_reg_capability - hal reg table in psoc
@@ -285,6 +289,20 @@ struct wlan_psoc_host_chainmask_table {
struct wlan_psoc_host_chainmask_capabilities *cap_list;
};
#ifdef WLAN_SUPPORT_RF_CHARACTERIZATION
/**
* struct wlan_psoc_host_rf_characterization_entry - rf characterization table
* @freq: center frequency of primary channel
* @bw: bandwidth of primary channel
* @chan_metric: primary channel-specific metric
*/
struct wlan_psoc_host_rf_characterization_entry {
uint16_t freq;
wmi_host_channel_width bw;
uint8_t chan_metric;
};
#endif
/**
* struct wlan_psoc_host_service_ext_param - EXT service base params in event
* @default_conc_scan_config_bits: Default concurrenct scan config
@@ -304,6 +322,8 @@ struct wlan_psoc_host_chainmask_table {
* @max_bssid_indicator: Maximum number of VAPs in MBSS IE
* @num_bin_scaling_params: Number of Spectral bin scaling parameters
* @chainmask_table: Available chain mask tables.
* @num_rf_characterization_entries: Number of RF characterization info entries
* @rf_characterization_entries: Channel RF characterization information entries
* @sar_version: SAR version info
*/
struct wlan_psoc_host_service_ext_param {
@@ -322,6 +342,11 @@ struct wlan_psoc_host_service_ext_param {
uint32_t num_bin_scaling_params;
struct wlan_psoc_host_chainmask_table
chainmask_table[PSOC_MAX_CHAINMASK_TABLES];
#ifdef WLAN_SUPPORT_RF_CHARACTERIZATION
uint32_t num_rf_characterization_entries;
struct wlan_psoc_host_rf_characterization_entry
*rf_characterization_entries;
#endif
uint32_t sar_version;
};

Просмотреть файл

@@ -27,6 +27,50 @@
#include "service_ready_param.h"
#include "target_if.h"
#ifdef WLAN_SUPPORT_RF_CHARACTERIZATION
/**
* init_deinit_populate_rf_characterization_entries()
* - allocates space for and populates the RF characterization information
* @handle: WMI handle pointer
* @evt: event buffer received from FW
* @service_ext_param: pointer to server ext param
*
* Allocates space for and populates the RF characterization information
*
* Return: QDF Status
*/
QDF_STATUS init_deinit_populate_rf_characterization_entries(void *handle,
uint8_t *evt,
struct wlan_psoc_host_service_ext_param *service_ext_par);
/**
* init_deinit_rf_characterization_entries_free()
* - free RF characterization information
* @service_ext_param: pointer to server ext param
*
* Frees RF characterization information
*
* Return: QDF Status
*/
QDF_STATUS init_deinit_rf_characterization_entries_free(
struct wlan_psoc_host_service_ext_param *service_ext_par);
#else
static inline
QDF_STATUS init_deinit_populate_rf_characterization_entries(void *handle,
uint8_t *evt,
struct wlan_psoc_host_service_ext_param *ser_ext_par)
{
return QDF_STATUS_SUCCESS;
}
static inline
QDF_STATUS init_deinit_rf_characterization_entries_free(
struct wlan_psoc_host_service_ext_param *ser_ext_par)
{
return QDF_STATUS_SUCCESS;
}
#endif
/**
* init_deinit_chainmask_table_alloc()
* - allocate chainmask table capability list.