|
@@ -767,9 +767,12 @@ static tSirLLStatsResults *wma_get_ll_stats_ext_buf(uint32_t *len,
|
|
|
(sizeof(struct sir_wifi_tx) +
|
|
|
sizeof(struct sir_wifi_rx)));
|
|
|
}
|
|
|
- if (peer_num > (WMI_SVC_MSG_MAX_SIZE /
|
|
|
- (sizeof(struct sir_wifi_ll_ext_peer_stats) +
|
|
|
- total_peer_len))) {
|
|
|
+ if (total_peer_len > WMI_SVC_MSG_MAX_SIZE) {
|
|
|
+ excess_data = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (peer_num > (WMI_SVC_MSG_MAX_SIZE - total_peer_len) /
|
|
|
+ sizeof(struct sir_wifi_ll_ext_peer_stats)) {
|
|
|
excess_data = true;
|
|
|
break;
|
|
|
} else {
|