Browse Source

qcacld-3.0: Trim the hang data size as per requirement

Trim the hang data as per the customer data size requirement.

Change-Id: I5a5d848f820ddeaa721dba176e67dba97fed7a71
CRs-Fixed: 2751261
Arun Kumar Khandavalli 4 years ago
parent
commit
57f9f1d78c

+ 2 - 2
core/cds/src/cds_api.c

@@ -94,9 +94,9 @@ static uint8_t cds_multicast_logging;
 
 struct cds_hang_event_fixed_param {
 	uint32_t tlv_header;
-	uint32_t recovery_reason;
+	uint8_t recovery_reason;
 	char driver_version[11];
-	char hang_event_version[3];
+	char hang_event_version;
 } qdf_packed;
 
 #ifdef QCA_WIFI_QCA8074

+ 1 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -1120,7 +1120,7 @@ hdd_convert_hang_reason(enum qdf_hang_reason reason)
  * Return: 0 on success or failure reason
  */
 int wlan_hdd_send_hang_reason_event(struct hdd_context *hdd_ctx,
-				    enum qdf_hang_reason reason, void *data,
+				    enum qdf_hang_reason reason, uint8_t *data,
 				    size_t data_len)
 {
 	struct sk_buff *vendor_event;

+ 1 - 1
core/hdd/src/wlan_hdd_cfg80211.h

@@ -475,7 +475,7 @@ int wlan_hdd_send_avoid_freq_event(struct hdd_context *hdd_ctx,
  * Return: 0 on success or failure reason
  */
 int wlan_hdd_send_hang_reason_event(struct hdd_context *hdd_ctx,
-				    uint32_t reason, void *data,
+				    uint32_t reason, uint8_t *data,
 				    size_t data_len);
 
 int wlan_hdd_send_avoid_freq_for_dnbs(struct hdd_context *hdd_ctx,

+ 3 - 3
core/hdd/src/wlan_hdd_driver_ops.c

@@ -744,7 +744,7 @@ static inline void hdd_wlan_ssr_shutdown_event(void) { }
  *
  * Return: None
  */
-static void hdd_send_hang_data(void *data, size_t data_len)
+static void hdd_send_hang_data(uint8_t *data, size_t data_len)
 {
 	enum qdf_hang_reason reason = QDF_REASON_UNSPECIFIED;
 	struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
@@ -1846,7 +1846,7 @@ wlan_hdd_pld_uevent(struct device *dev, struct pld_uevent_data *event_data)
 
 		break;
 	case PLD_FW_HANG_EVENT:
-		hdd_info("Received fimrware hang event");
+		hdd_info("Received firmware hang event");
 		cds_get_recovery_reason(&reason);
 		hang_evt_data.hang_data =
 				qdf_mem_malloc(QDF_HANG_EVENT_DATA_SIZE);
@@ -1854,12 +1854,12 @@ wlan_hdd_pld_uevent(struct device *dev, struct pld_uevent_data *event_data)
 			return;
 		hang_evt_data.offset = 0;
 		qdf_hang_event_notifier_call(reason, &hang_evt_data);
+		hang_evt_data.offset = QDF_WLAN_HANG_FW_OFFSET;
 		if (event_data->hang_data.hang_event_data_len >=
 		    QDF_HANG_EVENT_DATA_SIZE / 2)
 			event_data->hang_data.hang_event_data_len =
 						QDF_HANG_EVENT_DATA_SIZE / 2;
 
-		hang_evt_data.offset = QDF_WLAN_HANG_FW_OFFSET;
 		if (event_data->hang_data.hang_event_data_len)
 			qdf_mem_copy((hang_evt_data.hang_data +
 				      hang_evt_data.offset),