浏览代码

qcacld-3.0: Update fils connection ERP sequence number after roam

Currently the host driver updates the fils erp sequence number
to upper layer once the roam synch indication with the next erp
sequence number is received from the firmware. During the next
connection triggered from upper layer, the supplicant sends the
updated erp seq number value to host and host saves it in
session->pCurRoamProfile->fils_con_info->sequence_number.

During roaming, the supplicant doesn't update erp next seq
number so host retains the older value of sequence number given
by the supplicant during initial connection and sends this value
as part of RSO update config sent to firmware after roam synch
complete is done. So the FILS connection is terminated due to
this wrong sequence number sent by the host.

Add changes to update the new erp sequence number received in
roam synch indication to
session->pCurRoamProfile->fils_con_info->sequence_number. Send
this updated value without any modification if the RSO update
config reason is roam completion.

Change-Id: Ie833f31c57173a5a4dc45722c7ee0b42cf916cb0
CRs-Fixed: 2397877
Pragaspathi Thilagaraj 6 年之前
父节点
当前提交
87a60af51a
共有 2 个文件被更改,包括 16 次插入11 次删除
  1. 2 2
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 14 9
      core/sme/src/csr/csr_api_roam.c

+ 2 - 2
core/hdd/src/wlan_hdd_cfg80211.c

@@ -16387,7 +16387,7 @@ static int wlan_hdd_cfg80211_set_fils_config(struct hdd_adapter *adapter,
 
 	roam_profile->fils_con_info->is_fils_connection = true;
 	roam_profile->fils_con_info->sequence_number =
-		req->fils_erp_next_seq_num;
+			(req->fils_erp_next_seq_num + 1);
 	roam_profile->fils_con_info->auth_type = auth_type;
 
 	roam_profile->fils_con_info->r_rk_length =
@@ -20756,7 +20756,7 @@ __wlan_hdd_cfg80211_update_connect_params(struct wiphy *wiphy,
 					req->fils_erp_realm_len);
 		}
 
-		fils_info->sequence_number = req->fils_erp_next_seq_num;
+		fils_info->sequence_number = req->fils_erp_next_seq_num + 1;
 		fils_info->r_rk_length = req->fils_erp_rrk_len;
 
 		if (req->fils_erp_rrk_len && req->fils_erp_rrk)

+ 14 - 9
core/sme/src/csr/csr_api_roam.c

@@ -18538,8 +18538,8 @@ static uint32_t copy_all_before_char(char *str, uint32_t str_len,
  * Return: None
  */
 static void csr_update_fils_params_rso(struct mac_context *mac,
-		struct csr_roam_session *session,
-		struct roam_offload_scan_req *req_buffer)
+				       struct csr_roam_session *session,
+				       struct roam_offload_scan_req *req_buffer)
 {
 	struct roam_fils_params *roam_fils_params;
 	struct cds_fils_connection_info *fils_info;
@@ -18579,8 +18579,7 @@ static void csr_update_fils_params_rso(struct mac_context *mac,
 	roam_fils_params->username_length = usr_name_len;
 	req_buffer->is_fils_connection = true;
 
-	roam_fils_params->next_erp_seq_num =
-			(fils_info->sequence_number + 1);
+	roam_fils_params->next_erp_seq_num = fils_info->sequence_number;
 
 	roam_fils_params->rrk_length = fils_info->r_rk_length;
 	qdf_mem_copy(roam_fils_params->rrk, fils_info->r_rk,
@@ -18592,11 +18591,15 @@ static void csr_update_fils_params_rso(struct mac_context *mac,
 	qdf_mem_copy(roam_fils_params->realm, fils_info->keyname_nai
 			+ roam_fils_params->username_length + 1,
 			roam_fils_params->realm_len);
+	sme_debug("Fils: next_erp_seq_num %d rrk_len %d realm_len:%d",
+		  roam_fils_params->next_erp_seq_num,
+		  roam_fils_params->rrk_length, roam_fils_params->realm_len);
 }
 #else
-static inline void csr_update_fils_params_rso(struct mac_context *mac,
-		struct csr_roam_session *session,
-		struct roam_offload_scan_req *req_buffer)
+static inline
+void csr_update_fils_params_rso(struct mac_context *mac,
+				struct csr_roam_session *session,
+				struct roam_offload_scan_req *req_buffer)
 {}
 #endif
 
@@ -20798,8 +20801,8 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx,
 		policy_mgr_check_concurrent_intf_and_restart_sap(mac_ctx->psoc);
 		policy_mgr_check_n_start_opportunistic_timer(mac_ctx->psoc);
 		csr_roam_offload_scan(mac_ctx, session_id,
-				ROAM_SCAN_OFFLOAD_UPDATE_CFG,
-				REASON_CONNECT);
+				      ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+				      REASON_CONNECT);
 		csr_roam_call_callback(mac_ctx, session_id, NULL, 0,
 				       eCSR_ROAM_SYNCH_COMPLETE,
 				       eCSR_ROAM_RESULT_SUCCESS);
@@ -21052,6 +21055,8 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx,
 	roam_info->update_erp_next_seq_num =
 			roam_synch_data->update_erp_next_seq_num;
 	roam_info->next_erp_seq_num = roam_synch_data->next_erp_seq_num;
+	session->pCurRoamProfile->fils_con_info->sequence_number =
+					roam_info->next_erp_seq_num;
 	sme_debug("Update ERP Seq Num : %d, Next ERP Seq Num : %d",
 			roam_info->update_erp_next_seq_num,
 			roam_info->next_erp_seq_num);