|
@@ -7144,8 +7144,8 @@ void lim_update_session_he_capable_chan_switch(struct mac_context *mac,
|
|
|
session->vhtCapability, session->he_6ghz_band, new_chan_freq);
|
|
|
}
|
|
|
|
|
|
-void lim_set_he_caps(struct mac_context *mac, struct pe_session *session, uint8_t *ie_start,
|
|
|
- uint32_t num_bytes)
|
|
|
+void lim_set_he_caps(struct mac_context *mac, struct pe_session *session,
|
|
|
+ uint8_t *ie_start, uint32_t num_bytes)
|
|
|
{
|
|
|
const uint8_t *ie = NULL;
|
|
|
tDot11fIEhe_cap dot11_cap;
|
|
@@ -7252,25 +7252,35 @@ void lim_set_he_caps(struct mac_context *mac, struct pe_session *session, uint8_
|
|
|
|
|
|
he_cap->rx_he_mcs_map_lt_80 = dot11_cap.rx_he_mcs_map_lt_80;
|
|
|
he_cap->tx_he_mcs_map_lt_80 = dot11_cap.tx_he_mcs_map_lt_80;
|
|
|
- he_cap->rx_he_mcs_map_160 =
|
|
|
+ if (dot11_cap.chan_width_2) {
|
|
|
+ he_cap->rx_he_mcs_map_160 =
|
|
|
*((uint16_t *)dot11_cap.rx_he_mcs_map_160);
|
|
|
- he_cap->tx_he_mcs_map_160 =
|
|
|
+ he_cap->tx_he_mcs_map_160 =
|
|
|
*((uint16_t *)dot11_cap.tx_he_mcs_map_160);
|
|
|
- he_cap->rx_he_mcs_map_80_80 =
|
|
|
+ ie_start[1] += HE_CAP_160M_MCS_MAP_LEN;
|
|
|
+ }
|
|
|
+ if (dot11_cap.chan_width_3) {
|
|
|
+ he_cap->rx_he_mcs_map_80_80 =
|
|
|
*((uint16_t *)dot11_cap.rx_he_mcs_map_80_80);
|
|
|
- he_cap->tx_he_mcs_map_80_80 =
|
|
|
+ he_cap->tx_he_mcs_map_80_80 =
|
|
|
*((uint16_t *)dot11_cap.tx_he_mcs_map_80_80);
|
|
|
+ ie_start[1] += HE_CAP_80P80_MCS_MAP_LEN;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-QDF_STATUS lim_send_he_caps_ie(struct mac_context *mac_ctx, struct pe_session *session,
|
|
|
- uint8_t vdev_id)
|
|
|
+QDF_STATUS lim_send_he_caps_ie(struct mac_context *mac_ctx,
|
|
|
+ struct pe_session *session, uint8_t vdev_id)
|
|
|
{
|
|
|
- uint8_t he_caps[SIR_MAC_HE_CAP_MIN_LEN + 3];
|
|
|
+ uint8_t he_caps[SIR_MAC_HE_CAP_MIN_LEN + HE_CAP_OUI_LEN +
|
|
|
+ HE_CAP_160M_MCS_MAP_LEN + HE_CAP_80P80_MCS_MAP_LEN];
|
|
|
struct he_capability_info *he_cap;
|
|
|
QDF_STATUS status_5g, status_2g;
|
|
|
struct wlan_objmgr_vdev *vdev;
|
|
|
enum QDF_OPMODE device_mode;
|
|
|
+ uint8_t he_cap_total_len = SIR_MAC_HE_CAP_MIN_LEN + HE_CAP_OUI_LEN +
|
|
|
+ HE_CAP_160M_MCS_MAP_LEN +
|
|
|
+ HE_CAP_80P80_MCS_MAP_LEN;
|
|
|
|
|
|
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(
|
|
|
mac_ctx->psoc, vdev_id,
|
|
@@ -7283,14 +7293,13 @@ QDF_STATUS lim_send_he_caps_ie(struct mac_context *mac_ctx, struct pe_session *s
|
|
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_MAC_ID);
|
|
|
|
|
|
/* Sending only minimal info(no PPET) to FW now, update if required */
|
|
|
- qdf_mem_zero(he_caps, SIR_MAC_HE_CAP_MIN_LEN + 3);
|
|
|
+ qdf_mem_zero(he_caps, he_cap_total_len);
|
|
|
he_caps[0] = DOT11F_EID_HE_CAP;
|
|
|
he_caps[1] = SIR_MAC_HE_CAP_MIN_LEN;
|
|
|
qdf_mem_copy(&he_caps[2], HE_CAP_OUI_TYPE, HE_CAP_OUI_SIZE);
|
|
|
- lim_set_he_caps(mac_ctx, session, he_caps,
|
|
|
- SIR_MAC_HE_CAP_MIN_LEN + 3);
|
|
|
+ lim_set_he_caps(mac_ctx, session, he_caps, he_cap_total_len);
|
|
|
he_cap = (struct he_capability_info *) (&he_caps[2 + HE_CAP_OUI_SIZE]);
|
|
|
-
|
|
|
+ he_cap->ppet_present = 0;
|
|
|
if(device_mode == QDF_NDI_MODE) {
|
|
|
he_cap->su_beamformee = 0;
|
|
|
he_cap->su_beamformer = 0;
|
|
@@ -7304,14 +7313,14 @@ QDF_STATUS lim_send_he_caps_ie(struct mac_context *mac_ctx, struct pe_session *s
|
|
|
}
|
|
|
status_5g = lim_send_ie(mac_ctx, vdev_id, DOT11F_EID_HE_CAP,
|
|
|
CDS_BAND_5GHZ, &he_caps[2],
|
|
|
- SIR_MAC_HE_CAP_MIN_LEN + 1);
|
|
|
+ he_caps[1] + 1);
|
|
|
if (QDF_IS_STATUS_ERROR(status_5g))
|
|
|
pe_err("Unable send HE Cap IE for 5GHZ band, status: %d",
|
|
|
status_5g);
|
|
|
|
|
|
status_2g = lim_send_ie(mac_ctx, vdev_id, DOT11F_EID_HE_CAP,
|
|
|
CDS_BAND_2GHZ, &he_caps[2],
|
|
|
- SIR_MAC_HE_CAP_MIN_LEN + 1);
|
|
|
+ he_caps[1] + 1);
|
|
|
if (QDF_IS_STATUS_ERROR(status_2g))
|
|
|
pe_err("Unable send HE Cap IE for 2GHZ band, status: %d",
|
|
|
status_2g);
|