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
This commit is contained in:
Tallapragada Kalyan
2018-02-28 22:01:59 +05:30
committed by nshrivas
parent 0a580a3840
commit 7a47aac367

View File

@@ -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(