|
@@ -201,7 +201,6 @@ lim_send_probe_req_mgmt_frame(struct mac_context *mac_ctx,
|
|
uint8_t channel;
|
|
uint8_t channel;
|
|
uint8_t *eht_cap_ie = NULL, eht_cap_ie_len = 0;
|
|
uint8_t *eht_cap_ie = NULL, eht_cap_ie_len = 0;
|
|
bool is_band_2g;
|
|
bool is_band_2g;
|
|
- uint16_t ie_buf_size;
|
|
|
|
uint16_t mlo_ie_len = 0;
|
|
uint16_t mlo_ie_len = 0;
|
|
|
|
|
|
if (additional_ielen)
|
|
if (additional_ielen)
|
|
@@ -395,6 +394,23 @@ lim_send_probe_req_mgmt_frame(struct mac_context *mac_ctx,
|
|
if (extracted_ext_cap_flag)
|
|
if (extracted_ext_cap_flag)
|
|
lim_merge_extcap_struct(&pr->ExtCap, &extracted_ext_cap, true);
|
|
lim_merge_extcap_struct(&pr->ExtCap, &extracted_ext_cap, true);
|
|
|
|
|
|
|
|
+ if (pesession)
|
|
|
|
+ populate_dot11f_btm_extended_caps(mac_ctx, pesession,
|
|
|
|
+ &pr->ExtCap);
|
|
|
|
+
|
|
|
|
+ if (lim_is_session_eht_capable(pesession)) {
|
|
|
|
+ eht_cap_ie = qdf_mem_malloc(WLAN_MAX_IE_LEN + MIN_IE_LEN);
|
|
|
|
+ if (!eht_cap_ie) {
|
|
|
|
+ pe_err("malloc failed for eht_cap_ie");
|
|
|
|
+ qdf_status = QDF_STATUS_E_NOMEM;
|
|
|
|
+ goto mem_free;
|
|
|
|
+ }
|
|
|
|
+ is_band_2g = WLAN_REG_IS_24GHZ_CH_FREQ(pesession->curr_op_freq);
|
|
|
|
+ lim_ieee80211_pack_ehtcap(eht_cap_ie, pr->eht_cap, pr->he_cap,
|
|
|
|
+ is_band_2g);
|
|
|
|
+ eht_cap_ie_len = eht_cap_ie[TAG_LEN_POS] + MIN_IE_LEN;
|
|
|
|
+ pr->eht_cap.present = false;
|
|
|
|
+ }
|
|
|
|
|
|
/* That's it-- now we pack it. First, how much space are we going to */
|
|
/* That's it-- now we pack it. First, how much space are we going to */
|
|
status = dot11f_get_packed_probe_request_size(mac_ctx, pr, &payload);
|
|
status = dot11f_get_packed_probe_request_size(mac_ctx, pr, &payload);
|
|
@@ -408,15 +424,16 @@ lim_send_probe_req_mgmt_frame(struct mac_context *mac_ctx,
|
|
status);
|
|
status);
|
|
}
|
|
}
|
|
|
|
|
|
- bytes = payload + sizeof(tSirMacMgmtHdr) + addn_ielen + mlo_ie_len;
|
|
|
|
|
|
+ bytes = payload + sizeof(tSirMacMgmtHdr) + addn_ielen + mlo_ie_len +
|
|
|
|
+ eht_cap_ie_len;
|
|
|
|
|
|
/* Ok-- try to allocate some memory: */
|
|
/* Ok-- try to allocate some memory: */
|
|
qdf_status = cds_packet_alloc((uint16_t) bytes, (void **)&frame,
|
|
qdf_status = cds_packet_alloc((uint16_t) bytes, (void **)&frame,
|
|
(void **)&packet);
|
|
(void **)&packet);
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
pe_err("Failed to allocate %d bytes for a Probe Request", bytes);
|
|
pe_err("Failed to allocate %d bytes for a Probe Request", bytes);
|
|
- qdf_mem_free(pr);
|
|
|
|
- return QDF_STATUS_E_NOMEM;
|
|
|
|
|
|
+ qdf_status = QDF_STATUS_E_NOMEM;
|
|
|
|
+ goto mem_free;
|
|
}
|
|
}
|
|
/* Paranoia: */
|
|
/* Paranoia: */
|
|
qdf_mem_zero(frame, bytes);
|
|
qdf_mem_zero(frame, bytes);
|
|
@@ -432,46 +449,17 @@ lim_send_probe_req_mgmt_frame(struct mac_context *mac_ctx,
|
|
if (DOT11F_FAILED(status)) {
|
|
if (DOT11F_FAILED(status)) {
|
|
pe_err("Failed to pack a Probe Request (0x%08x)", status);
|
|
pe_err("Failed to pack a Probe Request (0x%08x)", status);
|
|
cds_packet_free((void *)packet);
|
|
cds_packet_free((void *)packet);
|
|
- return QDF_STATUS_E_FAILURE; /* allocated! */
|
|
|
|
|
|
+ qdf_status = QDF_STATUS_E_FAILURE;
|
|
|
|
+ goto mem_free;
|
|
} else if (DOT11F_WARNED(status)) {
|
|
} else if (DOT11F_WARNED(status)) {
|
|
pe_warn("There were warnings while packing a Probe Request (0x%08x)", status);
|
|
pe_warn("There were warnings while packing a Probe Request (0x%08x)", status);
|
|
}
|
|
}
|
|
|
|
|
|
- /* Strip EHT capabilities IE */
|
|
|
|
- if (lim_is_session_eht_capable(pesession)) {
|
|
|
|
- ie_buf_size = payload;
|
|
|
|
-
|
|
|
|
- eht_cap_ie = qdf_mem_malloc(WLAN_MAX_IE_LEN + 2);
|
|
|
|
- if (!eht_cap_ie) {
|
|
|
|
- pe_err("malloc failed for eht_cap_ie");
|
|
|
|
- goto skip_eht_ie_update;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- qdf_status = lim_strip_eht_cap_ie(mac_ctx, frame +
|
|
|
|
- sizeof(tSirMacMgmtHdr),
|
|
|
|
- &ie_buf_size, eht_cap_ie);
|
|
|
|
- if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
|
|
|
- pe_err("Failed to strip EHT cap IE");
|
|
|
|
- qdf_mem_free(eht_cap_ie);
|
|
|
|
- goto skip_eht_ie_update;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- is_band_2g =
|
|
|
|
- WLAN_REG_IS_24GHZ_CH_FREQ(pesession->curr_op_freq);
|
|
|
|
-
|
|
|
|
- lim_ieee80211_pack_ehtcap(eht_cap_ie, pr->eht_cap, pr->he_cap,
|
|
|
|
- is_band_2g);
|
|
|
|
- eht_cap_ie_len = eht_cap_ie[1] + 2;
|
|
|
|
-
|
|
|
|
- /* Copy the EHT IE to the end of the frame */
|
|
|
|
- qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) +
|
|
|
|
- ie_buf_size,
|
|
|
|
|
|
+ if (eht_cap_ie_len) {
|
|
|
|
+ qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
|
|
eht_cap_ie, eht_cap_ie_len);
|
|
eht_cap_ie, eht_cap_ie_len);
|
|
- qdf_mem_free(eht_cap_ie);
|
|
|
|
- payload = ie_buf_size + eht_cap_ie_len;
|
|
|
|
|
|
+ payload += eht_cap_ie_len;
|
|
}
|
|
}
|
|
-skip_eht_ie_update:
|
|
|
|
- qdf_mem_free(pr);
|
|
|
|
|
|
|
|
/* Append any AddIE if present. */
|
|
/* Append any AddIE if present. */
|
|
if (addn_ielen) {
|
|
if (addn_ielen) {
|
|
@@ -519,10 +507,17 @@ skip_eht_ie_update:
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
pe_err("could not send Probe Request frame!");
|
|
pe_err("could not send Probe Request frame!");
|
|
/* Pkt will be freed up by the callback */
|
|
/* Pkt will be freed up by the callback */
|
|
- return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
+ qdf_status = QDF_STATUS_E_FAILURE;
|
|
|
|
+ goto mem_free;
|
|
}
|
|
}
|
|
|
|
|
|
- return QDF_STATUS_SUCCESS;
|
|
|
|
|
|
+ qdf_status = QDF_STATUS_SUCCESS;
|
|
|
|
+
|
|
|
|
+mem_free:
|
|
|
|
+ qdf_mem_free(eht_cap_ie);
|
|
|
|
+ qdf_mem_free(pr);
|
|
|
|
+
|
|
|
|
+ return qdf_status;
|
|
} /* End lim_send_probe_req_mgmt_frame. */
|
|
} /* End lim_send_probe_req_mgmt_frame. */
|
|
|
|
|
|
static QDF_STATUS lim_get_addn_ie_for_probe_resp(struct mac_context *mac,
|
|
static QDF_STATUS lim_get_addn_ie_for_probe_resp(struct mac_context *mac,
|
|
@@ -1523,7 +1518,6 @@ lim_send_assoc_rsp_mgmt_frame(struct mac_context *mac_ctx,
|
|
uint8_t *eht_op_ie = NULL, eht_op_ie_len = 0;
|
|
uint8_t *eht_op_ie = NULL, eht_op_ie_len = 0;
|
|
uint8_t *eht_cap_ie = NULL, eht_cap_ie_len = 0;
|
|
uint8_t *eht_cap_ie = NULL, eht_cap_ie_len = 0;
|
|
bool is_band_2g;
|
|
bool is_band_2g;
|
|
- uint16_t ie_buf_size;
|
|
|
|
uint16_t mlo_ie_len = 0;
|
|
uint16_t mlo_ie_len = 0;
|
|
struct element_info ie;
|
|
struct element_info ie;
|
|
|
|
|
|
@@ -1788,6 +1782,44 @@ lim_send_assoc_rsp_mgmt_frame(struct mac_context *mac_ctx,
|
|
sta, &frm);
|
|
sta, &frm);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (sta && lim_is_sta_eht_capable(sta) &&
|
|
|
|
+ lim_is_session_eht_capable(pe_session)) {
|
|
|
|
+ eht_op_ie = qdf_mem_malloc(WLAN_MAX_IE_LEN + MIN_IE_LEN);
|
|
|
|
+ if (!eht_op_ie) {
|
|
|
|
+ pe_err("malloc failed for eht_op_ie");
|
|
|
|
+ goto error;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ lim_ieee80211_pack_ehtop(eht_op_ie, frm.eht_op,
|
|
|
|
+ frm.VHTOperation,
|
|
|
|
+ frm.he_op,
|
|
|
|
+ frm.HTInfo);
|
|
|
|
+ eht_op_ie_len = eht_op_ie[TAG_LEN_POS] + MIN_IE_LEN;
|
|
|
|
+
|
|
|
|
+ /* Set eht op to false as frame contents are present in
|
|
|
|
+ * eht_op_ie buffer
|
|
|
|
+ */
|
|
|
|
+ frm.eht_op.present = false;
|
|
|
|
+
|
|
|
|
+ eht_cap_ie = qdf_mem_malloc(WLAN_MAX_IE_LEN + MIN_IE_LEN);
|
|
|
|
+ if (!eht_cap_ie) {
|
|
|
|
+ pe_err("malloc failed for eht_cap_ie");
|
|
|
|
+ goto error;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ is_band_2g =
|
|
|
|
+ WLAN_REG_IS_24GHZ_CH_FREQ(pe_session->curr_op_freq);
|
|
|
|
+ lim_ieee80211_pack_ehtcap(eht_cap_ie, frm.eht_cap, frm.he_cap,
|
|
|
|
+ is_band_2g);
|
|
|
|
+
|
|
|
|
+ eht_cap_ie_len = eht_cap_ie[TAG_LEN_POS] + MIN_IE_LEN;
|
|
|
|
+
|
|
|
|
+ /* Set eht cap to false as frame contents are present in
|
|
|
|
+ * eht_cap_ie buffer
|
|
|
|
+ */
|
|
|
|
+ frm.eht_cap.present = false;
|
|
|
|
+ }
|
|
|
|
+
|
|
/* Allocate a buffer for this frame: */
|
|
/* Allocate a buffer for this frame: */
|
|
status = dot11f_get_packed_assoc_response_size(mac_ctx, &frm, &payload);
|
|
status = dot11f_get_packed_assoc_response_size(mac_ctx, &frm, &payload);
|
|
if (DOT11F_FAILED(status)) {
|
|
if (DOT11F_FAILED(status)) {
|
|
@@ -1799,12 +1831,14 @@ lim_send_assoc_rsp_mgmt_frame(struct mac_context *mac_ctx,
|
|
status);
|
|
status);
|
|
}
|
|
}
|
|
|
|
|
|
- bytes += sizeof(tSirMacMgmtHdr) + payload + mlo_ie_len;
|
|
|
|
|
|
+ bytes += sizeof(tSirMacMgmtHdr) + payload + mlo_ie_len + eht_op_ie_len +
|
|
|
|
+ eht_cap_ie_len;
|
|
|
|
|
|
if (sta) {
|
|
if (sta) {
|
|
bytes += sta->mlmStaContext.owe_ie_len;
|
|
bytes += sta->mlmStaContext.owe_ie_len;
|
|
bytes += sta->mlmStaContext.ft_ie_len;
|
|
bytes += sta->mlmStaContext.ft_ie_len;
|
|
}
|
|
}
|
|
|
|
+
|
|
qdf_status = cds_packet_alloc((uint16_t) bytes, (void **)&frame,
|
|
qdf_status = cds_packet_alloc((uint16_t) bytes, (void **)&frame,
|
|
(void **)&packet);
|
|
(void **)&packet);
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
@@ -1837,78 +1871,16 @@ lim_send_assoc_rsp_mgmt_frame(struct mac_context *mac_ctx,
|
|
status);
|
|
status);
|
|
}
|
|
}
|
|
|
|
|
|
- /* Strip EHT operation and EHT capabilities IEs */
|
|
|
|
- if (lim_is_session_eht_capable(pe_session)) {
|
|
|
|
- ie_buf_size = payload - WLAN_ASSOC_RSP_IES_OFFSET;
|
|
|
|
- eht_op_ie = qdf_mem_malloc(WLAN_MAX_IE_LEN + 2);
|
|
|
|
- if (!eht_op_ie) {
|
|
|
|
- pe_err("malloc failed for eht_op_ie");
|
|
|
|
- cds_packet_free((void *)packet);
|
|
|
|
- goto error;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- qdf_status = lim_strip_eht_op_ie(mac_ctx, frame +
|
|
|
|
- sizeof(tSirMacMgmtHdr) +
|
|
|
|
- WLAN_ASSOC_RSP_IES_OFFSET,
|
|
|
|
- &ie_buf_size, eht_op_ie);
|
|
|
|
- if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
|
|
|
- pe_err("Failed to strip EHT op IE");
|
|
|
|
- qdf_mem_free(eht_cap_ie);
|
|
|
|
- cds_packet_free((void *)packet);
|
|
|
|
- cds_packet_free((void *)packet);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- lim_ieee80211_pack_ehtop(eht_op_ie, frm.eht_op,
|
|
|
|
- frm.VHTOperation,
|
|
|
|
- frm.he_op,
|
|
|
|
- frm.HTInfo);
|
|
|
|
- eht_op_ie_len = eht_op_ie[1] + 2;
|
|
|
|
-
|
|
|
|
- /* Copy the EHT operation IE to the end of the frame */
|
|
|
|
- qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) +
|
|
|
|
- WLAN_ASSOC_RSP_IES_OFFSET + ie_buf_size,
|
|
|
|
|
|
+ if (eht_op_ie_len) {
|
|
|
|
+ qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
|
|
eht_op_ie, eht_op_ie_len);
|
|
eht_op_ie, eht_op_ie_len);
|
|
- qdf_mem_free(eht_op_ie);
|
|
|
|
- bytes = bytes - payload;
|
|
|
|
- payload = ie_buf_size + WLAN_ASSOC_RSP_IES_OFFSET +
|
|
|
|
- eht_op_ie_len;
|
|
|
|
- bytes = bytes + payload;
|
|
|
|
-
|
|
|
|
- ie_buf_size = payload - WLAN_ASSOC_RSP_IES_OFFSET;
|
|
|
|
- eht_cap_ie = qdf_mem_malloc(WLAN_MAX_IE_LEN + 2);
|
|
|
|
- if (!eht_cap_ie) {
|
|
|
|
- pe_err("malloc failed for eht_cap_ie");
|
|
|
|
- cds_packet_free((void *)packet);
|
|
|
|
- goto error;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- qdf_status = lim_strip_eht_cap_ie(mac_ctx, frame +
|
|
|
|
- sizeof(tSirMacMgmtHdr) +
|
|
|
|
- WLAN_ASSOC_RSP_IES_OFFSET,
|
|
|
|
- &ie_buf_size, eht_cap_ie);
|
|
|
|
- if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
|
|
|
- pe_err("Failed to strip EHT cap IE");
|
|
|
|
- qdf_mem_free(eht_cap_ie);
|
|
|
|
- cds_packet_free((void *)packet);
|
|
|
|
- goto error;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- is_band_2g =
|
|
|
|
- WLAN_REG_IS_24GHZ_CH_FREQ(pe_session->curr_op_freq);
|
|
|
|
- lim_ieee80211_pack_ehtcap(eht_cap_ie, frm.eht_cap, frm.he_cap,
|
|
|
|
- is_band_2g);
|
|
|
|
-
|
|
|
|
- eht_cap_ie_len = eht_cap_ie[1] + 2;
|
|
|
|
|
|
+ payload += eht_op_ie_len;
|
|
|
|
+ }
|
|
|
|
|
|
- /* Copy the EHT capability IE to the end of the frame */
|
|
|
|
- qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) +
|
|
|
|
- WLAN_ASSOC_RSP_IES_OFFSET + ie_buf_size,
|
|
|
|
|
|
+ if (eht_cap_ie_len) {
|
|
|
|
+ qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
|
|
eht_cap_ie, eht_cap_ie_len);
|
|
eht_cap_ie, eht_cap_ie_len);
|
|
- qdf_mem_free(eht_cap_ie);
|
|
|
|
- bytes = bytes - payload;
|
|
|
|
- payload = ie_buf_size + WLAN_ASSOC_RSP_IES_OFFSET +
|
|
|
|
- eht_cap_ie_len;
|
|
|
|
- bytes = bytes + payload;
|
|
|
|
|
|
+ payload += eht_cap_ie_len;
|
|
}
|
|
}
|
|
|
|
|
|
if (addn_ie_len && addn_ie_len <= WNI_CFG_ASSOC_RSP_ADDNIE_DATA_LEN) {
|
|
if (addn_ie_len && addn_ie_len <= WNI_CFG_ASSOC_RSP_ADDNIE_DATA_LEN) {
|
|
@@ -1995,6 +1967,8 @@ lim_send_assoc_rsp_mgmt_frame(struct mac_context *mac_ctx,
|
|
lim_util_count_sta_add(mac_ctx, sta, pe_session);
|
|
lim_util_count_sta_add(mac_ctx, sta, pe_session);
|
|
|
|
|
|
error:
|
|
error:
|
|
|
|
+ qdf_mem_free(eht_cap_ie);
|
|
|
|
+ qdf_mem_free(eht_op_ie);
|
|
qdf_mem_free(add_ie);
|
|
qdf_mem_free(add_ie);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2392,7 +2366,6 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
|
|
bool bss_mfp_capable, frag_ie_present = false;
|
|
bool bss_mfp_capable, frag_ie_present = false;
|
|
int8_t peer_rssi = 0;
|
|
int8_t peer_rssi = 0;
|
|
bool is_band_2g;
|
|
bool is_band_2g;
|
|
- uint16_t ie_buf_size;
|
|
|
|
uint16_t mlo_ie_len, fils_hlp_ie_len = 0;
|
|
uint16_t mlo_ie_len, fils_hlp_ie_len = 0;
|
|
uint8_t *fils_hlp_ie = NULL;
|
|
uint8_t *fils_hlp_ie = NULL;
|
|
struct cm_roam_values_copy mdie_cfg = {0};
|
|
struct cm_roam_values_copy mdie_cfg = {0};
|
|
@@ -2911,6 +2884,27 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* Strip EHT capabilities IE */
|
|
|
|
+ if (lim_is_session_eht_capable(pe_session)) {
|
|
|
|
+ eht_cap_ie = qdf_mem_malloc(WLAN_MAX_IE_LEN + MIN_IE_LEN);
|
|
|
|
+ if (!eht_cap_ie) {
|
|
|
|
+ pe_err("malloc failed for eht_cap_ie");
|
|
|
|
+ goto end;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ is_band_2g =
|
|
|
|
+ WLAN_REG_IS_24GHZ_CH_FREQ(pe_session->curr_op_freq);
|
|
|
|
+
|
|
|
|
+ lim_ieee80211_pack_ehtcap(eht_cap_ie, frm->eht_cap, frm->he_cap,
|
|
|
|
+ is_band_2g);
|
|
|
|
+ eht_cap_ie_len = eht_cap_ie[TAG_LEN_POS] + MIN_IE_LEN;
|
|
|
|
+
|
|
|
|
+ /* Mark EHT capability as false as this the data is already
|
|
|
|
+ * present in eht_cap_ie buffer pointer
|
|
|
|
+ */
|
|
|
|
+ frm->eht_cap.present = false;
|
|
|
|
+ }
|
|
|
|
+
|
|
status = dot11f_get_packed_assoc_request_size(mac_ctx, frm, &payload);
|
|
status = dot11f_get_packed_assoc_request_size(mac_ctx, frm, &payload);
|
|
if (DOT11F_FAILED(status)) {
|
|
if (DOT11F_FAILED(status)) {
|
|
pe_err("Association Request packet size failure(0x%08x)",
|
|
pe_err("Association Request packet size failure(0x%08x)",
|
|
@@ -2924,7 +2918,8 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
|
|
|
|
|
|
bytes = payload + sizeof(tSirMacMgmtHdr) + aes_block_size_len +
|
|
bytes = payload + sizeof(tSirMacMgmtHdr) + aes_block_size_len +
|
|
rsnx_ie_len + mbo_ie_len + adaptive_11r_ie_len +
|
|
rsnx_ie_len + mbo_ie_len + adaptive_11r_ie_len +
|
|
- mscs_ext_ie_len + vendor_ie_len + mlo_ie_len + fils_hlp_ie_len;
|
|
|
|
|
|
+ mscs_ext_ie_len + vendor_ie_len + mlo_ie_len + fils_hlp_ie_len +
|
|
|
|
+ eht_cap_ie_len;
|
|
|
|
|
|
|
|
|
|
qdf_status = cds_packet_alloc((uint16_t) bytes, (void **)&frame,
|
|
qdf_status = cds_packet_alloc((uint16_t) bytes, (void **)&frame,
|
|
@@ -2971,42 +2966,10 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
|
|
payload = payload + fils_hlp_ie_len;
|
|
payload = payload + fils_hlp_ie_len;
|
|
}
|
|
}
|
|
|
|
|
|
- /* Strip EHT capabilities IE */
|
|
|
|
- if (lim_is_session_eht_capable(pe_session)) {
|
|
|
|
- ie_buf_size = payload - WLAN_ASSOC_REQ_IES_OFFSET;
|
|
|
|
-
|
|
|
|
- eht_cap_ie = qdf_mem_malloc(WLAN_MAX_IE_LEN + 2);
|
|
|
|
- if (!eht_cap_ie) {
|
|
|
|
- pe_err("malloc failed for eht_cap_ie");
|
|
|
|
- cds_packet_free((void *)packet);
|
|
|
|
- goto end;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- qdf_status = lim_strip_eht_cap_ie(mac_ctx, frame +
|
|
|
|
- sizeof(tSirMacMgmtHdr) +
|
|
|
|
- WLAN_ASSOC_REQ_IES_OFFSET,
|
|
|
|
- &ie_buf_size, eht_cap_ie);
|
|
|
|
- if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
|
|
|
- pe_err("Failed to strip EHT cap IE");
|
|
|
|
- qdf_mem_free(eht_cap_ie);
|
|
|
|
- cds_packet_free((void *)packet);
|
|
|
|
- goto end;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- is_band_2g =
|
|
|
|
- WLAN_REG_IS_24GHZ_CH_FREQ(pe_session->curr_op_freq);
|
|
|
|
-
|
|
|
|
- lim_ieee80211_pack_ehtcap(eht_cap_ie, frm->eht_cap, frm->he_cap,
|
|
|
|
- is_band_2g);
|
|
|
|
- eht_cap_ie_len = eht_cap_ie[1] + 2;
|
|
|
|
-
|
|
|
|
- /* Copy the EHT IE to the end of the frame */
|
|
|
|
- qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) +
|
|
|
|
- WLAN_ASSOC_REQ_IES_OFFSET + ie_buf_size,
|
|
|
|
|
|
+ if (eht_cap_ie_len) {
|
|
|
|
+ qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
|
|
eht_cap_ie, eht_cap_ie_len);
|
|
eht_cap_ie, eht_cap_ie_len);
|
|
- qdf_mem_free(eht_cap_ie);
|
|
|
|
- payload = ie_buf_size + WLAN_ASSOC_REQ_IES_OFFSET +
|
|
|
|
- eht_cap_ie_len;
|
|
|
|
|
|
+ payload += eht_cap_ie_len;
|
|
}
|
|
}
|
|
|
|
|
|
if (rsnx_ie && rsnx_ie_len) {
|
|
if (rsnx_ie && rsnx_ie_len) {
|
|
@@ -3126,6 +3089,7 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
|
|
}
|
|
}
|
|
|
|
|
|
end:
|
|
end:
|
|
|
|
+ qdf_mem_free(eht_cap_ie);
|
|
qdf_mem_free(fils_hlp_ie);
|
|
qdf_mem_free(fils_hlp_ie);
|
|
qdf_mem_free(rsnx_ie);
|
|
qdf_mem_free(rsnx_ie);
|
|
qdf_mem_free(vendor_ies);
|
|
qdf_mem_free(vendor_ies);
|