فهرست منبع

qcacld-3.0: Never ageout connected AP scan entry

Connected AP scan entry is aged out if beacon
is not recieved within scan age out time.

Update mlme information of the connected AP/BSSID
scan entry so that scan age out hanlder will not
age it out even though the last beacon recieved
time is greater than the configured scan age out value.

Change-Id: I14c68c28459080623ca62c0bad9052e38d7fb348
CRs-Fixed: 2202010
Sandeep Puligilla 7 سال پیش
والد
کامیت
68908f2d02
1فایلهای تغییر یافته به همراه38 افزوده شده و 0 حذف شده
  1. 38 0
      core/sme/src/csr/csr_api_roam.c

+ 38 - 0
core/sme/src/csr/csr_api_roam.c

@@ -60,6 +60,7 @@
 #include <wlan_scan_ucfg_api.h>
 #include <wlan_tdls_tgt_api.h>
 #include <wlan_cfg80211_scan.h>
+#include <wlan_scan_public_structs.h>
 
 #define MAX_PWR_FCC_CHAN_12 8
 #define MAX_PWR_FCC_CHAN_13 2
@@ -6848,6 +6849,20 @@ bool csr_roam_is_fast_roam_enabled(tpAniSirGlobal pMac, uint32_t sessionId)
 	}
 }
 
+static void csr_update_scan_entry_associnfo(tpAniSirGlobal mac_ctx,
+			struct bss_info *bss, enum scan_entry_connection_state state)
+{
+	QDF_STATUS status;
+	struct mlme_info mlme;
+
+	sme_debug("Update MLME info in scan database. bssid %pM state: %d",
+				bss->bssid.bytes, state);
+	mlme.assoc_state = state;
+	status = ucfg_scan_update_mlme_by_bssinfo(mac_ctx->pdev, bss, &mlme);
+	if (QDF_IS_STATUS_ERROR(status))
+		sme_debug("Failed to update the MLME info in scan entry");
+}
+
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 static eCsrPhyMode csr_roamdot11mode_to_phymode(uint8_t dot11mode)
 {
@@ -6995,6 +7010,7 @@ static void csr_roam_process_results_default(tpAniSirGlobal mac_ctx,
 	struct csr_roam_session *session;
 	struct csr_roam_info roam_info;
 	QDF_STATUS status;
+	struct bss_info bss_info;
 
 	if (!CSR_IS_SESSION_VALID(mac_ctx, session_id)) {
 		sme_err("Invalid session id %d", session_id);
@@ -7005,6 +7021,16 @@ static void csr_roam_process_results_default(tpAniSirGlobal mac_ctx,
 	sme_debug("receives no association indication; FILS %d",
 		  session->is_fils_connection);
 	sme_debug("Assoc ref count: %d", session->bRefAssocStartCnt);
+
+	if (CSR_IS_INFRASTRUCTURE(&session->connectedProfile)) {
+		qdf_copy_macaddr(&bss_info.bssid,
+				&session->connectedProfile.bssid);
+		bss_info.chan = session->connectedProfile.operationChannel;
+		bss_info.ssid.length = session->connectedProfile.SSID.length;
+		qdf_mem_copy(&bss_info.ssid.ssid,
+				&session->connectedProfile.SSID.ssId,
+				bss_info.ssid.length);
+	}
 	if (CSR_IS_INFRASTRUCTURE(&session->connectedProfile)
 		|| CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(mac_ctx, session_id)) {
 		/*
@@ -7118,6 +7144,8 @@ static void csr_roam_process_results_default(tpAniSirGlobal mac_ctx,
 				SME_QOS_CSR_DISCONNECT_IND,
 				NULL);
 #endif
+		csr_update_scan_entry_associnfo(mac_ctx, &bss_info,
+						SCAN_ENTRY_CON_STATE_NONE);
 		csr_roam_link_down(mac_ctx, session_id);
 
 		if (mac_ctx->roam.deauthRspStatus == eSIR_SME_DEAUTH_STATUS) {
@@ -7579,6 +7607,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx,
 	struct ps_global_info *ps_global_info = &mac_ctx->sme.ps_global_info;
 	tSirSmeJoinRsp *join_rsp = (tSirSmeJoinRsp *) context;
 	uint32_t len;
+	struct bss_info bss_info;
 
 	if (!join_rsp) {
 		sme_err("join_rsp is NULL");
@@ -7921,6 +7950,15 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx,
 				eCSR_ROAM_RESULT_ASSOCIATED);
 		}
 
+		qdf_copy_macaddr(&bss_info.bssid, &conn_profile->bssid);
+		bss_info.chan = conn_profile->operationChannel;
+		bss_info.ssid.length =
+			conn_profile->SSID.length;
+		qdf_mem_copy(&bss_info.ssid.ssid,
+			&conn_profile->SSID.ssId,
+			bss_info.ssid.length);
+		csr_update_scan_entry_associnfo(mac_ctx,
+					&bss_info, SCAN_ENTRY_CON_STATE_ASSOC);
 		csr_roam_completion(mac_ctx, session_id, NULL, cmd,
 				eCSR_ROAM_RESULT_NONE, true);
 		csr_reset_pmkid_candidate_list(mac_ctx, session_id);