瀏覽代碼

qcacld-3.0: Add check for interface id

Currently, there is no interface id valid check,
Which is resulting in unnecessary Vdev NULL error
logs for interfaces for which Vdev is not created.

So to fix the excessive logging issue add a check
to validate the interface id.

Change-Id: I86b2a60c11631f5122f866a83427d4cd9b794a02
CRs-Fixed: 3283932
Amit Mehta 2 年之前
父節點
當前提交
20055c6534
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      components/dp/core/src/wlan_dp_bus_bandwidth.c

+ 8 - 0
components/dp/core/src/wlan_dp_bus_bandwidth.c

@@ -224,6 +224,12 @@ bbm_get_bus_bw_level_vote(struct wlan_dp_intf *dp_intf,
 	return vote_lvl;
 }
 
+static inline bool bbm_validate_intf_id(uint8_t intf_id)
+{
+	return !!(intf_id == WLAN_UMAC_VDEV_ID_MAX ||
+				intf_id >= WLAN_MAX_VDEVS);
+}
+
 /**
  * bbm_apply_tput_policy() - Apply tput BBM policy by considering
  *  throughput level and connection modes across adapters
@@ -263,6 +269,8 @@ bbm_apply_tput_policy(struct wlan_dp_psoc_context *dp_ctx,
 	dp_for_each_intf_held_safe(dp_ctx, dp_intf, dp_intf_next) {
 		if (!dp_intf)
 			continue;
+		if (bbm_validate_intf_id(dp_intf->intf_id))
+			continue;
 		tmp_vote = bbm_get_bus_bw_level_vote(dp_intf, tput_level);
 		if (tmp_vote > next_vote)
 			next_vote = tmp_vote;