From aca93a9919deb6b7ebe24959a182841b8310c401 Mon Sep 17 00:00:00 2001 From: Jia Ding Date: Mon, 31 Aug 2020 14:39:48 +0800 Subject: [PATCH] qcacld-3.0: Properly check return value of lim_cmp_ssid lim_cmp_ssid() calls qdf_mem_cmp() and a return value of 0 means the memory to be compared are equal. In lim_chk_ssid(), checking against != true is thus not proper to ensure memory are equal. Thus check against 0 to ensure requested SSID matches our own SSID configured. Change-Id: I31651e7fba47ae6eb22dc034c4479114343e8652 CRs-Fixed: 2765570 --- core/mac/src/pe/lim/lim_process_assoc_req_frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c index 61245c0d7547..98d0ee51b845 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c @@ -332,7 +332,7 @@ static bool lim_chk_ssid(struct mac_context *mac_ctx, tpSirMacMgmtHdr hdr, struct pe_session *session, tpSirAssocReq assoc_req, uint8_t sub_type) { - if (lim_cmp_ssid(&assoc_req->ssId, session) != true) + if (!lim_cmp_ssid(&assoc_req->ssId, session)) return true; pe_err("%s Req with ssid wrong(Rcvd: %.*s self: %.*s) from "