瀏覽代碼

qcacmn: WDS and AST specific code under different compile time flag

Based on requirement from customer we have re-organised
AST specific and WDS specific code under different compile
time flags.

Change-Id: Icbb0dff7c2e7a2239d82c296468fa8d3e4f53021
Tallapragada Kalyan 7 年之前
父節點
當前提交
71c46b9357
共有 4 個文件被更改,包括 15 次插入13 次删除
  1. 9 8
      dp/wifi3.0/dp_main.c
  2. 1 1
      dp/wifi3.0/dp_peer.c
  3. 0 4
      dp/wifi3.0/dp_tx.c
  4. 5 0
      dp/wifi3.0/dp_tx.h

+ 9 - 8
dp/wifi3.0/dp_main.c

@@ -524,7 +524,7 @@ static void dp_srng_msi_setup(struct dp_soc *soc, struct hal_srng_params
  *
  * return void
  */
-#ifdef FEATURE_WDS
+#ifdef FEATURE_AST
 static void dp_print_ast_stats(struct dp_soc *soc)
 {
 	uint8_t i;
@@ -533,6 +533,7 @@ static void dp_print_ast_stats(struct dp_soc *soc)
 	struct dp_pdev *pdev;
 	struct dp_peer *peer;
 	struct dp_ast_entry *ase, *tmp_ase;
+	char type[5][10] = {"NONE", "STATIC", "WDS", "MEC", "HMWDS"};
 
 	DP_PRINT_STATS("AST Stats:");
 	DP_PRINT_STATS("	Entries Added   = %d", soc->stats.ast.added);
@@ -546,7 +547,7 @@ static void dp_print_ast_stats(struct dp_soc *soc)
 				DP_PEER_ITERATE_ASE_LIST(peer, ase, tmp_ase) {
 					DP_PRINT_STATS("%6d mac_addr = %pM"
 							" peer_mac_addr = %pM"
-							" type = %d"
+							" type = %s"
 							" next_hop = %d"
 							" is_active = %d"
 							" is_bss = %d"
@@ -556,7 +557,7 @@ static void dp_print_ast_stats(struct dp_soc *soc)
 							++num_entries,
 							ase->mac_addr.raw,
 							ase->peer->mac_addr.raw,
-							ase->type,
+							type[ase->type],
 							ase->next_hop,
 							ase->is_active,
 							ase->is_bss,
@@ -571,7 +572,7 @@ static void dp_print_ast_stats(struct dp_soc *soc)
 #else
 static void dp_print_ast_stats(struct dp_soc *soc)
 {
-	DP_PRINT_STATS("AST Stats not available.Enable FEATURE_WDS");
+	DP_PRINT_STATS("AST Stats not available.Enable FEATURE_AST");
 	return;
 }
 #endif
@@ -1527,7 +1528,7 @@ static void dp_hw_link_desc_pool_cleanup(struct dp_soc *soc)
  * dp_wds_aging_timer_fn() - Timer callback function for WDS aging
  * @soc: Datapath SOC handle
  *
- * This is a timer function used to age out stale WDS nodes from
+ * This is a timer function used to age out stale AST nodes from
  * AST table
  */
 #ifdef FEATURE_WDS
@@ -6386,7 +6387,7 @@ static struct cdp_wds_ops dp_ops_wds = {
  *
  * Delete the AST entries belonging to a peer
  */
-#ifdef FEATURE_WDS
+#ifdef FEATURE_AST
 static inline void dp_peer_delete_ast_entries(struct dp_soc *soc,
 		struct dp_peer *peer)
 {
@@ -6478,7 +6479,7 @@ dp_soc_set_dp_txrx_handle(struct cdp_soc *soc_handle, void *txrx_handle)
 	soc->external_txrx_handle = txrx_handle;
 }
 
-#ifdef CONFIG_WIN
+#ifdef FEATURE_AST
 static void dp_peer_teardown_wifi3(struct cdp_vdev *vdev_hdl, void *peer_hdl)
 {
 	struct dp_vdev *vdev = (struct dp_vdev *) vdev_hdl;
@@ -6535,7 +6536,7 @@ static struct cdp_cmn_ops dp_ops_cmn = {
 	.txrx_pdev_detach = dp_pdev_detach_wifi3,
 	.txrx_peer_create = dp_peer_create_wifi3,
 	.txrx_peer_setup = dp_peer_setup_wifi3,
-#ifdef CONFIG_WIN
+#ifdef FEATURE_AST
 	.txrx_peer_teardown = dp_peer_teardown_wifi3,
 #else
 	.txrx_peer_teardown = NULL,

+ 1 - 1
dp/wifi3.0/dp_peer.c

@@ -190,7 +190,7 @@ void dp_peer_find_hash_add(struct dp_soc *soc, struct dp_peer *peer)
 	qdf_spin_unlock_bh(&soc->peer_ref_mutex);
 }
 
-#ifdef FEATURE_WDS
+#ifdef FEATURE_AST
 /*
  * dp_peer_ast_hash_attach() - Allocate and initialize AST Hash Table
  * @soc: SoC handle

+ 0 - 4
dp/wifi3.0/dp_tx.c

@@ -2399,10 +2399,6 @@ void dp_tx_mec_handler(struct dp_vdev *vdev, uint8_t *status)
 				CDP_TXRX_AST_TYPE_MEC,
 				flags);
 }
-#else
-static void dp_tx_mec_handler(struct dp_vdev *vdev, uint8_t *status)
-{
-}
 #endif
 
 /**

+ 5 - 0
dp/wifi3.0/dp_tx.h

@@ -179,6 +179,11 @@ static inline void dp_non_std_tx_comp_free_buff(struct dp_tx_desc_s *tx_desc,
 
 #ifdef FEATURE_WDS
 void dp_tx_mec_handler(struct dp_vdev *vdev, uint8_t *status);
+#else
+static inline void dp_tx_mec_handler(struct dp_vdev *vdev, uint8_t *status)
+{
+	return;
+}
 #endif
 
 #ifdef ATH_SUPPORT_IQUE