summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/mac/src/pe/include/lim_session.h3
-rw-r--r--core/mac/src/pe/lim/lim_process_sme_req_messages.c5
-rw-r--r--core/mac/src/pe/lim/lim_send_sme_rsp_messages.c3
-rw-r--r--core/mac/src/pe/lim/lim_session.c5
4 files changed, 15 insertions, 1 deletions
diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h
index 74188d03867d..4287b55930b9 100644
--- a/core/mac/src/pe/include/lim_session.h
+++ b/core/mac/src/pe/include/lim_session.h
@@ -94,7 +94,8 @@ typedef struct sPESession /* Added to Support BT-AMP */
uint16_t peSessionId;
uint8_t smeSessionId;
uint16_t transactionId;
-
+ qdf_wake_lock_t ap_ecsa_wakelock;
+ qdf_runtime_lock_t ap_ecsa_runtime_lock;
/* In AP role: BSSID and selfMacAddr will be the same. */
/* In STA role: they will be different */
tSirMacAddr bssId;
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index 37f0f62ab5c5..1aebd0ac2253 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -6011,6 +6011,8 @@ void lim_send_chan_switch_action_frame(tpAniSirGlobal mac_ctx,
}
+#define MAX_WAKELOCK_FOR_CSA 5000
+
/**
* lim_process_sme_dfs_csa_ie_request() - process sme dfs csa ie req
*
@@ -6130,6 +6132,9 @@ static void lim_process_sme_dfs_csa_ie_request(tpAniSirGlobal mac_ctx,
dfs_csa_ie_req->ch_params.center_freq_seg0;
skip_vht:
/* Send CSA IE request from here */
+ qdf_wake_lock_timeout_acquire(&session_entry->ap_ecsa_wakelock,
+ MAX_WAKELOCK_FOR_CSA);
+ qdf_runtime_pm_prevent_suspend(&session_entry->ap_ecsa_runtime_lock);
lim_send_dfs_chan_sw_ie_update(mac_ctx, session_entry);
if (dfs_csa_ie_req->ch_params.ch_width == CH_WIDTH_80MHZ)
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index 3daffcbd866f..7958083003ea 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -2519,6 +2519,9 @@ lim_send_sme_ap_channel_switch_resp(tpAniSirGlobal pMac,
enum phy_ch_width ch_width;
uint8_t ch_center_freq_seg1;
+ qdf_runtime_pm_allow_suspend(&psessionEntry->ap_ecsa_runtime_lock);
+ qdf_wake_lock_release(&psessionEntry->ap_ecsa_wakelock, 0);
+
pSmeSwithChnlParams = (tSwitchChannelParams *)
qdf_mem_malloc(sizeof(tSwitchChannelParams));
if (NULL == pSmeSwithChnlParams) {
diff --git a/core/mac/src/pe/lim/lim_session.c b/core/mac/src/pe/lim/lim_session.c
index 7f9e83624d68..2d8309be693f 100644
--- a/core/mac/src/pe/lim/lim_session.c
+++ b/core/mac/src/pe/lim/lim_session.c
@@ -509,6 +509,9 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId,
}
if (status != QDF_STATUS_SUCCESS)
pe_err("cannot create or start protectionFieldsResetTimer");
+ qdf_wake_lock_create(&session_ptr->ap_ecsa_wakelock,
+ "ap_ecsa_wakelock");
+ qdf_runtime_lock_init(&session_ptr->ap_ecsa_runtime_lock);
status = qdf_mc_timer_init(&session_ptr->ap_ecsa_timer,
QDF_TIMER_TYPE_WAKE_APPS, lim_process_ap_ecsa_timeout,
(void *)&pMac->lim.gpSession[i]);
@@ -686,6 +689,8 @@ void pe_delete_session(tpAniSirGlobal mac_ctx, tpPESession session)
session->dfsIncludeChanSwIe = 0;
qdf_mc_timer_stop(&session->ap_ecsa_timer);
qdf_mc_timer_destroy(&session->ap_ecsa_timer);
+ qdf_runtime_lock_deinit(&session->ap_ecsa_runtime_lock);
+ qdf_wake_lock_destroy(&session->ap_ecsa_wakelock);
lim_del_pmf_sa_query_timer(mac_ctx, session);
}