diff --git a/htc/htc_credit_history.c b/htc/htc_credit_history.c index 76ad4f12c1..36b6831ebc 100644 --- a/htc/htc_credit_history.c +++ b/htc/htc_credit_history.c @@ -41,6 +41,7 @@ static uint32_t g_htc_credit_history_length; static struct HTC_CREDIT_HISTORY htc_credit_history_buffer[HTC_CREDIT_HISTORY_MAX]; +#define NUM_HANG_CREDIT_HISTORY 1 #ifdef QCA_WIFI_NAPIER_EMULATION #define HTC_EMULATION_DELAY_IN_MS 20 @@ -149,7 +150,7 @@ void htc_log_hang_credit_history(struct notifier_block *block, void *data) qdf_notif_block *notif_block = qdf_container_of(block, qdf_notif_block, notif_block); struct qdf_notifer_data *htc_hang_data = data; - uint32_t count = 3, idx, total_len; + uint32_t count = NUM_HANG_CREDIT_HISTORY, idx, total_len; HTC_HANDLE htc; struct htc_hang_data_fixed_param *cmd; uint8_t *htc_buf_ptr; diff --git a/qdf/inc/qdf_hang_event_notifier.h b/qdf/inc/qdf_hang_event_notifier.h index b5742bd0e1..c80ba8caa8 100644 --- a/qdf/inc/qdf_hang_event_notifier.h +++ b/qdf/inc/qdf_hang_event_notifier.h @@ -24,13 +24,13 @@ #include -#define QDF_HANG_EVENT_VERSION "1.0" +#define QDF_HANG_EVENT_VERSION "1" /* Max hang event buffer size */ -#define QDF_HANG_EVENT_DATA_SIZE 784 +#define QDF_HANG_EVENT_DATA_SIZE 390 /* Max offset which host can write */ -#define QDF_WLAN_MAX_HOST_OFFSET 390 +#define QDF_WLAN_MAX_HOST_OFFSET 194 /* Start of the Firmware Data offset */ -#define QDF_WLAN_HANG_FW_OFFSET 392 +#define QDF_WLAN_HANG_FW_OFFSET 195 /** * hang_event_tag: Hang event tag for various modules @@ -59,10 +59,10 @@ enum hang_event_tag { #define QDF_HANG_EVENT_TLV_HDR_SIZE (sizeof(uint32_t)) #define QDF_HANG_EVT_SET_HDR(tlv_buf, tag, len) \ - (((uint32_t *)(tlv_buf))[0]) = (((tag) << 16) | ((len) & 0x0000FFFF)) + (((uint16_t *)(tlv_buf))[0]) = (((tag) << 8) | ((len) & 0x000000FF)) #define QDF_HANG_GET_STRUCT_TLVLEN(tlv_struct) \ - ((uint32_t)(sizeof(tlv_struct) - QDF_HANG_EVENT_TLV_HDR_SIZE)) + ((uint16_t)(sizeof(tlv_struct) - QDF_HANG_EVENT_TLV_HDR_SIZE)) /** * qdf_notifier_data - Private data for notifier data diff --git a/wmi/src/wmi_hang_event.c b/wmi/src/wmi_hang_event.c index d8ec2df6d0..08f1bc33de 100644 --- a/wmi/src/wmi_hang_event.c +++ b/wmi/src/wmi_hang_event.c @@ -28,6 +28,7 @@ struct wmi_hang_data_fixed_param { #define WMI_EVT_HIST 0 #define WMI_CMD_HIST 1 +#define NUM_HANG_WMI_HISTORY 1 static void wmi_log_history(struct notifier_block *block, void *data, uint8_t wmi_history) @@ -36,7 +37,7 @@ static void wmi_log_history(struct notifier_block *block, void *data, notif_block); struct qdf_notifer_data *wmi_hang_data = data; int nread, pos, total_len; - unsigned int wmi_ring_size = 3; + unsigned int wmi_ring_size = NUM_HANG_WMI_HISTORY; uint64_t secs, usecs; struct wmi_event_debug *wmi_evt; struct wmi_unified *wmi_handle;