Эх сурвалжийг харах

qcacld-3.0: Update capability info in Reassoc request to be in sync with BSS

qcacld-2.0 to qcacld-3.0 propagation

Check if the spectrum management, short preamble, immediate block ack
are supported by BSS before sending Reassoc request in roaming and
reset the corresponding capability info bits in Reassoc request if the
respective BSS does not support it

Git-commit: 1424fcbda6a8a71484ead54c059e17069f9895d7
Change-Id: Ied61d9b963b0b8176655fadaa7f1458cb1e830ef
CRs-Fixed: 1002770
Selvaraj, Sridhar 8 жил өмнө
parent
commit
af54e2e6f0

+ 5 - 0
core/mac/src/pe/lim/lim_process_mlm_host_roam.c

@@ -668,6 +668,11 @@ void lim_process_mlm_ft_reassoc_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf,
 		qdf_mem_free(pMlmReassocReq);
 		return;
 	}
+
+	lim_update_caps_info_for_bss(pMac, &caps,
+		psessionEntry->pLimReAssocReq->bssDescription.capabilityInfo);
+	lim_log(pMac, LOG1, FL("Capabilities info FT Reassoc: 0x%X"), caps);
+
 	pMlmReassocReq->capabilityInfo = caps;
 
 	/* Update PE sessionId */

+ 5 - 0
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -2339,6 +2339,11 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx,
 		lim_log(mac_ctx, LOGP, FL(
 				"could not retrieve Capabilities value"));
 	}
+
+	lim_update_caps_info_for_bss(mac_ctx, &caps,
+				reassoc_req->bssDescription.capabilityInfo);
+	lim_log(mac_ctx, LOG1, FL("Capabilities info Reassoc: 0x%X"), caps);
+
 	mlm_reassoc_req->capabilityInfo = caps;
 
 	/* Update PE session_id */

+ 32 - 0
core/mac/src/pe/lim/lim_utils.c

@@ -7150,3 +7150,35 @@ bool lim_is_ext_cap_ie_present (struct s_ext_cap *ext_cap)
 
 	return false;
 }
+
+/**
+ * lim_update_caps_info_for_bss - Update capability info for this BSS
+ *
+ * @mac_ctx: mac context
+ * @caps: Pointer to capability info to be updated
+ * @bss_caps: Capability info of the BSS
+ *
+ * Update the capability info in Assoc/Reassoc request frames and reset
+ * the spectrum management, short preamble, immediate block ack bits
+ * if the BSS doesnot support it
+ *
+ * Return: None
+ */
+void lim_update_caps_info_for_bss(tpAniSirGlobal mac_ctx,
+		uint16_t *caps, uint16_t bss_caps)
+{
+	if (!(bss_caps & LIM_SPECTRUM_MANAGEMENT_BIT_MASK)) {
+		*caps &= (~LIM_SPECTRUM_MANAGEMENT_BIT_MASK);
+		lim_log(mac_ctx, LOG1, FL("Clearing spectrum management:no AP support"));
+	}
+
+	if (!(bss_caps & LIM_SHORT_PREAMBLE_BIT_MASK)) {
+		*caps &= (~LIM_SHORT_PREAMBLE_BIT_MASK);
+		lim_log(mac_ctx, LOG1, FL("Clearing short preamble:no AP support"));
+	}
+
+	if (!(bss_caps & LIM_IMMEDIATE_BLOCK_ACK_MASK)) {
+		*caps &= (~LIM_IMMEDIATE_BLOCK_ACK_MASK);
+		lim_log(mac_ctx, LOG1, FL("Clearing Immed Blk Ack:no AP support"));
+	}
+}

+ 2 - 0
core/mac/src/pe/lim/lim_utils.h

@@ -619,4 +619,6 @@ bool lim_is_robust_mgmt_action_frame(uint8_t action_category);
 bool lim_is_ext_cap_ie_present (struct s_ext_cap *ext_cap);
 QDF_STATUS lim_p2p_action_cnf(tpAniSirGlobal mac_ctx,
 			uint32_t tx_complete_success);
+void lim_update_caps_info_for_bss(tpAniSirGlobal mac_ctx,
+			uint16_t *caps, uint16_t bss_caps);
 #endif /* __LIM_UTILS_H */