浏览代码

qcacld-3.0: Include MBO IE in assoc req only if peer supports PMF

Currently, MBO IE is included in assoc request if the peer
advertizes MBO IE and DUT is of MBO capability. But PMF (11w) is
a mandatory requirement for MBO. So include the MBO IE in assoc
request only if peer supports MBO along with PMF.

Change-Id: Ic0b542acdd8fc5011e7a2a4555973129c474100f
CRs-Fixed: 2528148
Srinivas Dasari 5 年之前
父节点
当前提交
603d497636
共有 1 个文件被更改,包括 13 次插入0 次删除
  1. 13 0
      core/mac/src/pe/lim/lim_send_management_frames.c

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

@@ -1690,6 +1690,7 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
 	enum rateid min_rid = RATEID_DEFAULT;
 	uint8_t *mbo_ie = NULL, *adaptive_11r_ie = NULL, *vendor_ies = NULL;
 	uint8_t mbo_ie_len = 0, adaptive_11r_ie_len = 0;
+	struct wlan_objmgr_peer *peer;
 
 	if (!pe_session) {
 		pe_err("pe_session is NULL");
@@ -2030,6 +2031,18 @@ 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 (peer)
+			wlan_objmgr_peer_release_ref(peer, WLAN_MBO_ID);
 	}
 
 	/*