diff --git a/umac/scan/core/src/wlan_scan_cache_db.c b/umac/scan/core/src/wlan_scan_cache_db.c index 2e865058d4..5da1fa777e 100644 --- a/umac/scan/core/src/wlan_scan_cache_db.c +++ b/umac/scan/core/src/wlan_scan_cache_db.c @@ -1017,6 +1017,27 @@ static bool scm_is_bss_allowed_for_country(struct wlan_objmgr_psoc *psoc, } #endif +/** + * scm_is_p2p_wildcard_ssid() - check p2p wildcard ssid or not + * @scan_entry: scan entry + * + * Return: true if SSID is wildcard "DIRECT-" ssid + */ +static bool scm_is_p2p_wildcard_ssid(struct scan_cache_entry *scan_entry) +{ + static const char wildcard_ssid[] = "DIRECT-"; + uint8_t len = sizeof(wildcard_ssid) - 1; + + if (!scan_entry->is_p2p) + return false; + if (!qdf_mem_cmp(scan_entry->ssid.ssid, + wildcard_ssid, len) && + (scan_entry->ssid.length == len)) + return true; + + return false; +} + QDF_STATUS __scm_handle_bcn_probe(struct scan_bcn_probe_event *bcn) { struct wlan_objmgr_psoc *psoc; @@ -1131,7 +1152,8 @@ QDF_STATUS __scm_handle_bcn_probe(struct scan_bcn_probe_event *bcn) status = wlan_crypto_rsnie_check( &sec_params, util_scan_entry_rsn(scan_entry)); - if (QDF_IS_STATUS_ERROR(status)) { + if (QDF_IS_STATUS_ERROR(status) && + !scm_is_p2p_wildcard_ssid(scan_entry)) { scm_nofl_debug("Drop frame from invalid RSN IE AP" QDF_MAC_ADDR_FMT ": RSN IE parse failed, status %d",