qcacmn: Return invalid peer state if peer is not found

Return an appropriate value in case a peer is not found.

CRs-Fixed: 3059712
Change-Id: I951d4dd900cde0606e8f03c2b8748f5e76fe5736
This commit is contained in:
Mohit Khanna
2021-10-08 07:14:17 -07:00
committed by Madan Koyyalamudi
parent d9eb751658
commit 25652ed9d8

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -5041,7 +5042,7 @@ int dp_get_peer_state(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
vdev_id, DP_MOD_ID_CDP); vdev_id, DP_MOD_ID_CDP);
if (!peer) if (!peer)
return QDF_STATUS_E_FAILURE; return OL_TXRX_PEER_STATE_INVALID;
DP_TRACE(DEBUG, "peer %pK stats %d", peer, peer->state); DP_TRACE(DEBUG, "peer %pK stats %d", peer, peer->state);
peer_state = peer->state; peer_state = peer->state;