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
Цей коміт міститься в:
@@ -577,6 +577,7 @@ QDF_STATUS target_if_free_psoc_tgt_info(struct wlan_objmgr_psoc *psoc)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
init_deinit_chainmask_table_free(ext_param);
|
||||
init_deinit_rf_characterization_entries_free(ext_param);
|
||||
init_deinit_dbr_ring_cap_free(tgt_psoc_info);
|
||||
init_deinit_spectral_scaling_params_free(tgt_psoc_info);
|
||||
|
||||
|
@@ -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.
|
||||
|
@@ -270,6 +270,13 @@ static int init_deinit_service_ext_ready_event_handler(ol_scn_t scn_handle,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
err_code = init_deinit_populate_rf_characterization_entries(
|
||||
wmi_handle,
|
||||
event,
|
||||
&info->service_ext_param);
|
||||
if (err_code)
|
||||
goto exit;
|
||||
|
||||
err_code = init_deinit_populate_dbr_ring_cap(psoc, wmi_handle,
|
||||
event, info);
|
||||
if (err_code)
|
||||
|
@@ -26,6 +26,51 @@
|
||||
#include <target_type.h>
|
||||
#include <qdf_module.h>
|
||||
|
||||
#ifdef WLAN_SUPPORT_RF_CHARACTERIZATION
|
||||
QDF_STATUS init_deinit_populate_rf_characterization_entries(void *handle,
|
||||
uint8_t *evt,
|
||||
struct wlan_psoc_host_service_ext_param *ser_ext_par)
|
||||
{
|
||||
uint32_t alloc_size;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
if (ser_ext_par->num_rf_characterization_entries == 0)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
alloc_size = (sizeof(struct wlan_psoc_host_rf_characterization_entry) *
|
||||
ser_ext_par->num_rf_characterization_entries);
|
||||
|
||||
ser_ext_par->rf_characterization_entries = qdf_mem_malloc(alloc_size);
|
||||
if (!ser_ext_par->rf_characterization_entries) {
|
||||
init_deinit_rf_characterization_entries_free(ser_ext_par);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
status = wmi_extract_rf_characterization_entries(handle, evt,
|
||||
ser_ext_par->rf_characterization_entries);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
target_if_err("failed to parse wmi service ready ext param");
|
||||
init_deinit_rf_characterization_entries_free(ser_ext_par);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
qdf_export_symbol(init_deinit_populate_rf_characterization_entries);
|
||||
|
||||
QDF_STATUS init_deinit_rf_characterization_entries_free(
|
||||
struct wlan_psoc_host_service_ext_param *ser_ext_par)
|
||||
{
|
||||
qdf_mem_free(ser_ext_par->rf_characterization_entries);
|
||||
ser_ext_par->rf_characterization_entries = NULL;
|
||||
ser_ext_par->num_rf_characterization_entries = 0;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
qdf_export_symbol(init_deinit_rf_characterization_entries_free);
|
||||
#endif
|
||||
|
||||
QDF_STATUS init_deinit_chainmask_table_alloc(
|
||||
struct wlan_psoc_host_service_ext_param *ser_ext_par)
|
||||
{
|
||||
|
Посилання в новій задачі
Заблокувати користувача