wifi: iwlwifi: mvm: fix iwl_ssid_exist() check

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
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Daniel Gabay <daniel.gabay@intel.com>
Link: https://patch.msgid.link/20241229164246.4471cd3d8dba.Iab8409b22bf6f01d05571ecef1e97dd3c8b1cc75@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Miri Korenblit 2024-12-29 16:44:45 +02:00 committed by Johannes Berg
parent 703f341e99
commit 2ce67f8bf1
1 changed files with 1 additions and 1 deletions

View File

@ -462,7 +462,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;