diff --git a/core/wma/inc/wma_he.h b/core/wma/inc/wma_he.h index 18050de8761c..9205da425fc0 100644 --- a/core/wma/inc/wma_he.h +++ b/core/wma/inc/wma_he.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -117,12 +117,14 @@ void wma_he_update_tgt_services(struct wmi_unified *wmi_handle, /** * wma_populate_peer_he_cap() - populate peer HE capabilities in peer assoc cmd + * @wma: pointer to wma handle * @peer: pointer to peer assoc params * @params: pointer to ADD STA params * * Return: None */ -void wma_populate_peer_he_cap(struct peer_assoc_params *peer, +void wma_populate_peer_he_cap(tp_wma_handle wma, + struct peer_assoc_params *peer, tpAddStaParams params); /** @@ -247,7 +249,8 @@ static inline void wma_he_update_tgt_services(struct wmi_unified *wmi_handle, return; } -static inline void wma_populate_peer_he_cap(struct peer_assoc_params *peer, +static inline void wma_populate_peer_he_cap(tp_wma_handle wma, + struct peer_assoc_params *peer, tpAddStaParams params) { } diff --git a/core/wma/src/wma_he.c b/core/wma/src/wma_he.c index 242c8e52134d..78fb22b959bb 100644 --- a/core/wma/src/wma_he.c +++ b/core/wma/src/wma_he.c @@ -1098,7 +1098,8 @@ static void wma_parse_he_ppet(int8_t *rcvd_ppet, } } -void wma_populate_peer_he_cap(struct peer_assoc_params *peer, +void wma_populate_peer_he_cap(tp_wma_handle wma, + struct peer_assoc_params *peer, tpAddStaParams params) { tDot11fIEhe_cap *he_cap = ¶ms->he_config; @@ -1106,12 +1107,15 @@ void wma_populate_peer_he_cap(struct peer_assoc_params *peer, uint32_t *phy_cap = peer->peer_he_cap_phyinfo; uint32_t mac_cap[PSOC_HOST_MAX_MAC_SIZE] = {0}, he_ops = 0; uint8_t temp, i, chan_width; + struct wma_txrx_node *intr = NULL; if (params->he_capable) peer->he_flag = 1; else return; + intr = &wma->interfaces[params->smesessionId]; + /* HE MAC capabilities */ WMI_HECAP_MAC_HECTRL_SET(mac_cap[0], he_cap->htc_he); WMI_HECAP_MAC_TWTREQ_SET(mac_cap[0], he_cap->twt_request); @@ -1168,7 +1172,8 @@ void wma_populate_peer_he_cap(struct peer_assoc_params *peer, WMI_HECAP_PHY_CBW_SET(phy_cap, chan_width); WMI_HECAP_PHY_PREAMBLEPUNCRX_SET(phy_cap, he_cap->rx_pream_puncturing); WMI_HECAP_PHY_COD_SET(phy_cap, he_cap->device_class); - WMI_HECAP_PHY_LDPC_SET(phy_cap, he_cap->ldpc_coding); + temp = he_cap->ldpc_coding && intr->config.ldpc; + WMI_HECAP_PHY_LDPC_SET(phy_cap, temp); WMI_HECAP_PHY_LTFGIFORHE_SET(phy_cap, he_cap->he_1x_ltf_800_gi_ppdu); WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET(phy_cap, he_cap->midamble_tx_rx_max_nsts); diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 691db0a3acce..4013d7bf2234 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -1686,7 +1686,7 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma, cmd->peer_nss = WMA_MAX_NSS; } - wma_populate_peer_he_cap(cmd, params); + wma_populate_peer_he_cap(wma, cmd, params); if (!wma_is_vdev_in_ap_mode(wma, params->smesessionId)) intr->nss = cmd->peer_nss;