浏览代码

qcacld-3.0: Validate vdev id for link stats before using

In the link layer stats, currently FW sends vdev_id info
for interface stats only, and not for peer and radio stats.
So, in the hdd callback function for the link layer stats,
when we try to get adapter from the vdev_id info sent by
FW, it returns error and ultimately causes LL_STATS timeout.

To avoid this issue, use the vdev_id info sent by FW only
if it is valid.

Change-Id: I7811b7c257cbfa67bdad0d132a1478120121f9fc
CRs-Fixed: 3254760
Aditya Kodukula 2 年之前
父节点
当前提交
959f9e5eb6
共有 1 个文件被更改,包括 11 次插入5 次删除
  1. 11 5
      core/hdd/src/wlan_hdd_stats.c

+ 11 - 5
core/hdd/src/wlan_hdd_stats.c

@@ -1725,11 +1725,17 @@ void wlan_hdd_cfg80211_link_layer_stats_callback(hdd_handle_t hdd_handle,
 		}
 
 		adapter = hdd_get_adapter_by_vdev(hdd_ctx, results->ifaceId);
-		if (!adapter) {
-			hdd_err("invalid vdev %d", results->ifaceId);
-			osif_request_put(request);
-			return;
-		}
+		if (!adapter)
+			hdd_debug_rl("invalid vdev_id %d sent by FW",
+				     results->ifaceId);
+			/* for peer stats FW doesn't update the vdev_id info*/
+			adapter = hdd_get_adapter_by_vdev(hdd_ctx,
+							  priv->vdev_id);
+			if (!adapter) {
+				hdd_err("invalid vdev %d", priv->vdev_id);
+				osif_request_put(request);
+				return;
+			}
 
 		wlan_hdd_update_ll_stats_request_bitmap(hdd_ctx, request,
 							results);