mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacmn: Fix NULL dereference of peer from DP_STATS macros
Fix NULL dereference of peer from DP_STATS macros Change-Id: I25b6269fe8e9b1deccaa38a7499167a156db6f37 CRs-Fixed: 2058483
This commit is contained in:
parent
2373e37ffa
commit
22b406cc13
2 changed files with 8 additions and 6 deletions
|
|
@ -74,24 +74,26 @@ while (0)
|
|||
#ifndef DISABLE_DP_STATS
|
||||
#define DP_STATS_INC(_handle, _field, _delta) \
|
||||
{ \
|
||||
_handle->stats._field += _delta; \
|
||||
if (likely(_handle)) \
|
||||
_handle->stats._field += _delta; \
|
||||
}
|
||||
|
||||
#define DP_STATS_INCC(_handle, _field, _delta, _cond) \
|
||||
{ \
|
||||
if (_cond) { \
|
||||
if (_cond && likely(_handle)) \
|
||||
_handle->stats._field += _delta; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define DP_STATS_DEC(_handle, _field, _delta) \
|
||||
{ \
|
||||
_handle->stats._field -= _delta; \
|
||||
if (likely(_handle)) \
|
||||
_handle->stats._field -= _delta; \
|
||||
}
|
||||
|
||||
#define DP_STATS_UPD(_handle, _field, _delta) \
|
||||
{ \
|
||||
_handle->stats._field = _delta; \
|
||||
if (likely(_handle)) \
|
||||
_handle->stats._field = _delta; \
|
||||
}
|
||||
|
||||
#define DP_STATS_INC_PKT(_handle, _field, _count, _bytes) \
|
||||
|
|
|
|||
|
|
@ -1290,7 +1290,7 @@ done:
|
|||
DP_STATS_INC_PKT(peer, rx.to_stack, 1,
|
||||
pkt_len);
|
||||
|
||||
if ((pdev->enhanced_stats_en) &&
|
||||
if ((pdev->enhanced_stats_en) && likely(peer) &&
|
||||
hal_rx_attn_first_mpdu_get(rx_tlv_hdr)) {
|
||||
if (soc->cdp_soc.ol_ops->update_dp_stats) {
|
||||
soc->cdp_soc.ol_ops->update_dp_stats(
|
||||
|
|
|
|||
Loading…
Reference in a new issue