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
This commit is contained in:
Jia Ding 2020-08-31 14:39:48 +08:00 • committed by snandini
commit aca93a9919

View file

@ -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 "