Browse Source

qcacld-3.0: Remove legacy scan event handling

Remove legacy scan event handling
in the WMA and LIM.

Change-Id: Ibeb6f99335b4e745335d5968791d9e9187df47f7
CRs-Fixed: 2101353
Sandeep Puligilla 7 years ago
parent
commit
d698bf5328

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

@@ -1787,9 +1787,7 @@ static void lim_process_messages(tpAniSirGlobal mac_ctx,
 		msg->bodyptr = NULL;
 		break;
 #endif
-	case WMA_RX_SCAN_EVENT:
-		lim_process_rx_scan_event(mac_ctx, msg->bodyptr);
-		break;
+
 	case WMA_RX_CHN_STATUS_EVENT:
 		lim_process_rx_channel_status_event(mac_ctx, msg->bodyptr);
 		break;

+ 0 - 82
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -3194,88 +3194,6 @@ void lim_send_beacon_ind(tpAniSirGlobal pMac, tpPESession psessionEntry)
 	return;
 }
 
-static void lim_send_scan_offload_complete(tpAniSirGlobal pMac,
-					   tSirScanOffloadEvent *pScanEvent)
-{
-
-	pMac->lim.gLimRspReqd = false;
-	lim_send_sme_scan_rsp(pMac, pScanEvent->reasonCode,
-			pScanEvent->sessionId, 0, pScanEvent->scanId);
-}
-
-void lim_process_rx_scan_event(tpAniSirGlobal pMac, void *buf)
-{
-	tSirScanOffloadEvent *pScanEvent = (tSirScanOffloadEvent *) buf;
-
-	switch (pScanEvent->event) {
-	case SIR_SCAN_EVENT_STARTED:
-		break;
-	case SIR_SCAN_EVENT_COMPLETED:
-	pe_debug("No.of beacons and probe response received per scan %d",
-		pMac->lim.beacon_probe_rsp_cnt_per_scan);
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
-	lim_diag_event_report(pMac, WLAN_PE_DIAG_SCAN_COMPLETE_EVENT, NULL,
-			      eSIR_SUCCESS, eSIR_SUCCESS);
-	if (pMac->lim.beacon_probe_rsp_cnt_per_scan)
-		lim_diag_event_report(pMac,
-				      WLAN_PE_DIAG_SCAN_RESULT_FOUND_EVENT,
-				      NULL, eSIR_SUCCESS, eSIR_SUCCESS);
-#endif
-	/* Fall through */
-	case SIR_SCAN_EVENT_START_FAILED:
-		if (ROC_SCAN_REQUESTOR_ID == pScanEvent->requestor) {
-			lim_send_sme_roc_rsp(pMac, eWNI_SME_REMAIN_ON_CHN_RSP,
-					 eSIR_SME_SUCCESS,
-					 pScanEvent->sessionId,
-					 pScanEvent->scanId);
-			qdf_mem_free(pMac->lim.gpLimRemainOnChanReq);
-			pMac->lim.gpLimRemainOnChanReq = NULL;
-			/*
-			 * If remain on channel timer expired and action frame
-			 * is pending then indicate confirmation with status
-			 * failure.
-			 */
-			if (pMac->lim.mgmtFrameSessionId != 0xff) {
-				lim_p2p_action_cnf(pMac, NULL, false, NULL);
-				pMac->lim.mgmtFrameSessionId = 0xff;
-			}
-		} else if (PREAUTH_REQUESTOR_ID == pScanEvent->requestor) {
-			lim_preauth_scan_event_handler(pMac, pScanEvent->event,
-					 pScanEvent->sessionId,
-					 pScanEvent->scanId);
-		} else {
-			lim_send_scan_offload_complete(pMac, pScanEvent);
-		}
-		break;
-	case SIR_SCAN_EVENT_FOREIGN_CHANNEL:
-		if (ROC_SCAN_REQUESTOR_ID == pScanEvent->requestor) {
-			/*Send Ready on channel indication to SME */
-			if (pMac->lim.gpLimRemainOnChanReq) {
-				lim_send_sme_roc_rsp(pMac,
-						 eWNI_SME_REMAIN_ON_CHN_RDY_IND,
-						 eSIR_SME_SUCCESS,
-						 pScanEvent->sessionId,
-						 pScanEvent->scanId);
-			} else {
-				pe_err("gpLimRemainOnChanReq is NULL");
-			}
-		} else if (PREAUTH_REQUESTOR_ID == pScanEvent->requestor) {
-			lim_preauth_scan_event_handler(pMac, pScanEvent->event,
-					pScanEvent->sessionId,
-					pScanEvent->scanId);
-		}
-		break;
-	case SIR_SCAN_EVENT_BSS_CHANNEL:
-	case SIR_SCAN_EVENT_DEQUEUED:
-	case SIR_SCAN_EVENT_PREEMPTED:
-	default:
-		QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
-			  "Received unhandled scan event %u",
-			  pScanEvent->event);
-	}
-	qdf_mem_free(buf);
-}
-
 void lim_process_rx_channel_status_event(tpAniSirGlobal mac_ctx, void *buf)
 {
 	struct lim_channel_status *chan_status = buf;

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

@@ -921,8 +921,6 @@ typedef struct sSetLinkCbackParams {
 	void *cbackDataPtr;
 } tSetLinkCbackParams;
 
-void lim_process_rx_scan_event(tpAniSirGlobal mac, void *buf);
-
 int lim_process_remain_on_chnl_req(tpAniSirGlobal pMac, uint32_t *pMsg);
 void lim_remain_on_chn_rsp(tpAniSirGlobal pMac, QDF_STATUS status, uint32_t *data);
 void lim_send_sme_disassoc_deauth_ntf(tpAniSirGlobal mac_ctx,

+ 0 - 52
core/sme/src/csr/csr_api_scan.c

@@ -2997,57 +2997,6 @@ error:
 }
 
 #endif
-#ifndef NAPIER_SCAN
-/**
- * csr_get_active_scan_entry() - To get scan entry from active command list
- *
- * @mac_ctx - MAC context
- * @scan_id - Scan identifier of the scan request
- * @entry - scan entry returned.
- *
- * Scan entry in the active scan list mapping to the sent scan id
- * is returned to the caller.
- *
- * Return: QDF_STATUS.
- */
-QDF_STATUS csr_get_active_scan_entry(tpAniSirGlobal mac_ctx,
-	uint32_t scan_id, tListElem **entry)
-{
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	tListElem *localentry;
-	tSmeCmd *cmd;
-	uint32_t cmd_scan_id = 0;
-
-	csr_scan_active_ll_lock(mac_ctx);
-
-	if (csr_scan_active_ll_is_list_empty(mac_ctx, LL_ACCESS_NOLOCK)) {
-		sme_err("Active list Empty scanId: %d", scan_id);
-		csr_scan_active_ll_unlock(mac_ctx);
-		return QDF_STATUS_SUCCESS;
-	}
-
-	localentry = csr_scan_active_ll_peek_head(mac_ctx,
-			LL_ACCESS_NOLOCK);
-	while (localentry) {
-		cmd = GET_BASE_ADDR(localentry, tSmeCmd, Link);
-		if (cmd->command == eSmeCommandScan)
-			cmd_scan_id = cmd->u.scanCmd.u.scanRequest.scan_id;
-		else if (cmd->command == eSmeCommandRemainOnChannel)
-			cmd_scan_id = cmd->u.remainChlCmd.scan_id;
-		if (cmd_scan_id == scan_id) {
-			sme_debug("scanId Matched %d", scan_id);
-			*entry = localentry;
-			csr_scan_active_ll_unlock(mac_ctx);
-			return QDF_STATUS_SUCCESS;
-		}
-		localentry = csr_scan_active_ll_next(mac_ctx,
-				localentry, LL_ACCESS_NOLOCK);
-	}
-	csr_scan_active_ll_unlock(mac_ctx);
-	return status;
-}
-
-#else
 
 /* API will be removed after p2p component L0 */
 QDF_STATUS csr_get_active_scan_entry(tpAniSirGlobal mac_ctx,
@@ -3089,7 +3038,6 @@ QDF_STATUS csr_get_active_scan_entry(tpAniSirGlobal mac_ctx,
 
 	return status;
 }
-#endif
 
 void csr_scan_callback(struct wlan_objmgr_vdev *vdev,
 				struct scan_event *event, void *arg)

+ 1 - 11
core/wma/src/wma_main.c

@@ -3247,17 +3247,7 @@ QDF_STATUS wma_start(void)
 		qdf_status = QDF_STATUS_E_INVAL;
 		goto end;
 	}
-#ifndef NAPIER_SCAN
-	status = wmi_unified_register_event_handler(wma_handle->wmi_handle,
-						    WMI_SCAN_EVENTID,
-						    wma_scan_event_callback,
-						    WMA_RX_SERIALIZER_CTX);
-	if (0 != status) {
-		WMA_LOGE("%s: Failed to register scan callback", __func__);
-		qdf_status = QDF_STATUS_E_FAILURE;
-		goto end;
-	}
-#endif
+
 	status = wmi_unified_register_event_handler(wma_handle->wmi_handle,
 						    WMI_ROAM_EVENTID,
 						    wma_roam_event_callback,

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

@@ -5429,88 +5429,6 @@ QDF_STATUS wma_scan_probe_setoui(tp_wma_handle wma, tSirScanMacOui *psetoui)
 	return wmi_unified_scan_probe_setoui_cmd(wma->wmi_handle,
 						&set_oui);
 }
-
-/**
- * wma_scan_event_callback() - scan event callback
- * @handle: wma handle
- * @data: event data
- * @len: data length
- *
- * This function process scan event and provide indication
- * to upper layers.
- *
- * Return: 0 for success or error code.
- */
-int wma_scan_event_callback(WMA_HANDLE handle, uint8_t *data,
-			    uint32_t len)
-{
-	tp_wma_handle wma_handle = (tp_wma_handle) handle;
-	WMI_SCAN_EVENTID_param_tlvs *param_buf = NULL;
-	wmi_scan_event_fixed_param *wmi_event = NULL;
-	tSirScanOffloadEvent *scan_event;
-	uint8_t vdev_id;
-	uint32_t scan_id;
-
-	param_buf = (WMI_SCAN_EVENTID_param_tlvs *) data;
-	wmi_event = param_buf->fixed_param;
-	vdev_id = wmi_event->vdev_id;
-	scan_id = wma_handle->interfaces[vdev_id].scan_info.scan_id;
-
-	scan_event = (tSirScanOffloadEvent *) qdf_mem_malloc
-			     (sizeof(tSirScanOffloadEvent));
-	if (!scan_event) {
-		WMA_LOGE("Memory allocation failed for tSirScanOffloadEvent");
-		return -ENOMEM;
-	}
-
-	WMA_LOGD("scan_event: %u, id: 0x%x, requestor: 0x%x, freq: %u, reason: %u",
-		 wmi_event->event, wmi_event->scan_id, wmi_event->requestor,
-		 wmi_event->channel_freq, wmi_event->reason);
-
-	scan_event->event = wmi_event->event;
-	scan_event->scanId = wmi_event->scan_id;
-	scan_event->requestor = wmi_event->requestor;
-	scan_event->chanFreq = wmi_event->channel_freq;
-	scan_event->sessionId = vdev_id;
-	scan_event->reasonCode = eSIR_SME_SCAN_FAILED;
-
-	switch (wmi_event->event) {
-	case WMI_SCAN_EVENT_COMPLETED:
-	case WMI_SCAN_EVENT_DEQUEUED:
-		/*
-		 * return success always so that SME can pick whatever scan
-		 * results is available in scan cache(due to partial or
-		 * aborted scan)
-		 */
-		scan_event->event = WMI_SCAN_EVENT_COMPLETED;
-		scan_event->reasonCode = eSIR_SME_SUCCESS;
-		break;
-	case WMI_SCAN_EVENT_START_FAILED:
-		scan_event->event = WMI_SCAN_EVENT_COMPLETED;
-		scan_event->reasonCode = eSIR_SME_SCAN_FAILED;
-		break;
-	case WMI_SCAN_EVENT_PREEMPTED:
-		WMA_LOGW("%s: Unhandled Scan Event WMI_SCAN_EVENT_PREEMPTED",
-			 __func__);
-		break;
-	case WMI_SCAN_EVENT_RESTARTED:
-		WMA_LOGW("%s: Unhandled Scan Event WMI_SCAN_EVENT_RESTARTED",
-			 __func__);
-		break;
-	}
-
-	/* Stop scan completion timeout if event is WMI_SCAN_EVENT_COMPLETED */
-	if (scan_event->event ==
-			(enum sir_scan_event_type) WMI_SCAN_EVENT_COMPLETED) {
-		WMA_LOGI("scan complete:scan_id 0x%x, requestor 0x%x, vdev %d",
-			 wmi_event->scan_id, wmi_event->requestor, vdev_id);
-	}
-
-	wma_send_msg(wma_handle, WMA_RX_SCAN_EVENT, (void *)scan_event, 0);
-
-	return 0;
-}
-
 /**
  * wma_roam_better_ap_handler() - better ap event handler
  * @wma: wma handle