Merge "qca-wifi: Replace WMI_LOGD() with wmi_debug()"
diff --git a/dp/wifi3.0/dp_full_mon.c b/dp/wifi3.0/dp_full_mon.c
index a4db3c8..f535d76 100644
--- a/dp/wifi3.0/dp_full_mon.c
+++ b/dp/wifi3.0/dp_full_mon.c
@@ -588,9 +588,17 @@
 						    l3_hdr_pad +
 						    frag_len);
 
-			dp_rx_mon_add_msdu_to_list(head_msdu, msdu, &last_msdu,
-						   rx_tlv_hdr, frag_len,
-						   l3_hdr_pad);
+			if (dp_rx_mon_add_msdu_to_list(head_msdu, msdu,
+						       &last_msdu,
+						       rx_tlv_hdr, frag_len,
+						       l3_hdr_pad)
+				!= QDF_STATUS_SUCCESS) {
+				dp_rx_mon_add_msdu_to_list_failure_handler(rx_tlv_hdr,
+					pdev, &last_msdu, head_msdu,
+					tail_msdu, __func__);
+				drop_mpdu = true;
+				goto next_msdu;
+			}
 
 next_msdu:
 			rx_buf_reaped++;
@@ -626,8 +634,8 @@
 	}
 	pdev->rx_mon_stats.dest_mpdu_done++;
 
-	dp_rx_mon_init_tail_msdu(msdu, last_msdu, tail_msdu);
-	dp_rx_mon_remove_raw_frame_fcs_len(head_msdu);
+	dp_rx_mon_init_tail_msdu(head_msdu, msdu, last_msdu, tail_msdu);
+	dp_rx_mon_remove_raw_frame_fcs_len(head_msdu, tail_msdu);
 
 	return rx_buf_reaped;
 }
diff --git a/dp/wifi3.0/dp_tx_capture.c b/dp/wifi3.0/dp_tx_capture.c
index f07b609..d6fa75f 100644
--- a/dp/wifi3.0/dp_tx_capture.c
+++ b/dp/wifi3.0/dp_tx_capture.c
@@ -3286,7 +3286,8 @@
  * return: qdf_nbuf_t
  */
 static qdf_nbuf_t
-dp_tx_mon_get_next_mpdu(struct cdp_tx_completion_ppdu_user *xretry_user,
+dp_tx_mon_get_next_mpdu(struct dp_pdev *pdev, struct dp_tx_tid *tx_tid,
+			struct cdp_tx_completion_ppdu_user *xretry_user,
 			qdf_nbuf_t mpdu_nbuf)
 {
 	qdf_nbuf_t next_nbuf = NULL;
@@ -3319,8 +3320,8 @@
 		} else {
 			QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
 				  QDF_TRACE_LEVEL_FATAL,
-				  "%s: This is buggy scenario, did not find nbuf in queue ",
-				  __func__);
+				  "%s: bug scenario, did not find nbuf in queue pdev %08x, peer id %d, tid %d, mpdu_nbuf %08x",
+				  __func__, pdev, tx_tid->peer_id, tx_tid->tid, mpdu_nbuf);
 			qdf_assert_always(0);
 		}
 	} else {
@@ -3415,7 +3416,8 @@
 					 * This API removes mpdu_nbuf from q
 					 * and returns next mpdu from the queue
 					 */
-					mpdu_nbuf = dp_tx_mon_get_next_mpdu(
+					mpdu_nbuf = dp_tx_mon_get_next_mpdu(pdev,
+							tx_tid,
 							xretry_user, mpdu_nbuf);
 				} else {
 					index = seq_no - start_seq;
diff --git a/wmi/src/wmi_unified_ap_tlv.c b/wmi/src/wmi_unified_ap_tlv.c
index e950262..232d531 100644
--- a/wmi/src/wmi_unified_ap_tlv.c
+++ b/wmi/src/wmi_unified_ap_tlv.c
@@ -2496,13 +2496,13 @@
 			 sizeof(wmi_pdev_rnr_bss_tbtt_info));
 		break;
 	default:
-		WMI_LOGP("%s: cmd_type: %d invalid", __func__, param->cmd_type);
+		wmi_err("cmd_type: %d invalid", param->cmd_type);
 		return QDF_STATUS_E_FAILURE;
 	}
 	tmp_bss = param->rnr_bss_tbtt;
 	buf = wmi_buf_alloc(wmi, len);
 	if (!buf) {
-		WMI_LOGP("%s: wmi_buf_alloc failed", __func__);
+		wmi_err("wmi_buf_alloc failed");
 		return QDF_STATUS_E_NOMEM;
 	}
 	buf_ptr = wmi_buf_data(buf);
@@ -2551,7 +2551,7 @@
 		  "Cmd Type: %d, Pdev id: %d Vap count: %d", tbtt_sync_cmd->cmd_type,
 		  tbtt_sync_cmd->pdev_id, param->rnr_vap_count);
 	if (wmi_unified_cmd_send(wmi, buf, len, WMI_PDEV_TBTT_OFFSET_SYNC_CMDID)) {
-		WMI_LOGP("%s: Failed to send multisoc tbtt sync command", __func__);
+		wmi_err("Failed to send multisoc tbtt sync command");
 		wmi_buf_free(buf);
 		return QDF_STATUS_E_FAILURE;
 	}
diff --git a/wmi/src/wmi_unified_non_tlv.c b/wmi/src/wmi_unified_non_tlv.c
index 3b0388a..e4b0312 100644
--- a/wmi/src/wmi_unified_non_tlv.c
+++ b/wmi/src/wmi_unified_non_tlv.c
@@ -1019,7 +1019,7 @@
 
 	param_id = convert_host_peer_param_id_to_target_id_non_tlv(param->param_id);
 	if (param_id == WMI_UNAVAILABLE_PARAM) {
-		WMI_LOGW("%s: Unavailable param %d", __func__, param->param_id);
+		wmi_err("Unavailable param %d", param->param_id);
 		return QDF_STATUS_E_NOSUPPORT;
 	}
 	buf = wmi_buf_alloc(wmi_handle, len);