From eca7cd938970954e3f50164eabd4100d64b3a005 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Mon, 20 Jan 2020 11:22:01 +0530 Subject: [PATCH] qcacld-3.0: Remove suspend if off-channel logic during connect Remove the unused suspend check is_lim_session_off_channel() logic which is not been used. Change-Id: Ie16475b324f7ba94b23a21c122865b742cace57b CRs-Fixed: 2606230 --- .../src/pe/lim/lim_process_mlm_req_messages.c | 59 +++++-------------- core/mac/src/pe/lim/lim_session_utils.c | 36 +---------- core/mac/src/pe/lim/lim_session_utils.h | 3 +- 3 files changed, 18 insertions(+), 80 deletions(-) diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c index c0e03a3d67f5..eea91ba356a4 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c @@ -370,10 +370,8 @@ failure: /** * lim_process_mlm_post_join_suspend_link() - This function is called after the * suspend link while joining off channel. - * * @mac_ctx: Pointer to Global MAC structure - * @status: status of suspend link. - * @ctx: passed while calling suspend link(session) + * @session: session * * This function does following: * Check for suspend state. @@ -386,15 +384,10 @@ failure: */ static void lim_process_mlm_post_join_suspend_link(struct mac_context *mac_ctx, - QDF_STATUS status, - uint32_t *ctx) + struct pe_session *session) { - struct pe_session *session = (struct pe_session *) ctx; + QDF_STATUS status; - if (QDF_STATUS_SUCCESS != status) { - pe_err("Sessionid %d Suspend link(NOTIFY_BSS) failed. Still proceeding with join", - session->peSessionId); - } lim_deactivate_and_change_timer(mac_ctx, eLIM_JOIN_FAIL_TIMER); /* assign appropriate sessionId to the timer object */ @@ -456,43 +449,23 @@ void lim_process_mlm_join_req(struct mac_context *mac_ctx, (mlm_join_req->bssDescription.capabilityInfo) != SIR_MAC_GET_IBSS(mlm_join_req->bssDescription. capabilityInfo))) { - /* Hold onto Join request parameters */ - session->pLimMlmJoinReq = mlm_join_req; - if (is_lim_session_off_channel(mac_ctx, sessionid)) { - pe_debug("SessionId:%d LimSession is on OffChannel", - sessionid); - /* suspend link */ - pe_debug("Suspend link, sessionid %d is off channel", - sessionid); - lim_process_mlm_post_join_suspend_link(mac_ctx, - QDF_STATUS_SUCCESS, (uint32_t *)session); - } else { - pe_debug("No need to Suspend link"); - /* - * No need to Suspend link as LimSession is not - * off channel, calling - * lim_process_mlm_post_join_suspend_link with - * status as SUCCESS. - */ - pe_debug("SessionId:%d Join req on current chan", - sessionid); - lim_process_mlm_post_join_suspend_link(mac_ctx, - QDF_STATUS_SUCCESS, (uint32_t *)session); - } + pe_debug("vdev_id:%d Join req on current freq %d", + session->vdev_id, session->curr_op_freq); + lim_process_mlm_post_join_suspend_link(mac_ctx, session); return; - } else { - /** - * Should not have received JOIN req in states other than - * Idle state or on AP. - * Return join confirm with invalid parameters code. - */ - pe_err("Session:%d Unexpected Join req, role %d state %X", - session->peSessionId, GET_LIM_SYSTEM_ROLE(session), - session->limMlmState); - lim_print_mlm_state(mac_ctx, LOGE, session->limMlmState); } + /** + * Should not have received JOIN req in states other than + * Idle state or on AP. + * Return join confirm with invalid parameters code. + */ + pe_err("Session:%d Unexpected Join req, role %d state %X", + session->peSessionId, GET_LIM_SYSTEM_ROLE(session), + session->limMlmState); + lim_print_mlm_state(mac_ctx, LOGE, session->limMlmState); + error: qdf_mem_free(mlm_join_req); if (session) diff --git a/core/mac/src/pe/lim/lim_session_utils.c b/core/mac/src/pe/lim/lim_session_utils.c index f7288b6cf955..64d99d21237b 100644 --- a/core/mac/src/pe/lim/lim_session_utils.c +++ b/core/mac/src/pe/lim/lim_session_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2020 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 @@ -32,40 +32,6 @@ #include "lim_session_utils.h" #include "lim_utils.h" -/** - * is_lim_session_off_channel() - checks if any other off channel session exists - * @mac_ctx: Global MAC context. - * @sessionId: PE session ID. - * - * Return: This function returns true if the session Id passed needs to be on - * a different channel than atleast one session already active. - **/ -uint8_t is_lim_session_off_channel(struct mac_context *mac_ctx, uint8_t session_id) -{ - uint8_t i; - - if (session_id >= mac_ctx->lim.maxBssId) { - pe_warn("Invalid session_id: %d", session_id); - return false; - } - - for (i = 0; i < mac_ctx->lim.maxBssId; i++) { - /* Skip the session_id that is to be joined. */ - if (i == session_id) - continue; - /* - * if another session is valid and it is on different channel - * then it is an off channel operation. - */ - if ((mac_ctx->lim.gpSession[i].valid) && - (mac_ctx->lim.gpSession[i].curr_op_freq != - mac_ctx->lim.gpSession[session_id].curr_op_freq)) - return true; - } - return false; - -} - /** * lim_is_chan_switch_running() - check if channel switch is happening * @mac_ctx: Global MAC context. diff --git a/core/mac/src/pe/lim/lim_session_utils.h b/core/mac/src/pe/lim/lim_session_utils.h index 59771b378b54..3079f655db29 100644 --- a/core/mac/src/pe/lim/lim_session_utils.h +++ b/core/mac/src/pe/lim/lim_session_utils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015, 2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2015, 2018, 2020 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 @@ -19,7 +19,6 @@ #if !defined(__LIM_SESSION_UTILS_H) #define __LIM_SESSION_UTILS_H -uint8_t is_lim_session_off_channel(struct mac_context *mac, uint8_t sessionId); uint8_t lim_is_chan_switch_running(struct mac_context *mac); uint8_t lim_is_in_mcc(struct mac_context *mac); uint8_t pe_get_current_stas_count(struct mac_context *mac);