qcacmn: Fix wrap-around condition check in DIAG_RX_EVENT_RECORD

Diag_log_max_entry should be used to determine wrap around condition
in DIAG_RX_EVENT_RECORD. Using incorrect max value results in invalid
access and memory corruption. Fix DIAG_RX_EVENT_RECORD to use diag_log
max entry instead of mgmt_max entry.

Change-Id: Icae3ce843b1fd76e15139fae1a867448ad032cf8
CRs-Fixed: 2488783
1 file changed