qcacld-3.0: Add support for Green AP UMAC componentization

Add support for Green AP UMAC componentization.

Change-Id: I4e41ee6c5dfd055c273096c56de4fa253727b429
CRs-Fixed: 2166756
This commit is contained in:
Himanshu Agarwal 2017-12-21 10:16:45 +05:30 committed by snandini
parent cb1d39463d
commit b229a14b67
16 changed files with 143 additions and 873 deletions

25
Kbuild
View File

@ -482,10 +482,6 @@ HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_cfg80211.o \
$(HDD_SRC_DIR)/wlan_hdd_p2p.o
endif
ifeq ($(CONFIG_QCACLD_FEATURE_GREEN_AP),y)
HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_green_ap.o
endif
ifeq ($(CONFIG_QCACLD_FEATURE_NAN),y)
HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_nan.o
endif
@ -883,6 +879,19 @@ UMAC_SPECTRAL_OBJS := $(UMAC_SPECTRAL_CORE_DIR)/spectral_offload.o \
$(WLAN_COMMON_ROOT)/target_if/spectral/target_if_spectral.o \
$(WLAN_COMMON_ROOT)/target_if/spectral/target_if_spectral_sim.o
############# UMAC_GREEN_AP ############
UMAC_GREEN_AP_DIR := umac/green_ap
UMAC_GREEN_AP_DISP_INC_DIR := $(UMAC_GREEN_AP_DIR)/dispatcher/inc
UMAC_GREEN_AP_CORE_DIR := $(WLAN_COMMON_ROOT)/$(UMAC_GREEN_AP_DIR)/core/src
UMAC_GREEN_AP_DISP_DIR := $(WLAN_COMMON_ROOT)/$(UMAC_GREEN_AP_DIR)/dispatcher/src
UMAC_TARGET_GREEN_AP_INC := -I$(WLAN_COMMON_INC)/target_if/green_ap/inc
UMAC_GREEN_AP_INC := -I$(WLAN_COMMON_INC)/$(UMAC_GREEN_AP_DISP_INC_DIR)
UMAC_GREEN_AP_OBJS := $(UMAC_GREEN_AP_CORE_DIR)/wlan_green_ap_main.o \
$(UMAC_GREEN_AP_DISP_DIR)/wlan_green_ap_api.o \
$(UMAC_GREEN_AP_DISP_DIR)/wlan_green_ap_ucfg_api.o \
$(WLAN_COMMON_ROOT)/target_if/green_ap/src/target_if_green_ap.o
############# UMAC_CMN_SERVICES ############
UMAC_COMMON_INC := -I$(WLAN_COMMON_INC)/umac/cmn_services/cmn_defs/inc \
-I$(WLAN_COMMON_INC)/umac/cmn_services/utils/inc
@ -1576,6 +1585,8 @@ endif
INCS += $(UMAC_DISP_INC)
INCS += $(UMAC_SCAN_INC)
INCS += $(UMAC_TARGET_SCAN_INC)
INCS += $(UMAC_GREEN_AP_INC)
INCS += $(UMAC_TARGET_GREEN_AP_INC)
INCS += $(UMAC_COMMON_INC)
INCS += $(UMAC_SPECTRAL_INC)
INCS += $(UMAC_TARGET_SPECTRAL_INC)
@ -1644,6 +1655,10 @@ OBJS += $(UMAC_COMMON_OBJS)
OBJS += $(WCFG_OBJS)
OBJS += $(UMAC_SPECTRAL_OBJS)
ifeq ($(CONFIG_QCACLD_FEATURE_GREEN_AP),y)
OBJS += $(UMAC_GREEN_AP_OBJS)
endif
ifeq ($(CONFIG_LITHIUM), y)
OBJS += $(DP_OBJS)
endif
@ -2114,7 +2129,7 @@ endif #CONFIG_MOBILE_ROUTER
#Green AP feature
ifeq ($(CONFIG_QCACLD_FEATURE_GREEN_AP),y)
CDEFINES += -DFEATURE_GREEN_AP
CDEFINES += -DWLAN_SUPPORT_GREEN_AP
endif
#Stats & Quota Metering feature

View File

@ -5862,7 +5862,7 @@ enum hdd_link_speed_rpt_type {
#define CFG_ENABLE_FW_RTS_PROFILE_MAX (66)
#define CFG_ENABLE_FW_RTS_PROFILE_DEFAULT (33)
#ifdef FEATURE_GREEN_AP
#ifdef WLAN_SUPPORT_GREEN_AP
#define CFG_ENABLE_GREEN_AP_FEATURE "gEnableGreenAp"
#define CFG_ENABLE_GREEN_AP_FEATURE_MIN (0)
#define CFG_ENABLE_GREEN_AP_FEATURE_MAX (1)
@ -14482,7 +14482,7 @@ struct hdd_config {
uint8_t ignoreCAC;
bool IsSapDfsChSifsBurstEnabled;
#ifdef FEATURE_GREEN_AP
#ifdef WLAN_SUPPORT_GREEN_AP
bool enableGreenAP;
bool enable_egap;
uint32_t egap_feature_flag;

View File

@ -1586,9 +1586,6 @@ struct hdd_context {
uint8_t dev_dfs_cac_status;
bool bt_coex_mode_set;
#ifdef FEATURE_GREEN_AP
struct hdd_green_ap_ctx *green_ap_ctx;
#endif
struct fw_log_info fw_log_settings;
#ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE
qdf_mc_timer_t skip_acs_scan_timer;
@ -2864,4 +2861,14 @@ void hdd_component_psoc_disable(struct wlan_objmgr_psoc *psoc);
int hdd_driver_memdump_init(void);
void hdd_driver_memdump_deinit(void);
/**
* hdd_check_green_ap_enable() - to check whether to enable green ap or not
* @hdd_ctx: hdd context
* @is_enabled: 1 - green ap enabled, 0 - green ap not enabled
*
* Return: 0 - success, < 0 - failure
*/
uint8_t hdd_check_green_ap_enable(struct hdd_context *hdd_ctx,
bool *is_enabled);
#endif /* end #if !defined(WLAN_HDD_MAIN_H) */

View File

@ -3312,7 +3312,7 @@ struct reg_table_entry g_registry_table[] = {
CFG_MAX_CONCURRENT_CONNECTIONS_MIN,
CFG_MAX_CONCURRENT_CONNECTIONS_MAX),
#ifdef FEATURE_GREEN_AP
#ifdef WLAN_SUPPORT_GREEN_AP
REG_VARIABLE(CFG_ENABLE_GREEN_AP_FEATURE, WLAN_PARAM_Integer,
struct hdd_config, enableGreenAP,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@ -6716,7 +6716,7 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx)
hdd_ctx->config->gSapPreferredChanLocation);
hdd_debug("Name = [gDisableDfsJapanW53] Value = [%u] ",
hdd_ctx->config->gDisableDfsJapanW53);
#ifdef FEATURE_GREEN_AP
#ifdef WLAN_SUPPORT_GREEN_AP
hdd_debug("Name = [gEnableGreenAp] Value = [%u] ",
hdd_ctx->config->enableGreenAP);
hdd_debug("Name = [gEenableEGAP] Value = [%u] ",

View File

@ -1,607 +0,0 @@
/*
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/**
* DOC: wlan_hdd_green_ap.c
*
* WLAN Host Device Driver Green AP implementation
*
*/
/* Include Files */
#include <wlan_hdd_main.h>
#include <wlan_hdd_misc.h>
#include "wlan_hdd_green_ap.h"
#include "wma_api.h"
#include "wlan_policy_mgr_api.h"
#define GREEN_AP_PS_ON_TIME (0)
#define GREEN_AP_PS_DELAY_TIME (20)
/**
* enum hdd_green_ap_ps_state - Green-AP power save states
* @GREEN_AP_PS_IDLE_STATE: the Green_AP is not enabled
* @GREEN_AP_PS_OFF_STATE: in Power Saving OFF state
* @GREEN_AP_PS_WAIT_STATE: in transition to Power Saving ON state
* @GREEN_AP_PS_ON_STATE: in Power Saving ON state
*/
enum hdd_green_ap_ps_state {
GREEN_AP_PS_IDLE_STATE = 1,
GREEN_AP_PS_OFF_STATE,
GREEN_AP_PS_WAIT_STATE,
GREEN_AP_PS_ON_STATE,
};
/**
* enum hdd_green_ap_event - Green-AP power save events
* @GREEN_AP_PS_START_EVENT: event to indicate to enable Green_AP
* @GREEN_AP_PS_START_EVENT: event to indicate to disable Green_AP
* @GREEN_AP_ADD_STA_EVENT: event to indicate a new STA connected
* @GREEN_AP_DEL_STA_EVENT: event to indicate a STA disconnected
* @GREEN_AP_PS_ON_EVENT: event to indicate to enter Power Saving state
* @GREEN_AP_PS_WAIT_EVENT: event to indicate in the transition to Power Saving
*/
enum hdd_green_ap_event {
GREEN_AP_PS_START_EVENT = 1,
GREEN_AP_PS_STOP_EVENT,
GREEN_AP_ADD_STA_EVENT,
GREEN_AP_DEL_STA_EVENT,
GREEN_AP_PS_ON_EVENT,
GREEN_AP_PS_WAIT_EVENT,
};
/**
* struct hdd_green_ap_ctx - Green-AP context
* @ps_enable: Whether or not Green AP is enabled
* @ps_on_time: Amount of time to stay in Green AP power saving state
* @ps_delay_time: Amount of time to delay when changing states
* @num_nodes: Number of connected clients
* @ps_state: Current state
* @ps_event: Event to trigger when timer expires
* @ps_timer: Event timer
* @egap_support: Enhanced Green AP support flag
*/
struct hdd_green_ap_ctx {
uint8_t ps_enable;
uint32_t ps_on_time;
uint32_t ps_delay_time;
uint32_t num_nodes;
enum hdd_green_ap_ps_state ps_state;
enum hdd_green_ap_event ps_event;
qdf_mc_timer_t ps_timer;
bool egap_support;
};
/**
* hdd_green_ap_update() - update the current State and Event
* @hdd_ctx: Global HDD context
* @state: New state
* @event: New event
*
* Return: none
*/
static void hdd_green_ap_update(struct hdd_context *hdd_ctx,
enum hdd_green_ap_ps_state state,
enum hdd_green_ap_event event)
{
struct hdd_green_ap_ctx *green_ap = hdd_ctx->green_ap_ctx;
green_ap->ps_state = state;
green_ap->ps_event = event;
}
/**
* hdd_green_ap_enable() - Send Green AP configuration to firmware
* @adapter: Adapter upon which Green AP is being configured
* @enable: Flag which indicates if Green AP is being enabled or disabled
*
* Return: 0 upon success, non-zero upon failure
*/
static int hdd_green_ap_enable(struct hdd_adapter *adapter, uint8_t enable)
{
int ret;
hdd_debug("Set Green-AP val: %d", enable);
ret = wma_cli_set_command(adapter->session_id,
WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
enable, DBG_CMD);
return ret;
}
/**
* hdd_green_ap_mc() - Green AP state machine
* @hdd_ctx: HDD global context
* @event: New event being processed
*
* Return: none
*/
static void hdd_green_ap_mc(struct hdd_context *hdd_ctx,
enum hdd_green_ap_event event)
{
struct hdd_green_ap_ctx *green_ap;
struct hdd_adapter *adapter;
green_ap = hdd_ctx->green_ap_ctx;
if (green_ap == NULL)
return;
hdd_debug("Green-AP event: %d, state: %d, num_nodes: %d",
event, green_ap->ps_state, green_ap->num_nodes);
/* handle the green ap ps event */
switch (event) {
case GREEN_AP_PS_START_EVENT:
green_ap->ps_enable = 1;
break;
case GREEN_AP_PS_STOP_EVENT:
green_ap->ps_enable = 0;
break;
case GREEN_AP_ADD_STA_EVENT:
green_ap->num_nodes++;
break;
case GREEN_AP_DEL_STA_EVENT:
if (green_ap->num_nodes)
green_ap->num_nodes--;
break;
case GREEN_AP_PS_ON_EVENT:
case GREEN_AP_PS_WAIT_EVENT:
break;
default:
hdd_err("Invalid event: %d", event);
break;
}
adapter = hdd_get_adapter(hdd_ctx, QDF_SAP_MODE);
if (adapter == NULL) {
hdd_err("Green-AP no SAP adapter");
goto done;
}
/* Confirm that power save is enabled before doing state transitions */
if (!green_ap->ps_enable) {
hdd_debug("Green-AP is disabled");
hdd_green_ap_update(hdd_ctx,
GREEN_AP_PS_OFF_STATE,
GREEN_AP_PS_WAIT_EVENT);
if (hdd_green_ap_enable(adapter, 0))
hdd_err("failed to set green ap mode");
goto done;
}
/* handle the green ap ps state */
switch (green_ap->ps_state) {
case GREEN_AP_PS_IDLE_STATE:
hdd_green_ap_update(hdd_ctx,
GREEN_AP_PS_OFF_STATE,
GREEN_AP_PS_WAIT_EVENT);
break;
case GREEN_AP_PS_OFF_STATE:
if (!green_ap->num_nodes) {
hdd_green_ap_update(hdd_ctx,
GREEN_AP_PS_WAIT_STATE,
GREEN_AP_PS_WAIT_EVENT);
qdf_mc_timer_start(&green_ap->ps_timer,
green_ap->ps_delay_time);
}
break;
case GREEN_AP_PS_WAIT_STATE:
if (!green_ap->num_nodes) {
hdd_green_ap_update(hdd_ctx,
GREEN_AP_PS_ON_STATE,
GREEN_AP_PS_WAIT_EVENT);
hdd_green_ap_enable(adapter, 1);
if (green_ap->ps_on_time) {
hdd_green_ap_update(hdd_ctx,
0,
GREEN_AP_PS_WAIT_EVENT);
qdf_mc_timer_start(&green_ap->ps_timer,
green_ap->ps_on_time);
}
} else {
hdd_green_ap_update(hdd_ctx,
GREEN_AP_PS_OFF_STATE,
GREEN_AP_PS_WAIT_EVENT);
}
break;
case GREEN_AP_PS_ON_STATE:
if (green_ap->num_nodes) {
if (hdd_green_ap_enable(adapter, 0)) {
hdd_err("FAILED TO SET GREEN-AP mode");
goto done;
}
hdd_green_ap_update(hdd_ctx,
GREEN_AP_PS_OFF_STATE,
GREEN_AP_PS_WAIT_EVENT);
} else if ((green_ap->ps_event == GREEN_AP_PS_WAIT_EVENT)
&& (green_ap->ps_on_time)) {
/* ps_on_time timeout, switch to ps off */
hdd_green_ap_update(hdd_ctx,
GREEN_AP_PS_WAIT_STATE,
GREEN_AP_PS_ON_EVENT);
if (hdd_green_ap_enable(adapter, 0)) {
hdd_err("FAILED TO SET GREEN-AP mode");
goto done;
}
qdf_mc_timer_start(&green_ap->ps_timer,
green_ap->ps_delay_time);
}
break;
default:
hdd_err("invalid state %d", green_ap->ps_state);
hdd_green_ap_update(hdd_ctx, GREEN_AP_PS_OFF_STATE,
GREEN_AP_PS_WAIT_EVENT);
break;
}
done:
return;
}
/**
* hdd_green_ap_timer_fn() - Green AP Timer handler
* @ctx: Global HDD context
*
* Return: none
*/
static void hdd_green_ap_timer_fn(void *ctx)
{
struct hdd_context *hdd_ctx = ctx;
struct hdd_green_ap_ctx *green_ap;
if (wlan_hdd_validate_context(hdd_ctx))
return;
green_ap = hdd_ctx->green_ap_ctx;
if (green_ap)
hdd_green_ap_mc(hdd_ctx, green_ap->ps_event);
}
/**
* hdd_green_ap_attach() - Attach Green AP context to HDD context
* @hdd_ctx: Global HDD contect
*
* Return: QDF_STATUS_SUCCESS on success, otherwise QDF_STATUS_E_** error
*/
static QDF_STATUS hdd_green_ap_attach(struct hdd_context *hdd_ctx)
{
struct hdd_green_ap_ctx *green_ap;
QDF_STATUS status = QDF_STATUS_SUCCESS;
ENTER();
green_ap = qdf_mem_malloc(sizeof(*green_ap));
if (!green_ap) {
hdd_err("Memory allocation for Green-AP failed!");
status = QDF_STATUS_E_NOMEM;
goto error;
}
green_ap->ps_state = GREEN_AP_PS_OFF_STATE;
green_ap->ps_event = 0;
green_ap->num_nodes = 0;
green_ap->ps_on_time = GREEN_AP_PS_ON_TIME;
green_ap->ps_delay_time = GREEN_AP_PS_DELAY_TIME;
qdf_mc_timer_init(&green_ap->ps_timer,
QDF_TIMER_TYPE_SW,
hdd_green_ap_timer_fn, hdd_ctx);
error:
hdd_ctx->green_ap_ctx = green_ap;
EXIT();
return status;
}
/**
* hdd_green_ap_deattach() - Detach Green AP context from HDD context
* @hdd_ctx: Global HDD contect
*
* Return: QDF_STATUS_SUCCESS on success, otherwise QDF_STATUS_E_** error
*/
static QDF_STATUS hdd_green_ap_deattach(struct hdd_context *hdd_ctx)
{
struct hdd_green_ap_ctx *green_ap = hdd_ctx->green_ap_ctx;
QDF_STATUS status = QDF_STATUS_SUCCESS;
ENTER();
if (green_ap == NULL) {
hdd_debug("Green-AP is not enabled");
status = QDF_STATUS_E_NOSUPPORT;
goto done;
}
/* check if the timer status is destroyed */
if (QDF_TIMER_STATE_RUNNING ==
qdf_mc_timer_get_current_state(&green_ap->ps_timer))
qdf_mc_timer_stop(&green_ap->ps_timer);
/* Destroy the Green AP timer */
if (!QDF_IS_STATUS_SUCCESS(qdf_mc_timer_destroy(&green_ap->ps_timer)))
hdd_debug("Cannot deallocate Green-AP's timer");
/* release memory */
qdf_mem_zero(green_ap, sizeof(*green_ap));
qdf_mem_free(green_ap);
hdd_ctx->green_ap_ctx = NULL;
done:
EXIT();
return status;
}
/*
* hdd_green_ap_init() - Initialize Green AP feature
* (public function documented in wlan_hdd_green_ap.h)
*/
void hdd_green_ap_init(struct hdd_context *hdd_ctx)
{
if (!QDF_IS_STATUS_SUCCESS(hdd_green_ap_attach(hdd_ctx)))
hdd_err("Failed to allocate Green-AP resource");
}
/*
* hdd_green_ap_deinit() - De-initialize Green AP feature
* (public function documented in wlan_hdd_green_ap.h)
*/
void hdd_green_ap_deinit(struct hdd_context *hdd_ctx)
{
if (!QDF_IS_STATUS_SUCCESS(hdd_green_ap_deattach(hdd_ctx)))
hdd_err("Cannot deallocate Green-AP resource");
}
/*
* hdd_is_egap_enabled() - Get Enhance Green AP feature status
* @fw_egap_support: flag whether firmware supports egap or not
* @cfg: pointer to the struct hdd_config
*
* Return: true if firmware, feature_flag and ini are all enabled the egap
*/
static bool hdd_is_egap_enabled(bool fw_egap_support, struct hdd_config *cfg)
{
/* check if the firmware and ini are both enabled the egap,
* and also the feature_flag enable.
*/
if (fw_egap_support && cfg->enable_egap &&
cfg->egap_feature_flag)
return true;
return false;
}
/*
* hdd_enable_egap() - Enable Enhance Green AP
* @hdd_ctx: HDD global context
*
* Return: 0 on success, negative errno on failure
*/
int hdd_enable_egap(struct hdd_context *hdd_ctx)
{
struct hdd_config *cfg;
if (!hdd_ctx) {
hdd_err("hdd context is NULL");
return -EINVAL;
}
cfg = hdd_ctx->config;
if (!cfg) {
hdd_err("hdd cfg is NULL");
return -EINVAL;
}
if (!hdd_ctx->green_ap_ctx) {
hdd_err("green ap context is NULL");
return -EINVAL;
}
if (!hdd_is_egap_enabled(hdd_ctx->green_ap_ctx->egap_support,
hdd_ctx->config))
return -ENOTSUPP;
if (QDF_STATUS_SUCCESS != sme_send_egap_conf_params(cfg->enable_egap,
cfg->egap_inact_time,
cfg->egap_wait_time,
cfg->egap_feature_flag))
return -EINVAL;
return 0;
}
/*
* hdd_green_ap_start_bss() - Notify Green AP of Start BSS event
* (public function documented in wlan_hdd_green_ap.h)
*/
void hdd_green_ap_start_bss(struct hdd_context *hdd_ctx)
{
struct hdd_config *cfg;
if (!hdd_ctx) {
hdd_err("hdd context is NULL");
return;
}
cfg = hdd_ctx->config;
if (!cfg) {
hdd_err("hdd cfg is NULL");
return;
}
if (!hdd_ctx->green_ap_ctx) {
hdd_err("Green AP is not enabled. green_ap_ctx = NULL");
return;
}
if (hdd_is_egap_enabled(hdd_ctx->green_ap_ctx->egap_support,
hdd_ctx->config))
return;
if ((hdd_ctx->concurrency_mode & QDF_SAP_MASK) &&
!(hdd_ctx->concurrency_mode & (QDF_SAP_MASK)) &&
cfg->enable2x2 && cfg->enableGreenAP) {
hdd_debug("Green AP enabled - sta_con: %d, 2x2: %d, GAP: %d",
QDF_STA_MASK & hdd_ctx->concurrency_mode,
cfg->enable2x2, cfg->enableGreenAP);
hdd_green_ap_mc(hdd_ctx, GREEN_AP_PS_START_EVENT);
} else {
hdd_green_ap_mc(hdd_ctx, GREEN_AP_PS_STOP_EVENT);
hdd_debug("Green-AP: is disabled, due to sta_concurrency: %d, enable2x2: %d, enableGreenAP: %d",
QDF_STA_MASK & hdd_ctx->concurrency_mode,
cfg->enable2x2, cfg->enableGreenAP);
}
}
/*
* hdd_green_ap_stop_bss() - Notify Green AP of Stop BSS event
* (public function documented in wlan_hdd_green_ap.h)
*/
void hdd_green_ap_stop_bss(struct hdd_context *hdd_ctx)
{
struct hdd_config *cfg;
if (!hdd_ctx) {
hdd_err("hdd context is NULL");
return;
}
cfg = hdd_ctx->config;
if (!cfg) {
hdd_err("hdd cfg is NULL");
return;
}
if (!hdd_ctx->green_ap_ctx) {
hdd_err("Green AP is not enabled. green_ap_ctx = NULL");
return;
}
if (hdd_is_egap_enabled(hdd_ctx->green_ap_ctx->egap_support,
hdd_ctx->config))
return;
/* For AP+AP mode, only trigger GREEN_AP_PS_STOP_EVENT, when the
* last AP stops.
*/
if (1 == (hdd_ctx->no_of_open_sessions[QDF_SAP_MODE]))
hdd_green_ap_mc(hdd_ctx, GREEN_AP_PS_STOP_EVENT);
}
/*
* hdd_green_ap_add_sta() - Notify Green AP of Add Station event
* (public function documented in wlan_hdd_green_ap.h)
*/
void hdd_green_ap_add_sta(struct hdd_context *hdd_ctx)
{
struct hdd_config *cfg;
if (!hdd_ctx) {
hdd_err("hdd context is NULL");
return;
}
cfg = hdd_ctx->config;
if (!cfg) {
hdd_err("hdd cfg is NULL");
return;
}
if (!hdd_ctx->green_ap_ctx) {
hdd_err("Green AP is not enabled. green_ap_ctx = NULL");
return;
}
if (hdd_is_egap_enabled(hdd_ctx->green_ap_ctx->egap_support,
hdd_ctx->config))
return;
hdd_green_ap_mc(hdd_ctx, GREEN_AP_ADD_STA_EVENT);
}
/*
* hdd_green_ap_del_sta() - Notify Green AP of Delete Station event
* (public function documented in wlan_hdd_green_ap.h)
*/
void hdd_green_ap_del_sta(struct hdd_context *hdd_ctx)
{
struct hdd_config *cfg;
if (!hdd_ctx) {
hdd_err("hdd context is NULL");
return;
}
cfg = hdd_ctx->config;
if (!cfg) {
hdd_err("hdd cfg is NULL");
return;
}
if (!hdd_ctx->green_ap_ctx) {
hdd_err("Green AP is not enabled. green_ap_ctx = NULL");
return;
}
if (hdd_is_egap_enabled(hdd_ctx->green_ap_ctx->egap_support,
hdd_ctx->config))
return;
hdd_green_ap_mc(hdd_ctx, GREEN_AP_DEL_STA_EVENT);
}
/*
* hdd_green_ap_target_config() - Handle Green AP target configuration
* (public function documented in wlan_hdd_green_ap.h)
*
* Implementation notes:
* Target indicates whether or not Enhanced Green AP (EGAP) is supported
*/
void hdd_green_ap_target_config(struct hdd_context *hdd_ctx,
struct wma_tgt_cfg *target_config)
{
struct hdd_green_ap_ctx *green_ap = hdd_ctx->green_ap_ctx;
green_ap->egap_support = target_config->egap_support;
}

View File

@ -1,125 +0,0 @@
/*
* Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* This file was originally distributed by Qualcomm Atheros, Inc.
* under proprietary terms before Copyright ownership was assigned
* to the Linux Foundation.
*/
#ifndef __WLAN_HDD_GREEN_AP_H
#define __WLAN_HDD_GREEN_AP_H
/**
* DOC: wlan_hdd_green_ap.h
*
* WLAN Host Device Driver Green AP API specification
*/
struct hdd_context;
struct wma_tgt_cfg;
#ifdef FEATURE_GREEN_AP
/**
* hdd_green_ap_init() - Initialize Green AP feature
* @hdd_ctx: HDD global context
*
* Return: none
*/
void hdd_green_ap_init(struct hdd_context *hdd_ctx);
/**
* hdd_green_ap_deinit() - De-initialize Green AP feature
* @hdd_ctx: HDD global context
*
* Return: none
*/
void hdd_green_ap_deinit(struct hdd_context *hdd_ctx);
/**
* hdd_green_ap_start_bss() - Notify Green AP of Start BSS event
* @hdd_ctx: HDD global context
*
* Return: none
*/
void hdd_green_ap_start_bss(struct hdd_context *hdd_ctx);
/**
* hdd_green_ap_stop_bss() - Notify Green AP of Stop BSS event
* @hdd_ctx: HDD global context
*
* Return: none
*/
void hdd_green_ap_stop_bss(struct hdd_context *hdd_ctx);
/**
* hdd_green_ap_add_sta() - Notify Green AP of Add Station event
* @hdd_ctx: HDD global context
*
* Return: none
*/
void hdd_green_ap_add_sta(struct hdd_context *hdd_ctx);
/**
* hdd_green_ap_del_sta() - Notify Green AP of Delete Station event
* @hdd_ctx: HDD global context
*
* Return: none
*/
void hdd_green_ap_del_sta(struct hdd_context *hdd_ctx);
/**
* hdd_enable_egap() - Enable Enhance Green AP
* @hdd_ctx: HDD global context
*
* Return: 0 on success, negative errno on failure
*/
int hdd_enable_egap(struct hdd_context *hdd_ctx);
/**
* hdd_green_ap_target_config() - Handle Green AP target configuration
* @hdd_ctx: HDD global context where Green AP information is stored
* @target_config: Target configuration containing Green AP info
*
* This function updates the HDD context with Green AP-specific
* information provided by the target.
*
* Return: none
*/
void hdd_green_ap_target_config(struct hdd_context *hdd_ctx,
struct wma_tgt_cfg *target_config);
#else
static inline void hdd_green_ap_init(struct hdd_context *hdd_ctx) {}
static inline void hdd_green_ap_deinit(struct hdd_context *hdd_ctx) {}
static inline void hdd_green_ap_start_bss(struct hdd_context *hdd_ctx) {}
static inline void hdd_green_ap_stop_bss(struct hdd_context *hdd_ctx) {}
static inline void hdd_green_ap_add_sta(struct hdd_context *hdd_ctx) {}
static inline void hdd_green_ap_del_sta(struct hdd_context *hdd_ctx) {}
static inline int hdd_enable_egap(struct hdd_context *hdd_ctx)
{
return -EINVAL;
}
static inline void hdd_green_ap_target_config(struct hdd_context *hdd_ctx,
struct wma_tgt_cfg *target_config)
{
}
#endif /* FEATURE_GREEN_AP */
#endif /* __WLAN_HDD_GREEN_AP_H */

View File

@ -75,7 +75,6 @@
#include "wlan_hdd_cfg.h"
#include "wlan_policy_mgr_api.h"
#include "wlan_hdd_tsf.h"
#include "wlan_hdd_green_ap.h"
#include <cdp_txrx_misc.h>
#include "wlan_hdd_power.h"
#include "wlan_hdd_object_manager.h"
@ -89,6 +88,7 @@
#include "wlan_utility.h"
#include <wlan_p2p_ucfg_api.h>
#include "sir_api.h"
#include <wlan_green_ap_ucfg_api.h>
#define IS_UP(_dev) \
(((_dev)->flags & (IFF_RUNNING|IFF_UP)) == (IFF_RUNNING|IFF_UP))
@ -2243,7 +2243,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
hdd_err("Peer object "MAC_ADDRESS_STR" add fails!",
MAC_ADDR_ARRAY(event->staMac.bytes));
hdd_green_ap_add_sta(hdd_ctx);
wlan_green_ap_add_sta(hdd_ctx->hdd_pdev);
break;
case eSAP_STA_DISASSOC_EVENT:
@ -2372,7 +2372,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
hdd_bus_bw_compute_timer_try_stop(hdd_ctx);
}
#endif
hdd_green_ap_del_sta(hdd_ctx);
wlan_green_ap_del_sta(hdd_ctx->hdd_pdev);
break;
case eSAP_WPS_PBC_PROBE_REQ_EVENT:
@ -8356,8 +8356,26 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
return ret;
if (adapter->device_mode == QDF_SAP_MODE) {
uint8_t num_sessions;
wlan_hdd_del_station(adapter);
hdd_green_ap_stop_bss(hdd_ctx);
/*
* For AP+AP mode, only trigger GREEN_AP_PS_STOP_EVENT, when the
* last AP stops.
*/
status = policy_mgr_mode_specific_num_open_sessions(
hdd_ctx->hdd_psoc, QDF_SAP_MODE, &num_sessions);
if (status == QDF_STATUS_SUCCESS) {
if (num_sessions == 1) {
hdd_debug("Disabling Green AP");
ucfg_green_ap_set_ps_config(hdd_ctx->hdd_pdev,
false);
wlan_green_ap_stop(hdd_ctx->hdd_pdev);
}
} else {
hdd_err("Failed to get num open sessions for QDF_SAP_MODE");
}
}
cds_flush_work(&adapter->sap_stop_bss_work);
@ -8601,6 +8619,8 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
int status;
struct sme_sta_inactivity_timeout *sta_inactivity_timer;
uint8_t channel;
bool is_enabled = false;
uint8_t ret;
ENTER();
@ -8715,8 +8735,17 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
}
}
if (QDF_SAP_MODE == adapter->device_mode)
hdd_green_ap_start_bss(hdd_ctx);
ret = hdd_check_green_ap_enable(hdd_ctx, &is_enabled);
if (!ret) {
hdd_debug("Green AP enable status: %d", is_enabled);
if (is_enabled) {
hdd_debug("Enabling Green AP");
ucfg_green_ap_set_ps_config(hdd_ctx->hdd_pdev, true);
wlan_green_ap_start(hdd_ctx->hdd_pdev);
}
} else {
hdd_err("Failed to check if Green AP should be enabled or not");
}
if (adapter->device_mode == QDF_P2P_GO_MODE) {
struct hdd_adapter *p2p_adapter;

View File

@ -103,7 +103,6 @@
#include "wma.h"
#include "wlan_policy_mgr_api.h"
#include "wlan_hdd_tsf.h"
#include "wlan_hdd_green_ap.h"
#include "bmi.h"
#include <wlan_hdd_regulatory.h>
#include "wlan_hdd_lpass.h"
@ -136,6 +135,8 @@
#endif
#include "wlan_reg_ucfg_api.h"
#include <wlan_green_ap_ucfg_api.h>
#ifdef MODULE
#define WLAN_MODULE_NAME module_name(THIS_MODULE)
#else
@ -272,6 +273,7 @@ static const struct category_info cinfo[MAX_SUPPORTED_CATEGORY] = {
[QDF_MODULE_ID_DFS] = {QDF_TRACE_LEVEL_ALL},
[QDF_MODULE_ID_OBJ_MGR] = {QDF_TRACE_LEVEL_ALL},
[QDF_MODULE_ID_ROAM_DEBUG] = {QDF_TRACE_LEVEL_ALL},
[QDF_MODULE_ID_GREEN_AP] = {QDF_TRACE_LEVEL_ALL},
};
int limit_off_chan_tbl[HDD_MAX_AC][HDD_MAX_OFF_CHAN_ENTRIES] = {
@ -1742,6 +1744,49 @@ static void hdd_update_ra_rate_limit(struct hdd_context *hdd_ctx,
}
#endif
uint8_t hdd_check_green_ap_enable(struct hdd_context *hdd_ctx,
bool *is_enabled)
{
struct hdd_config *cfg;
uint32_t concurrency_mode;
cfg = hdd_ctx->config;
if (!cfg) {
hdd_err("NULL hdd config");
return -EINVAL;
}
concurrency_mode = policy_mgr_get_concurrency_mode(hdd_ctx->hdd_psoc);
if (cfg->enable2x2 && cfg->enableGreenAP) {
if ((concurrency_mode & (1 << QDF_SAP_MODE)) &&
!(concurrency_mode & (~(1 << QDF_SAP_MODE))))
*is_enabled = true;
}
return 0;
}
static int hdd_update_green_ap_config(struct hdd_context *hdd_ctx)
{
struct green_ap_user_cfg green_ap_cfg;
struct hdd_config *cfg = hdd_ctx->config;
QDF_STATUS status;
green_ap_cfg.host_enable_egap = cfg->enable_egap;
green_ap_cfg.egap_inactivity_time = cfg->egap_inact_time;
green_ap_cfg.egap_wait_time = cfg->egap_wait_time;
green_ap_cfg.egap_feature_flags = cfg->egap_feature_flag;
status = ucfg_green_ap_update_user_config(hdd_ctx->hdd_pdev,
&green_ap_cfg);
if (status != QDF_STATUS_SUCCESS) {
hdd_err("failed to update green ap user configuration");
return -EINVAL;
}
return 0;
}
void hdd_update_tgt_cfg(void *context, void *param)
{
int ret;
@ -1760,6 +1805,8 @@ void hdd_update_tgt_cfg(void *context, void *param)
hdd_ctx->hdd_pdev->pdev_objmgr.wlan_pdev_id);
}
ret = hdd_update_green_ap_config(hdd_ctx);
if (cds_cfg) {
if (hdd_ctx->config->enable_sub_20_channel_width !=
WLAN_SUB_20_CH_WIDTH_NONE && !cfg->sub_20_support) {
@ -1831,7 +1878,7 @@ 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);
hdd_green_ap_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);
@ -3694,6 +3741,10 @@ QDF_STATUS hdd_init_station_mode(struct hdd_adapter *adapter)
}
hdd_conn_set_connection_state(adapter, eConnectionState_NotConnected);
hdd_debug("Disabling Green AP");
ucfg_green_ap_set_ps_config(hdd_ctx->hdd_pdev, false);
wlan_green_ap_stop(hdd_ctx->hdd_pdev);
qdf_mem_set(sta_ctx->conn_info.staId,
sizeof(sta_ctx->conn_info.staId), HDD_WLAN_INVALID_STA_ID);
@ -4563,6 +4614,8 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
tSirUpdateIE updateIE;
unsigned long rc;
tsap_Config_t *sap_config;
bool is_enabled = false;
uint8_t ret;
ENTER();
@ -4667,8 +4720,20 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
return QDF_STATUS_E_FAILURE;
}
hdd_vdev_destroy(adapter);
ret = hdd_check_green_ap_enable(hdd_ctx, &is_enabled);
if (!ret) {
hdd_debug("Green AP enable status: %d", is_enabled);
if (is_enabled) {
hdd_debug("Enabling Green AP");
ucfg_green_ap_set_ps_config(hdd_ctx->hdd_pdev,
true);
wlan_green_ap_start(hdd_ctx->hdd_pdev);
}
} else {
hdd_err("Failed to check if Green AP should be enabled or not");
}
hdd_vdev_destroy(adapter);
break;
case QDF_SAP_MODE:
@ -6268,7 +6333,6 @@ static void hdd_wlan_exit(struct hdd_context *hdd_ctx)
* that requires pMac access after this.
*/
hdd_green_ap_deinit(hdd_ctx);
hdd_request_manager_deinit();
hdd_ipa_cleanup(hdd_ctx);
@ -9818,7 +9882,7 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter)
goto cds_disable;
}
if (hdd_enable_egap(hdd_ctx))
if (ucfg_green_ap_enable_egap(hdd_ctx->hdd_pdev))
hdd_debug("enhance green ap is not enabled");
if (0 != wlan_hdd_set_wow_pulse(hdd_ctx, true))
@ -10238,7 +10302,6 @@ int hdd_wlan_startup(struct device *dev)
#endif
hdd_request_manager_init();
hdd_green_ap_init(hdd_ctx);
hdd_driver_memdump_init();
@ -10356,7 +10419,6 @@ err_stop_modules:
err_memdump_deinit:
hdd_driver_memdump_deinit();
hdd_green_ap_deinit(hdd_ctx);
hdd_request_manager_deinit();
hdd_exit_netlink_services(hdd_ctx);

View File

@ -6432,23 +6432,6 @@ struct stsf {
uint32_t soc_timer_high;
};
/**
* struct egap_params - the enhanced green ap params
* @vdev_id: vdev id
* @enable: enable or disable the enhance green ap in firmware
* @inactivity_time: inactivity timeout value
* @wait_time: wait timeout value
* @flags: feature flag in bitmask
*
*/
struct egap_conf_params {
uint32_t vdev_id;
bool enable;
uint32_t inactivity_time;
uint32_t wait_time;
uint32_t flags;
};
#define SIR_BCN_FLT_MAX_ELEMS_IE_LIST 8
/**
* struct beacon_filter_param - parameters for beacon filtering

View File

@ -1240,21 +1240,6 @@ QDF_STATUS sme_gateway_param_update(tHalHandle hHal,
struct gateway_param_update_req *request);
#endif
#ifdef FEATURE_GREEN_AP
QDF_STATUS sme_send_egap_conf_params(uint32_t enable,
uint32_t inactivity_time,
uint32_t wait_time,
uint32_t flags);
#else
static inline QDF_STATUS sme_send_egap_conf_params(uint32_t enable,
uint32_t inactivity_time,
uint32_t wait_time,
uint32_t flags)
{
return QDF_STATUS_E_NOSUPPORT;
}
#endif
void sme_update_fine_time_measurement_capab(tHalHandle hal, uint8_t session_id,
uint32_t val);
QDF_STATUS sme_ht40_stop_obss_scan(tHalHandle hHal, uint32_t vdev_id);

View File

@ -13808,48 +13808,6 @@ void sme_get_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset,
}
#endif
#ifdef FEATURE_GREEN_AP
/**
* sme_send_egap_conf_params() - set the enhanced green ap configuration params
* @enable: enable/disable the enhanced green ap feature
* @inactivity_time: inactivity timeout value
* @wait_time: wait timeout value
* @flag: feature flag in bitmasp
*
* Return: Return QDF_STATUS, otherwise appropriate failure code
*/
QDF_STATUS sme_send_egap_conf_params(uint32_t enable, uint32_t inactivity_time,
uint32_t wait_time, uint32_t flags)
{
struct scheduler_msg message = {0};
QDF_STATUS status;
struct egap_conf_params *egap_params;
egap_params = qdf_mem_malloc(sizeof(*egap_params));
if (NULL == egap_params) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
"%s: fail to alloc egap_params", __func__);
return QDF_STATUS_E_NOMEM;
}
egap_params->enable = enable;
egap_params->inactivity_time = inactivity_time;
egap_params->wait_time = wait_time;
egap_params->flags = flags;
message.type = WMA_SET_EGAP_CONF_PARAMS;
message.bodyptr = egap_params;
status = scheduler_post_msg(QDF_MODULE_ID_WMA, &message);
if (!QDF_IS_STATUS_SUCCESS(status)) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
"%s: Not able to post msg to WMA!", __func__);
qdf_mem_free(egap_params);
}
return status;
}
#endif
/**
* sme_set_fw_test() - set fw test
* @fw_test: fw test param

View File

@ -1427,7 +1427,7 @@ typedef struct {
uint8_t lpss_support;
#endif
uint8_t ap_arpns_support;
#ifdef FEATURE_GREEN_AP
#ifdef WLAN_SUPPORT_GREEN_AP
bool egap_support;
#endif
bool wmi_ready;

View File

@ -212,20 +212,13 @@ 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 FEATURE_GREEN_AP
#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);
QDF_STATUS wma_send_egap_conf_params(WMA_HANDLE handle,
struct egap_conf_params *egap_params);
#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) {}
static inline QDF_STATUS wma_send_egap_conf_params(WMA_HANDLE handle,
struct egap_conf_params *egap_params)
{
return QDF_STATUS_E_NOSUPPORT;
}
#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);

View File

@ -175,7 +175,7 @@ struct wma_tgt_cfg {
uint8_t lpss_support;
#endif
uint8_t ap_arpns_support;
#ifdef FEATURE_GREEN_AP
#ifdef WLAN_SUPPORT_GREEN_AP
bool egap_support;
#endif
uint32_t fine_time_measurement_cap;

View File

@ -1054,7 +1054,7 @@ QDF_STATUS wma_send_dbs_scan_selection_params(WMA_HANDLE handle,
return QDF_STATUS_SUCCESS;
}
#ifdef FEATURE_GREEN_AP
#ifdef WLAN_SUPPORT_GREEN_AP
/**
* wma_egap_info_status_event() - egap info status event
@ -1090,31 +1090,6 @@ static int wma_egap_info_status_event(void *handle, u_int8_t *event,
return 0;
}
/**
* wma_send_egap_conf_params() - send wmi cmd of egap configuration params
* @wma_handle: wma handler
* @egap_params: pointer to egap_params
*
* Return: 0 for success, otherwise appropriate error code
*/
QDF_STATUS wma_send_egap_conf_params(WMA_HANDLE handle,
struct egap_conf_params *egap_params)
{
tp_wma_handle wma_handle = (tp_wma_handle) handle;
wmi_ap_ps_egap_param_cmd_fixed_param cmd = {0};
int32_t err;
cmd.enable = egap_params->enable;
cmd.inactivity_time = egap_params->inactivity_time;
cmd.wait_time = egap_params->wait_time;
cmd.flags = egap_params->flags;
err = wmi_unified_egap_conf_params_cmd(wma_handle->wmi_handle, &cmd);
if (err)
return QDF_STATUS_E_FAILURE;
return QDF_STATUS_SUCCESS;
}
/**
* wma_setup_egap_support() - setup the EGAP support flag
* @tgt_cfg: pointer to hdd target configuration
@ -1158,7 +1133,7 @@ void wma_register_egap_event_handle(WMA_HANDLE handle)
} else
wma_handle->egap_support = false;
}
#endif /* FEATURE_GREEN_AP */
#endif /* WLAN_SUPPORT_GREEN_AP */
/**
* wma_unified_fw_profiling_cmd() - send FW profiling cmd to WLAN FW

View File

@ -7888,11 +7888,6 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
(struct gateway_param_update_req *)msg->bodyptr);
qdf_mem_free(msg->bodyptr);
break;
case WMA_SET_EGAP_CONF_PARAMS:
wma_send_egap_conf_params(wma_handle,
(struct egap_conf_params *)msg->bodyptr);
qdf_mem_free(msg->bodyptr);
break;
case WMA_SET_ADAPT_DWELLTIME_CONF_PARAMS:
wma_send_adapt_dwelltime_params(wma_handle,
(struct adaptive_dwelltime_params *)msg->bodyptr);