Эх сурвалжийг харах

qcacmn: Add CDP api support to notify asserted soc info

Add CDP api support to notify asserted soc info to DP
umac reset module, to disengage a asserted soc from
umac reset process.

Change-Id: I92ee07ed90243567dab83d0686022c8327efe1b6
CRs-Fixed: 3428265
Surya Prakash Raajen 2 жил өмнө
parent
commit
7265d860b2

+ 22 - 0
dp/inc/cdp_txrx_cmn.h

@@ -1863,6 +1863,28 @@ static inline void cdp_txrx_umac_reset_deinit(ol_txrx_soc_handle soc)
 	soc->ops->cmn_drv_ops->txrx_umac_reset_deinit(soc);
 	soc->ops->cmn_drv_ops->txrx_umac_reset_deinit(soc);
 }
 }
 
 
+/**
+ * cdp_notify_asserted_soc(): function to notify asserted SoC
+ * @soc: soc handle
+ *
+ * Return: QDF_STATUS
+ */
+static inline QDF_STATUS
+cdp_notify_asserted_soc(ol_txrx_soc_handle soc)
+{
+	if (!soc || !soc->ops) {
+		dp_cdp_debug("Invalid Instance:");
+		QDF_BUG(0);
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	if (!soc->ops->cmn_drv_ops ||
+	    !soc->ops->cmn_drv_ops->notify_asserted_soc)
+		return QDF_STATUS_E_NULL_VALUE;
+
+	return soc->ops->cmn_drv_ops->notify_asserted_soc(soc);
+}
+
 /**
 /**
  * cdp_display_stats(): function to map to dump stats
  * cdp_display_stats(): function to map to dump stats
  * @soc: soc handle
  * @soc: soc handle

+ 8 - 0
dp/inc/cdp_txrx_ops.h

@@ -544,6 +544,14 @@ struct cdp_cmn_ops {
 	QDF_STATUS (*display_stats)(struct cdp_soc_t *psoc, uint16_t value,
 	QDF_STATUS (*display_stats)(struct cdp_soc_t *psoc, uint16_t value,
 				    enum qdf_stats_verbosity_level level);
 				    enum qdf_stats_verbosity_level level);
 
 
+	/**
+	 * notify_asserted_soc() - Notified asserted soc info to UMAC Reset
+	 * @cdp_soc: soc handle
+	 *
+	 * Return: QDF_STATUS
+	 */
+	QDF_STATUS (*notify_asserted_soc)(struct cdp_soc_t *psoc);
+
 	QDF_STATUS (*txrx_intr_attach)(struct cdp_soc_t *soc_handle);
 	QDF_STATUS (*txrx_intr_attach)(struct cdp_soc_t *soc_handle);
 	void (*txrx_intr_detach)(struct cdp_soc_t *soc_handle);
 	void (*txrx_intr_detach)(struct cdp_soc_t *soc_handle);
 	void (*txrx_ppeds_stop)(struct cdp_soc_t *soc_handle);
 	void (*txrx_ppeds_stop)(struct cdp_soc_t *soc_handle);

+ 21 - 0
dp/wifi3.0/dp_main.c

@@ -12142,6 +12142,26 @@ fail0:
 	return status;
 	return status;
 }
 }
 
 
+/**
+ * dp_soc_notify_asserted_soc() - API to notify asserted soc info
+ * @psoc: CDP soc handle
+ *
+ * Return: QDF_STATUS
+ */
+static QDF_STATUS dp_soc_notify_asserted_soc(struct cdp_soc_t *psoc)
+{
+	struct dp_soc *soc =
+		(struct dp_soc *)psoc;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
+
+	if (!soc) {
+		dp_cdp_err("%pK: soc is NULL", soc);
+		return QDF_STATUS_E_INVAL;
+	}
+
+	return status;
+}
+
 /**
 /**
  * dp_txrx_dump_stats() -  Dump statistics
  * dp_txrx_dump_stats() -  Dump statistics
  * @psoc: CDP soc handle
  * @psoc: CDP soc handle
@@ -14215,6 +14235,7 @@ static struct cdp_cmn_ops dp_ops_cmn = {
 	.txrx_stats_request = dp_txrx_stats_request,
 	.txrx_stats_request = dp_txrx_stats_request,
 	.txrx_get_peer_mac_from_peer_id = dp_get_peer_mac_from_peer_id,
 	.txrx_get_peer_mac_from_peer_id = dp_get_peer_mac_from_peer_id,
 	.display_stats = dp_txrx_dump_stats,
 	.display_stats = dp_txrx_dump_stats,
+	.notify_asserted_soc = dp_soc_notify_asserted_soc,
 	.txrx_intr_attach = dp_soc_interrupt_attach_wrapper,
 	.txrx_intr_attach = dp_soc_interrupt_attach_wrapper,
 	.txrx_intr_detach = dp_soc_interrupt_detach,
 	.txrx_intr_detach = dp_soc_interrupt_detach,
 	.txrx_ppeds_stop = dp_soc_ppeds_stop,
 	.txrx_ppeds_stop = dp_soc_ppeds_stop,