Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22b5613b authored by Jyoti Kumari's avatar Jyoti Kumari
Browse files

qcacld-3.0: Avoid excessive kmsg log in roam stats event handler

Sometimes firmware sends WMI_ROAM_STATS_EVENTID repeatedly with
wrong TLV. This causes event extraction failure at the event
handler and continuous error logs are written to kmsg.

Rate limit debug level prints in wma_roam_stats_event_handler()

Change-Id: I03c1a50198d26096333d9b42190b34204453155a
CRs-Fixed: 2829293
parent 045288e8
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -3839,7 +3839,7 @@ int wma_roam_stats_event_handler(WMA_HANDLE handle, uint8_t *event,
					wma->wmi_handle, event,
					&roam_info->data_11kv, 0, 0);
		if (QDF_IS_STATUS_ERROR(status)) {
			wma_debug("%s: Roam 11kv stats extract failed vdev %d",
			wma_debug_rl("%s: Roam 11kv stats extract failed vdev %d",
				     __func__, vdev_id);
			qdf_mem_free(roam_info);
			goto err;
@@ -3865,7 +3865,7 @@ int wma_roam_stats_event_handler(WMA_HANDLE handle, uint8_t *event,
						wma->wmi_handle, event,
						&roam_info->trigger, i);
		if (QDF_IS_STATUS_ERROR(status)) {
			wma_debug("%s: Extract roam trigger stats failed vdev %d at %d iteration",
			wma_debug_rl("%s: Extract roam trigger stats failed vdev %d at %d iteration",
				     __func__, vdev_id, i);
			qdf_mem_free(roam_info);
			return -EINVAL;
@@ -3877,7 +3877,7 @@ int wma_roam_stats_event_handler(WMA_HANDLE handle, uint8_t *event,
							&roam_info->scan, i,
							num_chan, num_ap);
		if (QDF_IS_STATUS_ERROR(status)) {
			wma_debug("%s: Roam scan stats extract failed vdev %d at %d iteration",
			wma_debug_rl("%s: Roam scan stats extract failed vdev %d at %d iteration",
				     __func__, vdev_id, i);
			qdf_mem_free(roam_info);
			return -EINVAL;
@@ -3890,17 +3890,18 @@ int wma_roam_stats_event_handler(WMA_HANDLE handle, uint8_t *event,
							wma->wmi_handle, event,
							&roam_info->result, i);
		if (QDF_IS_STATUS_ERROR(status)) {
			wma_debug("%s: Roam result stats extract failed vdev %d at %d iteration",
			wma_debug_rl("%s: Roam result stats extract failed vdev %d at %d iteration",
				     __func__, vdev_id, i);
			qdf_mem_free(roam_info);
			return -EINVAL;
		}

		/* BTM req/resp or Neighbor report/response info */
		status = wmi_unified_extract_roam_11kv_stats(
				wma->wmi_handle, event,
				&roam_info->data_11kv, i, num_rpt);
		if (QDF_IS_STATUS_ERROR(status)) {
			wma_debug("%s: Roam 11kv stats extract failed vdev %d at %d iteration",
			wma_debug_rl("%s: Roam 11kv stats extract failed vdev %d at %d iteration",
				     __func__, vdev_id, i);
			qdf_mem_free(roam_info);
			return -EINVAL;