Browse Source

qcacld-3.0: Rename enumeration associated with scan types

qcacld-2.0 to qcacld-3.0 propagation.

Rename enumeration associated with scan types.

WMI interface files shared between host and Firmware have
the same macro defined resulting in compilaiton issue. Hence
renaming these enumeration with LIM prefix.

Change-Id: Ia196b8e4bb582490a9f957b8cdf1e3a12c4fbde0
CRs-Fixed: 981355
Krishna Kumaar Natarajan 9 years ago
parent
commit
3c443556a9

+ 24 - 12
core/mac/inc/sir_api.h

@@ -3584,20 +3584,32 @@ typedef struct sSirScanOffloadReq {
 	  -----------------------------*/
 } tSirScanOffloadReq, *tpSirScanOffloadReq;
 
-typedef enum sSirScanEventType {
-	SCAN_EVENT_STARTED = 0x1,       /* Scan command accepted by FW */
-	SCAN_EVENT_COMPLETED = 0x2,     /* Scan has been completed by FW */
-	SCAN_EVENT_BSS_CHANNEL = 0x4,   /* FW is going to move to HOME ch */
-	SCAN_EVENT_FOREIGN_CHANNEL = 0x8,   /* FW going to move to FORIEGN ch */
-	SCAN_EVENT_DEQUEUED = 0x10,     /* scan request got dequeued */
-	SCAN_EVENT_PREEMPTED = 0x20,    /* preempted by high priority scan */
-	SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
-	SCAN_EVENT_RESTARTED = 0x80,    /*scan restarted */
-	SCAN_EVENT_MAX = 0x8000
-} tSirScanEventType;
+/**
+ * lim_scan_event_type - scan event types used in LIM
+ * @LIM_SCAN_EVENT_STARTED - scan command accepted by FW
+ * @LIM_SCAN_EVENT_COMPLETED - scan has been completed by FW
+ * @LIM_SCAN_EVENT_BSS_CHANNEL - FW is going to move to HOME channel
+ * @LIM_SCAN_EVENT_FOREIGN_CHANNEL - FW is going to move to FORIEGN channel
+ * @LIM_SCAN_EVENT_DEQUEUED - scan request got dequeued
+ * @LIM_SCAN_EVENT_PREEMPTED - preempted by other high priority scan
+ * @LIM_SCAN_EVENT_START_FAILED - scan start failed
+ * @LIM_SCAN_EVENT_RESTARTED - scan restarted
+ * @LIM_SCAN_EVENT_MAX - max value for event type
+*/
+enum lim_scan_event_type {
+	LIM_SCAN_EVENT_STARTED = 0x1,
+	LIM_SCAN_EVENT_COMPLETED = 0x2,
+	LIM_SCAN_EVENT_BSS_CHANNEL = 0x4,
+	LIM_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
+	LIM_SCAN_EVENT_DEQUEUED = 0x10,
+	LIM_SCAN_EVENT_PREEMPTED = 0x20,
+	LIM_SCAN_EVENT_START_FAILED = 0x40,
+	LIM_SCAN_EVENT_RESTARTED = 0x80,
+	LIM_SCAN_EVENT_MAX = 0x8000
+};
 
 typedef struct sSirScanOffloadEvent {
-	tSirScanEventType event;
+	enum lim_scan_event_type event;
 	tSirResultCodes reasonCode;
 	uint32_t chanFreq;
 	uint32_t requestor;

+ 1 - 1
core/mac/src/pe/include/lim_ft.h

@@ -63,7 +63,7 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf,
 				    tpPESession psessionEntry);
 void lim_process_ft_preauth_rsp_timeout(tpAniSirGlobal pMac);
 void lim_preauth_scan_event_handler(tpAniSirGlobal mac_ctx,
-				tSirScanEventType event,
+				enum lim_scan_event_type event,
 				uint8_t session_id,
 				uint32_t scan_id);
 tSirRetStatus lim_ft_setup_auth_session(tpAniSirGlobal pMac,

+ 4 - 4
core/mac/src/pe/lim/lim_ft.c

@@ -1956,7 +1956,7 @@ QDF_STATUS lim_send_preauth_scan_offload(tpAniSirGlobal mac_ctx,
  */
 
 void lim_preauth_scan_event_handler(tpAniSirGlobal mac_ctx,
-				tSirScanEventType event,
+				enum lim_scan_event_type event,
 				uint8_t session_id,
 				uint32_t scan_id)
 {
@@ -1970,14 +1970,14 @@ void lim_preauth_scan_event_handler(tpAniSirGlobal mac_ctx,
 	}
 
 	switch (event) {
-	case SCAN_EVENT_START_FAILED:
+	case LIM_SCAN_EVENT_START_FAILED:
 		/* Scan command is rejected by firmware */
 		lim_log(mac_ctx, LOGE, FL("Failed to start preauth scan"));
 		lim_post_ft_pre_auth_rsp(mac_ctx, eSIR_FAILURE, NULL, 0,
 					 session_entry);
 		return;
 
-	case SCAN_EVENT_COMPLETED:
+	case LIM_SCAN_EVENT_COMPLETED:
 		/*
 		 * Scan either completed succesfully or or got terminated
 		 * after successful auth, or timed out. Either way, STA
@@ -1987,7 +1987,7 @@ void lim_preauth_scan_event_handler(tpAniSirGlobal mac_ctx,
 			session_entry);
 		break;
 
-	case SCAN_EVENT_FOREIGN_CHANNEL:
+	case LIM_SCAN_EVENT_FOREIGN_CHANNEL:
 		/* Sta is on candidate channel. Send auth */
 		lim_perform_ft_pre_auth(mac_ctx, QDF_STATUS_SUCCESS, NULL,
 					session_entry);

+ 7 - 7
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -4158,10 +4158,10 @@ void lim_process_rx_scan_event(tpAniSirGlobal pMac, void *buf)
 		  "scan_id = %u, scan_requestor_id 0x%x", pScanEvent->scanId,
 		  pScanEvent->requestor);
 	switch (pScanEvent->event) {
-	case SCAN_EVENT_STARTED:
+	case LIM_SCAN_EVENT_STARTED:
 		break;
-	case SCAN_EVENT_START_FAILED:
-	case SCAN_EVENT_COMPLETED:
+	case LIM_SCAN_EVENT_START_FAILED:
+	case LIM_SCAN_EVENT_COMPLETED:
 		if (ROC_SCAN_REQUESTOR_ID == pScanEvent->requestor) {
 			lim_send_sme_roc_rsp(pMac, eWNI_SME_REMAIN_ON_CHN_RSP,
 					 QDF_STATUS_SUCCESS,
@@ -4189,7 +4189,7 @@ void lim_process_rx_scan_event(tpAniSirGlobal pMac, void *buf)
 			lim_send_scan_offload_complete(pMac, pScanEvent);
 		}
 		break;
-	case SCAN_EVENT_FOREIGN_CHANNEL:
+	case LIM_SCAN_EVENT_FOREIGN_CHANNEL:
 		if (ROC_SCAN_REQUESTOR_ID == pScanEvent->requestor) {
 			/*Send Ready on channel indication to SME */
 			if (pMac->lim.gpLimRemainOnChanReq) {
@@ -4208,9 +4208,9 @@ void lim_process_rx_scan_event(tpAniSirGlobal pMac, void *buf)
 					pScanEvent->scanId);
 		}
 		break;
-	case SCAN_EVENT_BSS_CHANNEL:
-	case SCAN_EVENT_DEQUEUED:
-	case SCAN_EVENT_PREEMPTED:
+	case LIM_SCAN_EVENT_BSS_CHANNEL:
+	case LIM_SCAN_EVENT_DEQUEUED:
+	case LIM_SCAN_EVENT_PREEMPTED:
 	default:
 		QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
 			  "Received unhandled scan event %u",

+ 4 - 3
core/wma/src/wma_scan_roam.c

@@ -4092,7 +4092,7 @@ int wma_nlo_scan_cmp_evt_handler(void *handle, uint8_t *event,
 				WIFI_POWER_EVENT_WAKELOCK_PNO);
 		qdf_mem_zero(scan_event, sizeof(tSirScanOffloadEvent));
 		scan_event->reasonCode = eSIR_PNO_SCAN_SUCCESS;
-		scan_event->event = SCAN_EVENT_COMPLETED;
+		scan_event->event = LIM_SCAN_EVENT_COMPLETED;
 		scan_event->sessionId = nlo_event->vdev_id;
 		wma_send_msg(wma, WMA_RX_SCAN_EVENT, (void *)scan_event, 0);
 	} else {
@@ -6583,7 +6583,7 @@ int wma_scan_event_callback(WMA_HANDLE handle, uint8_t *data,
 	if (scan_event->scanId ==
 		wma_handle->interfaces[vdev_id].p2p_scan_info.scan_id) {
 		scan_event->p2pScanType = P2P_SCAN_TYPE_LISTEN;
-		if  (scan_event->event == SCAN_EVENT_COMPLETED)
+		if  (scan_event->event == LIM_SCAN_EVENT_COMPLETED)
 			wma_reset_p2p_scan_info(wma_handle, vdev_id);
 	}
 	scan_event->sessionId = vdev_id;
@@ -6620,7 +6620,8 @@ int wma_scan_event_callback(WMA_HANDLE handle, uint8_t *data,
 	}
 
 	/* Stop scan completion timeout if event is WMI_SCAN_EVENT_COMPLETED */
-	if (scan_event->event == (tSirScanEventType) WMI_SCAN_EVENT_COMPLETED) {
+	if (scan_event->event ==
+			(enum lim_scan_event_type) WMI_SCAN_EVENT_COMPLETED) {
 		WMA_LOGE("scan complete:scan_id 0x%x, requestor 0x%x, vdev %d",
 			 wmi_event->scan_id, wmi_event->requestor, vdev_id);
 	}