mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
qcacld-3.0: Correct 160/80p80MHz mcs map in HE Cap IE
Check the supported bandwidth capability bits to set the 160MHz and 80p80MHz mcs map in HE capabilities that are configured to FW. Change-Id: If7ff882a99650f9771b77dc28adf9ebcbf64a00c CRs-Fixed: 2625166
This commit is contained in:
parent
66b4b30bcf
commit
294723f410
3 changed files with 30 additions and 24 deletions
|
|
@ -1887,7 +1887,10 @@ struct he_capability_info {
|
|||
/*
|
||||
* frame parser does not include optional 160 and 80+80 mcs set for MIN IE len
|
||||
*/
|
||||
#define SIR_MAC_HE_CAP_MIN_LEN (DOT11F_IE_HE_CAP_MIN_LEN + 8)
|
||||
#define SIR_MAC_HE_CAP_MIN_LEN (DOT11F_IE_HE_CAP_MIN_LEN)
|
||||
#define HE_CAP_160M_MCS_MAP_LEN 4
|
||||
#define HE_CAP_80P80_MCS_MAP_LEN 4
|
||||
#define HE_CAP_OUI_LEN 3
|
||||
|
||||
/* QOS action frame definitions */
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -6078,25 +6078,19 @@ QDF_STATUS populate_dot11f_he_caps(struct mac_context *mac_ctx, struct pe_sessio
|
|||
tDot11fIEhe_cap *he_cap)
|
||||
{
|
||||
uint8_t *ppet;
|
||||
uint32_t value = WNI_CFG_HE_PPET_LEN;
|
||||
uint32_t value = 0;
|
||||
|
||||
he_cap->present = 1;
|
||||
|
||||
if (!session) {
|
||||
qdf_mem_copy(he_cap, &mac_ctx->mlme_cfg->he_caps.dot11_he_cap,
|
||||
sizeof(tDot11fIEhe_cap));
|
||||
qdf_mem_copy(he_cap->ppet.ppe_threshold.ppe_th,
|
||||
mac_ctx->mlme_cfg->he_caps.he_ppet_5g,
|
||||
value);
|
||||
|
||||
ppet = he_cap->ppet.ppe_threshold.ppe_th;
|
||||
he_cap->ppet.ppe_threshold.num_ppe_th =
|
||||
lim_truncate_ppet(ppet, value);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
/** TODO: String items needs attention. **/
|
||||
qdf_mem_copy(he_cap, &session->he_config, sizeof(*he_cap));
|
||||
if (he_cap->ppet_present) {
|
||||
value = WNI_CFG_HE_PPET_LEN;
|
||||
/* if session is present, populate PPET based on band */
|
||||
if (!wlan_reg_is_24ghz_ch_freq(session->curr_op_freq))
|
||||
qdf_mem_copy(he_cap->ppet.ppe_threshold.ppe_th,
|
||||
|
|
|
|||
Loading…
Reference in a new issue