소스 검색

qcacmn: Add debug logs to the stats request

Currently there are no debug logs for station stats
request because of which it is difficult to debug
stats related issues.

Add debug logs in stats request and response callbacks.

Change-Id: I4071628ee988ef2e88624740d7e2113610464033
CRs-Fixed: 2541225
Ashish Kumar Dhanotiya 5 년 전
부모
커밋
cd4d6c1d0b
1개의 변경된 파일16개의 추가작업 그리고 1개의 파일을 삭제
  1. 16 1
      os_if/linux/cp_stats/src/wlan_cfg80211_mc_cp_stats.c

+ 16 - 1
os_if/linux/cp_stats/src/wlan_cfg80211_mc_cp_stats.c

@@ -43,8 +43,12 @@ static void wlan_cfg80211_mc_cp_stats_dealloc(void *priv)
 {
 	struct stats_event *stats = priv;
 
-	if (!stats)
+	osif_debug("Enter");
+
+	if (!stats) {
+		osif_err("stats is NULL");
 		return;
+	}
 
 	qdf_mem_free(stats->pdev_stats);
 	qdf_mem_free(stats->peer_stats);
@@ -52,6 +56,7 @@ static void wlan_cfg80211_mc_cp_stats_dealloc(void *priv)
 	qdf_mem_free(stats->vdev_summary_stats);
 	qdf_mem_free(stats->vdev_chain_rssi);
 	qdf_mem_free(stats->peer_adv_stats);
+	osif_debug("Exit");
 }
 
 /**
@@ -424,6 +429,8 @@ static void get_station_stats_cb(struct stats_event *ev, void *cookie)
 	struct osif_request *request;
 	uint32_t summary_size, rssi_size, peer_adv_size;
 
+	osif_debug("Enter");
+
 	request = osif_request_get(cookie);
 	if (!request) {
 		osif_err("Obsolete request");
@@ -471,6 +478,8 @@ static void get_station_stats_cb(struct stats_event *ev, void *cookie)
 station_stats_cb_fail:
 	osif_request_complete(request);
 	osif_request_put(request);
+
+	osif_debug("Exit");
 }
 
 struct stats_event *
@@ -489,6 +498,8 @@ wlan_cfg80211_mc_cp_stats_get_station_stats(struct wlan_objmgr_vdev *vdev,
 		.dealloc = wlan_cfg80211_mc_cp_stats_dealloc,
 	};
 
+	osif_debug("Enter");
+
 	out = qdf_mem_malloc(sizeof(*out));
 	if (!out) {
 		*errno = -ENOMEM;
@@ -557,12 +568,16 @@ wlan_cfg80211_mc_cp_stats_get_station_stats(struct wlan_objmgr_vdev *vdev,
 	priv->peer_adv_stats = NULL;
 	osif_request_put(request);
 
+	osif_debug("Exit");
+
 	return out;
 
 get_station_stats_fail:
 	osif_request_put(request);
 	wlan_cfg80211_mc_cp_stats_free_stats_event(out);
 
+	osif_debug("Exit");
+
 	return NULL;
 }