qcacld-3.0: Remove dependency on WMA layer for green AP component
Remove dependency on WMA layer for green AP component by registering green AP events through target_if layer. Change-Id: Ic4ea8df1928db632b8e31f0a873b74c6aff4505d CRs-Fixed: 2167028
This commit is contained in:

committed by
snandini

parent
bd27d79273
commit
ceb9faa305
@@ -1931,7 +1931,6 @@ void hdd_update_tgt_cfg(void *context, void *param)
|
|||||||
hdd_ctx->max_intf_count = cfg->max_intf_count;
|
hdd_ctx->max_intf_count = cfg->max_intf_count;
|
||||||
|
|
||||||
hdd_lpass_target_config(hdd_ctx, cfg);
|
hdd_lpass_target_config(hdd_ctx, cfg);
|
||||||
ucfg_green_ap_target_config(hdd_ctx->hdd_pdev, cfg->egap_support);
|
|
||||||
|
|
||||||
hdd_ctx->ap_arpns_support = cfg->ap_arpns_support;
|
hdd_ctx->ap_arpns_support = cfg->ap_arpns_support;
|
||||||
hdd_update_tgt_services(hdd_ctx, &cfg->services);
|
hdd_update_tgt_services(hdd_ctx, &cfg->services);
|
||||||
|
@@ -623,7 +623,6 @@ struct sir_mgmt_msg {
|
|||||||
|
|
||||||
#define SIR_HAL_LRO_CONFIG_CMD (SIR_HAL_ITC_MSG_TYPES_BEGIN + 335)
|
#define SIR_HAL_LRO_CONFIG_CMD (SIR_HAL_ITC_MSG_TYPES_BEGIN + 335)
|
||||||
|
|
||||||
#define SIR_HAL_SET_EGAP_CONF_PARAMS (SIR_HAL_ITC_MSG_TYPES_BEGIN + 336)
|
|
||||||
#define SIR_HAL_HT40_OBSS_SCAN_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 337)
|
#define SIR_HAL_HT40_OBSS_SCAN_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 337)
|
||||||
|
|
||||||
#define SIR_HAL_TSF_GPIO_PIN_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 338)
|
#define SIR_HAL_TSF_GPIO_PIN_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 338)
|
||||||
|
@@ -570,7 +570,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
|
|||||||
CASE_RETURN_STRING(WMA_SET_IE_INFO);
|
CASE_RETURN_STRING(WMA_SET_IE_INFO);
|
||||||
CASE_RETURN_STRING(WMA_LRO_CONFIG_CMD);
|
CASE_RETURN_STRING(WMA_LRO_CONFIG_CMD);
|
||||||
CASE_RETURN_STRING(WMA_GW_PARAM_UPDATE_REQ);
|
CASE_RETURN_STRING(WMA_GW_PARAM_UPDATE_REQ);
|
||||||
CASE_RETURN_STRING(WMA_SET_EGAP_CONF_PARAMS);
|
|
||||||
CASE_RETURN_STRING(WMA_ADD_BCN_FILTER_CMDID);
|
CASE_RETURN_STRING(WMA_ADD_BCN_FILTER_CMDID);
|
||||||
CASE_RETURN_STRING(WMA_REMOVE_BCN_FILTER_CMDID);
|
CASE_RETURN_STRING(WMA_REMOVE_BCN_FILTER_CMDID);
|
||||||
CASE_RETURN_STRING(WMA_SET_ADAPT_DWELLTIME_CONF_PARAMS);
|
CASE_RETURN_STRING(WMA_SET_ADAPT_DWELLTIME_CONF_PARAMS);
|
||||||
|
@@ -1387,9 +1387,6 @@ typedef struct {
|
|||||||
uint8_t lpss_support;
|
uint8_t lpss_support;
|
||||||
#endif
|
#endif
|
||||||
uint8_t ap_arpns_support;
|
uint8_t ap_arpns_support;
|
||||||
#ifdef WLAN_SUPPORT_GREEN_AP
|
|
||||||
bool egap_support;
|
|
||||||
#endif
|
|
||||||
bool wmi_ready;
|
bool wmi_ready;
|
||||||
uint32_t wlan_init_status;
|
uint32_t wlan_init_status;
|
||||||
qdf_device_t qdf_dev;
|
qdf_device_t qdf_dev;
|
||||||
|
@@ -213,14 +213,6 @@ QDF_STATUS wma_send_adapt_dwelltime_params(WMA_HANDLE handle,
|
|||||||
*/
|
*/
|
||||||
QDF_STATUS wma_send_dbs_scan_selection_params(WMA_HANDLE handle,
|
QDF_STATUS wma_send_dbs_scan_selection_params(WMA_HANDLE handle,
|
||||||
struct wmi_dbs_scan_sel_params *dbs_scan_params);
|
struct wmi_dbs_scan_sel_params *dbs_scan_params);
|
||||||
#ifdef WLAN_SUPPORT_GREEN_AP
|
|
||||||
void wma_setup_egap_support(struct wma_tgt_cfg *tgt_cfg, WMA_HANDLE handle);
|
|
||||||
void wma_register_egap_event_handle(WMA_HANDLE handle);
|
|
||||||
#else
|
|
||||||
static inline void wma_setup_egap_support(struct wma_tgt_cfg *tgt_cfg,
|
|
||||||
WMA_HANDLE handle) {}
|
|
||||||
static inline void wma_register_egap_event_handle(WMA_HANDLE handle) {}
|
|
||||||
#endif
|
|
||||||
QDF_STATUS wma_set_tx_power_scale(uint8_t vdev_id, int value);
|
QDF_STATUS wma_set_tx_power_scale(uint8_t vdev_id, int value);
|
||||||
QDF_STATUS wma_set_tx_power_scale_decr_db(uint8_t vdev_id, int value);
|
QDF_STATUS wma_set_tx_power_scale_decr_db(uint8_t vdev_id, int value);
|
||||||
|
|
||||||
|
@@ -177,9 +177,6 @@ struct wma_tgt_cfg {
|
|||||||
uint8_t lpss_support;
|
uint8_t lpss_support;
|
||||||
#endif
|
#endif
|
||||||
uint8_t ap_arpns_support;
|
uint8_t ap_arpns_support;
|
||||||
#ifdef WLAN_SUPPORT_GREEN_AP
|
|
||||||
bool egap_support;
|
|
||||||
#endif
|
|
||||||
uint32_t fine_time_measurement_cap;
|
uint32_t fine_time_measurement_cap;
|
||||||
bool bpf_enabled;
|
bool bpf_enabled;
|
||||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
#ifdef FEATURE_WLAN_RA_FILTERING
|
||||||
|
@@ -449,7 +449,6 @@
|
|||||||
|
|
||||||
#define WMA_LRO_CONFIG_CMD SIR_HAL_LRO_CONFIG_CMD
|
#define WMA_LRO_CONFIG_CMD SIR_HAL_LRO_CONFIG_CMD
|
||||||
#define WMA_GW_PARAM_UPDATE_REQ SIR_HAL_GATEWAY_PARAM_UPDATE_REQ
|
#define WMA_GW_PARAM_UPDATE_REQ SIR_HAL_GATEWAY_PARAM_UPDATE_REQ
|
||||||
#define WMA_SET_EGAP_CONF_PARAMS SIR_HAL_SET_EGAP_CONF_PARAMS
|
|
||||||
#define WMA_ADD_BCN_FILTER_CMDID SIR_HAL_ADD_BCN_FILTER_CMDID
|
#define WMA_ADD_BCN_FILTER_CMDID SIR_HAL_ADD_BCN_FILTER_CMDID
|
||||||
#define WMA_REMOVE_BCN_FILTER_CMDID SIR_HAL_REMOVE_BCN_FILTER_CMDID
|
#define WMA_REMOVE_BCN_FILTER_CMDID SIR_HAL_REMOVE_BCN_FILTER_CMDID
|
||||||
#define WMA_SET_ADAPT_DWELLTIME_CONF_PARAMS SIR_HAL_SET_ADAPT_DWELLTIME_PARAMS
|
#define WMA_SET_ADAPT_DWELLTIME_CONF_PARAMS SIR_HAL_SET_ADAPT_DWELLTIME_PARAMS
|
||||||
|
@@ -1054,87 +1054,6 @@ QDF_STATUS wma_send_dbs_scan_selection_params(WMA_HANDLE handle,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WLAN_SUPPORT_GREEN_AP
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wma_egap_info_status_event() - egap info status event
|
|
||||||
* @handle: pointer to wma handler
|
|
||||||
* @event: pointer to event
|
|
||||||
* @len: len of the event
|
|
||||||
*
|
|
||||||
* Return: 0 for success, otherwise appropriate error code
|
|
||||||
*/
|
|
||||||
static int wma_egap_info_status_event(void *handle, u_int8_t *event,
|
|
||||||
uint32_t len)
|
|
||||||
{
|
|
||||||
WMI_TX_PAUSE_EVENTID_param_tlvs *param_buf;
|
|
||||||
wmi_ap_ps_egap_info_event_fixed_param *egap_info_event;
|
|
||||||
wmi_ap_ps_egap_info_chainmask_list *chainmask_event;
|
|
||||||
u_int8_t *buf_ptr;
|
|
||||||
|
|
||||||
param_buf = (WMI_TX_PAUSE_EVENTID_param_tlvs *)event;
|
|
||||||
if (!param_buf) {
|
|
||||||
WMA_LOGE("Invalid EGAP Info status event buffer");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
egap_info_event = (wmi_ap_ps_egap_info_event_fixed_param *)
|
|
||||||
param_buf->fixed_param;
|
|
||||||
buf_ptr = (uint8_t *)egap_info_event;
|
|
||||||
buf_ptr += sizeof(wmi_ap_ps_egap_info_event_fixed_param);
|
|
||||||
chainmask_event = (wmi_ap_ps_egap_info_chainmask_list *)buf_ptr;
|
|
||||||
WMA_LOGD("mac_id: %d, status: %d, tx_mask: %x, rx_mask: %d",
|
|
||||||
chainmask_event->mac_id,
|
|
||||||
egap_info_event->status,
|
|
||||||
chainmask_event->tx_chainmask,
|
|
||||||
chainmask_event->rx_chainmask);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wma_setup_egap_support() - setup the EGAP support flag
|
|
||||||
* @tgt_cfg: pointer to hdd target configuration
|
|
||||||
* @egap_support: EGAP support flag
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void wma_setup_egap_support(struct wma_tgt_cfg *tgt_cfg, WMA_HANDLE handle)
|
|
||||||
{
|
|
||||||
tp_wma_handle wma_handle = (tp_wma_handle) handle;
|
|
||||||
|
|
||||||
if (tgt_cfg && wma_handle)
|
|
||||||
tgt_cfg->egap_support = wma_handle->egap_support;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wma_register_egap_event_handle() - register the EGAP event handle
|
|
||||||
* @wma_handle: wma handler
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void wma_register_egap_event_handle(WMA_HANDLE handle)
|
|
||||||
{
|
|
||||||
tp_wma_handle wma_handle = (tp_wma_handle) handle;
|
|
||||||
QDF_STATUS status;
|
|
||||||
|
|
||||||
if (wmi_service_enabled(wma_handle->wmi_handle,
|
|
||||||
wmi_service_egap)) {
|
|
||||||
status = wmi_unified_register_event_handler(
|
|
||||||
wma_handle->wmi_handle,
|
|
||||||
wmi_ap_ps_egap_info_event_id,
|
|
||||||
wma_egap_info_status_event,
|
|
||||||
WMA_RX_SERIALIZER_CTX);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
|
||||||
WMA_LOGE("Failed to register Enhance Green AP event");
|
|
||||||
wma_handle->egap_support = false;
|
|
||||||
} else {
|
|
||||||
WMA_LOGI("Set the Enhance Green AP event handler");
|
|
||||||
wma_handle->egap_support = true;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
wma_handle->egap_support = false;
|
|
||||||
}
|
|
||||||
#endif /* WLAN_SUPPORT_GREEN_AP */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wma_unified_fw_profiling_cmd() - send FW profiling cmd to WLAN FW
|
* wma_unified_fw_profiling_cmd() - send FW profiling cmd to WLAN FW
|
||||||
* @wma: wma handle
|
* @wma: wma handle
|
||||||
|
@@ -95,6 +95,7 @@
|
|||||||
#include <wlan_spectral_utils_api.h>
|
#include <wlan_spectral_utils_api.h>
|
||||||
#include "init_event_handler.h"
|
#include "init_event_handler.h"
|
||||||
#include "init_deinit_ucfg.h"
|
#include "init_deinit_ucfg.h"
|
||||||
|
#include "target_if_green_ap.h"
|
||||||
|
|
||||||
#define WMA_LOG_COMPLETION_TIMER 3000 /* 3 seconds */
|
#define WMA_LOG_COMPLETION_TIMER 3000 /* 3 seconds */
|
||||||
#define WMI_TLV_HEADROOM 128
|
#define WMI_TLV_HEADROOM 128
|
||||||
@@ -5154,12 +5155,17 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle)
|
|||||||
wma_handle->fine_time_measurement_cap;
|
wma_handle->fine_time_measurement_cap;
|
||||||
tgt_cfg.wmi_max_len = wmi_get_max_msg_len(wma_handle->wmi_handle)
|
tgt_cfg.wmi_max_len = wmi_get_max_msg_len(wma_handle->wmi_handle)
|
||||||
- WMI_TLV_HEADROOM;
|
- WMI_TLV_HEADROOM;
|
||||||
wma_setup_egap_support(&tgt_cfg, wma_handle);
|
|
||||||
tgt_cfg.tx_bfee_8ss_enabled = wma_handle->tx_bfee_8ss_enabled;
|
tgt_cfg.tx_bfee_8ss_enabled = wma_handle->tx_bfee_8ss_enabled;
|
||||||
wma_update_obss_detection_support(wma_handle, &tgt_cfg);
|
wma_update_obss_detection_support(wma_handle, &tgt_cfg);
|
||||||
wma_update_hdd_cfg_ndp(wma_handle, &tgt_cfg);
|
wma_update_hdd_cfg_ndp(wma_handle, &tgt_cfg);
|
||||||
wma_handle->tgt_cfg_update_cb(hdd_ctx, &tgt_cfg);
|
wma_handle->tgt_cfg_update_cb(hdd_ctx, &tgt_cfg);
|
||||||
target_if_store_pdev_target_if_ctx(wma_get_pdev_from_scn_handle);
|
target_if_store_pdev_target_if_ctx(wma_get_pdev_from_scn_handle);
|
||||||
|
|
||||||
|
/* register the Enhanced Green AP event handler */
|
||||||
|
if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
|
||||||
|
WMI_SERVICE_EGAP))
|
||||||
|
target_if_green_ap_register_egap_event_handler(
|
||||||
|
wma_handle->pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -5505,9 +5511,6 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
|
|||||||
|
|
||||||
wlan_res_cfg->max_num_dbs_scan_duty_cycle = CDS_DBS_SCAN_CLIENTS_MAX;
|
wlan_res_cfg->max_num_dbs_scan_duty_cycle = CDS_DBS_SCAN_CLIENTS_MAX;
|
||||||
|
|
||||||
/* register the Enhanced Green AP event handler */
|
|
||||||
wma_register_egap_event_handle(wma_handle);
|
|
||||||
|
|
||||||
/* Initialize the log supported event handler */
|
/* Initialize the log supported event handler */
|
||||||
status = wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
status = wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||||
wmi_diag_event_id_log_supported_event_id,
|
wmi_diag_event_id_log_supported_event_id,
|
||||||
|
Reference in New Issue
Block a user