qcacld-3.0: Fix layering violation while handling management frames

Fix layering violation while handling management frames. Currently
LIM data structures are accessed before dropping Assoc, Disassoc and
Deauth packets to avoid DoS attacks. Since the LIM data structures
are accessed in different thread context, data present in them are
out of sync resulting in a crash.

Fix the layering violation by doing appropriate check in WMA instead
of doing the same in LIM

Change-Id: I8876a4d4b99948cd9ab3ccec403cf5e4050b1cff
CRs-Fixed: 977773
diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c
index 884b205..27d6a41 100644
--- a/core/mac/src/pe/lim/lim_process_message_queue.c
+++ b/core/mac/src/pe/lim/lim_process_message_queue.c
@@ -803,6 +803,17 @@
 	isFrmFt = WMA_GET_RX_FT_DONE(pRxPacketInfo);
 	fc = pHdr->fc;
 
+	if (pMac->sap.SapDfsInfo.is_dfs_cac_timer_running) {
+		psessionEntry = pe_find_session_by_bssid(pMac,
+					pHdr->bssId, &sessionId);
+		if (psessionEntry &&
+		    (QDF_SAP_MODE == psessionEntry->pePersona)) {
+			lim_log(pMac, LOG1,
+				FL("CAC timer running - drop the frame"));
+			goto end;
+		}
+	}
+
 #ifdef WLAN_DUMP_MGMTFRAMES
 	lim_log(pMac, LOGE,
 		FL("ProtVersion %d, Type %d, Subtype %d rateIndex=%d"),