Parcourir la source

qcacld-3.0: Remove legacy P2P codes in SME

To reduce code size, remove legacy P2P codes in SME layer.

Change-Id: I2f7d4c14d4ba2df9360351bdc55a8ba92ec9caf9
CRs-Fixed: 2111574
Wu Gao il y a 7 ans
Parent
commit
aa06e3511c

+ 0 - 1
core/sme/inc/csr_api.h

@@ -482,7 +482,6 @@ typedef enum {
 	eCSR_ROAM_WPS_PBC_PROBE_REQ_IND,
 	eCSR_ROAM_FT_RESPONSE,
 	eCSR_ROAM_FT_START,
-	eCSR_ROAM_REMAIN_CHAN_READY,
 	/* this mean error happens before assoc_start/roam_start is called. */
 	eCSR_ROAM_SESSION_OPENED,
 	eCSR_ROAM_FT_REASSOC_FAILED,

+ 0 - 113
core/sme/inc/p2p_api.h

@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2011-2012, 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.
- */
-
-/*
- * This file was originally distributed by Qualcomm Atheros, Inc.
- * under proprietary terms before Copyright ownership was assigned
- * to the Linux Foundation.
- */
-
-/**
- *
- * Name:  p2p_api.h
- *
- * Description: P2P FSM defines.
- *
- *
- */
-
-#ifndef __P2P_API_H__
-#define __P2P_API_H__
-
-#include "qdf_types.h"
-#include "qdf_mc_timer.h"
-#include "qdf_lock.h"
-
-typedef struct sP2pPsConfig {
-	uint8_t opp_ps;
-	uint32_t ctWindow;
-	uint8_t count;
-	uint32_t duration;
-	uint32_t interval;
-	uint32_t single_noa_duration;
-	uint8_t psSelection;
-	uint8_t sessionid;
-} tP2pPsConfig, *tpP2pPsConfig;
-
-typedef QDF_STATUS (*remainOnChanCallback)(tHalHandle, void *context,
-		QDF_STATUS status, uint32_t scan_id);
-
-typedef struct sRemainOnChn {
-	uint8_t chn;
-	uint32_t duration;
-	remainOnChanCallback callback;
-	void *pCBContext;
-} tRemainOnChn, tpRemainOnChn;
-
-#define SIZE_OF_NOA_DESCRIPTOR 13
-#define MAX_NOA_PERIOD_IN_MICROSECS 3000000
-
-#define P2P_CLEAR_POWERSAVE 0
-#define P2P_OPPORTUNISTIC_PS 1
-#define P2P_PERIODIC_NOA 2
-#define P2P_SINGLE_NOA 4
-
-typedef struct sp2pContext {
-	tHalHandle hHal;
-	uint8_t sessionId;      /* Session id corresponding to P2P */
-	uint8_t SMEsessionId;
-	uint8_t probeReqForwarding;
-	uint8_t *probeRspIe;
-	uint32_t probeRspIeLength;
-} tp2pContext, *tPp2pContext;
-
-QDF_STATUS sme_remain_on_chn_rsp(tpAniSirGlobal pMac, uint8_t *pMsg);
-QDF_STATUS sme_remain_on_chn_ready(tHalHandle hHal, uint8_t *pMsg);
-QDF_STATUS sme_remain_on_channel(tHalHandle hHal, uint8_t sessionId,
-		uint8_t channel, uint32_t duration,
-		remainOnChanCallback callback,
-		void *pContext, uint8_t isP2PProbeReqAllowed,
-		uint32_t *scan_id);
-QDF_STATUS sme_report_probe_req(tHalHandle hHal, uint8_t flag);
-QDF_STATUS sme_update_p2p_ie(tHalHandle hHal, void *p2pIe,
-		uint32_t p2pIeLength);
-QDF_STATUS sme_send_action(tHalHandle hHal, uint8_t sessionId,
-		const uint8_t *pBuf, uint32_t len, uint16_t wait, bool noack,
-		uint16_t channel_freq);
-QDF_STATUS sme_cancel_remain_on_channel(tHalHandle hHal,
-	uint8_t sessionId, uint32_t scan_id);
-QDF_STATUS sme_p2p_open(tHalHandle hHal);
-QDF_STATUS p2p_stop(tHalHandle hHal);
-QDF_STATUS sme_p2p_close(tHalHandle hHal);
-QDF_STATUS sme_p2p_set_ps(tHalHandle hHal, tP2pPsConfig *data);
-QDF_STATUS p2p_remain_on_channel(tHalHandle hHal, uint8_t sessionId,
-		uint8_t channel, uint32_t duration,
-		remainOnChanCallback callback,
-		void *pContext, uint8_t isP2PProbeReqAllowed,
-		uint32_t scan_id);
-QDF_STATUS p2p_send_action(tHalHandle hHal, uint8_t sessionId,
-		const uint8_t *pBuf, uint32_t len, uint16_t wait, bool noack,
-		uint16_t channel_freq);
-QDF_STATUS p2p_cancel_remain_on_channel(tHalHandle hHal,
-	uint8_t sessionId, uint32_t scan_id);
-QDF_STATUS p2p_set_ps(tHalHandle hHal, tP2pPsConfig *pNoA);
-tSirRFBand get_rf_band(uint8_t channel);
-#endif /* __P2P_API_H__ */

+ 0 - 3
core/sme/inc/sme_api.h

@@ -41,7 +41,6 @@
 #include "qdf_lock.h"
 #include "qdf_types.h"
 #include "sir_api.h"
-#include "p2p_api.h"
 #include "cds_regdomain.h"
 #include "sme_internal.h"
 #include "wma_tgt_cfg.h"
@@ -1268,8 +1267,6 @@ void sme_get_vdev_type_nss(enum tQDF_ADAPTER_MODE dev_mode,
 		uint8_t *nss_2g, uint8_t *nss_5g);
 QDF_STATUS sme_roam_set_default_key_index(tHalHandle hal, uint8_t session_id,
 					  uint8_t default_idx);
-QDF_STATUS sme_register_p2p_ack_ind_callback(tHalHandle hal,
-		sir_p2p_ack_ind_callback callback);
 void sme_send_disassoc_req_frame(tHalHandle hal, uint8_t session_id, uint8_t
 				*peer_mac, uint16_t reason, uint8_t
 				wait_for_ack);

+ 0 - 4
core/sme/inc/sme_inside.h

@@ -90,9 +90,6 @@ typedef struct sRemainChlCmd {
 	void *callbackCtx;
 } tRemainChlCmd;
 
-typedef struct sNoACmd {
-	tP2pPsConfig NoA;
-} tNoACmd;
 #ifdef FEATURE_WLAN_TDLS
 typedef struct TdlsSendMgmtInfo {
 	tSirMacAddr peerMac;
@@ -177,7 +174,6 @@ typedef struct tagSmeCmd {
 		tGenericPmcCmd pmcCmd;
 		tGenericQosCmd qosCmd;
 		tRemainChlCmd remainChlCmd;
-		tNoACmd NoACmd;
 		struct addstafor_sessioncmd addStaSessionCmd;
 		struct delstafor_sessionCmd delStaSessionCmd;
 #ifdef FEATURE_WLAN_TDLS

+ 0 - 1
core/sme/inc/sme_internal.h

@@ -82,7 +82,6 @@ typedef enum eSmeCommandType {
 	eSmeQosCommandMask = 0x40000,   /* To identify Qos commands */
 	eSmeCommandAddTs,
 	eSmeCommandDelTs,
-	eSmeCommandRemainOnChannel,
 	e_sme_command_set_hw_mode,
 	e_sme_command_nss_update,
 	e_sme_command_set_dual_mac_config,

+ 0 - 308
core/sme/src/common/sme_api.c

@@ -536,9 +536,6 @@ QDF_STATUS sme_ser_handle_active_cmd(struct wlan_serialization_command *cmd)
 				CSR_ACTIVE_SCAN_LIST_CMD_TIMEOUT);
 		status = csr_process_scan_command(mac_ctx, sme_cmd);
 		break;
-	case eSmeCommandRemainOnChannel:
-		status = p2p_process_remain_on_channel_cmd(mac_ctx, sme_cmd);
-		break;
 	/*
 	 * Treat standby differently here because caller may not be able
 	 * to handle the failure so we do our best here
@@ -780,7 +777,6 @@ QDF_STATUS sme_open(tHalHandle hHal)
 		sme_err("rrm_open failed, status: %d", status);
 		return status;
 	}
-	sme_p2p_open(pMac);
 	sme_trace_init(pMac);
 	sme_register_debug_callback();
 	wlan_serialization_legacy_init_callback();
@@ -1342,41 +1338,6 @@ static QDF_STATUS sme_handle_scan_req(tpAniSirGlobal mac_ctx,
 	return status;
 }
 
-/**
- * sme_handle_roc_req() - Roc request handler
- * @mac_ctx: MAC global context
- * @msg: message buffer
- *
- * Roc request message from upper layer is handled as
- * part of this API
- *
- * Return: QDF_STATUS
- */
-static QDF_STATUS sme_handle_roc_req(tHalHandle hal,
-					void *msg)
-{
-	struct ani_roc_req *roc_msg;
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	remainOnChanCallback callback;
-
-	if (msg == NULL) {
-		sme_err("ROC request is NULL");
-		return status;
-	}
-
-	roc_msg = msg;
-	callback = roc_msg->callback;
-	status = p2p_remain_on_channel(hal, roc_msg->session_id,
-		roc_msg->channel, roc_msg->duration, callback,
-		roc_msg->ctx, roc_msg->is_p2pprobe_allowed,
-		roc_msg->scan_id);
-	if (!QDF_IS_STATUS_SUCCESS(status))
-		sme_err("Scan request failed. session_id: %d scan_id: %d",
-			roc_msg->session_id, roc_msg->scan_id);
-
-	return status;
-}
-
 static QDF_STATUS dfs_msg_processor(tpAniSirGlobal mac,
 		struct scheduler_msg *msg)
 {
@@ -2164,22 +2125,6 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, struct scheduler_msg *pMsg)
 			sme_err("Empty message for: %d", pMsg->type);
 		}
 		break;
-	case eWNI_SME_REMAIN_ON_CHN_RSP:
-		if (pMsg->bodyptr) {
-			status = sme_remain_on_chn_rsp(pMac, pMsg->bodyptr);
-			qdf_mem_free(pMsg->bodyptr);
-		} else {
-			sme_err("Empty message for: %d", pMsg->type);
-		}
-		break;
-	case eWNI_SME_REMAIN_ON_CHN_RDY_IND:
-		if (pMsg->bodyptr) {
-			status = sme_remain_on_chn_ready(pMac, pMsg->bodyptr);
-			qdf_mem_free(pMsg->bodyptr);
-		} else {
-			sme_err("Empty message for: %d", pMsg->type);
-		}
-		break;
 	case eWNI_SME_CHANGE_COUNTRY_CODE:
 		if (pMsg->bodyptr) {
 			status = sme_handle_change_country_code((void *)pMac,
@@ -2206,14 +2151,6 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, struct scheduler_msg *pMsg)
 			sme_err("Empty message for: %d", pMsg->type);
 		}
 		break;
-	case eWNI_SME_ROC_CMD:
-		if (pMsg->bodyptr) {
-			status = sme_handle_roc_req(hHal, pMsg->bodyptr);
-			qdf_mem_free(pMsg->bodyptr);
-		} else {
-			sme_err("Empty message for: %d", pMsg->type);
-		}
-		break;
 #ifdef WLAN_FEATURE_11W
 	case eWNI_SME_UNPROT_MGMT_FRM_IND:
 		if (pMsg->bodyptr) {
@@ -2666,8 +2603,6 @@ QDF_STATUS sme_stop(tHalHandle hHal, tHalStopType stopType)
 	QDF_STATUS fail_status = QDF_STATUS_SUCCESS;
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 
-	p2p_stop(hHal);
-
 	status = rrm_stop(pMac);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
 		sme_err("rrm_stop failed with status: %d", status);
@@ -2737,8 +2672,6 @@ QDF_STATUS sme_close(tHalHandle hHal)
 		fail_status = status;
 	}
 
-	sme_p2p_close(hHal);
-
 	free_sme_cmd_list(pMac);
 
 	if (!QDF_IS_STATUS_SUCCESS
@@ -5712,42 +5645,6 @@ QDF_STATUS sme_get_operation_channel(tHalHandle hHal, uint32_t *pChannel,
 	return QDF_STATUS_E_FAILURE;
 } /* sme_get_operation_channel ends here */
 
-/**
- * sme_register_p2p_ack_ind_callback() - p2p ack indication callback
- * @hal: hal pointer
- * @callback: callback pointer to be registered
- *
- * This function is used to register a callback to PE for p2p ack
- * indication
- *
- * Return: Success if msg is posted to PE else Failure.
- */
-QDF_STATUS sme_register_p2p_ack_ind_callback(tHalHandle hal,
-				sir_p2p_ack_ind_callback callback)
-{
-	tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
-	struct sir_sme_p2p_ack_ind_cb_req *msg;
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-
-	status = sme_acquire_global_lock(&mac_ctx->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		msg = qdf_mem_malloc(sizeof(*msg));
-		if (NULL == msg) {
-			sme_err("Failed to allocate memory");
-			sme_release_global_lock(&mac_ctx->sme);
-			return QDF_STATUS_E_NOMEM;
-		}
-		msg->message_type = eWNI_SME_REGISTER_P2P_ACK_CB;
-		msg->length = sizeof(*msg);
-
-		msg->callback = callback;
-		status = umac_send_mb_message_to_mac(msg);
-		sme_release_global_lock(&mac_ctx->sme);
-		return status;
-	}
-	return status;
-}
-
 /**
  * sme_register_mgmt_frame_ind_callback() - Register a callback for
  * management frame indication to PE.
@@ -5904,211 +5801,6 @@ QDF_STATUS sme_deregister_mgmt_frame(tHalHandle hHal, uint8_t sessionId,
 	return status;
 }
 
-/**
- * sme_remain_on_channel - API to request remain on channel for 'x' duration
- *
- * @hHal: pointer to MAC handle
- * @session_id: Session identifier
- * @channel: channel information
- * @duration: duration in ms
- * @callback: HDD registered callback to process reaminOnChannelRsp
- * @context: HDD Callback param
- * @scan_id: scan identifier
- *
- * This function process the roc request and generates scan identifier.s
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS sme_remain_on_channel(tHalHandle hHal, uint8_t session_id,
-				 uint8_t channel, uint32_t duration,
-				 remainOnChanCallback callback,
-				 void *pContext, uint8_t isP2PProbeReqAllowed,
-				 uint32_t *scan_id)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tpAniSirGlobal mac_ctx = PMAC_STRUCT(hHal);
-	uint32_t san_req_id, scan_count;
-	struct ani_roc_req *roc_msg;
-	struct scheduler_msg msg = {0};
-
-
-	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
-			 TRACE_CODE_SME_RX_HDD_REMAIN_ONCHAN, session_id, 0));
-
-	scan_count = csr_scan_active_ll_count(mac_ctx);
-	if (scan_count >= mac_ctx->scan.max_scan_count) {
-		sme_err("Max scan reached");
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	wma_get_scan_id(&san_req_id);
-	*scan_id = san_req_id;
-	status = sme_acquire_global_lock(&mac_ctx->sme);
-
-	roc_msg = qdf_mem_malloc(sizeof(struct ani_roc_req));
-	if (NULL == roc_msg) {
-		sme_err("scan_req: failed to allocate mem for msg");
-		sme_release_global_lock(&mac_ctx->sme);
-		return QDF_STATUS_E_NOMEM;
-	}
-	roc_msg->msg_type = eWNI_SME_ROC_CMD;
-	roc_msg->msg_len = (uint16_t) sizeof(struct ani_roc_req);
-	roc_msg->session_id = session_id;
-	roc_msg->callback = callback;
-	roc_msg->duration = duration;
-	roc_msg->channel = channel;
-	roc_msg->is_p2pprobe_allowed = isP2PProbeReqAllowed;
-	roc_msg->ctx = pContext;
-	roc_msg->scan_id = *scan_id;
-	msg.type = eWNI_SME_ROC_CMD;
-	msg.bodyptr = roc_msg;
-	msg.reserved = 0;
-	msg.bodyval = 0;
-	if (QDF_STATUS_SUCCESS !=
-		scheduler_post_msg(QDF_MODULE_ID_SME, &msg)) {
-		sme_err("sme_scan_req failed to post msg");
-		qdf_mem_free(roc_msg);
-		status = QDF_STATUS_E_FAILURE;
-	}
-	sme_release_global_lock(&mac_ctx->sme);
-	return status;
-}
-
-/*
- * sme_report_probe_req() -
- * API to enable/disable forwarding of probeReq to apps in p2p.
- *
- * hHal - The handle returned by mac_open.
- * falg: to set the Probe request forarding to wpa_supplicant in listen state
- * in p2p
- * Return QDF_STATUS
- */
-
-#ifndef WLAN_FEATURE_CONCURRENT_P2P
-QDF_STATUS sme_report_probe_req(tHalHandle hHal, uint8_t flag)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-
-	do {
-		/* acquire the lock for the sme object */
-		status = sme_acquire_global_lock(&pMac->sme);
-		if (QDF_IS_STATUS_SUCCESS(status)) {
-			/* call set in context */
-			pMac->p2pContext.probeReqForwarding = flag;
-			/* release the lock for the sme object */
-			sme_release_global_lock(&pMac->sme);
-		}
-	} while (0);
-
-	return status;
-}
-
-/*
- * sme_update_p2p_ie() -
- * API to set the P2p Ie in p2p context
- *
- * hHal - The handle returned by mac_open.
- * p2pIe -  Ptr to p2pIe from HDD.
- * p2pIeLength: length of p2pIe
- * Return QDF_STATUS
- */
-
-QDF_STATUS sme_update_p2p_ie(tHalHandle hHal, void *p2pIe, uint32_t p2pIeLength)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-
-	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
-			 TRACE_CODE_SME_RX_HDD_UPDATE_P2P_IE, NO_SESSION, 0));
-	/* acquire the lock for the sme object */
-	status = sme_acquire_global_lock(&pMac->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		if (NULL != pMac->p2pContext.probeRspIe) {
-			qdf_mem_free(pMac->p2pContext.probeRspIe);
-			pMac->p2pContext.probeRspIeLength = 0;
-		}
-
-		pMac->p2pContext.probeRspIe = qdf_mem_malloc(p2pIeLength);
-		if (NULL == pMac->p2pContext.probeRspIe) {
-			sme_err("Unable to allocate P2P IE");
-			pMac->p2pContext.probeRspIeLength = 0;
-			status = QDF_STATUS_E_NOMEM;
-		} else {
-			pMac->p2pContext.probeRspIeLength = p2pIeLength;
-			qdf_mem_copy((uint8_t *) pMac->p2pContext.probeRspIe,
-				     p2pIe, p2pIeLength);
-		}
-
-		/* release the lock for the sme object */
-		sme_release_global_lock(&pMac->sme);
-	}
-
-	return status;
-}
-#endif
-
-/*
- * sme_send_action() -
- * API to send action frame from supplicant.
- *
- * hHal - The handle returned by mac_open.
- * Return QDF_STATUS
- */
-
-QDF_STATUS sme_send_action(tHalHandle hHal, uint8_t sessionId,
-			   const uint8_t *pBuf, uint32_t len,
-			   uint16_t wait, bool noack,
-			   uint16_t channel_freq)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-
-	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
-			 TRACE_CODE_SME_RX_HDD_SEND_ACTION, sessionId, 0));
-	/* acquire the lock for the sme object */
-	status = sme_acquire_global_lock(&pMac->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		p2p_send_action(hHal, sessionId, pBuf, len, wait, noack,
-		channel_freq);
-		/* release the lock for the sme object */
-		sme_release_global_lock(&pMac->sme);
-	}
-
-	return status;
-}
-
-QDF_STATUS sme_cancel_remain_on_channel(tHalHandle hHal,
-	uint8_t sessionId, uint32_t scan_id)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-
-	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
-			 TRACE_CODE_SME_RX_HDD_CANCEL_REMAIN_ONCHAN, sessionId,
-			 0));
-	status = sme_acquire_global_lock(&pMac->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		status = p2p_cancel_remain_on_channel(hHal, sessionId, scan_id);
-		sme_release_global_lock(&pMac->sme);
-	}
-	return status;
-}
-
-/* Power Save Related */
-QDF_STATUS sme_p2p_set_ps(tHalHandle hHal, tP2pPsConfig *data)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-
-	status = sme_acquire_global_lock(&pMac->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		status = p2p_set_ps(hHal, data);
-		sme_release_global_lock(&pMac->sme);
-	}
-	return status;
-}
-
 #ifdef WLAN_FEATURE_EXTWOW_SUPPORT
 /**
  * sme_configure_ext_wow() - configure Extr WoW

+ 0 - 1
core/sme/src/common/sme_trace.c

@@ -189,7 +189,6 @@ static uint8_t *sme_trace_get_command_string(uint32_t command)
 		CASE_RETURN_STRING(eSmeQosCommandMask);
 		CASE_RETURN_STRING(eSmeCommandAddTs);
 		CASE_RETURN_STRING(eSmeCommandDelTs);
-		CASE_RETURN_STRING(eSmeCommandRemainOnChannel);
 		CASE_RETURN_STRING(e_sme_command_set_hw_mode);
 		CASE_RETURN_STRING(e_sme_command_nss_update);
 		CASE_RETURN_STRING(e_sme_command_set_dual_mac_config);

+ 3 - 46
core/sme/src/csr/csr_api_roam.c

@@ -1351,43 +1351,9 @@ void csr_release_command_wm_status_change(tpAniSirGlobal pMac,
 	csr_reinit_wm_status_change_cmd(pMac, pCommand);
 }
 
-/**
- * csr_release_roc_req_cmd() - Release the command
- * @mac_ctx: Global MAC Context
- *
- * Release the remain on channel request command from the queue
- *
- * Return: None
- */
-void csr_release_roc_req_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd)
-{
-	if (eSmeCommandRemainOnChannel == sme_cmd->command) {
-		remainOnChanCallback callback =
-			sme_cmd->u.remainChlCmd.callback;
-		/* process the msg */
-		if (callback)
-			callback(mac_ctx,
-				 sme_cmd->u.remainChlCmd.callbackCtx, 0,
-				 sme_cmd->u.remainChlCmd.scan_id);
-		sme_err("Remove RoC Request from Active Cmd List");
-	}
-}
-
 void csr_cancel_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd)
 {
 	switch (sme_cmd->command) {
-	case eSmeCommandRemainOnChannel:
-		if (NULL != sme_cmd->u.remainChlCmd.callback) {
-			remainOnChanCallback callback =
-				sme_cmd->u.remainChlCmd.callback;
-			/* process the msg */
-			if (callback) {
-				callback(mac_ctx, sme_cmd->u.remainChlCmd.
-					callbackCtx, eCSR_SCAN_ABORT,
-					sme_cmd->u.remainChlCmd.scan_id);
-			}
-		}
-		break;
 	case eSmeCommandScan:
 		/*
 		 * We need to inform the requester before dropping
@@ -18988,9 +18954,6 @@ static void csr_free_cmd_memory(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 	case eSmeCommandNdpDataEndInitiatorRequest:
 		csr_release_ndp_data_end_req(pMac, pCommand);
 		break;
-	case eSmeCommandRemainOnChannel:
-		csr_release_roc_req_cmd(pMac, pCommand);
-		break;
 	default:
 		break;
 	}
@@ -19030,8 +18993,7 @@ void csr_release_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd)
 	}
 	qdf_mem_zero(&cmd_info,
 			sizeof(struct wlan_serialization_queued_cmd_info));
-	if (sme_cmd->command == eSmeCommandScan ||
-			sme_cmd->command == eSmeCommandRemainOnChannel) {
+	if (sme_cmd->command == eSmeCommandScan) {
 		sme_debug("filled cmd_id[%d]",
 			sme_cmd->u.scanCmd.scanID);
 		cmd_info.cmd_id = sme_cmd->u.scanCmd.scanID;
@@ -19214,9 +19176,6 @@ enum wlan_serialization_cmd_type csr_get_cmd_type(tSmeCmd *sme_cmd)
 	case eSmeCommandNdpDataEndInitiatorRequest:
 		cmd_type = WLAN_SER_CMD_NDP_DATA_END_INIT_REQ;
 		break;
-	case eSmeCommandRemainOnChannel:
-		cmd_type = WLAN_SER_CMD_REMAIN_ON_CHANNEL;
-		break;
 	case eSmeCommandEnterStandby:
 		cmd_type = WLAN_SER_CMD_ENTER_STANDBY;
 		break;
@@ -19291,8 +19250,7 @@ QDF_STATUS csr_set_serialization_params_to_cmd(tpAniSirGlobal mac_ctx,
 	 * no need to fill command id for non-scan as they will be
 	 * zero always
 	 */
-	if (sme_cmd->command == eSmeCommandScan ||
-			sme_cmd->command == eSmeCommandRemainOnChannel) {
+	if (sme_cmd->command == eSmeCommandScan) {
 		cmd->cmd_id = sme_cmd->u.scanCmd.scanID;
 		sme_debug("cmd_id[%d]", sme_cmd->u.scanCmd.scanID);
 	} else {
@@ -19342,8 +19300,7 @@ QDF_STATUS csr_queue_sme_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd,
 		}
 	}
 
-	if ((eSmeCommandScan == sme_cmd->command) ||
-	    (sme_cmd->command == eSmeCommandRemainOnChannel)) {
+	if (eSmeCommandScan == sme_cmd->command) {
 		if (csr_scan_active_ll_count(mac_ctx) >=
 		    mac_ctx->scan.max_scan_count) {
 			sme_err("Max scan reached");

+ 23 - 0
core/sme/src/csr/csr_neighbor_roam.c

@@ -490,6 +490,29 @@ csr_neighbor_roam_prepare_scan_profile_filter(tpAniSirGlobal pMac,
 	return QDF_STATUS_SUCCESS;
 }
 
+/**
+ * get_rf_band()
+ *
+ * @channel: channel number
+ *
+ * This function is used to translate channel number to band
+ *
+ * Return: SIR_BAND_2_4_GHZ -  if 2.4GHZ channel
+ *         SIR_BAND_5_GHZ   -  if 5GHZ channel
+ */
+static tSirRFBand get_rf_band(uint8_t channel)
+{
+	if ((channel >= SIR_11A_CHANNEL_BEGIN) &&
+	    (channel <= SIR_11A_CHANNEL_END))
+		return SIR_BAND_5_GHZ;
+
+	if ((channel >= SIR_11B_CHANNEL_BEGIN) &&
+	    (channel <= SIR_11B_CHANNEL_END))
+		return SIR_BAND_2_4_GHZ;
+
+	return SIR_BAND_UNKNOWN;
+}
+
 /**
  * csr_neighbor_roam_channels_filter_by_current_band()
  *

+ 3 - 7
core/sme/src/csr/csr_util.c

@@ -231,7 +231,6 @@ const char *get_e_roam_cmd_status_str(eRoamCmdStatus val)
 		CASE_RETURN_STR(eCSR_ROAM_WPS_PBC_PROBE_REQ_IND);
 		CASE_RETURN_STR(eCSR_ROAM_FT_RESPONSE);
 		CASE_RETURN_STR(eCSR_ROAM_FT_START);
-		CASE_RETURN_STR(eCSR_ROAM_REMAIN_CHAN_READY);
 		CASE_RETURN_STR(eCSR_ROAM_SESSION_OPENED);
 		CASE_RETURN_STR(eCSR_ROAM_FT_REASSOC_FAILED);
 		CASE_RETURN_STR(eCSR_ROAM_PMK_NOTIFY);
@@ -658,8 +657,7 @@ tListElem *csr_scan_active_ll_next(struct sAniSirGlobal *mac_ctx,
 	if (!entry)
 		return NULL;
 	sme_cmd = GET_BASE_ADDR(entry, tSmeCmd, Link);
-	if (sme_cmd->command == eSmeCommandScan ||
-			sme_cmd->command == eSmeCommandRemainOnChannel)
+	if (sme_cmd->command == eSmeCommandScan)
 		cmd.cmd_id = sme_cmd->u.scanCmd.scanID;
 	else
 		cmd.cmd_id = 0;
@@ -687,8 +685,7 @@ tListElem *csr_scan_pending_ll_next(struct sAniSirGlobal *mac_ctx,
 	if (!entry)
 		return NULL;
 	sme_cmd = GET_BASE_ADDR(entry, tSmeCmd, Link);
-	if (sme_cmd->command == eSmeCommandScan ||
-			sme_cmd->command == eSmeCommandRemainOnChannel)
+	if (sme_cmd->command == eSmeCommandScan)
 		cmd.cmd_id = sme_cmd->u.scanCmd.scanID;
 	else
 		cmd.cmd_id = 0;
@@ -716,8 +713,7 @@ tListElem *csr_nonscan_pending_ll_next(struct sAniSirGlobal *mac_ctx,
 	if (!entry)
 		return NULL;
 	sme_cmd = GET_BASE_ADDR(entry, tSmeCmd, Link);
-	if (sme_cmd->command == eSmeCommandScan ||
-			sme_cmd->command == eSmeCommandRemainOnChannel)
+	if (sme_cmd->command == eSmeCommandScan)
 		cmd.cmd_id = sme_cmd->u.scanCmd.scanID;
 	else
 		cmd.cmd_id = 0;