Prechádzať zdrojové kódy

qcacld-3.0: Setup CDP interface for flushing RX queue

Refactor flush rx queue function call based on soc by adding an
interface to CDP funtion indirection table.

Change-Id: I2d05acd023baf156c5b0752447d76d0e9e92ff53
CRs-fixed: 2023399
Manikandan Mohan 8 rokov pred
rodič
commit
8b4e201376

+ 0 - 7
core/dp/ol/inc/ol_txrx_osif_api.h

@@ -89,11 +89,4 @@ void ol_rx_data_process(struct ol_txrx_peer_t *peer,
 
 void ol_txrx_flush_rx_frames(struct ol_txrx_peer_t *peer,
 			     bool drop);
-/**
- * ol_txrx_flush_cache_rx_queue() - flush cache rx queue frame
- *
- * Return: None
- */
-void ol_txrx_flush_cache_rx_queue(void);
-
 #endif /* _OL_TXRX_OSIF_API__H_ */

+ 2 - 1
core/dp/txrx/ol_txrx.c

@@ -2275,7 +2275,7 @@ void ol_txrx_flush_rx_frames(struct ol_txrx_peer_t *peer,
 	qdf_atomic_dec(&peer->flush_in_progress);
 }
 
-void ol_txrx_flush_cache_rx_queue(void)
+static void ol_txrx_flush_cache_rx_queue(void)
 {
 	uint8_t sta_id;
 	struct ol_txrx_peer_t *peer;
@@ -5316,6 +5316,7 @@ static struct cdp_cmn_ops ol_ops_cmn = {
 	.txrx_mgmt_tx_cb_set = ol_txrx_mgmt_tx_cb_set,
 	.txrx_data_tx_cb_set = ol_txrx_data_tx_cb_set,
 	.txrx_get_tx_pending = ol_txrx_get_tx_pending,
+	.flush_cache_rx_queue = ol_txrx_flush_cache_rx_queue,
 	.txrx_fw_stats_get = ol_txrx_fw_stats_get
 	/* TODO: Add other functions */
 };

+ 3 - 1
core/hdd/src/wlan_hdd_power.c

@@ -1246,6 +1246,7 @@ QDF_STATUS hdd_wlan_shutdown(void)
 	hdd_context_t *pHddCtx;
 	p_cds_sched_context cds_sched_context = NULL;
 	QDF_STATUS qdf_status;
+	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 
 	hdd_alert("WLAN driver shutting down!");
 
@@ -1280,7 +1281,8 @@ QDF_STATUS hdd_wlan_shutdown(void)
 	hdd_reset_all_adapters(pHddCtx);
 
 	/* Flush cached rx frame queue */
-	ol_txrx_flush_cache_rx_queue();
+	if (soc)
+		cdp_flush_cache_rx_queue(soc);
 
 	/* De-register the HDD callbacks */
 	hdd_deregister_cb(pHddCtx);