From 12a7179b7d810f2fec7705b4d67ee7bce801c764 Mon Sep 17 00:00:00 2001 From: Deeksha Gupta Date: Mon, 8 Mar 2021 21:13:43 +0530 Subject: [PATCH] qcacld-3.0: Update the P2P restart roc timer duration In off channel P2P GO neg resp tx frame, supplicant sends roc duration (suppose 100ms) to sends the frame and as this is not sufficient to receive the GO confimation frame, driver internally adds 500ms more duration. So, new roc duration is 600ms (100+500). But currently, restart of the roc timer happens with old roc duration instead of newly calculated roc. Send the extended roc timer duration in restart roc timer to fix this. Change-Id: I1238d69d1d8b03578d74ef6ad0895f11cfac0178 CRs-Fixed: 2890951 --- components/p2p/core/src/wlan_p2p_off_chan_tx.c | 4 +++- components/p2p/core/src/wlan_p2p_roc.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/p2p/core/src/wlan_p2p_off_chan_tx.c b/components/p2p/core/src/wlan_p2p_off_chan_tx.c index bbd56c066998..71cf3b1a9cba 100644 --- a/components/p2p/core/src/wlan_p2p_off_chan_tx.c +++ b/components/p2p/core/src/wlan_p2p_off_chan_tx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -2867,6 +2867,8 @@ QDF_STATUS p2p_process_mgmt_tx(struct tx_action_context *tx_ctx) return QDF_STATUS_SUCCESS; } else if (curr_roc_ctx->roc_state == ROC_STATE_ON_CHAN) { p2p_adjust_tx_wait(tx_ctx); + if (curr_roc_ctx->duration < tx_ctx->duration) + curr_roc_ctx->duration = tx_ctx->duration; status = p2p_restart_roc_timer(curr_roc_ctx); curr_roc_ctx->tx_ctx = tx_ctx; if (status != QDF_STATUS_SUCCESS) { diff --git a/components/p2p/core/src/wlan_p2p_roc.c b/components/p2p/core/src/wlan_p2p_roc.c index 517a234f86d6..62ae30badbae 100644 --- a/components/p2p/core/src/wlan_p2p_roc.c +++ b/components/p2p/core/src/wlan_p2p_roc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -670,7 +670,7 @@ QDF_STATUS p2p_restart_roc_timer(struct p2p_roc_context *roc_ctx) if (QDF_TIMER_STATE_RUNNING == qdf_mc_timer_get_current_state(&roc_ctx->roc_timer)) { - p2p_debug("roc timer is running"); + p2p_debug("roc restart duration:%d", roc_ctx->duration); status = qdf_mc_timer_stop_sync(&roc_ctx->roc_timer); if (status != QDF_STATUS_SUCCESS) { p2p_err("Failed to stop roc timer");