qcacld-3.0: Enable AMSDU in AMPDU support for tdls peer

Advertise Rx AMSDU in AMPDU support in addba response only
if tdls peer is present and it supports he caps.

Change-Id: I0e28a12c13b07ef30f57e604d0ab05e22832e2c7
CRs-Fixed: 3104771
This commit is contained in:
Jyoti Kumari
2022-02-18 22:51:17 +05:30
committed by Madan Koyyalamudi
orang tua c7449092dd
melakukan 0f29ca4c14

Melihat File

@@ -5550,7 +5550,7 @@ QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx,
uint8_t he_frag = 0;
tpDphHashNode sta_ds = NULL;
uint16_t aid;
bool he_cap = false;
bool he_cap = false, peer_he_cap = false;
struct wlan_mlme_qos *qos_aggr;
vdev_id = session->vdev_id;
@@ -5567,6 +5567,8 @@ QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx,
frm.DialogToken.token = dialog_token;
frm.Status.status = status_code;
sta_ds = dph_lookup_hash_entry(mac_ctx, peer_mac, &aid,
&session->dph.dphHashTable);
if ((LIM_IS_STA_ROLE(session) && qos_aggr->rx_aggregation_size == 1 &&
!mac_ctx->usr_cfg_ba_buff_size) || mac_ctx->reject_addba_req) {
frm.Status.status = STATUS_REQUEST_DECLINED;
@@ -5576,8 +5578,6 @@ QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx,
frm.addba_param_set.buff_size =
QDF_MIN(qos_aggr->rx_aggregation_size, calc_buff_size);
} else {
sta_ds = dph_lookup_hash_entry(mac_ctx, peer_mac, &aid,
&session->dph.dphHashTable);
if (sta_ds && lim_is_session_he_capable(session))
he_cap = lim_is_sta_he_capable(sta_ds);
@@ -5612,11 +5612,15 @@ QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx,
}
frm.addba_param_set.tid = tid;
if (sta_ds)
peer_he_cap = lim_is_sta_he_capable(sta_ds);
/* Enable RX AMSDU only in HE mode if supported */
if (mac_ctx->is_usr_cfg_amsdu_enabled &&
((IS_PE_SESSION_HE_MODE(session) &&
WLAN_REG_IS_24GHZ_CH_FREQ(session->curr_op_freq)) ||
!WLAN_REG_IS_24GHZ_CH_FREQ(session->curr_op_freq)))
!WLAN_REG_IS_24GHZ_CH_FREQ(session->curr_op_freq) ||
(sta_ds && sta_ds->staType == STA_ENTRY_TDLS_PEER && peer_he_cap)))
frm.addba_param_set.amsdu_supp = amsdu_support;
else
frm.addba_param_set.amsdu_supp = 0;