Browse Source

qcacld-3.0: Reserve Beacon Protection Enabled bit in probe req

Currently, irrespective of OP MODE of the driver, the HOST sets
85th bit (Beacon Protection Enabled) in octet 11 of extended
capabilities. As per the 802.11 2020 standard, this field is
reserved for a non-AP STA.

The fix is to make sure 85th bit in octet 11 of extended
capabilities are reserved for a non-AP STA.

Change-Id: I36825bd8045af51d0f998ca5bcd90a3bc8dce632
CRs-Fixed: 2999299
abhinav kumar 3 years ago
parent
commit
b72e11a8da

+ 11 - 2
core/mac/src/pe/lim/lim_utils.c

@@ -6299,6 +6299,10 @@ void lim_merge_extcap_struct(tDot11fIEExtCap *dst,
 	if (!src->present)
 		return;
 
+	pe_debug("source extended capabilities length:%d", src->num_bytes);
+	QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
+			   src, src->num_bytes);
+
 	/* Return if strip the capabilities from @dst which not present */
 	if (!dst->present && !add)
 		return;
@@ -6313,10 +6317,15 @@ void lim_merge_extcap_struct(tDot11fIEExtCap *dst,
 		tempsrc++;
 	}
 	dst->num_bytes = lim_compute_ext_cap_ie_length(dst);
-	if (dst->num_bytes == 0)
+	if (dst->num_bytes == 0) {
 		dst->present = 0;
-	else
+	} else {
 		dst->present = 1;
+		pe_debug("destination extended capabilities length: %d",
+			 dst->num_bytes);
+		QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
+				   dst, dst->num_bytes);
+	}
 }
 
 /**

+ 5 - 2
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -1538,9 +1538,12 @@ populate_dot11f_ext_cap(struct mac_context *mac,
 	if (pe_session && pe_session->is_mbssid_enabled)
 		p_ext_cap->multi_bssid = 1;
 
-	p_ext_cap->beacon_protection_enable = pe_session ?
+	/* Beacon Protection Enabled : This field is reserved for STA */
+	if (pe_session && (pe_session->opmode == QDF_SAP_MODE ||
+	    pe_session->opmode == QDF_P2P_GO_MODE)) {
+		p_ext_cap->beacon_protection_enable = pe_session ?
 			mlme_get_bigtk_support(pe_session->vdev) : false;
-
+	}
 	if (pe_session)
 		populate_dot11f_twt_extended_caps(mac, pe_session, pDot11f);