From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
To: linux-wireless@vger.kernel.org
Cc: miriam.rachel.korenblit@intel.com
Subject: [PATCH] wifi: iwlwifi: mvm: fix iwl_ssid_exist() duplicate check
Date: Sun, 31 Mar 2024 18:07:38 +0000 (UTC) [thread overview]
Message-ID: <04759p9q-p8r3-p811-s0n4-q23r6n3s74s2@SerrOFQ.bet> (raw)
iwl_ssid_exist() seems to check if a given ssid/ssid_len already
exists in a given array ssid_list.
Correctly compare the ssid to the SSID of each array element
(with a matching SSID length) to better remove duplicates.
Signed-off-by: Bjoern A. Zeeb <bz@FreeBSD.org>
Sponsored by: The FreeBSD Foundation
---
drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git drivers/net/wireless/intel/iwlwifi/mvm/scan.c drivers/net/wireless/intel/iwlwifi/mvm/scan.c
index 7b6f1cdca067..343e70e58da5 100644
--- drivers/net/wireless/intel/iwlwifi/mvm/scan.c
+++ drivers/net/wireless/intel/iwlwifi/mvm/scan.c
@@ -454,7 +454,7 @@ 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 &&
- !memcmp(ssid_list->ssid, ssid, ssid_len))
+ !memcmp(ssid_list[i]->ssid, ssid, ssid_len))
return i;
}
return -1;
--
2.40.0
reply other threads:[~2024-03-31 18:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04759p9q-p8r3-p811-s0n4-q23r6n3s74s2@SerrOFQ.bet \
--to=bz@freebsd.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).