diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 30b1ef0845..589730dd2b 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1931,7 +1931,6 @@ void hdd_update_tgt_cfg(void *context, void *param) hdd_ctx->max_intf_count = cfg->max_intf_count; 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_update_tgt_services(hdd_ctx, &cfg->services); diff --git a/core/mac/src/include/sir_params.h b/core/mac/src/include/sir_params.h index f25d0675ab..99ba35b045 100644 --- a/core/mac/src/include/sir_params.h +++ b/core/mac/src/include/sir_params.h @@ -623,7 +623,6 @@ struct sir_mgmt_msg { #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_TSF_GPIO_PIN_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 338) diff --git a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c index f539489e58..eb2870ce22 100644 --- a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c +++ b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c @@ -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_LRO_CONFIG_CMD); 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_REMOVE_BCN_FILTER_CMDID); CASE_RETURN_STRING(WMA_SET_ADAPT_DWELLTIME_CONF_PARAMS); diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 4dc355ab24..b45bbff854 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -1387,9 +1387,6 @@ typedef struct { uint8_t lpss_support; #endif uint8_t ap_arpns_support; -#ifdef WLAN_SUPPORT_GREEN_AP - bool egap_support; -#endif bool wmi_ready; uint32_t wlan_init_status; qdf_device_t qdf_dev; diff --git a/core/wma/inc/wma_api.h b/core/wma/inc/wma_api.h index eb158973c3..71847b7cc4 100644 --- a/core/wma/inc/wma_api.h +++ b/core/wma/inc/wma_api.h @@ -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, 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_decr_db(uint8_t vdev_id, int value); diff --git a/core/wma/inc/wma_tgt_cfg.h b/core/wma/inc/wma_tgt_cfg.h index 65fba44bf5..90b0f0674f 100644 --- a/core/wma/inc/wma_tgt_cfg.h +++ b/core/wma/inc/wma_tgt_cfg.h @@ -177,9 +177,6 @@ struct wma_tgt_cfg { uint8_t lpss_support; #endif uint8_t ap_arpns_support; -#ifdef WLAN_SUPPORT_GREEN_AP - bool egap_support; -#endif uint32_t fine_time_measurement_cap; bool bpf_enabled; #ifdef FEATURE_WLAN_RA_FILTERING diff --git a/core/wma/inc/wma_types.h b/core/wma/inc/wma_types.h index 029c3d49ea..a37f111aab 100644 --- a/core/wma/inc/wma_types.h +++ b/core/wma/inc/wma_types.h @@ -449,7 +449,6 @@ #define WMA_LRO_CONFIG_CMD SIR_HAL_LRO_CONFIG_CMD #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_REMOVE_BCN_FILTER_CMDID SIR_HAL_REMOVE_BCN_FILTER_CMDID #define WMA_SET_ADAPT_DWELLTIME_CONF_PARAMS SIR_HAL_SET_ADAPT_DWELLTIME_PARAMS diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index ff99292783..f1f91adcbc 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -1054,87 +1054,6 @@ QDF_STATUS wma_send_dbs_scan_selection_params(WMA_HANDLE handle, 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: wma handle diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 46de9dc9e6..d7f946b4ef 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -95,6 +95,7 @@ #include #include "init_event_handler.h" #include "init_deinit_ucfg.h" +#include "target_if_green_ap.h" #define WMA_LOG_COMPLETION_TIMER 3000 /* 3 seconds */ #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; tgt_cfg.wmi_max_len = wmi_get_max_msg_len(wma_handle->wmi_handle) - WMI_TLV_HEADROOM; - wma_setup_egap_support(&tgt_cfg, wma_handle); tgt_cfg.tx_bfee_8ss_enabled = wma_handle->tx_bfee_8ss_enabled; wma_update_obss_detection_support(wma_handle, &tgt_cfg); wma_update_hdd_cfg_ndp(wma_handle, &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); + + /* 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; - /* register the Enhanced Green AP event handler */ - wma_register_egap_event_handle(wma_handle); - /* Initialize the log supported event handler */ status = wmi_unified_register_event_handler(wma_handle->wmi_handle, wmi_diag_event_id_log_supported_event_id,