diff --git a/components/dp/core/src/wlan_dp_bus_bandwidth.c b/components/dp/core/src/wlan_dp_bus_bandwidth.c index d48621b3f3..8851d197f6 100644 --- a/components/dp/core/src/wlan_dp_bus_bandwidth.c +++ b/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;