From 697aacf6856dffaef505fca7b55cb845d0e2a118 Mon Sep 17 00:00:00 2001 From: Soumya Bhat Date: Tue, 16 Jan 2018 14:26:53 +0530 Subject: [PATCH] qcacmn: Change to config PS transition time in seconds In current code GreenAP transition time is being set in milliseconds. Add change to configure PS transition time in seconds. Change-Id: Ic42b1f40851966e6e0f4f613de06fdf50ec2d7cc CRs-Fixed: 2142183 --- umac/green_ap/core/src/wlan_green_ap_main.c | 18 +++++++++--------- .../dispatcher/src/wlan_green_ap_api.c | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/umac/green_ap/core/src/wlan_green_ap_main.c b/umac/green_ap/core/src/wlan_green_ap_main.c index 542069c3d75a..c0cabd278eb1 100644 --- a/umac/green_ap/core/src/wlan_green_ap_main.c +++ b/umac/green_ap/core/src/wlan_green_ap_main.c @@ -230,7 +230,7 @@ QDF_STATUS wlan_green_ap_state_mc(struct wlan_pdev_green_ap_ctx *green_ap_ctx, WLAN_GREEN_AP_PS_WAIT_STATE, WLAN_GREEN_AP_PS_WAIT_EVENT); qdf_timer_start(&green_ap_ctx->ps_timer, - green_ap_ctx->ps_trans_time); + green_ap_ctx->ps_trans_time * 1000); } break; @@ -242,19 +242,19 @@ QDF_STATUS wlan_green_ap_state_mc(struct wlan_pdev_green_ap_ctx *green_ap_ctx, WLAN_GREEN_AP_PS_WAIT_STATE, WLAN_GREEN_AP_PS_WAIT_EVENT); qdf_timer_start(&green_ap_ctx->ps_timer, - green_ap_ctx->ps_trans_time); + green_ap_ctx->ps_trans_time * 1000); } break; case WLAN_GREEN_AP_PS_WAIT_STATE: if (!green_ap_ctx->num_nodes) { if ((channel == 0) || (channel_flags == 0)) { - /* - * Stay in the current state and restart the - * timer to check later. - */ + /* + * Stay in the current state and restart the + * timer to check later. + */ qdf_timer_start(&green_ap_ctx->ps_timer, - green_ap_ctx->ps_on_time); + green_ap_ctx->ps_on_time * 1000); } else { wlan_green_ap_ps_event_state_update( green_ap_ctx, @@ -268,7 +268,7 @@ QDF_STATUS wlan_green_ap_state_mc(struct wlan_pdev_green_ap_ctx *green_ap_ctx, if (green_ap_ctx->ps_on_time) qdf_timer_start(&green_ap_ctx->ps_timer, - green_ap_ctx->ps_on_time); + green_ap_ctx->ps_on_time * 1000); } } else { green_ap_info("Transition to OFF from WAIT"); @@ -312,7 +312,7 @@ QDF_STATUS wlan_green_ap_state_mc(struct wlan_pdev_green_ap_ctx *green_ap_ctx, wlan_green_ap_ant_ps_reset(green_ap_ctx); green_ap_info("Transition to WAIT from ON\n"); qdf_timer_start(&green_ap_ctx->ps_timer, - green_ap_ctx->ps_trans_time); + green_ap_ctx->ps_trans_time * 1000); } break; diff --git a/umac/green_ap/dispatcher/src/wlan_green_ap_api.c b/umac/green_ap/dispatcher/src/wlan_green_ap_api.c index d396e89d178a..2c407e2c0f3b 100644 --- a/umac/green_ap/dispatcher/src/wlan_green_ap_api.c +++ b/umac/green_ap/dispatcher/src/wlan_green_ap_api.c @@ -81,8 +81,8 @@ static QDF_STATUS wlan_green_ap_pdev_obj_create_notification( green_ap_ctx->ps_state = WLAN_GREEN_AP_PS_IDLE_STATE; green_ap_ctx->ps_event = WLAN_GREEN_AP_PS_WAIT_EVENT; green_ap_ctx->num_nodes = 0; - green_ap_ctx->ps_on_time = WLAN_GREEN_AP_PS_ON_TIME * 1000; - green_ap_ctx->ps_trans_time = WLAN_GREEN_AP_PS_TRANS_TIME * 1000; + green_ap_ctx->ps_on_time = WLAN_GREEN_AP_PS_ON_TIME; + green_ap_ctx->ps_trans_time = WLAN_GREEN_AP_PS_TRANS_TIME; green_ap_ctx->pdev = pdev;