mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacmn: In CDP get_ast_info APIs return astentry when CB is registered
When delete callback is registered for the ast entry return the ast info even delete in progress is set Change-Id: I3ff8a6d49560513c6a18153c5bf901f201e5949f CRs-fixed: 2384550
This commit is contained in:
parent
dedc49bb06
commit
4fd2fe420f
2 changed files with 30 additions and 23 deletions
|
|
@ -688,21 +688,23 @@ static bool dp_peer_get_ast_info_by_soc_wifi3
|
|||
qdf_spin_lock_bh(&soc->ast_lock);
|
||||
|
||||
ast_entry = dp_peer_ast_hash_find_soc(soc, ast_mac_addr);
|
||||
|
||||
if (ast_entry && !ast_entry->delete_in_progress) {
|
||||
ast_entry_info->type = ast_entry->type;
|
||||
ast_entry_info->pdev_id = ast_entry->pdev_id;
|
||||
ast_entry_info->vdev_id = ast_entry->vdev_id;
|
||||
ast_entry_info->peer_id = ast_entry->peer->peer_ids[0];
|
||||
qdf_mem_copy(&ast_entry_info->peer_mac_addr[0],
|
||||
&ast_entry->peer->mac_addr.raw[0],
|
||||
DP_MAC_ADDR_LEN);
|
||||
if (!ast_entry || !ast_entry->peer) {
|
||||
qdf_spin_unlock_bh(&soc->ast_lock);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ast_entry->delete_in_progress && !ast_entry->callback) {
|
||||
qdf_spin_unlock_bh(&soc->ast_lock);
|
||||
return false;
|
||||
}
|
||||
ast_entry_info->type = ast_entry->type;
|
||||
ast_entry_info->pdev_id = ast_entry->pdev_id;
|
||||
ast_entry_info->vdev_id = ast_entry->vdev_id;
|
||||
ast_entry_info->peer_id = ast_entry->peer->peer_ids[0];
|
||||
qdf_mem_copy(&ast_entry_info->peer_mac_addr[0],
|
||||
&ast_entry->peer->mac_addr.raw[0],
|
||||
DP_MAC_ADDR_LEN);
|
||||
qdf_spin_unlock_bh(&soc->ast_lock);
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -731,20 +733,23 @@ static bool dp_peer_get_ast_info_by_pdevid_wifi3
|
|||
|
||||
ast_entry = dp_peer_ast_hash_find_by_pdevid(soc, ast_mac_addr, pdev_id);
|
||||
|
||||
if (ast_entry && !ast_entry->delete_in_progress) {
|
||||
ast_entry_info->type = ast_entry->type;
|
||||
ast_entry_info->pdev_id = ast_entry->pdev_id;
|
||||
ast_entry_info->vdev_id = ast_entry->vdev_id;
|
||||
ast_entry_info->peer_id = ast_entry->peer->peer_ids[0];
|
||||
qdf_mem_copy(&ast_entry_info->peer_mac_addr[0],
|
||||
&ast_entry->peer->mac_addr.raw[0],
|
||||
DP_MAC_ADDR_LEN);
|
||||
if (!ast_entry || !ast_entry->peer) {
|
||||
qdf_spin_unlock_bh(&soc->ast_lock);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ast_entry->delete_in_progress && !ast_entry->callback) {
|
||||
qdf_spin_unlock_bh(&soc->ast_lock);
|
||||
return false;
|
||||
}
|
||||
ast_entry_info->type = ast_entry->type;
|
||||
ast_entry_info->pdev_id = ast_entry->pdev_id;
|
||||
ast_entry_info->vdev_id = ast_entry->vdev_id;
|
||||
ast_entry_info->peer_id = ast_entry->peer->peer_ids[0];
|
||||
qdf_mem_copy(&ast_entry_info->peer_mac_addr[0],
|
||||
&ast_entry->peer->mac_addr.raw[0],
|
||||
DP_MAC_ADDR_LEN);
|
||||
qdf_spin_unlock_bh(&soc->ast_lock);
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -654,6 +654,8 @@ int dp_peer_add_ast(struct dp_soc *soc,
|
|||
param->flags = flags;
|
||||
param->vdev_id = vdev->vdev_id;
|
||||
ast_entry->callback = dp_peer_free_hmwds_cb;
|
||||
ast_entry->pdev_id = vdev->pdev->pdev_id;
|
||||
ast_entry->type = type;
|
||||
ast_entry->cookie = (void *)param;
|
||||
if (!ast_entry->delete_in_progress)
|
||||
dp_peer_del_ast(soc, ast_entry);
|
||||
|
|
|
|||
Loading…
Reference in a new issue