From 4316b7a8870cd316bcf6524bc96de6b3f9633fde Mon Sep 17 00:00:00 2001 From: Ankit Gupta Date: Wed, 14 Sep 2016 17:36:28 -0700 Subject: [PATCH] qcacld-3.0: Fix check while processing lim_ndp_delete_peers If the peer is not present in the deleted list, this function frees the resources for that peer and add it to the deleted list. If the peer is already in the deleted list, do nothing and continue to scan for other peers. Incorrectly checking the return value qdf_mem_cmp make the above functionality broken. Fix the check for return value of qdf_mem_cmp to allow the proper processing of the peers in deleted list. Change-Id: Ica97b3bcaa651e2ca5935beb1381e9fc5b196e8a CRs-Fixed: 1067411 --- core/mac/src/pe/nan/nan_datapath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mac/src/pe/nan/nan_datapath.c b/core/mac/src/pe/nan/nan_datapath.c index 6a1fd99f8a1c..3bed714cdf2c 100644 --- a/core/mac/src/pe/nan/nan_datapath.c +++ b/core/mac/src/pe/nan/nan_datapath.c @@ -310,7 +310,7 @@ static void lim_ndp_delete_peers(tpAniSirGlobal mac_ctx, /* Check if this peer is already in the deleted list */ found = false; for (j = 0; j < deleted_num && !found; j++) { - if (qdf_mem_cmp( + if (!qdf_mem_cmp( &deleted_peers[j].bytes, &ndp_map[i].peer_ndi_mac_addr.bytes, QDF_MAC_ADDR_SIZE)) {