|
@@ -3104,13 +3104,6 @@ int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
|
|
|
}
|
|
|
event = param_buf->fixed_param;
|
|
|
temp = (uint8_t *) param_buf->data;
|
|
|
- if ((event->num_pdev_stats + event->num_vdev_stats +
|
|
|
- event->num_peer_stats) > param_buf->num_data) {
|
|
|
- WMA_LOGE("%s: Invalid num_pdev_stats:%d or num_vdev_stats:%d or num_peer_stats:%d",
|
|
|
- __func__, event->num_pdev_stats, event->num_vdev_stats,
|
|
|
- event->num_peer_stats);
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
|
|
|
do {
|
|
|
if (event->num_pdev_stats > ((WMI_SVC_MSG_MAX_SIZE -
|
|
@@ -3137,6 +3130,14 @@ int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
|
|
|
buf_len += event->num_peer_stats * sizeof(*peer_stats);
|
|
|
}
|
|
|
|
|
|
+ if (buf_len > param_buf->num_data) {
|
|
|
+ WMA_LOGE("%s: num_data: %d Invalid num_pdev_stats:%d or num_vdev_stats:%d or num_peer_stats:%d",
|
|
|
+ __func__, param_buf->num_data,
|
|
|
+ event->num_pdev_stats,
|
|
|
+ event->num_vdev_stats, event->num_peer_stats);
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
rssi_event =
|
|
|
(wmi_per_chain_rssi_stats *) param_buf->chain_stats;
|
|
|
if (rssi_event) {
|
|
@@ -3157,7 +3158,6 @@ int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
|
|
|
WMA_LOGE("excess wmi buffer: stats pdev %d vdev %d peer %d",
|
|
|
event->num_pdev_stats, event->num_vdev_stats,
|
|
|
event->num_peer_stats);
|
|
|
- QDF_ASSERT(0);
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|