summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSungjoon Park <sungjoon.park@broadcom.corp-partner.google.com>2023-05-16 22:16:04 +0900
committerIsaac Chiou <isaacchiou@google.com>2023-06-27 01:46:56 +0000
commite692b2cf74ceec72a1a229abfe96c7255b7b2ba9 (patch)
tree11b2d2709c2fce080d1c111b759c68ba12d013e1
parent76231e4cbede20fe85ca38f6498ec304c399ac56 (diff)
downloadbcm4389-e692b2cf74ceec72a1a229abfe96c7255b7b2ba9.tar.gz
bcmdhd: Ignore the Coredump generation for the continuous packet drop with SKIP_COREDUMP_PKTDROP_RXHC
Google requested to stop the coredump generation for the shipping Phone image which doesn't generate the coredump even if DHD triggers the dongle trap. Make the SKIP_COREDUMP_PKTDROP_RXHC flag to control the coredump generate. Bug: 274302570 Test: Regression test Change-Id: Iecc43b3edb73779ed53868f48e4cb03ae2c36437 Signed-off-by: Sungjoon Park <sungjoon.park@broadcom.corp-partner.google.com>
-rw-r--r--Kbuild3
-rwxr-xr-xdhd_common.c30
2 files changed, 33 insertions, 0 deletions
diff --git a/Kbuild b/Kbuild
index 1c08c93..7399f0b 100644
--- a/Kbuild
+++ b/Kbuild
@@ -708,6 +708,9 @@ DHDCFLAGS += -DWL_RAV_MSCS_NEG_IN_ASSOC
# MAX_PFN_LIST_COUNT is defined as 64 in wlioctl_defs.h
DHDCFLAGS += -DMAX_PFN_LIST_COUNT=16
+# Ignore the Coredump generation for the continuous packet drop
+DHDCFLAGS += -DSKIP_COREDUMP_PKTDROP_RXHC
+
##########################
# driver type
# m: module type driver
diff --git a/dhd_common.c b/dhd_common.c
index 3178832..4cf930c 100755
--- a/dhd_common.c
+++ b/dhd_common.c
@@ -5239,6 +5239,31 @@ dhd_parse_hck_common_sw_event(bcm_xtlv_t *wl_hc)
}
+#ifdef SKIP_COREDUMP_PKTDROP_RXHC
+static bool
+dhd_skip_coredump_for_rxhc(bcm_xtlv_t *wl_hc)
+{
+ wl_rx_hc_info_v2_t *hck_rx_stall_v2;
+ uint16 id;
+ bool ignore_coredump = FALSE;
+
+ id = ltoh16(wl_hc->id);
+
+ if (id == WL_HC_DD_RX_STALL_V2) {
+ /* map the hck_rx_stall_v2 structure to the value of the XTLV */
+ hck_rx_stall_v2 =
+ (wl_rx_hc_info_v2_t*)wl_hc;
+ if (hck_rx_stall_v2->rx_hc_dropped_all >=
+ hck_rx_stall_v2->rx_hc_alert_th) {
+ DHD_ERROR(("Skip the coredump for continous packet drop\n"));
+ ignore_coredump = TRUE;
+ }
+ }
+
+ return ignore_coredump;
+}
+#endif /* SKIP_COREDUMP_PKTDROP_RXHC */
+
#endif /* PARSE_DONGLE_HOST_EVENT */
#ifdef WL_CFGVENDOR_SEND_ALERT_EVENT
static void
@@ -5399,6 +5424,11 @@ dngl_host_event_process(dhd_pub_t *dhdp, bcm_dngl_event_t *event,
#ifdef PARSE_DONGLE_HOST_EVENT
dhd_parse_hck_common_sw_event(wl_hc);
#endif /* PARSE_DONGLE_HOST_EVENT */
+#ifdef SKIP_COREDUMP_PKTDROP_RXHC
+ if (dhd_skip_coredump_for_rxhc(wl_hc) == TRUE) {
+ ignore_hc = TRUE;
+ }
+#endif /* SKIP_COREDUMP_PKTDROP_RXHC */
#ifdef WL_CFGVENDOR_SEND_ALERT_EVENT
dhd_send_error_alert_event(dhdp, wl_hc);
#endif /* WL_CFGVENDOR_SEND_ALERT_EVENT */