From nobody Wed Nov 29 16:38:15 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 4SgQ480fwMz52x2V; Wed, 29 Nov 2023 16:38:16 +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 4SgQ4770Mbz3HwW; Wed, 29 Nov 2023 16:38:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701275896; 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=Ua6RkeVykrX0DlOiqtGCF9rRljf002wx3iXp57h5cPE=; b=aUPwsNMQG/oJ47X2mKvCIk6hRHYEUtk2c9P8uTxUHp8epHxQ98XVXq9KkWD8laLgLUJ8Rn X0FR5cmHtr6j4LlxYTw8s60Jy2ln5auCQtUC6/FHO/KKYu4z5VNkJTX37Dimf+B/WTYUvh a0WD8O87kgLLZIavi00UBy7L0K36vTwokkcVwuKaxqhWpGmnlEi9InL8KbKqUBInpvPK31 QYrMBFGxcgbifzp1rvxJQNyfhx79HbiHV7p5AvsZ108RcZupkBjvTg80enOzATu/loJlGg iSD5Any05XGKuryRrAlzxoZlxQSCwNA06Ahw6asM2EM+Tnfw6/Kku9u2Ngm4Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701275896; 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=Ua6RkeVykrX0DlOiqtGCF9rRljf002wx3iXp57h5cPE=; b=v2lnHSo14UKCHrCmfYf5LEl6ndi/9ZvjH+8+5V0bPNI4sUeUv3uKG3rshfn0e4OvrRzZwt Z1xfP09/H1LOchu5oE+ZYL1s5NhxmUmtyR3pi2dXK/RIlx7751sp9ogosz44Nj381TJtdN hJP/ws2C95ceZHC6J8kkmJWTqCq77kvpsjzlQRWXEplrD5vvofmzvE8ElbtZwn4/acKr0K yS3ApRJeEwYvzustpTeeKJkpiSBX+/0MKE9iWt9uHidHly0XoxXHU2ieUf3qBI5SfqcMxp aF1hVe2ml4Mb0XKSp3SVFPaNHP+UYEezVuVgoYi613Rr45ohjgpdESPQwUbrMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701275896; a=rsa-sha256; cv=none; b=mnFonF3i0Po3RdEQWMvNy3jM8X59gPp3hjQcnyfEAn5bMyE6erFqbM7MYQeY9Ji1+b7AMB HafVYazLSASh6GlLxJ6aoC7NzmkwyxAgrY+Ys7taizmHSwdjeg41Jp7Ckz1WGL7UdquTXz yJVMlcuKSP1IhEv1bk8yum0xTmL4x2LR0Bfkwv6mJ87KBQr8YV1tLBZil64VtuOMaqLYDS 5aTyZ0AxMW8NOLthvYnF3woYHdQnlv5BEHbaNMkqfA0lYEzavi/AZwTJHZOGWD6OQkSexy kZwfxC7H7LGLlJAHCotX+Qq+KfcaLeGdWNNJ2hDNZXj6J9AXOLiJ41qUdbiDyw== 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 4SgQ4761nPz1CXl; Wed, 29 Nov 2023 16:38:15 +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 3ATGcFc8045349; Wed, 29 Nov 2023 16:38:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ATGcFjQ045346; Wed, 29 Nov 2023 16:38:15 GMT (envelope-from git) Date: Wed, 29 Nov 2023 16:38:15 GMT Message-Id: <202311291638.3ATGcFjQ045346@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: 7f40fc099de6 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 7f40fc099de6720363d4e0bc1a45c094ccf451d5 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7f40fc099de6720363d4e0bc1a45c094ccf451d5 commit 7f40fc099de6720363d4e0bc1a45c094ccf451d5 Author: Bjoern A. Zeeb AuthorDate: 2023-09-14 17:22:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-29 16:36:06 +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;