From eb0e456d6864ce668b7b2e8d2e2d3c69afebb9cf Mon Sep 17 00:00:00 2001 From: "Pamidipati, Vijay" Date: Fri, 30 Nov 2018 18:54:51 +0530 Subject: [PATCH] qcacmn: Add missing NULL check in DP rx path Add a missing NULL check for peer object in rx_da_learn API Also add missing elements in pdev_stats_cmn_tlv structure. CRs-Fixed: 2357352 Change-Id: Ie54fd0a6a45f00d60420c391098f22b0097de3ac --- dp/inc/cdp_txrx_stats_struct.h | 7 +++++++ dp/wifi3.0/dp_rx.c | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dp/inc/cdp_txrx_stats_struct.h b/dp/inc/cdp_txrx_stats_struct.h index fbff24fc999b..7a4d7dde451b 100644 --- a/dp/inc/cdp_txrx_stats_struct.h +++ b/dp/inc/cdp_txrx_stats_struct.h @@ -804,6 +804,13 @@ struct cdp_htt_tx_pdev_stats_cmn_tlv { * (acked, no ack, flush, TTL, etc) */ uint32_t local_data_freed; + + /* Num MPDUs tried by SW */ + uint32_t mpdu_tried; + /* Num of waiting seq posted in isr completion handler */ + uint32_t isr_wait_seq_posted; + uint32_t tx_active_dur_us_low; + uint32_t tx_active_dur_us_high; }; struct cdp_htt_tx_pdev_stats_urrn_tlv_v { diff --git a/dp/wifi3.0/dp_rx.c b/dp/wifi3.0/dp_rx.c index ed88552be020..03b0995b2b51 100644 --- a/dp/wifi3.0/dp_rx.c +++ b/dp/wifi3.0/dp_rx.c @@ -357,7 +357,10 @@ dp_rx_da_learn(struct dp_soc *soc, if (qdf_likely(soc->ast_override_support)) return; - if (ta_peer && (ta_peer->vdev->opmode != wlan_op_mode_ap)) + if (qdf_unlikely(!ta_peer)) + return; + + if (qdf_unlikely(ta_peer->vdev->opmode != wlan_op_mode_ap)) return; if (qdf_unlikely(!hal_rx_msdu_end_da_is_valid_get(rx_tlv_hdr) &&