From nobody Wed Oct 04 15:23:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S0z425PZyz4w6Lh; Wed, 4 Oct 2023 15:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S0z423NVpz4N22; Wed, 4 Oct 2023 15:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KRc3ZZrm/ueSzHHT9qjr+dNFrf+Q6yPrbw8FI4XsIY=; b=WtFnqD+UnTCoDkndcMlIitax17w2C0DAMp3Ybh2ELISbWKaDYk/oiH+VYRT7gO0TjXOgdf iVZmYycZSBLpUlmlzmky2Y9EIYCBjqx5D+kKtULJfuDB3Y56B1rxxBmN1EloEVXWt5ZSa7 8+cWriRcY5aFBSOBTloi7bkLmBoWKx0SZJJ6uQR4aYpadQSe6ptWVzSLRKv5rjw5PpxTjM uC9EYpiaQBLGiAr5PdenjvK5goB2rbCrGcpH0yBZZLwcKTYmf6lyQxj4XvQZqu6YzOtui/ Rjco/p5YEHecer5oiz8rbDII8VdJg5T0EwIDBfUcARnNXaXSV2C0ZYUQuX3C7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433026; a=rsa-sha256; cv=none; b=eZGrsCrZl5fU0gGUoXQm0FD4Obi7jxNgjJXdQD5k72nR4jugZY528mVYEVxmj72BBf4+aA KLTVnKvsvnQpwK+Ll7SHVPxqyTK2k1tGSHzWJZCGLStwwSPxZoNxmBjRV8QsVF0V1BY3Z6 a76TL4T8Rz2oPjspC+djmCc3cTcDrQnt7pjUxACYlAhb/VMXdrXqmJgh3/80kksuD/unAa OUZ4QPAAZAixHdqKBAmT+eBshXHYiKDR7IpQE9GhL29OoRArkfXCISzSK2f339YRLxa4A8 Oiy3SJkmoEPy/2ptk/FX7ps/hSjoumdSdLr95qPT963EQfgM1WkqN7DKXyn1iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KRc3ZZrm/ueSzHHT9qjr+dNFrf+Q6yPrbw8FI4XsIY=; b=glmn+f9T29hpmqXLA5yVgCn3Pf/LrUczGyUtQrLH4s6U/pA8i5iIHL2PGhOQBG1SOx8cUY bSgqB0N0C9yT2/kABMhFcWwxVYTSPtzDgMhO+mGaYQD6RY0n5I9X+InnNHycwTG9PhgO0n 65OVP4YBYOOpCPs18GLuVe7OWFzrDmRcfSAvapuz2mHf2E8/mCSdyp8RZjXcsx3VKqZT1S Mi7ghjF+as8FlyUXjRTOUtPj2fwIXqFdUSHOVNa6cL9+u0k2AWCYlmVpsEbw/I7t4AYZ2C ///3e66mJJn7u7E4L0bCoy4BEJrNmDG4EgqSgG6ThBmSkrT/5wacP19LqaPI2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S0z422VSCzjdQ; Wed, 4 Oct 2023 15:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 394FNksc087012; Wed, 4 Oct 2023 15:23:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNk6n087009; Wed, 4 Oct 2023 15:23:46 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:46 GMT Message-Id: <202310041523.394FNk6n087009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: a513f65b92b6 - stable/14 - iwlwifi: fix a bug in iwl_ssid_exist() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a513f65b92b672830c89acfa04b93c3b77d3f97d Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a513f65b92b672830c89acfa04b93c3b77d3f97d commit a513f65b92b672830c89acfa04b93c3b77d3f97d Author: Bjoern A. Zeeb AuthorDate: 2023-09-14 17:22:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:18 +0000 iwlwifi: fix a bug in iwl_ssid_exist() Rather than always comparing a given SSID to the first SSID of the IE list, compare it to the the iterator one. That way duplicates can be found. Sponsored by: The FreeBSD Foundation (cherry picked from commit ee7077f24f5b02bde8cf5c202848128f18733398) --- sys/contrib/dev/iwlwifi/mvm/scan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/contrib/dev/iwlwifi/mvm/scan.c b/sys/contrib/dev/iwlwifi/mvm/scan.c index a4077053e374..8c5d6860914b 100644 --- a/sys/contrib/dev/iwlwifi/mvm/scan.c +++ b/sys/contrib/dev/iwlwifi/mvm/scan.c @@ -447,7 +447,11 @@ static int iwl_ssid_exist(u8 *ssid, u8 ssid_len, struct iwl_ssid_ie *ssid_list) if (!ssid_list[i].len) break; if (ssid_list[i].len == ssid_len && +#if defined(__linux__) !memcmp(ssid_list->ssid, ssid, ssid_len)) +#elif defined(__FreeBSD__) + !memcmp(ssid_list[i].ssid, ssid, ssid_len)) +#endif return i; } return -1;