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@xxxxxxxxxxx> 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