Browse Source

qcacmn: Remove AST entry from previous peer ast_list for ast update

Remove ast entry from the previous peer ast_list and add it to the
new peer ast_list when ast_update is called

Change-Id: Ic6e628ec2c225e6743d042fe3f3e227cb1864a3c
Tallapragada Kalyan 7 years ago
parent
commit
7a47aac367
1 changed files with 10 additions and 0 deletions
  1. 10 0
      dp/wifi3.0/dp_peer.c

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

@@ -545,8 +545,18 @@ int dp_peer_update_ast(struct dp_soc *soc, struct dp_peer *peer,
 		       struct dp_ast_entry *ast_entry, uint32_t flags)
 {
 	int ret = -1;
+	struct dp_peer *old_peer;
+
+	old_peer = ast_entry->peer;
+	TAILQ_REMOVE(&old_peer->ast_entry_list, ast_entry, ase_list_elem);
 
 	ast_entry->peer = peer;
+	ast_entry->type = CDP_TXRX_AST_TYPE_WDS;
+	ast_entry->pdev_id = peer->vdev->pdev->pdev_id;
+	ast_entry->vdev_id = peer->vdev->vdev_id;
+	ast_entry->is_active = TRUE;
+	TAILQ_INSERT_TAIL(&peer->ast_entry_list, ast_entry, ase_list_elem);
+
 	if (ast_entry->type != CDP_TXRX_AST_TYPE_STATIC) {
 		if (QDF_STATUS_SUCCESS ==
 				soc->cdp_soc.ol_ops->peer_update_wds_entry(