diff options
| author | Miri Korenblit <[email protected]> | 2024-12-29 14:44:45 +0000 |
|---|---|---|
| committer | Johannes Berg <[email protected]> | 2025-01-13 14:26:42 +0000 |
| commit | 2ce67f8bf1ce11549c055bd64fa382c511c1af9b (patch) | |
| tree | 0aa97ee4166d6b54dc7e238c6850998c85bccb58 | |
| parent | wifi: iwlwifi: mvm: Improve code style in pointer declarations (diff) | |
| download | kernel-2ce67f8bf1ce11549c055bd64fa382c511c1af9b.tar.gz kernel-2ce67f8bf1ce11549c055bd64fa382c511c1af9b.zip | |
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 <[email protected]>
Sponsored by: The FreeBSD Foundation
Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Emmanuel Grumbach <[email protected]>
Reviewed-by: Daniel Gabay <[email protected]>
Link: https://patch.msgid.link/20241229164246.4471cd3d8dba.Iab8409b22bf6f01d05571ecef1e97dd3c8b1cc75@changeid
Signed-off-by: Johannes Berg <[email protected]>
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index 0bcd1fca31bc..60bd9c7e5f03 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -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; |
