git: a513f65b92b6 - stable/14 - iwlwifi: fix a bug in iwl_ssid_exist()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Oct 2023 15:23:46 UTC
The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a513f65b92b672830c89acfa04b93c3b77d3f97d commit a513f65b92b672830c89acfa04b93c3b77d3f97d Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2023-09-14 17:22:04 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> 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;