Jelajahi Sumber

qcacld-3.0: Scan cleanup in lim and csr

Cleanup the unused scan legacy code in lim and csr

Change-Id: Ibea328196a9453ebaae887aa4068e78c47296762
CRs-Fixed: 2184924
Abhinav Kumar 7 tahun lalu
induk
melakukan
f9989586a6

+ 0 - 3
core/mac/inc/ani_global.h

@@ -822,9 +822,6 @@ typedef struct sAniSirLim {
 	uint8_t gLimDfsTargetChanNum;
 	uint8_t probeCounter;
 	uint8_t maxProbe;
-	QDF_STATUS(*add_bssdescr_callback)
-		(tpAniSirGlobal pMac, tpSirBssDescription buf,
-		uint32_t scan_id, uint32_t flags);
 	QDF_STATUS(*sme_msg_callback)
 		(tHalHandle hal, struct scheduler_msg *msg);
 	uint8_t retry_packet_cnt;

+ 0 - 1
core/mac/inc/sir_api.h

@@ -476,7 +476,6 @@ typedef struct sSirSmeReadyReq {
 	uint16_t messageType;   /* eWNI_SME_SYS_READY_IND */
 	uint16_t length;
 	uint16_t transactionId;
-	void *add_bssdescr_cb;
 	void *csr_roam_synch_cb;
 	void *pe_roam_synch_cb;
 	void *sme_msg_cb;

+ 1 - 11
core/mac/src/pe/lim/lim_process_message_queue.c

@@ -639,16 +639,7 @@ __lim_ext_scan_forward_bcn_probe_rsp(tpAniSirGlobal pmac, uint8_t *rx_pkt_info,
 	qdf_mem_zero(bssdescr, frame_len);
 
 	lim_collect_bss_description(pmac, bssdescr, frame, rx_pkt_info, false);
-	/*
-	 * Send the beacon to CSR with registered callback routine.
-	 * scan_id and flags parameters are currently unused and set to 0.
-	 * EXT scan results will also be added to scan cache in SME
-	 */
-	if (pmac->lim.add_bssdescr_callback) {
-		(pmac->lim.add_bssdescr_callback) (pmac, bssdescr, 0, 0);
-	} else {
-		pe_err("No CSR callback routine to send beacon/probe response");
-	}
+
 	qdf_mem_free(bssdescr);
 
 	mmh_msg.type = msg_type;
@@ -1437,7 +1428,6 @@ static void lim_process_messages(tpAniSirGlobal mac_ctx,
 			cds_pkt_return_packet(body_ptr);
 		}
 		break;
-	case eWNI_SME_SCAN_REQ:
 	case eWNI_SME_DISASSOC_REQ:
 	case eWNI_SME_DEAUTH_REQ:
 #ifdef FEATURE_WLAN_TDLS

+ 0 - 32
core/mac/src/pe/lim/lim_process_mlm_req_messages.c

@@ -2698,38 +2698,6 @@ void lim_process_assoc_failure_timeout(tpAniSirGlobal mac_ctx,
 	}
 }
 
-/**
- * lim_complete_mlm_scan() - This function is called to send MLM_SCAN_CNF
- * message to SME state machine.
- *
- * @mac_ctx:      Pointer to Global MAC structure
- * @ret_code:     Result code to be sent
- *
- * This function is called to send MLM_SCAN_CNF message to SME state machine.
- *
- * @Return: None
- */
-
-void lim_complete_mlm_scan(tpAniSirGlobal mac_ctx, tSirResultCodes ret_code)
-{
-	tLimMlmScanCnf mlm_scan_cnf;
-
-	/* Restore previous MLM state */
-	mac_ctx->lim.gLimMlmState = mac_ctx->lim.gLimPrevMlmState;
-	MTRACE(mac_trace(mac_ctx, TRACE_CODE_MLM_STATE, NO_SESSION,
-			 mac_ctx->lim.gLimMlmState));
-	lim_restore_pre_scan_state(mac_ctx);
-	/* Free up mac_ctx->lim.gLimMlmScanReq */
-	if (NULL != mac_ctx->lim.gpLimMlmScanReq) {
-		qdf_mem_free(mac_ctx->lim.gpLimMlmScanReq);
-		mac_ctx->lim.gpLimMlmScanReq = NULL;
-	}
-
-	mlm_scan_cnf.resultCode = ret_code;
-	lim_post_sme_message(mac_ctx, LIM_MLM_SCAN_CNF,
-			     (uint32_t *) &mlm_scan_cnf);
-}
-
 /**
  * lim_set_channel() - set channel api for lim
  *

+ 0 - 329
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -88,7 +88,6 @@
 static bool __lim_process_sme_sys_ready_ind(tpAniSirGlobal, uint32_t *);
 static bool __lim_process_sme_start_bss_req(tpAniSirGlobal,
 					    struct scheduler_msg *pMsg);
-static void __lim_process_sme_scan_req(tpAniSirGlobal, uint32_t *);
 static void __lim_process_sme_join_req(tpAniSirGlobal, uint32_t *);
 static void __lim_process_sme_reassoc_req(tpAniSirGlobal, uint32_t *);
 static void __lim_process_sme_disassoc_req(tpAniSirGlobal, uint32_t *);
@@ -329,81 +328,6 @@ fail:
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * __lim_fresh_scan_reqd() - determine if a fresh scan request must be issued.
- * @mac_ctx: Pointer to Global MAC structure
- * @return_fresh_results: Trigger fresh scan.
- *
- * PE will do fresh scan, if all of the active sessions are in
- * good state (Link Est or BSS Started). If one of the sessions
- * is not in one of the above states, then PE does not do fresh
- * scan. If no session exists (scanning very first time),
- * then PE will always do fresh scan if SME asks it to do that.
- *
- * Return: true for fresh scan results, false if in invalid state.
- */
-static uint8_t
-__lim_fresh_scan_reqd(tpAniSirGlobal mac_ctx, uint8_t return_fresh_results)
-{
-	uint8_t valid_state = true;
-	int i;
-
-
-	pe_debug("gLimSmeState: %d, returnFreshResults 0x%x",
-		mac_ctx->lim.gLimSmeState, return_fresh_results);
-
-	if (mac_ctx->lim.gLimSmeState != eLIM_SME_IDLE_STATE)
-		return false;
-
-	for (i = 0; i < mac_ctx->lim.maxBssId; i++) {
-
-		if (mac_ctx->lim.gpSession[i].valid == false)
-			continue;
-
-		pe_debug("session %d, bsstype %d, limSystemRole %d, limSmeState %d",
-			i, mac_ctx->lim.gpSession[i].bssType,
-			mac_ctx->lim.gpSession[i].limSystemRole,
-			mac_ctx->lim.gpSession[i].limSmeState);
-
-		if (mac_ctx->lim.gpSession[i].bssType == eSIR_NDI_MODE)
-			continue;
-
-		if (mac_ctx->lim.gpSession[i].bssType ==
-				eSIR_INFRASTRUCTURE_MODE &&
-				mac_ctx->lim.gpSession[i].limSmeState ==
-				eLIM_SME_LINK_EST_STATE)
-			continue;
-
-		if (mac_ctx->lim.gpSession[i].bssType == eSIR_IBSS_MODE &&
-				mac_ctx->lim.gpSession[i].limSmeState ==
-				eLIM_SME_NORMAL_STATE)
-			continue;
-
-		if (mac_ctx->lim.gpSession[i].bssType == eSIR_INFRA_AP_MODE &&
-				mac_ctx->lim.gpSession[i].pePersona ==
-				QDF_P2P_GO_MODE &&
-				mac_ctx->lim.gpSession[i].limSmeState ==
-				eLIM_SME_NORMAL_STATE)
-			continue;
-
-		if (mac_ctx->lim.gpSession[i].limSystemRole == eLIM_AP_ROLE &&
-				mac_ctx->lim.gpSession[i].limSmeState ==
-				eLIM_SME_NORMAL_STATE)
-			continue;
-
-		valid_state = false;
-		break;
-	}
-
-	pe_debug("valid_state: %d", valid_state);
-
-	if ((valid_state) &&
-	    (return_fresh_results & SIR_BG_SCAN_RETURN_FRESH_RESULTS))
-		return true;
-	else
-		return false;
-}
-
 /**
  * __lim_is_sme_assoc_cnf_valid()
  *
@@ -553,7 +477,6 @@ static bool __lim_process_sme_sys_ready_ind(tpAniSirGlobal pMac, uint32_t *pMsgB
 		ready_req->pe_roam_synch_cb = pe_roam_synch_callback;
 		pe_register_mgmt_rx_frm_callback(pMac);
 		pe_register_callbacks_with_wma(pMac, ready_req);
-		pMac->lim.add_bssdescr_callback = ready_req->add_bssdescr_cb;
 		pMac->lim.sme_msg_callback = ready_req->sme_msg_cb;
 	}
 
@@ -1212,250 +1135,6 @@ void lim_get_random_bssid(tpAniSirGlobal pMac, uint8_t *data)
 	qdf_mem_copy(data, (uint8_t *) random, sizeof(tSirMacAddr));
 }
 
-static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac,
-						      tpSirSmeScanReq pScanReq)
-{
-	tSirScanOffloadReq *pScanOffloadReq;
-	uint8_t *p;
-	struct scheduler_msg msg = {0};
-	uint16_t i, len;
-	uint16_t addn_ie_len = 0;
-	tSirRetStatus status, rc = eSIR_SUCCESS;
-	tDot11fIEExtCap extracted_extcap = {0};
-	bool extcap_present = true;
-
-	if (pScanReq->uIEFieldLen) {
-		status = lim_strip_extcap_update_struct(pMac,
-			     (uint8_t *) pScanReq + pScanReq->uIEFieldOffset,
-			     &pScanReq->uIEFieldLen, &extracted_extcap);
-
-		if (eSIR_SUCCESS != status) {
-			extcap_present = false;
-			pe_debug("Unable to Strip ExtCap IE from Scan Req");
-		}
-
-		if (extcap_present) {
-			pe_debug("Extcap was part of SCAN IE - Updating FW");
-			lim_send_ext_cap_ie(pMac, pScanReq->sessionId,
-					    &extracted_extcap, true);
-		}
-	} else {
-	    pe_debug("No IEs in the scan request from supplicant");
-	}
-
-	/**
-	 * The tSirScanOffloadReq will reserve the space for first channel,
-	 * so allocate the memory for (numChannels - 1) and uIEFieldLen
-	 */
-	len = sizeof(tSirScanOffloadReq) +
-		(pScanReq->channelList.numChannels - 1) +
-		pScanReq->uIEFieldLen;
-
-	pScanOffloadReq = qdf_mem_malloc(len);
-	if (NULL == pScanOffloadReq) {
-		pe_err("AllocateMemory failed for pScanOffloadReq");
-		return QDF_STATUS_E_NOMEM;
-	}
-
-	msg.type = WMA_START_SCAN_OFFLOAD_REQ;
-	msg.bodyptr = pScanOffloadReq;
-	msg.bodyval = 0;
-
-	qdf_copy_macaddr(&pScanOffloadReq->bssId, &pScanReq->bssId);
-
-	if (pScanReq->numSsid > SIR_SCAN_MAX_NUM_SSID) {
-		pe_err("Invalid value (%d) for numSsid",
-			SIR_SCAN_MAX_NUM_SSID);
-		qdf_mem_free(pScanOffloadReq);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	pScanOffloadReq->numSsid = pScanReq->numSsid;
-	for (i = 0; i < pScanOffloadReq->numSsid; i++) {
-		pScanOffloadReq->ssId[i].length = pScanReq->ssId[i].length;
-		qdf_mem_copy((uint8_t *) pScanOffloadReq->ssId[i].ssId,
-			     (uint8_t *) pScanReq->ssId[i].ssId,
-			     pScanOffloadReq->ssId[i].length);
-	}
-
-	pScanOffloadReq->hiddenSsid = pScanReq->hiddenSsid;
-	qdf_copy_macaddr(&pScanOffloadReq->selfMacAddr, &pScanReq->selfMacAddr);
-	pScanOffloadReq->bssType = pScanReq->bssType;
-	pScanOffloadReq->dot11mode = pScanReq->dot11mode;
-	pScanOffloadReq->scanType = pScanReq->scanType;
-	pScanOffloadReq->minChannelTime = pScanReq->minChannelTime;
-	pScanOffloadReq->maxChannelTime = pScanReq->maxChannelTime;
-	pScanOffloadReq->restTime = pScanReq->restTime;
-	pScanOffloadReq->min_rest_time = pScanReq->min_rest_time;
-	pScanOffloadReq->idle_time = pScanReq->idle_time;
-	pScanOffloadReq->scan_adaptive_dwell_mode =
-			pScanReq->scan_adaptive_dwell_mode;
-
-	for (i = 0; i < pMac->lim.maxBssId; i++) {
-		tpPESession session_entry =
-				pe_find_session_by_sme_session_id(pMac, i);
-		if (session_entry &&
-			(eLIM_MLM_LINK_ESTABLISHED_STATE ==
-				session_entry->limMlmState) &&
-			(session_entry->beaconParams.beaconInterval
-				< BEACON_INTERVAL_THRESHOLD)) {
-			pScanOffloadReq->burst_scan_duration =
-						STA_BURST_SCAN_DURATION;
-			break;
-		}
-	}
-
-	/* for normal scan, the value for p2pScanType should be 0
-	   always */
-	if (pScanReq->p2pSearch)
-		pScanOffloadReq->p2pScanType = P2P_SCAN_TYPE_SEARCH;
-
-	pScanOffloadReq->sessionId = pScanReq->sessionId;
-	pScanOffloadReq->scan_id = pScanReq->scan_id;
-	pScanOffloadReq->scan_requestor_id = USER_SCAN_REQUESTOR_ID;
-	pScanOffloadReq->scan_adaptive_dwell_mode =
-			pScanReq->scan_adaptive_dwell_mode;
-
-	if (pScanOffloadReq->sessionId >= pMac->lim.maxBssId)
-		pe_err("Invalid pe sessionID: %d",
-			pScanOffloadReq->sessionId);
-
-	pScanOffloadReq->channelList.numChannels =
-		pScanReq->channelList.numChannels;
-	p = &(pScanOffloadReq->channelList.channelNumber[0]);
-	for (i = 0; i < pScanOffloadReq->channelList.numChannels; i++)
-		p[i] = pScanReq->channelList.channelNumber[i];
-
-	pScanOffloadReq->uIEFieldLen = pScanReq->uIEFieldLen;
-	pScanOffloadReq->uIEFieldOffset = len - addn_ie_len -
-						pScanOffloadReq->uIEFieldLen;
-	qdf_mem_copy((uint8_t *) pScanOffloadReq +
-		     pScanOffloadReq->uIEFieldOffset,
-		     (uint8_t *) pScanReq + pScanReq->uIEFieldOffset,
-		     pScanReq->uIEFieldLen);
-
-	rc = wma_post_ctrl_msg(pMac, &msg);
-	if (rc != eSIR_SUCCESS) {
-		pe_err("wma_post_ctrl_msg() return failure");
-		qdf_mem_free(pScanOffloadReq);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	pe_debug("Processed Offload Scan Request Successfully");
-
-	return QDF_STATUS_SUCCESS;
-}
-
-/**
- * __lim_process_sme_scan_req() - Process the SME Scan Request
- * @mac_ctx: Global MAC Context
- * @msg_buf: Buffer which contains the request and pertinent parameters
- *
- * This function is called to process SME_SCAN_REQ message
- * from HDD or upper layer application.
- *
- * Return: None
- */
-
-static void __lim_process_sme_scan_req(tpAniSirGlobal mac_ctx,
-		uint32_t *msg_buf)
-{
-	tpSirSmeScanReq scan_req;
-	uint8_t valid_req = 0;
-
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
-	lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_SCAN_REQ_EVENT, NULL,
-			      eSIR_SUCCESS, eSIR_SUCCESS);
-#endif
-	mac_ctx->lim.beacon_probe_rsp_cnt_per_scan = 0;
-
-	scan_req = (tpSirSmeScanReq) msg_buf;
-	pe_debug("SME SCAN REQ id %d numChan %d min %d max %d IELen %d first %d fresh %d unique %d type %s (%d) rsp %d",
-		scan_req->scan_id, scan_req->channelList.numChannels,
-		scan_req->minChannelTime, scan_req->maxChannelTime,
-		scan_req->uIEFieldLen, scan_req->returnAfterFirstMatch,
-		scan_req->returnFreshResults, scan_req->returnUniqueResults,
-		lim_scan_type_to_string(scan_req->scanType),
-		scan_req->scanType, mac_ctx->lim.gLimRspReqd ? 1 : 0);
-	/*
-	 * Since scan req always requires a response, we will overwrite response
-	 * required here. This is added esp to take care of the condition where
-	 * in p2p go case, we hold the scan req and insert single NOA. We send
-	 * the held scan request to FW later on getting start NOA ind from FW so
-	 * we lose state of the gLimRspReqd flag for the scan req if any other
-	 * request comes by then. e.g. While unit testing, we found when insert
-	 * single NOA is done, we see a get stats request which turns the flag
-	 * gLimRspReqd to false; now when we actually start the saved scan req
-	 * for init scan after getting NOA started, the gLimRspReqd being a
-	 * global flag is showing false instead of true value for this saved
-	 * scan req. Since all scan reqs coming to lim require a response,
-	 * there is no harm in setting the global flag gLimRspReqd to true here.
-	 */
-	mac_ctx->lim.gLimRspReqd = true;
-
-	/*
-	 * copy the Self MAC address from SmeReq to the globalplace,
-	 * used for sending probe req
-	 */
-	sir_copy_mac_addr(mac_ctx->lim.gSelfMacAddr,
-			  scan_req->selfMacAddr.bytes);
-	valid_req = lim_is_sme_scan_req_valid(mac_ctx, scan_req);
-
-	if (!valid_req || mac_ctx->lim.scan_disabled) {
-		pe_err("Scan disabled %d, Valid Scan Req %d",
-			mac_ctx->lim.scan_disabled, valid_req);
-
-		if (mac_ctx->lim.gLimRspReqd) {
-			mac_ctx->lim.gLimRspReqd = false;
-
-			lim_send_sme_scan_rsp(mac_ctx,
-					eSIR_SME_INVALID_PARAMETERS,
-					scan_req->sessionId,
-					scan_req->transactionId,
-					scan_req->scan_id);
-		}
-		return;
-	}
-
-	/*
-	 * If scan request is received in idle, joinFailed
-	 * states or in link established state (in STA role)
-	 * or in normal state (in STA-in-IBSS/AP role) with
-	 * 'return fresh scan results' request from HDD or
-	 * it is periodic background scanning request,
-	 * trigger fresh scan request to MLM
-	 */
-	if (__lim_fresh_scan_reqd(mac_ctx, scan_req->returnFreshResults)) {
-
-		mac_ctx->lim.gLim24Band11dScanDone = 0;
-		mac_ctx->lim.gLim50Band11dScanDone = 0;
-		mac_ctx->lim.gLimReturnAfterFirstMatch =
-			scan_req->returnAfterFirstMatch;
-		mac_ctx->lim.gLimReturnUniqueResults =
-			((scan_req->returnUniqueResults) > 0 ? true : false);
-
-		if (QDF_STATUS_SUCCESS !=
-			lim_send_hal_start_scan_offload_req(mac_ctx,
-			    scan_req)) {
-			pe_err("Couldn't send Offload scan request");
-			lim_send_sme_scan_rsp(mac_ctx,
-					eSIR_SME_INVALID_PARAMETERS,
-					scan_req->sessionId,
-					scan_req->transactionId,
-					scan_req->scan_id);
-			return;
-		}
-	} else {
-		/* In all other cases return 'cached' scan results */
-		if (mac_ctx->lim.gLimRspReqd) {
-			mac_ctx->lim.gLimRspReqd = false;
-			lim_send_sme_scan_rsp(mac_ctx, eSIR_SME_SUCCESS,
-				scan_req->sessionId,
-				scan_req->transactionId, scan_req->scan_id);
-		}
-	}
-}
-
 /**
  * __lim_process_clear_dfs_channel_list()
  *
@@ -4427,10 +4106,6 @@ void lim_process_regd_defd_sme_req_after_noa_start(tpAniSirGlobal mac_ctx)
 		return;
 	}
 	switch (mac_ctx->lim.gDeferMsgTypeForNOA) {
-	case eWNI_SME_SCAN_REQ:
-		__lim_process_sme_scan_req(mac_ctx,
-				mac_ctx->lim.gpDefdSmeMsgForNOA);
-		break;
 	case eWNI_SME_JOIN_REQ:
 		__lim_process_sme_join_req(mac_ctx,
 				mac_ctx->lim.gpDefdSmeMsgForNOA);
@@ -4861,10 +4536,6 @@ bool lim_process_sme_req_messages(tpAniSirGlobal pMac,
 		bufConsumed = __lim_process_sme_start_bss_req(pMac, pMsg);
 		break;
 
-	case eWNI_SME_SCAN_REQ:
-		__lim_process_sme_scan_req(pMac, pMsgBuf);
-		break;
-
 	case eWNI_SME_CLEAR_DFS_CHANNEL_LIST:
 		__lim_process_clear_dfs_channel_list(pMac, pMsg);
 		break;

+ 0 - 81
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -758,87 +758,6 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac,
 	lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
 } /*** end lim_send_sme_start_bss_rsp() ***/
 
-/**
- * lim_send_sme_scan_rsp() - Send scan response to SME
- * @pMac:         Pointer to Global MAC structure
- * @length:       Indicates length of message
- * @resultCode:   Indicates the result of previously issued
- *                     eWNI_SME_SCAN_REQ message
- * @scan_id: scan identifier
- *
- * This function is called by lim_process_sme_req_messages() to send
- * eWNI_SME_SCAN_RSP message to applications above MAC
- *
- * return: None
- */
-
-void
-lim_send_sme_scan_rsp(tpAniSirGlobal pMac, tSirResultCodes resultCode,
-		uint8_t smesessionId, uint16_t smetranscationId,
-		uint32_t scan_id)
-{
-	lim_post_sme_scan_rsp_message(pMac, resultCode, smesessionId,
-				smetranscationId, scan_id);
-}
-
-/**
- * lim_post_sme_scan_rsp_message()
- *
- ***FUNCTION:
- * This function is called by lim_send_sme_scan_rsp() to send
- * eWNI_SME_SCAN_RSP message with failed result code
- *
- ***NOTE:
- * NA
- *
- * @param pMac         Pointer to Global MAC structure
- * @param length       Indicates length of message
- * @param resultCode   failed result code
- *
- * @return None
- */
-
-void
-lim_post_sme_scan_rsp_message(tpAniSirGlobal pMac,
-			tSirResultCodes resultCode, uint8_t smesessionId,
-			uint16_t smetransactionId,
-			uint32_t scan_id)
-{
-	tpSirSmeScanRsp pSirSmeScanRsp;
-	struct scheduler_msg mmhMsg = {0};
-
-	pe_debug("send SME_SCAN_RSP reasonCode: %s",
-		lim_result_code_str(resultCode));
-
-	pSirSmeScanRsp = qdf_mem_malloc(sizeof(tSirSmeScanRsp));
-	if (NULL == pSirSmeScanRsp) {
-		pe_err("AllocateMemory failed for eWNI_SME_SCAN_RSP");
-		return;
-	}
-
-	pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP;
-	pSirSmeScanRsp->statusCode = resultCode;
-
-	/*Update SME session Id and transaction Id */
-	pSirSmeScanRsp->sessionId = smesessionId;
-	pSirSmeScanRsp->transcationId = smetransactionId;
-	pSirSmeScanRsp->scan_id = scan_id;
-
-	mmhMsg.type = eWNI_SME_SCAN_RSP;
-	mmhMsg.bodyptr = pSirSmeScanRsp;
-	mmhMsg.bodyval = 0;
-
-	MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type));
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
-	lim_diag_event_report(pMac, WLAN_PE_DIAG_SCAN_RSP_EVENT, NULL,
-			      (uint16_t) resultCode, 0);
-#endif /* FEATURE_WLAN_DIAG_SUPPORT */
-
-	lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT);
-	return;
-
-} /*** lim_post_sme_scan_rsp_message ***/
-
 void lim_send_sme_disassoc_deauth_ntf(tpAniSirGlobal pMac,
 				      QDF_STATUS status, uint32_t *pCtx)
 {

+ 1 - 6
core/mac/src/pe/lim/lim_send_sme_rsp_messages.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -51,11 +51,6 @@ void lim_send_sme_roc_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type,
 	 uint32_t scan_id);
 void lim_send_sme_start_bss_rsp(tpAniSirGlobal, uint16_t, tSirResultCodes,
 				tpPESession, uint8_t, uint16_t);
-void lim_send_sme_scan_rsp(tpAniSirGlobal, tSirResultCodes, uint8_t,
-	uint16_t, uint32_t scan_id);
-void lim_post_sme_scan_rsp_message(tpAniSirGlobal, tSirResultCodes,
-				   uint8_t, uint16_t, uint32_t scan_id);
-
 void lim_send_sme_join_reassoc_rsp(tpAniSirGlobal, uint16_t, tSirResultCodes,
 				   uint16_t, tpPESession, uint8_t, uint16_t);
 void lim_send_sme_disassoc_ntf(tpAniSirGlobal, tSirMacAddr, tSirResultCodes,

+ 0 - 3
core/mac/src/pe/lim/lim_types.h

@@ -706,9 +706,6 @@ void lim_set_channel(tpAniSirGlobal pMac, uint8_t channel,
 		uint32_t dfs_regdomain);
 
 
-/* / Function that completes channel scan */
-void lim_complete_mlm_scan(tpAniSirGlobal, tSirResultCodes);
-
 #ifdef ANI_SUPPORT_11H
 /* / Function that sends Measurement Report action frame */
 tSirRetStatus lim_send_meas_report_frame(tpAniSirGlobal, tpSirMacMeasReqActionFrame,

+ 0 - 4
core/mac/src/pe/lim/lim_utils.c

@@ -280,10 +280,6 @@ char *lim_msg_str(uint32_t msgType)
 	switch (msgType) {
 	case eWNI_SME_SYS_READY_IND:
 		return "eWNI_SME_SYS_READY_IND";
-	case eWNI_SME_SCAN_REQ:
-		return "eWNI_SME_SCAN_REQ";
-	case eWNI_SME_SCAN_RSP:
-		return "eWNI_SME_SCAN_RSP";
 	case eWNI_SME_JOIN_REQ:
 		return "eWNI_SME_JOIN_REQ";
 	case eWNI_SME_JOIN_RSP:

+ 0 - 3
core/mac/src/sys/legacy/src/utils/src/mac_trace.c

@@ -230,8 +230,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
 {
 	switch (sme_msg) {
 		CASE_RETURN_STRING(eWNI_SME_SYS_READY_IND);
-		CASE_RETURN_STRING(eWNI_SME_SCAN_REQ);
-		CASE_RETURN_STRING(eWNI_SME_SCAN_RSP);
 		CASE_RETURN_STRING(eWNI_SME_JOIN_REQ);
 		CASE_RETURN_STRING(eWNI_SME_JOIN_RSP);
 		CASE_RETURN_STRING(eWNI_SME_SETCONTEXT_REQ);
@@ -517,7 +515,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
 		CASE_RETURN_STRING(WMA_UPDATE_OP_MODE);
 		CASE_RETURN_STRING(WMA_UPDATE_MEMBERSHIP);
 		CASE_RETURN_STRING(WMA_UPDATE_USERPOS);
-		CASE_RETURN_STRING(WMA_START_SCAN_OFFLOAD_REQ);
 		CASE_RETURN_STRING(WMA_UPDATE_CHAN_LIST_REQ);
 		CASE_RETURN_STRING(WMA_CLI_SET_CMD);
 #ifndef REMOVE_PKT_LOG

+ 0 - 82
core/sme/inc/csr_internal.h

@@ -115,21 +115,7 @@ enum csr_cfgdot11mode {
 };
 
 enum csr_scan_reason {
-	eCsrScanOther = 1,
-	eCsrScanLostLink1,
-	eCsrScanLostLink2,
-	eCsrScanLostLink3,
-	eCsrScanLostLink4,
-	eCsrScan11d1,           /* First 11d scan */
-	eCsrScan11d2,           /* First 11d scan has failed */
-	eCsrScan11dDone,        /* 11d scan succeed, try rest of the channels */
-	eCsrScanUserRequest,
 	eCsrScanForSsid,
-	eCsrScanIdleScan,
-	eCsrScanProbeBss,       /* direct prb on entry from candidate list-HO */
-	eCsrScanAbortNormalScan,/* aborting a normal scan */
-	eCsrScanP2PFindPeer,
-	eCsrScanCandidateFound,
 };
 
 enum csr_roam_reason {
@@ -342,7 +328,6 @@ struct scan_cmd {
 	uint32_t scanID;
 	csr_scan_completeCallback callback;
 	void *pContext;
-	enum csr_scan_reason reason;
 	eCsrScanStatus status;
 	enum csr_roam_state lastRoamState[CSR_ROAM_SESSION_MAX];
 	tCsrRoamProfile *pToRoamProfile;
@@ -688,14 +673,6 @@ struct csr_votes11d {
 
 struct csr_scanstruct {
 	struct scan_profile scanProfile;
-	bool fScanEnable;
-	bool fFullScanIssued;
-	qdf_mc_timer_t hTimerIdleScan;
-	/*
-	 * changes on every scan, it is used as a flag for whether 11d info is
-	 * found on every scan
-	 */
-	uint8_t channelOf11dInfo;
 	uint8_t scanResultCfgAgingTime;
 	tSirScanType curScanType;
 	struct csr_channel channels11d;
@@ -1438,65 +1415,6 @@ QDF_STATUS csr_issue_stored_joinreq(tpAniSirGlobal mac_ctx,
 		uint32_t session_id);
 QDF_STATUS csr_get_channels_and_power(tpAniSirGlobal pMac);
 
-/* csr_scan_process_single_bssdescr() - Add a bssdescriptor to scan table
- *
- * @mac_ctx - MAC context
- * @bssdescr - Pointer to BSS description structure that contains
- *             everything from beacon/probe response frame and additional
- *             information.
- * @scan_id - Scan identifier of the scan request that was running
- *            when this beacon was received. Reserved for future when
- *            firmware provides that information.
- * @flags - Reserved for future use.
- *
- * Callback routine called by LIM when it receives a beacon or probe response
- * from the device. 802.11 frame is already converted to internal
- * tSirBssDescription data structure.
- *
- * Return: 0 or other error codes.
- */
-
-QDF_STATUS csr_scan_process_single_bssdescr(tpAniSirGlobal pMac,
-		tSirBssDescription *pSirBssDescription,
-		uint32_t scan_id, uint32_t flags);
-
-void csr_scan_pending_ll_unlock(struct sAniSirGlobal *mac_ctx);
-void csr_scan_active_ll_unlock(struct sAniSirGlobal *mac_ctx);
-void csr_scan_pending_ll_lock(struct sAniSirGlobal *mac_ctx);
-void csr_scan_active_ll_lock(struct sAniSirGlobal *mac_ctx);
-uint32_t csr_scan_active_ll_count(struct sAniSirGlobal *mac_ctx);
-uint32_t csr_scan_pending_ll_count(struct sAniSirGlobal *mac_ctx);
-bool csr_scan_active_ll_is_list_empty(
-				struct sAniSirGlobal *mac_ctx,
-				bool inter_locked);
-bool csr_scan_active_ll_remove_entry(
-		struct sAniSirGlobal *mac_ctx,
-		tListElem *entry, bool inter_locked);
-bool csr_scan_pending_ll_remove_entry(
-		struct sAniSirGlobal *mac_ctx,
-		tListElem *entry, bool inter_locked);
-tListElem *csr_scan_active_ll_peek_head(
-		struct sAniSirGlobal *mac_ctx,
-		bool inter_locked);
-tListElem *csr_scan_pending_ll_peek_head(
-		struct sAniSirGlobal *mac_ctx,
-		bool inter_locked);
-tListElem *csr_scan_pending_ll_next(struct sAniSirGlobal *mac_ctx,
-		tListElem *entry, bool inter_locked);
-tListElem *csr_scan_active_ll_next(struct sAniSirGlobal *mac_ctx,
-		tListElem *entry, bool inter_locked);
-tListElem *csr_scan_active_ll_remove_head(
-			struct sAniSirGlobal *mac_ctx,
-			bool fInterlocked);
-tListElem *csr_scan_pending_ll_remove_head(
-			struct sAniSirGlobal *mac_ctx,
-			bool fInterlocked);
-tListElem *csr_scan_active_ll_remove_head(
-			struct sAniSirGlobal *mac_ctx,
-			bool fInterlocked);
-tListElem *csr_scan_pending_ll_remove_head(
-			struct sAniSirGlobal *mac_ctx,
-			bool fInterlocked);
 void csr_nonscan_pending_ll_unlock(struct sAniSirGlobal *mac_ctx);
 void csr_nonscan_active_ll_unlock(struct sAniSirGlobal *mac_ctx);
 void csr_nonscan_pending_ll_lock(struct sAniSirGlobal *mac_ctx);

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

@@ -844,7 +844,6 @@ QDF_STATUS sme_modify_add_ie(tHalHandle hHal,
 QDF_STATUS sme_update_add_ie(tHalHandle hHal,
 		tSirUpdateIE *pUpdateIE, eUpdateIEsType updateType);
 QDF_STATUS sme_update_connect_debug(tHalHandle hHal, uint32_t set_value);
-const char *sme_request_type_to_string(const uint8_t request_type);
 const char *sme_scan_type_to_string(const uint8_t scan_type);
 const char *sme_bss_type_to_string(const uint8_t bss_type);
 QDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId,

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

@@ -225,8 +225,6 @@ void csr_reinit_roam_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand);
 void csr_reinit_wm_status_change_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand);
 QDF_STATUS csr_roam_send_set_key_cmd(tpAniSirGlobal mac_ctx,
 		uint32_t session_id, struct setkey_cmd *set_key_cmd);
-void csr_cancel_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd);
-
 QDF_STATUS csr_is_valid_channel(tpAniSirGlobal pMac, uint8_t chnNum);
 
 QDF_STATUS sme_acquire_global_lock(tSmeStruct *psSme);

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

@@ -380,11 +380,6 @@ done:
 static void dump_csr_command_info(tpAniSirGlobal pMac, tSmeCmd *pCmd)
 {
 	switch (pCmd->command) {
-	case eSmeCommandScan:
-		sme_debug("scan command reason is %d",
-			pCmd->u.scanCmd.reason);
-		break;
-
 	case eSmeCommandRoam:
 		sme_debug("roam command reason is %d",
 			pCmd->u.roamCmd.roamReason);
@@ -523,12 +518,6 @@ QDF_STATUS sme_ser_handle_active_cmd(struct wlan_serialization_command *cmd)
 		csr_roam_process_wm_status_change_command(mac_ctx,
 					sme_cmd);
 		break;
-	case eSmeCommandScan:
-		sme_debug("Processing scan offload cmd");
-		qdf_mc_timer_start(&sme_cmd->u.scanCmd.csr_scan_timer,
-				CSR_ACTIVE_SCAN_LIST_CMD_TIMEOUT);
-		status = csr_process_scan_command(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
@@ -595,8 +584,6 @@ QDF_STATUS sme_ser_cmd_callback(void *buf,
 		break;
 	case WLAN_SER_CB_CANCEL_CMD:
 		sme_debug("WLAN_SER_CB_CANCEL_CMD callback");
-		sme_cmd = cmd->umac_cmd;
-		csr_cancel_command(mac_ctx, sme_cmd);
 		break;
 	case WLAN_SER_CB_RELEASE_MEM_CMD:
 		sme_debug("WLAN_SER_CB_RELEASE_MEM_CMD callback");
@@ -1174,7 +1161,6 @@ QDF_STATUS sme_hdd_ready_ind(tHalHandle hHal)
 		}
 		msg->messageType = eWNI_SME_SYS_READY_IND;
 		msg->length = sizeof(*msg);
-		msg->add_bssdescr_cb = csr_scan_process_single_bssdescr;
 		msg->csr_roam_synch_cb = csr_roam_synch_callback;
 		msg->sme_msg_cb = sme_process_msg_callback;
 

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

@@ -170,7 +170,6 @@ static uint8_t *sme_trace_get_command_string(uint32_t command)
 		CASE_RETURN_STRING(eSmeNoCommand);
 		CASE_RETURN_STRING(eSmeDropCommand);
 		CASE_RETURN_STRING(eSmeCsrCommandMask);
-		CASE_RETURN_STRING(eSmeCommandScan);
 		CASE_RETURN_STRING(eSmeCommandRoam);
 		CASE_RETURN_STRING(eSmeCommandWmStatusChange);
 #ifdef FEATURE_WLAN_TDLS

+ 14 - 183
core/sme/src/csr/csr_api_roam.c

@@ -1057,7 +1057,7 @@ QDF_STATUS csr_start(tpAniSirGlobal pMac)
 			break;
 
 		pMac->roam.sPendingCommands = 0;
-		csr_scan_enable(pMac);
+		ucfg_scan_set_enable(pMac->psoc, true);
 		for (i = 0; i < CSR_ROAM_SESSION_MAX; i++)
 			status = csr_neighbor_roam_init(pMac, i);
 		pMac->roam.tlStatsReqInfo.numClient = 0;
@@ -1082,7 +1082,7 @@ QDF_STATUS csr_stop(tpAniSirGlobal pMac, tHalStopType stopType)
 	for (sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++)
 		csr_roam_close_session(pMac, sessionId, true);
 
-	csr_scan_disable(pMac);
+	ucfg_scan_set_enable(pMac->psoc, false);
 	pMac->scan.fCancelIdleScan = false;
 	pMac->scan.fRestartIdleScan = false;
 
@@ -1405,41 +1405,12 @@ void csr_release_command_roam(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 	csr_reinit_roam_cmd(pMac, pCommand);
 }
 
-void csr_release_command_scan(tpAniSirGlobal pMac, tSmeCmd *pCommand)
-{
-	qdf_mc_timer_stop(&pCommand->u.scanCmd.csr_scan_timer);
-	qdf_mc_timer_destroy(&pCommand->u.scanCmd.csr_scan_timer);
-	csr_reinit_scan_cmd(pMac, pCommand);
-}
-
 void csr_release_command_wm_status_change(tpAniSirGlobal pMac,
 					tSmeCmd *pCommand)
 {
 	csr_reinit_wm_status_change_cmd(pMac, pCommand);
 }
 
-void csr_cancel_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd)
-{
-	switch (sme_cmd->command) {
-	case eSmeCommandScan:
-		/*
-		 * We need to inform the requester before dropping
-		 * the scan command
-		 */
-		sme_warn("Drop scan reason %d callback %pK",
-				sme_cmd->u.scanCmd.reason,
-				sme_cmd->u.scanCmd.callback);
-		if (NULL != sme_cmd->u.scanCmd.callback) {
-			sme_warn("callback scan requester");
-			csr_scan_call_callback(mac_ctx, sme_cmd,
-					eCSR_SCAN_ABORT);
-		}
-		break;
-	default:
-		break;
-	}
-}
-
 void csr_roam_substate_change(tpAniSirGlobal pMac,
 		enum csr_roam_substate NewSubstate, uint32_t sessionId)
 {
@@ -7004,21 +6975,9 @@ static void csr_roam_process_results_default(tpAniSirGlobal mac_ctx,
 					eCSR_ROAM_RESULT_FORCED);
 		}
 		break;
-	case eCsrLostLink1:
-		/* if lost link roam1 failed, then issue lost link Scan2 ... */
-		csr_scan_request_lost_link2(mac_ctx, session_id);
-		break;
-	case eCsrLostLink2:
-		/* if lost link roam2 failed, then issue lost link scan3 ... */
-		csr_scan_request_lost_link3(mac_ctx, session_id);
-		break;
-	case eCsrLostLink3:
 	default:
 		csr_roam_state_change(mac_ctx,
 			eCSR_ROAMING_STATE_IDLE, session_id);
-
-		/* We are done with one round of lostlink roaming here */
-		csr_scan_handle_failed_lostlink3(mac_ctx, session_id);
 		break;
 	}
 }
@@ -9640,27 +9599,6 @@ bool csr_is_roam_command_waiting(tpAniSirGlobal pMac)
 	return fRet;
 }
 
-bool csr_is_scan_for_roam_command_active(tpAniSirGlobal pMac,
-					uint8_t session_id)
-{
-	bool fRet = false;
-	tListElem *pEntry;
-	tSmeCmd *pCommand;
-	/* alwasy lock active list before locking pending list */
-	csr_nonscan_active_ll_lock(pMac);
-	pEntry = csr_nonscan_active_ll_peek_head(pMac, LL_ACCESS_NOLOCK);
-	if (pEntry) {
-		pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link);
-		if ((eSmeCommandScan == pCommand->command) &&
-		    ((eCsrScanForSsid == pCommand->u.scanCmd.reason) ||
-		     (eCsrScanP2PFindPeer == pCommand->u.scanCmd.reason))) {
-			fRet = true;
-		}
-	}
-	csr_nonscan_active_ll_unlock(pMac);
-	return fRet;
-}
-
 static void
 csr_roaming_state_config_cnf_processor(tpAniSirGlobal mac_ctx,
 			tSmeCmd *cmd, uint32_t result, uint8_t sme_session_id)
@@ -12473,18 +12411,6 @@ void csr_call_roaming_completion_callback(tpAniSirGlobal pMac,
 		sme_err("pSession is NULL");
 }
 
-QDF_STATUS csr_roam_start_roaming(tpAniSirGlobal pMac, uint32_t sessionId,
-				  enum csr_roaming_reason roamingReason)
-{
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-
-	if (CSR_IS_LOSTLINK_ROAMING(roamingReason) &&
-	    (false == pMac->roam.roamSession[sessionId].fCancelRoaming)) {
-		status = csr_scan_request_lost_link1(pMac, sessionId);
-	}
-	return status;
-}
-
 /* return a bool to indicate whether roaming completed or continue. */
 bool csr_roam_complete_roaming(tpAniSirGlobal pMac, uint32_t sessionId,
 			       bool fForce, eCsrRoamResult roamResult)
@@ -12586,13 +12512,10 @@ void csr_roam_roaming_timer_handler(void *pv)
 	}
 
 	if (false == pSession->fCancelRoaming) {
-		if (!QDF_IS_STATUS_SUCCESS(csr_roam_start_roaming(pMac,
-					sessionId, pSession->roamingReason))) {
-			csr_call_roaming_completion_callback(pMac, pSession,
-							NULL, 0,
-							pSession->roamResult);
-			pSession->roamingReason = eCsrNotRoaming;
-		}
+		csr_call_roaming_completion_callback(pMac, pSession,
+						NULL, 0,
+						pSession->roamResult);
+		pSession->roamingReason = eCsrNotRoaming;
 	}
 }
 
@@ -12858,9 +12781,6 @@ QDF_STATUS csr_roam_lost_link(tpAniSirGlobal pMac, uint32_t sessionId,
 		return QDF_STATUS_E_FAILURE;
 	}
 	qdf_mem_set(&roamInfo, sizeof(struct csr_roam_info), 0);
-#ifndef NAPIER_SCAN
-	pSession->fCancelRoaming = false;
-#endif
 	if (eWNI_SME_DISASSOC_IND == type) {
 		result = eCSR_ROAM_RESULT_DISASSOC_IND;
 		pDisassocIndMsg = (tSirSmeDisassocInd *) pSirMsg;
@@ -16973,7 +16893,7 @@ static void csr_init_session(tpAniSirGlobal pMac, uint32_t sessionId)
 	csr_roam_free_connect_profile(&pSession->connectedProfile);
 	csr_roam_free_connected_info(pMac, &pSession->connectedInfo);
 	csr_free_connect_bss_desc(pMac, sessionId);
-	csr_scan_enable(pMac);
+	ucfg_scan_set_enable(pMac->psoc, true);
 	qdf_mem_set(&pSession->selfMacAddr, sizeof(struct qdf_mac_addr), 0);
 	if (pSession->pWpaRsnReqIE) {
 		qdf_mem_free(pSession->pWpaRsnReqIE);
@@ -19624,11 +19544,6 @@ static void csr_free_cmd_memory(tpAniSirGlobal pMac, tSmeCmd *pCommand)
 		return;
 	}
 	switch (pCommand->command) {
-	case eSmeCommandScan:
-		csr_scan_call_callback(pMac, pCommand,
-				pCommand->u.scanCmd.status);
-		csr_release_command_scan(pMac, pCommand);
-		break;
 	case eSmeCommandRoam:
 		csr_release_command_roam(pMac, pCommand);
 		break;
@@ -19674,16 +19589,10 @@ 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_debug("filled cmd_id[%d]",
-			sme_cmd->u.scanCmd.scanID);
-		cmd_info.cmd_id = sme_cmd->u.scanCmd.scanID;
-		cmd_info.req_type = WLAN_SER_CANCEL_SINGLE_SCAN;
-	} else {
-		sme_debug("filled cmd_id = 0");
-		cmd_info.cmd_id = 0;
-		cmd_info.req_type = WLAN_SER_CANCEL_NON_SCAN_CMD;
-	}
+
+	sme_debug("filled cmd_id = 0");
+	cmd_info.cmd_id = 0;
+	cmd_info.req_type = WLAN_SER_CANCEL_NON_SCAN_CMD;
 	cmd_info.cmd_type = csr_get_cmd_type(sme_cmd);
 	cmd_info.vdev = vdev;
 	qdf_mem_zero(&cmd, sizeof(struct wlan_serialization_command));
@@ -19708,60 +19617,6 @@ void csr_release_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd)
 		wlan_objmgr_vdev_release_ref(cmd_info.vdev, WLAN_LEGACY_SME_ID);
 }
 
-static enum wlan_serialization_cmd_type csr_get_scan_cmd_type(
-		tSmeCmd *sme_cmd)
-{
-	enum wlan_serialization_cmd_type cmd_type = WLAN_SER_CMD_MAX;
-
-	switch (sme_cmd->u.scanCmd.reason) {
-	case eCsrScanOther:
-		cmd_type = WLAN_SER_CMD_SCAN_OTHER;
-		break;
-	case eCsrScanLostLink1:
-		cmd_type = WLAN_SER_CMD_SCAN_LOST_LINK1;
-		break;
-	case eCsrScanLostLink2:
-		cmd_type = WLAN_SER_CMD_SCAN_LOST_LINK2;
-		break;
-	case eCsrScanLostLink3:
-		cmd_type = WLAN_SER_CMD_SCAN_LOST_LINK3;
-		break;
-	case eCsrScan11d1:
-		cmd_type = WLAN_SER_CMD_SCAN_11D_TYPE1;
-		break;
-	case eCsrScan11d2:
-		cmd_type = WLAN_SER_CMD_SCAN_11D_TYPE2;
-		break;
-	case eCsrScan11dDone:
-		cmd_type = WLAN_SER_CMD_SCAN_11D_DONE;
-		break;
-	case eCsrScanUserRequest:
-		cmd_type = WLAN_SER_CMD_SCAN_USER_REQ;
-		break;
-	case eCsrScanForSsid:
-		cmd_type = WLAN_SER_CMD_SCAN_FOR_SSID;
-		break;
-	case eCsrScanIdleScan:
-		cmd_type = WLAN_SER_CMD_SCAN_IDLE_SCAN;
-		break;
-	case eCsrScanProbeBss:
-		cmd_type = WLAN_SER_CMD_SCAN_PROBE_BSS;
-		break;
-	case eCsrScanAbortNormalScan:
-		cmd_type = WLAN_SER_CMD_SCAN_ABORT_NORMAL_SCAN;
-		break;
-	case eCsrScanP2PFindPeer:
-		cmd_type = WLAN_SER_CMD_SCAN_P2P_FIND_PEER;
-		break;
-	case eCsrScanCandidateFound:
-		cmd_type = WLAN_SER_CMD_SCAN_CANDIDATE_FOUND;
-		break;
-	default:
-		break;
-	}
-
-	return cmd_type;
-}
 
 static enum wlan_serialization_cmd_type csr_get_roam_cmd_type(
 		tSmeCmd *sme_cmd)
@@ -19840,9 +19695,6 @@ enum wlan_serialization_cmd_type csr_get_cmd_type(tSmeCmd *sme_cmd)
 	enum wlan_serialization_cmd_type cmd_type = WLAN_SER_CMD_MAX;
 
 	switch (sme_cmd->command) {
-	case eSmeCommandScan:
-		cmd_type = csr_get_scan_cmd_type(sme_cmd);
-		break;
 	case eSmeCommandRoam:
 		cmd_type = csr_get_roam_cmd_type(sme_cmd);
 		break;
@@ -19923,13 +19775,9 @@ 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) {
-		cmd->cmd_id = sme_cmd->u.scanCmd.scanID;
-		sme_debug("cmd_id[%d]", sme_cmd->u.scanCmd.scanID);
-	} else {
-		sme_debug("cmd_id = 0");
-		cmd->cmd_id = 0;
-	}
+	sme_debug("cmd_id = 0");
+	cmd->cmd_id = 0;
+
 	cmd->cmd_type = csr_get_cmd_type(sme_cmd);
 	sme_debug("filled cmd_type[%d] cmd_id[%d]",
 		cmd->cmd_type, cmd->cmd_id);
@@ -19963,13 +19811,6 @@ QDF_STATUS csr_queue_sme_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd,
 		goto error;
 	}
 
-	if ((eSmeCommandScan == sme_cmd->command) &&
-				mac_ctx->scan.fDropScanCmd) {
-		sme_debug("drop scan (scan reason %d) command",
-			sme_cmd->u.scanCmd.reason);
-		goto error;
-	}
-
 	if (CSR_IS_WAIT_FOR_KEY(mac_ctx, sme_cmd->sessionId)) {
 		if (!CSR_IS_DISCONNECT_COMMAND(sme_cmd)) {
 			sme_err("Can't process cmd(%d), waiting for key",
@@ -19978,16 +19819,6 @@ QDF_STATUS csr_queue_sme_command(tpAniSirGlobal mac_ctx, tSmeCmd *sme_cmd,
 		}
 	}
 
-	if (eSmeCommandScan == sme_cmd->command) {
-		if (csr_scan_active_ll_count(mac_ctx) >=
-		    mac_ctx->scan.max_scan_count) {
-			sme_err("Max scan reached");
-			csr_scan_call_callback(mac_ctx, sme_cmd,
-					       eCSR_SCAN_ABORT);
-			goto error;
-		}
-	}
-
 	qdf_mem_zero(&cmd, sizeof(struct wlan_serialization_command));
 	status = csr_set_serialization_params_to_cmd(mac_ctx, sme_cmd,
 					&cmd, high_priority);

File diff ditekan karena terlalu besar
+ 11 - 966
core/sme/src/csr/csr_api_scan.c


+ 0 - 54
core/sme/src/csr/csr_inside_api.h

@@ -108,21 +108,9 @@ bool csr_is_supported_channel(tpAniSirGlobal pMac, uint8_t channelId);
 
 enum csr_scancomplete_nextcommand {
 	eCsrNextScanNothing,
-	eCsrNextLostLinkScan1Success,
-	eCsrNextLostLinkScan1Failed,
-	eCsrNextLostLinkScan2Success,
-	eCsrNextLostLinkScan2Failed,
-	eCsrNextLostLinkScan3Success,
 	eCsrNexteScanForSsidSuccess,
-	eCsrNextLostLinkScan3Failed,
-	eCsrNext11dScan1Failure,
-	eCsrNext11dScan1Success,
-	eCsrNext11dScan2Failure,
-	eCsrNext11dScan2Success,
-	eCsrNext11dScanComplete,
 	eCsrNexteScanForSsidFailure,
 	eCsrNextCheckAllowConc,
-
 };
 
 enum csr_roamcomplete_result {
@@ -225,14 +213,11 @@ struct scan_result_list {
 enum csr_roam_state csr_roam_state_change(tpAniSirGlobal pMac,
 					  enum csr_roam_state NewRoamState,
 					  uint8_t sessionId);
-QDF_STATUS csr_scanning_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf);
 void csr_roaming_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf);
 void csr_roam_joined_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf);
 void csr_scan_callback(struct wlan_objmgr_vdev *vdev,
 				struct scan_event *event, void *arg);
-bool csr_scan_complete(tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp);
 void csr_release_command_roam(tpAniSirGlobal pMac, tSmeCmd *pCommand);
-void csr_release_command_scan(tpAniSirGlobal pMac, tSmeCmd *pCommand);
 void csr_release_command_wm_status_change(tpAniSirGlobal pMac,
 					  tSmeCmd *pCommand);
 void csr_release_roc_req_cmd(tpAniSirGlobal mac_ctx,
@@ -247,7 +232,6 @@ QDF_STATUS csr_roam_save_connected_bss_desc(tpAniSirGlobal pMac,
 					    tSirBssDescription *pBssDesc);
 bool csr_is_network_type_equal(tSirBssDescription *pSirBssDesc1,
 			       tSirBssDescription *pSirBssDesc2);
-QDF_STATUS csr_scan_sme_scan_response(tpAniSirGlobal pMac, void *pMsgBuf);
 /*
  * Prepare a filter base on a profile for parsing the scan results.
  * Upon successful return, caller MUST call csr_free_scan_filter on
@@ -269,15 +253,6 @@ void csr_roam_stopTKIPCounterMeasureTimer(tpAniSirGlobal pMac);
 
 QDF_STATUS csr_scan_open(tpAniSirGlobal pMac);
 QDF_STATUS csr_scan_close(tpAniSirGlobal pMac);
-QDF_STATUS csr_scan_request_lost_link1(tpAniSirGlobal pMac, uint32_t sessionId);
-QDF_STATUS csr_scan_request_lost_link2(tpAniSirGlobal pMac, uint32_t sessionId);
-QDF_STATUS csr_scan_request_lost_link3(tpAniSirGlobal pMac, uint32_t sessionId);
-QDF_STATUS csr_scan_handle_failed_lostlink1(tpAniSirGlobal pMac,
-					    uint32_t sessionId);
-QDF_STATUS csr_scan_handle_failed_lostlink2(tpAniSirGlobal pMac,
-					    uint32_t sessionId);
-QDF_STATUS csr_scan_handle_failed_lostlink3(tpAniSirGlobal pMac,
-					    uint32_t sessionId);
 bool csr_scan_append_bss_description(tpAniSirGlobal pMac,
 						tSirBssDescription *
 						pSirBssDescription,
@@ -314,7 +289,6 @@ bool csr_learn_11dcountry_information(tpAniSirGlobal pMac,
 void csr_apply_country_information(tpAniSirGlobal pMac);
 void csr_set_cfg_scan_control_list(tpAniSirGlobal pMac, uint8_t *countryCode,
 				   struct csr_channel *pChannelList);
-void csr_reinit_scan_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand);
 void csr_free_scan_result_entry(tpAniSirGlobal pMac, struct tag_csrscan_result
 				*pResult);
 
@@ -366,8 +340,6 @@ bool csr_is_same_profile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile
 bool csr_is_roam_command_waiting(tpAniSirGlobal pMac);
 bool csr_is_roam_command_waiting_for_session(tpAniSirGlobal pMac,
 					uint32_t sessionId);
-bool csr_is_scan_for_roam_command_active(tpAniSirGlobal pMac,
-					uint8_t session_id);
 eRoamCmdStatus csr_get_roam_complete_status(tpAniSirGlobal pMac,
 					    uint32_t sessionId);
 /* pBand can be NULL if caller doesn't need to get it */
@@ -495,25 +467,6 @@ QDF_STATUS csr_roam_get_session_id_from_bssid(tpAniSirGlobal pMac,
 enum csr_cfgdot11mode csr_find_best_phy_mode(tpAniSirGlobal pMac,
 							uint32_t phyMode);
 
-/*
- * csr_scan_enable() -
- * Enable the scanning feature of CSR. It must be called before any scan
- * request can be performed.
- *
- * tHalHandle - HAL context handle
- * Return QDF_STATUS
- */
-QDF_STATUS csr_scan_enable(tpAniSirGlobal pMac);
-
-/*
- * csr_scan_disable() -
- * Disableing the scanning feature of CSR. After this function return success,
- * no scan is performed until a successful to csr_scan_enable
- *
- * tHalHandle - HAL context handle
- * Return QDF_STATUS
- */
-QDF_STATUS csr_scan_disable(tpAniSirGlobal pMac);
 /*
  * csr_scan_request() -
  * Request a 11d or full scan.
@@ -647,8 +600,6 @@ void csr_release_command(tpAniSirGlobal pMac, tSmeCmd *pCommand);
 void csr_release_command_buffer(tpAniSirGlobal pMac, tSmeCmd *pCommand);
 void csr_scan_flush_bss_entry(tpAniSirGlobal pMac,
 			      tpSmeCsaOffloadInd pCsaOffloadInd);
-QDF_STATUS csr_get_active_scan_entry(tpAniSirGlobal mac, uint32_t scan_id,
-	tListElem **entry);
 
 #ifdef FEATURE_WLAN_WAPI
 bool csr_is_profile_wapi(tCsrRoamProfile *pProfile);
@@ -1072,17 +1023,12 @@ QDF_STATUS csr_send_ext_change_channel(tpAniSirGlobal mac_ctx,
 QDF_STATUS csr_set_ht2040_mode(tpAniSirGlobal pMac, uint32_t sessionId,
 			       ePhyChanBondState cbMode, bool obssEnabled);
 #endif
-#ifndef NAPIER_SCAN
-void csr_saved_scan_cmd_free_fields(tpAniSirGlobal mac_ctx,
-				    tSmeCmd *saved_scan_cmd);
-#else
 QDF_STATUS csr_scan_handle_search_for_ssid(tpAniSirGlobal mac_ctx,
 					   uint32_t session_id);
 QDF_STATUS csr_scan_handle_search_for_ssid_failure(tpAniSirGlobal mac,
 		uint32_t session_id);
 void csr_saved_scan_cmd_free_fields(tpAniSirGlobal mac_ctx,
 				    struct csr_roam_session *session);
-#endif
 tpSirBssDescription csr_get_fst_bssdescr_ptr(tScanResultHandle result_handle);
 
 tSirBssDescription*

+ 1 - 217
core/sme/src/csr/csr_util.c

@@ -434,22 +434,6 @@ void csr_nonscan_pending_ll_insert_tail(struct sAniSirGlobal *mac_ctx,
 {
 }
 
-void csr_scan_pending_ll_unlock(struct sAniSirGlobal *mac_ctx)
-{
-}
-
-void csr_scan_active_ll_unlock(struct sAniSirGlobal *mac_ctx)
-{
-}
-
-void csr_scan_pending_ll_lock(struct sAniSirGlobal *mac_ctx)
-{
-}
-
-void csr_scan_active_ll_lock(struct sAniSirGlobal *mac_ctx)
-{
-}
-
 void csr_nonscan_pending_ll_unlock(struct sAniSirGlobal *mac_ctx)
 {
 }
@@ -476,23 +460,6 @@ uint32_t csr_nonscan_pending_ll_count(struct sAniSirGlobal *mac_ctx)
 	return wlan_serialization_get_pending_list_count(mac_ctx->psoc, false);
 }
 
-uint32_t csr_scan_active_ll_count(struct sAniSirGlobal *mac_ctx)
-{
-	return wlan_serialization_get_active_list_count(mac_ctx->psoc, true);
-}
-
-uint32_t csr_scan_pending_ll_count(struct sAniSirGlobal *mac_ctx)
-{
-	return wlan_serialization_get_pending_list_count(mac_ctx->psoc, true);
-}
-
-bool csr_scan_active_ll_is_list_empty(struct sAniSirGlobal *mac_ctx,
-					bool inter_locked)
-{
-	return !wlan_serialization_get_active_list_count(mac_ctx->psoc, true);
-}
-
-
 bool csr_nonscan_active_ll_is_list_empty(struct sAniSirGlobal *mac_ctx,
 				bool inter_locked)
 {
@@ -538,41 +505,6 @@ tListElem *csr_nonscan_pending_ll_peek_head(struct sAniSirGlobal *mac_ctx,
 	return &sme_cmd->Link;
 }
 
-tListElem *csr_scan_active_ll_peek_head(struct sAniSirGlobal *mac_ctx,
-		bool inter_locked)
-{
-	struct wlan_serialization_command *cmd;
-	tSmeCmd *sme_cmd;
-
-	SME_ENTER();
-	cmd = wlan_serialization_peek_head_active_cmd_using_psoc(mac_ctx->psoc,
-			true);
-	if (!cmd) {
-		sme_err("No cmd found");
-		return NULL;
-	}
-	sme_cmd = cmd->umac_cmd;
-
-	return &sme_cmd->Link;
-}
-
-tListElem *csr_scan_pending_ll_peek_head(struct sAniSirGlobal *mac_ctx,
-		bool inter_locked)
-{
-	struct wlan_serialization_command *cmd;
-	tSmeCmd *sme_cmd;
-
-	cmd = wlan_serialization_peek_head_pending_cmd_using_psoc(mac_ctx->psoc,
-			true);
-	if (!cmd) {
-		sme_err("No cmd found");
-		return NULL;
-	}
-	sme_cmd = cmd->umac_cmd;
-
-	return &sme_cmd->Link;
-}
-
 bool csr_nonscan_active_ll_remove_entry(struct sAniSirGlobal *mac_ctx,
 		tListElem *entry, bool inter_locked)
 {
@@ -597,74 +529,6 @@ bool csr_nonscan_pending_ll_remove_entry(struct sAniSirGlobal *mac_ctx,
 	return false;
 }
 
-bool csr_scan_active_ll_remove_entry(struct sAniSirGlobal *mac_ctx,
-		tListElem *entry, bool inter_locked)
-{
-	tListElem *found_sme_cmd;
-	tSmeCmd *sme_cmd;
-	struct wlan_serialization_command *cmd;
-
-	if (!entry) {
-		sme_err("entry is null");
-		return false;
-	}
-
-	sme_cmd = GET_BASE_ADDR(entry, tSmeCmd, Link);
-	cmd = wlan_serialization_get_scan_cmd_using_scan_id(mac_ctx->psoc,
-				sme_cmd->sessionId, sme_cmd->u.scanCmd.scanID,
-				true);
-	if (!cmd) {
-		sme_err("Can't find the entry");
-		return false;
-	}
-	sme_cmd = cmd->umac_cmd;
-	found_sme_cmd = &sme_cmd->Link;
-	if (found_sme_cmd == entry)
-		return true;
-
-	return false;
-}
-
-bool csr_scan_pending_ll_remove_entry(struct sAniSirGlobal *mac_ctx,
-		tListElem *entry, bool inter_locked)
-{
-	tListElem *found_sme_cmd;
-	tSmeCmd *sme_cmd;
-	struct wlan_serialization_command *cmd;
-
-	if (!entry) {
-		sme_err("entry is null");
-		return false;
-	}
-	sme_cmd = GET_BASE_ADDR(entry, tSmeCmd, Link);
-	cmd = wlan_serialization_get_scan_cmd_using_scan_id(mac_ctx->psoc,
-				sme_cmd->sessionId, sme_cmd->u.scanCmd.scanID,
-				false);
-	if (!cmd) {
-		sme_err("Can't find the entry");
-		return false;
-	}
-	sme_cmd = cmd->umac_cmd;
-	found_sme_cmd = &sme_cmd->Link;
-	if (found_sme_cmd == entry)
-		return true;
-
-	return false;
-}
-
-tListElem *csr_scan_active_ll_remove_head(struct sAniSirGlobal *mac_ctx,
-		bool inter_locked)
-{
-	return csr_scan_active_ll_peek_head(mac_ctx, inter_locked);
-}
-
-tListElem *csr_scan_pending_ll_remove_head(struct sAniSirGlobal *mac_ctx,
-		bool inter_locked)
-{
-	return csr_scan_pending_ll_peek_head(mac_ctx, inter_locked);
-}
-
-
 tListElem *csr_nonscan_active_ll_remove_head(struct sAniSirGlobal *mac_ctx,
 		bool inter_locked)
 {
@@ -677,62 +541,6 @@ tListElem *csr_nonscan_pending_ll_remove_head(struct sAniSirGlobal *mac_ctx,
 	return csr_nonscan_pending_ll_peek_head(mac_ctx, inter_locked);
 }
 
-tListElem *csr_scan_active_ll_next(struct sAniSirGlobal *mac_ctx,
-				tListElem *entry, bool inter_locked)
-{
-	tSmeCmd *sme_cmd;
-	struct wlan_serialization_command cmd, *tcmd;
-
-	if (!entry)
-		return NULL;
-	sme_cmd = GET_BASE_ADDR(entry, tSmeCmd, Link);
-	if (sme_cmd->command == eSmeCommandScan)
-		cmd.cmd_id = sme_cmd->u.scanCmd.scanID;
-	else
-		cmd.cmd_id = 0;
-	cmd.cmd_type = csr_get_cmd_type(sme_cmd);
-	cmd.vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc,
-				sme_cmd->sessionId, WLAN_LEGACY_SME_ID);
-	tcmd = wlan_serialization_get_active_list_next_node_using_psoc(
-				mac_ctx->psoc, &cmd, true);
-	if (cmd.vdev)
-		wlan_objmgr_vdev_release_ref(cmd.vdev, WLAN_LEGACY_SME_ID);
-	if (!tcmd) {
-		sme_err("No cmd found");
-		return NULL;
-	}
-	sme_cmd = tcmd->umac_cmd;
-	return &sme_cmd->Link;
-}
-
-tListElem *csr_scan_pending_ll_next(struct sAniSirGlobal *mac_ctx,
-				tListElem *entry, bool inter_locked)
-{
-	tSmeCmd *sme_cmd;
-	struct wlan_serialization_command cmd, *tcmd;
-
-	if (!entry)
-		return NULL;
-	sme_cmd = GET_BASE_ADDR(entry, tSmeCmd, Link);
-	if (sme_cmd->command == eSmeCommandScan)
-		cmd.cmd_id = sme_cmd->u.scanCmd.scanID;
-	else
-		cmd.cmd_id = 0;
-	cmd.cmd_type = csr_get_cmd_type(sme_cmd);
-	cmd.vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc,
-				sme_cmd->sessionId, WLAN_LEGACY_SME_ID);
-	tcmd = wlan_serialization_get_pending_list_next_node_using_psoc(
-				mac_ctx->psoc, &cmd, true);
-	if (cmd.vdev)
-		wlan_objmgr_vdev_release_ref(cmd.vdev, WLAN_LEGACY_SME_ID);
-	if (!tcmd) {
-		sme_err("No cmd found");
-		return NULL;
-	}
-	sme_cmd = tcmd->umac_cmd;
-	return &sme_cmd->Link;
-}
-
 tListElem *csr_nonscan_pending_ll_next(struct sAniSirGlobal *mac_ctx,
 				tListElem *entry, bool inter_locked)
 {
@@ -742,10 +550,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)
-		cmd.cmd_id = sme_cmd->u.scanCmd.scanID;
-	else
-		cmd.cmd_id = 0;
+	cmd.cmd_id = 0;
 	cmd.cmd_type = csr_get_cmd_type(sme_cmd);
 	cmd.vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc,
 				sme_cmd->sessionId, WLAN_LEGACY_SME_ID);
@@ -6846,27 +6651,6 @@ bool csr_is_channel_present_in_list(uint8_t *pChannelList,
 	return false;
 }
 
-/**
- * sme_request_type_to_string(): converts scan request enum to string.
- * @request_type: scan request type enum.
- *
- * Return: Printable string for request_type
- */
-const char *sme_request_type_to_string(const uint8_t request_type)
-{
-	switch (request_type) {
-	CASE_RETURN_STRING(eCSR_SCAN_REQUEST_11D_SCAN);
-	CASE_RETURN_STRING(eCSR_SCAN_REQUEST_FULL_SCAN);
-	CASE_RETURN_STRING(eCSR_SCAN_IDLE_MODE_SCAN);
-	CASE_RETURN_STRING(eCSR_SCAN_HO_PROBE_SCAN);
-	CASE_RETURN_STRING(eCSR_SCAN_P2P_DISCOVERY);
-	CASE_RETURN_STRING(eCSR_SCAN_SOFTAP_CHANNEL_RANGE);
-	CASE_RETURN_STRING(eCSR_SCAN_P2P_FIND_PEER);
-	default:
-		return "Unknown Scan Request Type";
-	}
-}
-
 /**
  * sme_bsstype_to_string() - converts bss type to string.
  * @bss_type: bss type enum

+ 1 - 69
core/sme/src/p2p/p2p_api.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -87,74 +87,6 @@ QDF_STATUS p2p_process_remain_on_channel_cmd(tpAniSirGlobal pMac,
 	return status;
 }
 
-/* handle LIM remain on channel rsp: Success/failure. */
-
-QDF_STATUS sme_remain_on_chn_rsp(tpAniSirGlobal pMac, uint8_t *pMsg)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tListElem *pEntry = NULL;
-	tSmeCmd *pCommand = NULL;
-	bool fFound;
-	remainOnChanCallback callback = NULL;
-	struct sir_roc_rsp *rsp = (struct sir_roc_rsp *)pMsg;
-
-	csr_get_active_scan_entry(pMac, rsp->scan_id, &pEntry);
-	if (!pEntry) {
-		sme_err("No cmd found in active list");
-		return status;
-	}
-
-	pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link);
-	if (eSmeCommandRemainOnChannel != pCommand->command)
-		return status;
-
-	callback = pCommand->u.remainChlCmd.callback;
-	if (callback && rsp) {
-		if (rsp->status != eSIR_SME_SUCCESS)
-			status = QDF_STATUS_E_FAILURE;
-		callback(pMac, pCommand->u.remainChlCmd.callbackCtx,
-				status, rsp->scan_id);
-	}
-
-	fFound = csr_scan_active_ll_remove_entry(pMac, pEntry,
-				     LL_ACCESS_LOCK);
-	if (fFound)
-		/* Now put this command back on the avilable command list */
-		csr_release_command(pMac, pCommand);
-
-	return status;
-}
-
-/* Handle the remain on channel ready indication from PE */
-
-QDF_STATUS sme_remain_on_chn_ready(tHalHandle hHal, uint8_t *pMsg)
-{
-	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tListElem *pEntry = NULL;
-	tSmeCmd *pCommand = NULL;
-	struct csr_roam_info RoamInfo;
-	struct sir_roc_rsp *rsp =  (struct sir_roc_rsp *)pMsg;
-
-	csr_get_active_scan_entry(pMac, rsp->scan_id, &pEntry);
-	if (!pEntry) {
-		sme_err("No cmd found in active list");
-		return status;
-	}
-	sme_debug("Ready Ind %d %d", rsp->session_id, rsp->scan_id);
-	pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link);
-	if (eSmeCommandRemainOnChannel == pCommand->command) {
-		RoamInfo.roc_scan_id = rsp->scan_id;
-		/* forward the indication to HDD */
-		RoamInfo.pRemainCtx = pCommand->u.remainChlCmd.callbackCtx;
-		csr_roam_call_callback(pMac, rsp->session_id,
-				       &RoamInfo, 0,
-				       eCSR_ROAM_REMAIN_CHAN_READY, 0);
-	}
-
-	return status;
-}
-
 QDF_STATUS sme_p2p_open(tHalHandle hHal)
 {
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);

+ 0 - 1
core/wma/inc/wma.h

@@ -2105,7 +2105,6 @@ QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
 
 QDF_STATUS wma_send_pdev_set_hw_mode_cmd(tp_wma_handle wma_handle,
 		struct policy_mgr_hw_mode *msg);
-QDF_STATUS wma_get_scan_id(uint32_t *scan_id);
 
 QDF_STATUS wma_send_pdev_set_dual_mac_config(tp_wma_handle wma_handle,
 		struct sir_dual_mac_config *msg);

+ 0 - 38
core/wma/src/wma_scan_roam.c

@@ -5702,44 +5702,6 @@ QDF_STATUS wma_set_rssi_monitoring(tp_wma_handle wma,
 						&params);
 }
 
-/**
- * wma_get_scan_id() - Generates scan id
- * @scan_id: Scan id
- *
- * This function generates the scan id.
- *
- * Return: QDF_STATUS
- */
-
-QDF_STATUS wma_get_scan_id(uint32_t *scan_id)
-{
-	tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
-
-	if (!scan_id) {
-		WMA_LOGE("Scan_id is NULL");
-		return QDF_STATUS_E_FAULT;
-	}
-
-	if (!wma) {
-		WMA_LOGE("%s: wma handle is NULL", __func__);
-		return QDF_STATUS_E_INVAL;
-	}
-
-#ifdef NAPIER_SCAN
-	*scan_id = ucfg_scan_get_scan_id(wma->psoc);
-#else
-	/* host need to cycle through the lower 12 bits to generate ids */
-	*scan_id = qdf_atomic_inc_return(&wma->scan_id_counter) &
-			WMA_SCAN_ID_MASK;
-	/*
-	 * Firmware expects the host scan request id appended
-	 * by PREFIX 0xA000
-	 */
-	*scan_id = *scan_id | WMI_HOST_SCAN_REQ_ID_PREFIX;
-#endif
-	return QDF_STATUS_SUCCESS;
-}
-
 #ifdef FEATURE_LFR_SUBNET_DETECTION
 /**
  * wma_set_gateway_params() - set gateway parameters

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini