|
@@ -6537,7 +6537,7 @@ void ipa3_counter_remove_hdl(int hdl)
|
|
}
|
|
}
|
|
/* remove counters belong to this hdl, set used back to 0 */
|
|
/* remove counters belong to this hdl, set used back to 0 */
|
|
offset = counter->hw_counter.start_id - 1;
|
|
offset = counter->hw_counter.start_id - 1;
|
|
- if (offset >= 0 && offset + counter->hw_counter.num_counters
|
|
|
|
|
|
+ if (offset >= 0 && (offset + counter->hw_counter.num_counters)
|
|
< IPA_FLT_RT_HW_COUNTER) {
|
|
< IPA_FLT_RT_HW_COUNTER) {
|
|
memset(&ipa3_ctx->flt_rt_counters.used_hw + offset,
|
|
memset(&ipa3_ctx->flt_rt_counters.used_hw + offset,
|
|
0, counter->hw_counter.num_counters * sizeof(bool));
|
|
0, counter->hw_counter.num_counters * sizeof(bool));
|
|
@@ -6546,7 +6546,7 @@ void ipa3_counter_remove_hdl(int hdl)
|
|
goto err;
|
|
goto err;
|
|
}
|
|
}
|
|
offset = counter->sw_counter.start_id - 1 - IPA_FLT_RT_HW_COUNTER;
|
|
offset = counter->sw_counter.start_id - 1 - IPA_FLT_RT_HW_COUNTER;
|
|
- if (offset >= 0 && offset + counter->sw_counter.num_counters
|
|
|
|
|
|
+ if (offset >= 0 && (offset + counter->sw_counter.num_counters)
|
|
< IPA_FLT_RT_SW_COUNTER) {
|
|
< IPA_FLT_RT_SW_COUNTER) {
|
|
memset(&ipa3_ctx->flt_rt_counters.used_sw + offset,
|
|
memset(&ipa3_ctx->flt_rt_counters.used_sw + offset,
|
|
0, counter->sw_counter.num_counters * sizeof(bool));
|
|
0, counter->sw_counter.num_counters * sizeof(bool));
|