mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacmn: Add lock for update ast entry
Add lock protection while update of ast entry for peer Change-Id: I0f61add9a06174303b40b017a6f1f2d202f3cf55 CRs-Fixed: 2210301
This commit is contained in:
parent
61f7fa32c4
commit
4c7099f001
2 changed files with 7 additions and 3 deletions
|
|
@ -317,12 +317,10 @@ static int dp_peer_update_ast_wifi3(struct cdp_soc_t *soc_hdl,
|
|||
{
|
||||
int status;
|
||||
struct dp_soc *soc = (struct dp_soc *)soc_hdl;
|
||||
qdf_spin_lock_bh(&soc->ast_lock);
|
||||
status = dp_peer_update_ast(soc,
|
||||
(struct dp_peer *)peer_hdl,
|
||||
(struct dp_ast_entry *)ast_entry_hdl,
|
||||
flags);
|
||||
qdf_spin_unlock_bh(&soc->ast_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -547,6 +547,8 @@ int dp_peer_update_ast(struct dp_soc *soc, struct dp_peer *peer,
|
|||
int ret = -1;
|
||||
struct dp_peer *old_peer;
|
||||
|
||||
qdf_spin_lock_bh(&soc->ast_lock);
|
||||
|
||||
old_peer = ast_entry->peer;
|
||||
TAILQ_REMOVE(&old_peer->ast_entry_list, ast_entry, ase_list_elem);
|
||||
|
||||
|
|
@ -563,10 +565,14 @@ int dp_peer_update_ast(struct dp_soc *soc, struct dp_peer *peer,
|
|||
peer->vdev->osif_vdev,
|
||||
ast_entry->mac_addr.raw,
|
||||
peer->mac_addr.raw,
|
||||
flags))
|
||||
flags)) {
|
||||
qdf_spin_unlock_bh(&soc->ast_lock);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
qdf_spin_unlock_bh(&soc->ast_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue