Correct condition for not to use pmk caching
@@ -2275,7 +2275,7 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher,
if (sm->key_mgmt == WPA_KEY_MGMT_SAE ||
is_wpa2_enterprise_connection()) {
- if (!esp_wifi_skip_supp_pmkcaching() || use_pmk_cache) {
+ if (!esp_wifi_skip_supp_pmkcaching() && use_pmk_cache) {
pmksa_cache_set_current(sm, NULL, (const u8*) bssid, 0, 0);
wpa_sm_set_pmk_from_pmksa(sm);
} else {
