mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
qcacmn: Correct return values on ast entry add
Return value on dp_peer_add_ast where not correct resulting in unnecessary flooding of print. Correct the return values for the AST APIs Change-Id: I03983995e96314cae91db95fe02edda4564baa46 CRs-Fixed: 2183715
This commit is contained in:
parent
1435fba5e0
commit
d6ba7ae230
1 changed files with 14 additions and 9 deletions
|
|
@ -401,7 +401,7 @@ static inline void dp_peer_map_ast(struct dp_soc *soc,
|
|||
* add a new AST entry into peer AST list
|
||||
*
|
||||
* Return: 0 if new entry is allocated,
|
||||
* 1 if entry already exists or if allocation has failed
|
||||
* -1 if entry add failed
|
||||
*/
|
||||
int dp_peer_add_ast(struct dp_soc *soc,
|
||||
struct dp_peer *peer,
|
||||
|
|
@ -412,7 +412,7 @@ int dp_peer_add_ast(struct dp_soc *soc,
|
|||
struct dp_ast_entry *ast_entry;
|
||||
struct dp_vdev *vdev = peer->vdev;
|
||||
uint8_t next_node_mac[6];
|
||||
bool ret = 1;
|
||||
int ret = -1;
|
||||
|
||||
if (!vdev) {
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||
|
|
@ -436,7 +436,7 @@ int dp_peer_add_ast(struct dp_soc *soc,
|
|||
ast_entry->is_active = TRUE;
|
||||
|
||||
qdf_spin_unlock_bh(&soc->ast_lock);
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ast_entry = (struct dp_ast_entry *)
|
||||
|
|
@ -489,11 +489,13 @@ int dp_peer_add_ast(struct dp_soc *soc,
|
|||
qdf_mem_copy(next_node_mac, peer->vdev->mac_addr.raw, 6);
|
||||
|
||||
if (ast_entry->type != CDP_TXRX_AST_TYPE_STATIC) {
|
||||
ret = soc->cdp_soc.ol_ops->peer_add_wds_entry(
|
||||
if (QDF_STATUS_SUCCESS ==
|
||||
soc->cdp_soc.ol_ops->peer_add_wds_entry(
|
||||
peer->vdev->osif_vdev,
|
||||
mac_addr,
|
||||
next_node_mac,
|
||||
flags);
|
||||
flags))
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
@ -537,21 +539,24 @@ void dp_peer_del_ast(struct dp_soc *soc, struct dp_ast_entry *ast_entry)
|
|||
* tables
|
||||
*
|
||||
* Return: 0 if ast entry is updated successfully
|
||||
* 1 failure
|
||||
* -1 failure
|
||||
*/
|
||||
int dp_peer_update_ast(struct dp_soc *soc, struct dp_peer *peer,
|
||||
struct dp_ast_entry *ast_entry, uint32_t flags)
|
||||
{
|
||||
bool ret = 1;
|
||||
int ret = -1;
|
||||
|
||||
ast_entry->peer = peer;
|
||||
if (ast_entry->type != CDP_TXRX_AST_TYPE_STATIC) {
|
||||
ret = soc->cdp_soc.ol_ops->peer_update_wds_entry(
|
||||
if (QDF_STATUS_SUCCESS ==
|
||||
soc->cdp_soc.ol_ops->peer_update_wds_entry(
|
||||
peer->vdev->osif_vdev,
|
||||
ast_entry->mac_addr.raw,
|
||||
peer->mac_addr.raw,
|
||||
flags);
|
||||
flags))
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue