|
@@ -2892,19 +2892,56 @@ sir_convert_probe_frame2_t2lm_struct(tDot11fProbeResponse *pr,
|
|
|
tpSirProbeRespBeacon bcn_struct)
|
|
|
{
|
|
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
+ struct wlan_t2lm_context *t2lm_ctx;
|
|
|
+ /* add 3 bytes for extn_ie_header */
|
|
|
+ uint8_t ie[DOT11F_IE_T2LM_IE_MAX_LEN + 3];
|
|
|
+ struct wlan_t2lm_info t2lm;
|
|
|
uint8_t i;
|
|
|
|
|
|
+ t2lm_ctx = &bcn_struct->t2lm_ctx;
|
|
|
+ qdf_mem_zero(&t2lm_ctx->established_t2lm.t2lm,
|
|
|
+ sizeof(struct wlan_t2lm_info));
|
|
|
+ t2lm_ctx->established_t2lm.t2lm.direction = WLAN_T2LM_INVALID_DIRECTION;
|
|
|
+
|
|
|
+ qdf_mem_zero(&t2lm_ctx->upcoming_t2lm.t2lm,
|
|
|
+ sizeof(struct wlan_t2lm_info));
|
|
|
+ t2lm_ctx->upcoming_t2lm.t2lm.direction = WLAN_T2LM_INVALID_DIRECTION;
|
|
|
+
|
|
|
if (!pr->num_t2lm_ie) {
|
|
|
pe_debug("T2LM IEs not present");
|
|
|
return status;
|
|
|
}
|
|
|
- bcn_struct->t2lm_ctx.num_of_t2lm_ie = pr->num_t2lm_ie;
|
|
|
+
|
|
|
pe_debug("Number of T2LM IEs in probe rsp %d", pr->num_t2lm_ie);
|
|
|
for (i = 0; i < pr->num_t2lm_ie; i++) {
|
|
|
- status = wlan_mlo_parse_bcn_prbresp_t2lm_ie(&bcn_struct->t2lm_ctx,
|
|
|
- &pr->t2lm_ie[i].data[0]);
|
|
|
- if (QDF_IS_STATUS_ERROR(status))
|
|
|
+ qdf_mem_zero(&ie[0], DOT11F_IE_T2LM_IE_MAX_LEN + 3);
|
|
|
+ qdf_mem_zero(&t2lm, sizeof(struct wlan_t2lm_info));
|
|
|
+ ie[ID_POS] = WLAN_ELEMID_EXTN_ELEM;
|
|
|
+ ie[TAG_LEN_POS] = pr->t2lm_ie[i].num_data + 1;
|
|
|
+ ie[IDEXT_POS] = WLAN_EXTN_ELEMID_T2LM;
|
|
|
+ qdf_mem_copy(&ie[3], &pr->t2lm_ie[i].data[0],
|
|
|
+ pr->t2lm_ie[i].num_data);
|
|
|
+
|
|
|
+ qdf_trace_hex_dump(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
|
|
|
+ &ie[0], pr->t2lm_ie[i].num_data + 3);
|
|
|
+
|
|
|
+ status = wlan_mlo_parse_t2lm_info(&ie[0], &t2lm);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ pe_debug("Parse T2LM IE fail");
|
|
|
return status;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!t2lm.mapping_switch_time_present &&
|
|
|
+ t2lm.expected_duration_present) {
|
|
|
+ qdf_mem_copy(&t2lm_ctx->established_t2lm.t2lm, &t2lm,
|
|
|
+ sizeof(struct wlan_t2lm_info));
|
|
|
+ pe_debug("Parse established T2LM IE success");
|
|
|
+ } else if (t2lm.mapping_switch_time_present) {
|
|
|
+ qdf_mem_copy(&t2lm_ctx->upcoming_t2lm.t2lm, &t2lm,
|
|
|
+ sizeof(struct wlan_t2lm_info));
|
|
|
+ pe_debug("Parse upcoming T2LM IE success");
|
|
|
+ }
|
|
|
+ pe_debug("Parse T2LM IE success");
|
|
|
}
|
|
|
return status;
|
|
|
}
|
|
@@ -5036,20 +5073,54 @@ sir_convert_beacon_frame2_t2lm_struct(tDot11fBeacon *bcn_frm,
|
|
|
tpSirProbeRespBeacon bcn_struct)
|
|
|
{
|
|
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
+ struct wlan_t2lm_context *t2lm_ctx;
|
|
|
+ /* add 3 bytes for extn_ie_header */
|
|
|
+ uint8_t ie[DOT11F_IE_T2LM_IE_MAX_LEN + 3];
|
|
|
+ struct wlan_t2lm_info t2lm;
|
|
|
uint8_t i;
|
|
|
|
|
|
+ t2lm_ctx = &bcn_struct->t2lm_ctx;
|
|
|
+ qdf_mem_zero(&t2lm_ctx->established_t2lm.t2lm,
|
|
|
+ sizeof(struct wlan_t2lm_info));
|
|
|
+ t2lm_ctx->established_t2lm.t2lm.direction = WLAN_T2LM_INVALID_DIRECTION;
|
|
|
+
|
|
|
+ qdf_mem_zero(&t2lm_ctx->upcoming_t2lm.t2lm,
|
|
|
+ sizeof(struct wlan_t2lm_info));
|
|
|
+ t2lm_ctx->upcoming_t2lm.t2lm.direction = WLAN_T2LM_INVALID_DIRECTION;
|
|
|
+
|
|
|
if (!bcn_frm->num_t2lm_ie) {
|
|
|
pe_debug("T2LM IEs not present");
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
- bcn_struct->t2lm_ctx.num_of_t2lm_ie = bcn_frm->num_t2lm_ie;
|
|
|
- pe_debug("Number of T2LM IEs in probe rsp %d", bcn_frm->num_t2lm_ie);
|
|
|
+ pe_debug("Number of T2LM IEs in beacon %d", bcn_frm->num_t2lm_ie);
|
|
|
for (i = 0; i < bcn_frm->num_t2lm_ie; i++) {
|
|
|
- status = wlan_mlo_parse_bcn_prbresp_t2lm_ie(&bcn_struct->t2lm_ctx,
|
|
|
- &bcn_frm->t2lm_ie[i].data[0]);
|
|
|
- if (QDF_IS_STATUS_ERROR(status))
|
|
|
+ qdf_mem_zero(&ie[0], DOT11F_IE_T2LM_IE_MAX_LEN + 3);
|
|
|
+ qdf_mem_zero(&t2lm, sizeof(struct wlan_t2lm_info));
|
|
|
+ ie[ID_POS] = WLAN_ELEMID_EXTN_ELEM;
|
|
|
+ ie[TAG_LEN_POS] = bcn_frm->t2lm_ie[i].num_data + 1;
|
|
|
+ ie[IDEXT_POS] = WLAN_EXTN_ELEMID_T2LM;
|
|
|
+ qdf_mem_copy(&ie[3], &bcn_frm->t2lm_ie[i].data[0],
|
|
|
+ bcn_frm->t2lm_ie[i].num_data + 3);
|
|
|
+ qdf_trace_hex_dump(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
|
|
|
+ &ie[0], bcn_frm->t2lm_ie[i].num_data + 3);
|
|
|
+ status = wlan_mlo_parse_t2lm_info(&ie[0], &t2lm);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ pe_debug("Parse T2LM IE fail");
|
|
|
return status;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!t2lm.mapping_switch_time_present &&
|
|
|
+ t2lm.expected_duration_present) {
|
|
|
+ qdf_mem_copy(&t2lm_ctx->established_t2lm.t2lm, &t2lm,
|
|
|
+ sizeof(struct wlan_t2lm_info));
|
|
|
+ pe_debug("Parse established T2LM IE success");
|
|
|
+ } else if (t2lm.mapping_switch_time_present) {
|
|
|
+ qdf_mem_copy(&t2lm_ctx->upcoming_t2lm.t2lm, &t2lm,
|
|
|
+ sizeof(struct wlan_t2lm_info));
|
|
|
+ pe_debug("Parse upcoming T2LM IE success");
|
|
|
+ }
|
|
|
+ pe_debug("Parse T2LM IE success");
|
|
|
}
|
|
|
return status;
|
|
|
}
|