From 45b7556c8186df3d595dc60f98eef2a204a171e0 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Fri, 13 Sep 2019 18:08:53 +0530 Subject: [PATCH] qcacld-3.0: Flush the scan result only in lost link case Currently the driver flushes the scan entry in the scan db for the BSSID which it was connected to in deauth, disassoc and lostlink case. In case of disassoc, and deauth, ap is still alive, hence there is a chance for connection, but in lostlink case there is no chance as the AP is switched off. So if the supplicant finds the scan result in the scan cache, it would try connect with this, but since the AP is not present, and cannot service anymore, it would result to a failed connect attempt. After several failure attempts, supplicant would blacklist the AP for some time. If the AP is alive again, the DUT cannot connect to it since it is blacklisted. Hence this situation leads to blacklisting a AP which did not send any assoc reject, and can service the DUT. Fix is to clear the scan cache so that supplicant cannot try to send connect request for this AP to the driver, hence there would be no point to blacklist the AP. This would ensure the wireless connection with this AP in future. Change-Id: I14fb36ef588856750917d83c32644b135186def9 CRs-Fixed: 2525539 --- core/hdd/src/wlan_hdd_assoc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 818e8d2121ff..ee1b5140efd4 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1858,9 +1858,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, hdd_debug("roam_result: %d", roam_result); /* clear scan cache for Link Lost */ - if (eCSR_ROAM_RESULT_DEAUTH_IND == roam_result || - eCSR_ROAM_RESULT_DISASSOC_IND == roam_result || - eCSR_ROAM_LOSTLINK == roam_status) { + if (eCSR_ROAM_LOSTLINK == roam_status) { wlan_hdd_cfg80211_unlink_bss(adapter, sta_ctx->conn_info.bssid.bytes, sta_ctx->conn_info.ssid.SSID.ssId,