ソースを参照

qcacld-3.0: Don't delete peer if assoc_req rejected

As ref-STA peer not created yet when handling assoc_req frame,
don't delete peer if DUT decide to reject the incoming
association request.

Change-Id: I3532545c9c6f498a2649bd943e3d45c49a1ce3e6
CRs-Fixed: 3064763
Lin Bai 3 年 前
コミット
9d7f4239f2
1 ファイル変更15 行追加12 行削除
  1. 15 12
      core/mac/src/pe/lim/lim_process_assoc_req_frame.c

+ 15 - 12
core/mac/src/pe/lim/lim_process_assoc_req_frame.c

@@ -2176,6 +2176,21 @@ bool lim_send_assoc_ind_to_sme(struct mac_context *mac_ctx,
 		goto send_ind_to_sme;
 	}
 
+	if (LIM_IS_AP_ROLE(session)) {
+		if ((assoc_req->wpaPresent || assoc_req->rsnPresent) &&
+		    !session->privacy) {
+			pe_debug("reject assoc. wpa: %d, rsn: %d, privacy: %d",
+				 assoc_req->wpaPresent,
+				 assoc_req->rsnPresent,
+				 session->privacy);
+			lim_reject_association(mac_ctx, sa, sub_type, true,
+					       auth_type, peer_idx, false,
+					       STATUS_UNSPECIFIED_FAILURE,
+					       session);
+			return false;
+		}
+	}
+
 	/* check if sta is allowed per QoS AC rules */
 	if (!lim_chk_wmm(mac_ctx, sa, session, assoc_req, sub_type, qos_mode))
 		return false;
@@ -2255,18 +2270,6 @@ bool lim_send_assoc_ind_to_sme(struct mac_context *mac_ctx,
 	else
 		lim_set_mlo_recv_assoc(sta_ds, false);
 
-	if (LIM_IS_AP_ROLE(session)) {
-		if ((assoc_req->wpaPresent || assoc_req->rsnPresent) &&
-		    !session->privacy) {
-			lim_reject_association(mac_ctx, sa, sub_type,
-					       true, auth_type, peer_idx,
-					       true,
-					       STATUS_UNSPECIFIED_FAILURE,
-					       session);
-			return false;
-		}
-	}
-
 send_ind_to_sme:
 	if (!lim_update_sta_ds(mac_ctx, sa, session, assoc_req,
 			       sub_type, sta_ds, auth_type, akm_type,