瀏覽代碼

qcacld-3.0: Add MBO IE for Open auth connection

The host driver checks the peer PMF capability
before adding MBO IE. But for open authentication
AP, the peer will not advertise PMF capability.
So while connecting to open mode AP, the MBO IE
doesn't get added in the association request frames.

Check if the authentication algorithm is open.
If the authentication algorithm is open don't
check for peer pmf capability to add MBO IE.

Change-Id: Ieae85ce696a40234535388a548906dc9521b19a0
CRs-Fixed: 2584527
Pragaspathi Thilagaraj 5 年之前
父節點
當前提交
376ead97d5
共有 2 個文件被更改,包括 22 次插入13 次删除
  1. 21 13
      core/mac/src/pe/lim/lim_send_management_frames.c
  2. 1 0
      core/sme/src/csr/csr_api_roam.c

+ 21 - 13
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -1806,7 +1806,7 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
 	uint8_t vdev_id = 0;
 	bool vht_enabled = false;
 	tDot11fIEExtCap extr_ext_cap;
-	bool extr_ext_flag = true;
+	bool extr_ext_flag = true, is_open_auth = false;
 	tpSirMacMgmtHdr mac_hdr;
 	uint32_t ie_offset = 0;
 	uint8_t *p_ext_cap = NULL;
@@ -2180,19 +2180,27 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
 
 		/* Include the EID and length fields */
 		mbo_ie_len = mbo_ie[1] + 2;
-		pe_debug("Stripped MBO IE of length %d", mbo_ie_len);
-
-		peer = wlan_objmgr_get_peer_by_mac(mac_ctx->psoc,
-						   mlm_assoc_req->peerMacAddr,
-						   WLAN_MBO_ID);
-		if (peer && !mlme_get_peer_pmf_status(peer)) {
-			pe_debug("Peer doesn't support PMF, Don't add MBO IE");
-			qdf_mem_free(mbo_ie);
-			mbo_ie = NULL;
-			mbo_ie_len = 0;
+
+		if (pe_session->connected_akm == ANI_AKM_TYPE_NONE)
+			is_open_auth = true;
+
+		pe_debug("Stripped MBO IE of length %d is_open_auth:%d",
+			 mbo_ie_len, is_open_auth);
+
+		if (!is_open_auth) {
+			peer = wlan_objmgr_get_peer_by_mac(
+						mac_ctx->psoc,
+						mlm_assoc_req->peerMacAddr,
+						WLAN_MBO_ID);
+			if (peer && !mlme_get_peer_pmf_status(peer)) {
+				pe_debug("Peer doesn't support PMF, Don't add MBO IE");
+				qdf_mem_free(mbo_ie);
+				mbo_ie = NULL;
+				mbo_ie_len = 0;
+			}
+			if (peer)
+				wlan_objmgr_peer_release_ref(peer, WLAN_MBO_ID);
 		}
-		if (peer)
-			wlan_objmgr_peer_release_ref(peer, WLAN_MBO_ID);
 	}
 
 	/*

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

@@ -11840,6 +11840,7 @@ csr_convert_csr_to_ani_akm_type(enum csr_akm_type akm_type)
 	enum ani_akm_type ani_akm;
 
 	switch (akm_type) {
+	case eCSR_AUTH_TYPE_OPEN_SYSTEM:
 	case eCSR_AUTH_TYPE_NONE:
 		return ANI_AKM_TYPE_NONE;
 	case eCSR_AUTH_TYPE_WPA: