qcacmn: Enable monitor dest ring in m_copy mode

In existing code, 132 bytes of OTA mgmt. and control payload is
provided to upper layers by subscribing to packet header TLV.

The requirement in M-copy mode though is to get complete payload for
mgmt. and ctrl. packets. Add change to configure monitor destination
ring and add mgmt. and ctrl. packet filter to receive full mgmt. and
ctrl. packets.

Change-Id: I0014837b51cac6f0143dcc5cb624ea2086cf4486
CRs-Fixed: 2256159
diff --git a/dp/wifi3.0/dp_rx_mon_status.c b/dp/wifi3.0/dp_rx_mon_status.c
index 10d1bfc..680d55f 100644
--- a/dp/wifi3.0/dp_rx_mon_status.c
+++ b/dp/wifi3.0/dp_rx_mon_status.c
@@ -271,6 +271,8 @@
 			struct hal_rx_ppdu_info *ppdu_info, qdf_nbuf_t nbuf)
 {
 	uint8_t size = 0;
+	struct ieee80211_frame *wh;
+	uint32_t *nbuf_data;
 
 	if (ppdu_info->msdu_info.first_msdu_payload == NULL)
 		return QDF_STATUS_SUCCESS;
@@ -280,14 +282,24 @@
 
 	pdev->m_copy_id.rx_ppdu_id = ppdu_info->com_info.ppdu_id;
 
-	/* Include 2 bytes of reserved space appended to the msdu payload */
+	wh = (struct ieee80211_frame *)(ppdu_info->msdu_info.first_msdu_payload
+					+ 4);
 	size = (ppdu_info->msdu_info.first_msdu_payload -
-				qdf_nbuf_data(nbuf)) + 2;
+				qdf_nbuf_data(nbuf));
 	ppdu_info->msdu_info.first_msdu_payload = NULL;
 
 	if (qdf_nbuf_pull_head(nbuf, size) == NULL)
 		return QDF_STATUS_SUCCESS;
 
+	if (((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) ==
+	     IEEE80211_FC0_TYPE_MGT) ||
+	     ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) ==
+	     IEEE80211_FC0_TYPE_CTL)) {
+		return QDF_STATUS_SUCCESS;
+	}
+
+	nbuf_data = (uint32_t *)qdf_nbuf_data(nbuf);
+	*nbuf_data = pdev->ppdu_info.com_info.ppdu_id;
 	/* only retain RX MSDU payload in the skb */
 	qdf_nbuf_trim_tail(nbuf, qdf_nbuf_len(nbuf) -
 				ppdu_info->msdu_info.payload_len);