Browse Source

qcacld-3.0: Handle roaming support for connection manager

enable roaming support in hdd for connection manager.

Change-Id: I9437dc0590b0d6f56a65c8aba1a3ceeb29e701b6
CRs-fixed: 2882325
gaurank kathpalia 4 năm trước cách đây
mục cha
commit
6ebabc2961

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

@@ -6728,7 +6728,7 @@ int wlan_hdd_send_roam_auth_event(struct hdd_adapter *adapter, uint8_t *bssid,
 	skb = cfg80211_vendor_event_alloc(hdd_ctx->wiphy,
 			&(adapter->wdev),
 			ETH_ALEN + req_rsn_len + rsp_rsn_len +
-			sizeof(uint8_t) + SIR_REPLAY_CTR_LEN +
+			sizeof(uint8_t) + REPLAY_CTR_LEN +
 			SIR_KCK_KEY_LEN + roam_info_ptr->kek_len +
 			sizeof(uint16_t) + sizeof(uint8_t) +
 			(9 * NLMSG_HDRLEN) + fils_params_len,
@@ -6767,13 +6767,13 @@ int wlan_hdd_send_roam_auth_event(struct hdd_adapter *adapter, uint8_t *bssid,
 		    auth_type != eCSR_AUTH_TYPE_CCKM_RSN &&
 		    nla_put(skb,
 			    QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_KEY_REPLAY_CTR,
-			    SIR_REPLAY_CTR_LEN,
+			    REPLAY_CTR_LEN,
 			    roam_info_ptr->replay_ctr)) {
 			hdd_err("non FT/non CCKM connection");
 			hdd_err("failed to send replay counter");
 			goto nla_put_failure;
 		}
-		if (roam_info_ptr->kek_len > SIR_KEK_KEY_LEN_FILS ||
+		if (roam_info_ptr->kek_len > MAX_KEK_LENGTH ||
 		    nla_put(skb,
 			QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KCK,
 			roam_info_ptr->kck_len, roam_info_ptr->kck) ||

+ 5 - 6
core/hdd/src/wlan_hdd_cm_connect.c

@@ -458,7 +458,7 @@ hdd_cm_connect_failure_post_user_update(struct wlan_objmgr_vdev *vdev,
 	struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	struct hdd_adapter *adapter = hdd_get_adapter_by_vdev(hdd_ctx,
 						wlan_vdev_get_id(vdev));
-	bool is_roam = false;
+	bool is_roam = rsp->is_reassoc;
 
 	if (!is_roam) {
 		/* call only for connect */
@@ -783,7 +783,7 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 	uint32_t ie_len;
 	uint8_t *ie_field;
 	mac_handle_t mac_handle;
-	bool is_roam = false;
+	bool is_roam = rsp->is_reassoc;
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	if (!hdd_ctx) {
@@ -929,7 +929,6 @@ bool hdd_cm_is_fils_connection(struct wlan_cm_connect_resp *rsp)
 static bool hdd_cm_is_roam_auth_required(struct hdd_station_ctx *sta_ctx,
 					 struct wlan_cm_connect_resp *rsp)
 {
-#if 0
 	if (!rsp->roaming_info)
 		return false;
 
@@ -937,7 +936,7 @@ static bool hdd_cm_is_roam_auth_required(struct hdd_station_ctx *sta_ctx,
 	    sta_ctx->conn_info.auth_type == eCSR_AUTH_TYPE_SAE ||
 	    sta_ctx->conn_info.auth_type == eCSR_AUTH_TYPE_OWE)
 		return false;
-#endif
+
 	return true;
 }
 #else
@@ -962,7 +961,7 @@ hdd_cm_connect_success_post_user_update(struct wlan_objmgr_vdev *vdev,
 		mlme_obj->ext_vdev_ptr->connect_info.uapsd_per_ac_bitmask;
 	bool is_auth_required = true;
 	bool is_roam_offload = false;
-	bool is_roam = false;
+	bool is_roam = rsp->is_reassoc;
 
 	if (is_roam) {
 		/* If roaming is set check if FW roaming/LFR3  */
@@ -1048,7 +1047,7 @@ QDF_STATUS hdd_cm_save_gtk(struct wlan_objmgr_vdev *vdev,
 {
 	uint8_t *kek;
 	uint32_t kek_len;
-	uint8_t replay_ctr[SIR_REPLAY_CTR_LEN] = {0};
+	uint8_t replay_ctr[REPLAY_CTR_LEN] = {0};
 	struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	struct hdd_adapter *adapter = hdd_get_adapter_by_vdev(hdd_ctx,
 						wlan_vdev_get_id(vdev));

+ 3 - 3
core/mac/inc/sir_api.h

@@ -2511,16 +2511,16 @@ struct roam_offload_synch_ind {
 	uint8_t rssi;
 	uint8_t roamReason;
 	uint32_t chan_freq;
-	uint8_t kck[KCK_256BIT_KEY_LEN];
+	uint8_t kck[MAX_KCK_LEN];
 	uint8_t kck_len;
 	uint32_t kek_len;
-	uint8_t kek[SIR_KEK_KEY_LEN_FILS];
+	uint8_t kek[MAX_KEK_LENGTH];
 	uint32_t   pmk_len;
 	uint8_t    pmk[MAX_PMK_LEN];
 	uint8_t    pmkid[PMKID_LEN];
 	bool update_erp_next_seq_num;
 	uint16_t next_erp_seq_num;
-	uint8_t replay_ctr[SIR_REPLAY_CTR_LEN];
+	uint8_t replay_ctr[REPLAY_CTR_LEN];
 	void *add_bss_params;
 	struct join_rsp *join_rsp;
 	uint16_t aid;

+ 3 - 3
core/sme/inc/csr_api.h

@@ -834,16 +834,16 @@ struct csr_roam_info {
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 	uint8_t roamSynchInProgress;
 	uint8_t synchAuthStatus;
-	uint8_t kck[KCK_256BIT_KEY_LEN];
+	uint8_t kck[MAX_KCK_LEN];
 	uint8_t kck_len;
-	uint8_t kek[SIR_KEK_KEY_LEN_FILS];
+	uint8_t kek[MAX_KEK_LENGTH];
 	uint8_t kek_len;
 	uint32_t pmk_len;
 	uint8_t pmk[MAX_PMK_LEN];
 	uint8_t pmkid[PMKID_LEN];
 	bool update_erp_next_seq_num;
 	uint16_t next_erp_seq_num;
-	uint8_t replay_ctr[SIR_REPLAY_CTR_LEN];
+	uint8_t replay_ctr[REPLAY_CTR_LEN];
 	uint8_t subnet_change_status;
 #endif
 	struct oem_channel_info chan_info;

+ 1 - 1
core/sme/src/csr/csr_api_roam.c

@@ -17354,7 +17354,7 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
 			roam_info->update_erp_next_seq_num,
 			roam_info->next_erp_seq_num);
 	qdf_mem_copy(roam_info->replay_ctr, roam_synch_data->replay_ctr,
-			SIR_REPLAY_CTR_LEN);
+			REPLAY_CTR_LEN);
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 		FL("LFR3: Copy KCK, KEK(len %d) and Replay Ctr"),
 		roam_info->kek_len);

+ 3 - 3
core/wma/src/wma_scan_roam.c

@@ -793,7 +793,7 @@ static int wma_fill_roam_synch_buffer(tp_wma_handle wma,
 		qdf_mem_copy(roam_synch_ind_ptr->kek, key->kek,
 			     SIR_KEK_KEY_LEN);
 		qdf_mem_copy(roam_synch_ind_ptr->replay_ctr,
-			     key->replay_counter, SIR_REPLAY_CTR_LEN);
+			     key->replay_counter, REPLAY_CTR_LEN);
 	} else if (key_ft) {
 		/*
 		 * For AKM 00:0F:AC (FT suite-B-SHA384)
@@ -817,7 +817,7 @@ static int wma_fill_roam_synch_buffer(tp_wma_handle wma,
 
 		qdf_mem_copy(roam_synch_ind_ptr->replay_ctr,
 			     (key_ft->key_buffer + kek_len + kck_len),
-			     SIR_REPLAY_CTR_LEN);
+			     REPLAY_CTR_LEN);
 	}
 
 	if (param_buf->hw_mode_transition_fixed_param)
@@ -830,7 +830,7 @@ static int wma_fill_roam_synch_buffer(tp_wma_handle wma,
 
 	fils_info = param_buf->roam_fils_synch_info;
 	if (fils_info) {
-		if ((fils_info->kek_len > SIR_KEK_KEY_LEN_FILS) ||
+		if ((fils_info->kek_len > MAX_KEK_LENGTH) ||
 		    (fils_info->pmk_len > MAX_PMK_LEN)) {
 			wma_err("Invalid kek_len %d or pmk_len %d",
 				 fils_info->kek_len,