Ver Fonte

qcacmn: Add AST type to distinquish bss on STA

When a BSS peer gets associated with vap configured in sta mode,
the ast type associated with that entry should be different from
that of regular static entries, The reason being bridge on root AP
can pick up the mac address of AP VAP.

Change-Id: Ie322a015d883e2712f41623f71ccbc255b99baf3
Radha krishna Simha Jiguru há 6 anos atrás
pai
commit
273407908f
4 ficheiros alterados com 22 adições e 11 exclusões
  1. 1 0
      dp/inc/cdp_txrx_cmn_struct.h
  2. 13 8
      dp/wifi3.0/dp_main.c
  3. 6 2
      dp/wifi3.0/dp_peer.c
  4. 2 1
      dp/wifi3.0/dp_rx.h

+ 1 - 0
dp/inc/cdp_txrx_cmn_struct.h

@@ -312,6 +312,7 @@ enum cdp_txrx_ast_entry_type {
 	CDP_TXRX_AST_TYPE_WDS,	/* WDS peer ast entry type*/
 	CDP_TXRX_AST_TYPE_MEC,	/* Multicast echo ast entry type */
 	CDP_TXRX_AST_TYPE_WDS_HM, /* HM WDS entry */
+	CDP_TXRX_AST_TYPE_STA_BSS,	 /* BSS entry(STA mode) */
 	CDP_TXRX_AST_TYPE_MAX
 };
 

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

@@ -517,7 +517,8 @@ static void dp_wds_reset_ast_wifi3(struct cdp_soc_t *soc_hdl,
 
 	if (ast_entry) {
 		if ((ast_entry->type != CDP_TXRX_AST_TYPE_STATIC) &&
-		    (ast_entry->type != CDP_TXRX_AST_TYPE_SELF)) {
+			(ast_entry->type != CDP_TXRX_AST_TYPE_SELF) &&
+			(ast_entry->type != CDP_TXRX_AST_TYPE_STA_BSS)) {
 			ast_entry->is_active = TRUE;
 		}
 	}
@@ -550,9 +551,11 @@ static void dp_wds_reset_ast_table_wifi3(struct cdp_soc_t  *soc_hdl,
 			DP_VDEV_ITERATE_PEER_LIST(vdev, peer) {
 				DP_PEER_ITERATE_ASE_LIST(peer, ase, temp_ase) {
 					if ((ase->type ==
-					     CDP_TXRX_AST_TYPE_STATIC) ||
-					    (ase->type ==
-					     CDP_TXRX_AST_TYPE_SELF))
+						CDP_TXRX_AST_TYPE_STATIC) ||
+						(ase->type ==
+						CDP_TXRX_AST_TYPE_SELF) ||
+						(ase->type ==
+						CDP_TXRX_AST_TYPE_STA_BSS))
 						continue;
 					ase->is_active = TRUE;
 				}
@@ -588,9 +591,11 @@ static void dp_wds_flush_ast_table_wifi3(struct cdp_soc_t  *soc_hdl)
 			DP_VDEV_ITERATE_PEER_LIST(vdev, peer) {
 				DP_PEER_ITERATE_ASE_LIST(peer, ase, temp_ase) {
 					if ((ase->type ==
-					     CDP_TXRX_AST_TYPE_STATIC) ||
-					    (ase->type ==
-					     CDP_TXRX_AST_TYPE_SELF))
+						CDP_TXRX_AST_TYPE_STATIC) ||
+						(ase->type ==
+						 CDP_TXRX_AST_TYPE_SELF) ||
+						(ase->type ==
+						 CDP_TXRX_AST_TYPE_STA_BSS))
 						continue;
 					dp_peer_del_ast(soc, ase);
 				}
@@ -867,7 +872,7 @@ static void dp_print_ast_stats(struct dp_soc *soc)
 	struct dp_peer *peer;
 	struct dp_ast_entry *ase, *tmp_ase;
 	char type[CDP_TXRX_AST_TYPE_MAX][10] = {
-			"NONE", "STATIC", "SELF", "WDS", "MEC", "HMWDS"};
+			"NONE", "STATIC", "SELF", "WDS", "MEC", "HMWDS", "BSS"};
 
 	DP_PRINT_STATS("AST Stats:");
 	DP_PRINT_STATS("	Entries Added   = %d", soc->stats.ast.added);

+ 6 - 2
dp/wifi3.0/dp_peer.c

@@ -515,6 +515,8 @@ int dp_peer_add_ast(struct dp_soc *soc,
 	case CDP_TXRX_AST_TYPE_STATIC:
 		peer->self_ast_entry = ast_entry;
 		ast_entry->type = CDP_TXRX_AST_TYPE_STATIC;
+		if (peer->vdev->opmode == wlan_op_mode_sta)
+			ast_entry->type = CDP_TXRX_AST_TYPE_STA_BSS;
 		break;
 	case CDP_TXRX_AST_TYPE_SELF:
 		peer->self_ast_entry = ast_entry;
@@ -549,7 +551,8 @@ int dp_peer_add_ast(struct dp_soc *soc,
 		qdf_mem_copy(next_node_mac, peer->mac_addr.raw, 6);
 
 	if ((ast_entry->type != CDP_TXRX_AST_TYPE_STATIC) &&
-	    (ast_entry->type != CDP_TXRX_AST_TYPE_SELF)) {
+	    (ast_entry->type != CDP_TXRX_AST_TYPE_SELF) &&
+	    (ast_entry->type != CDP_TXRX_AST_TYPE_STA_BSS)) {
 		if (QDF_STATUS_SUCCESS ==
 				soc->cdp_soc.ol_ops->peer_add_wds_entry(
 				peer->vdev->osif_vdev,
@@ -630,7 +633,8 @@ int dp_peer_update_ast(struct dp_soc *soc, struct dp_peer *peer,
 	struct dp_peer *old_peer;
 
 	if ((ast_entry->type == CDP_TXRX_AST_TYPE_STATIC) ||
-	    (ast_entry->type == CDP_TXRX_AST_TYPE_SELF))
+		(ast_entry->type == CDP_TXRX_AST_TYPE_SELF) ||
+		(ast_entry->type == CDP_TXRX_AST_TYPE_STA_BSS))
 		return 0;
 
 	old_peer = ast_entry->peer;

+ 2 - 1
dp/wifi3.0/dp_rx.h

@@ -464,7 +464,8 @@ dp_rx_wds_srcport_learn(struct dp_soc *soc,
 		sa_peer = ast->peer;
 
 		if ((ast->type != CDP_TXRX_AST_TYPE_STATIC) &&
-		    (ast->type != CDP_TXRX_AST_TYPE_SELF)) {
+		    (ast->type != CDP_TXRX_AST_TYPE_SELF) &&
+			(ast->type != CDP_TXRX_AST_TYPE_STA_BSS)) {
 			if (ast->pdev_id != ta_peer->vdev->pdev->pdev_id) {
 				ret = dp_peer_add_ast(soc,
 						      ta_peer, wds_src_mac,