qcacmn: Set bandwidth, MPDU retry threshold at peer register
Currently, bandwidth and corresponding MPDU retry threshold was taken from tx packet status in per packet to update peer stats. With this change, set bandwidth and MPDU retry threshold during peer registration. Change-Id: Iffd06968246d0b86b26716ae6672e2cd23360c67 CRs-Fixed: 3225479
This commit is contained in:

committed by
Madan Koyyalamudi

parent
721afd10ab
commit
e52231c86e
@@ -5097,6 +5097,42 @@ dp_rx_delba_ind_handler(void *soc_handle, uint16_t peer_id,
|
||||
}
|
||||
|
||||
#ifdef DP_PEER_EXTENDED_API
|
||||
/**
|
||||
* dp_peer_set_bw() - Set bandwidth and mpdu retry count threshold for peer
|
||||
* @soc: DP soc handle
|
||||
* @txrx_peer: Core txrx_peer handle
|
||||
* @set_bw: enum of bandwidth to be set for this peer connection
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void dp_peer_set_bw(struct dp_soc *soc, struct dp_txrx_peer *txrx_peer,
|
||||
enum cdp_peer_bw set_bw)
|
||||
{
|
||||
if (!txrx_peer)
|
||||
return;
|
||||
|
||||
txrx_peer->bw = set_bw;
|
||||
|
||||
switch (set_bw) {
|
||||
case CDP_160_MHZ:
|
||||
case CDP_320_MHZ:
|
||||
txrx_peer->mpdu_retry_threshold =
|
||||
soc->wlan_cfg_ctx->mpdu_retry_threshold_2;
|
||||
break;
|
||||
case CDP_20_MHZ:
|
||||
case CDP_40_MHZ:
|
||||
case CDP_80_MHZ:
|
||||
default:
|
||||
txrx_peer->mpdu_retry_threshold =
|
||||
soc->wlan_cfg_ctx->mpdu_retry_threshold_1;
|
||||
break;
|
||||
}
|
||||
|
||||
dp_info("Peer id: %u: BW: %u, mpdu retry threshold: %u",
|
||||
txrx_peer->peer_id, txrx_peer->bw,
|
||||
txrx_peer->mpdu_retry_threshold);
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_11BE_MLO
|
||||
QDF_STATUS dp_register_peer(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
|
||||
struct ol_txrx_desc_type *sta_desc)
|
||||
@@ -5114,6 +5150,8 @@ QDF_STATUS dp_register_peer(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
|
||||
peer->state = OL_TXRX_PEER_STATE_CONN;
|
||||
qdf_spin_unlock_bh(&peer->peer_info_lock);
|
||||
|
||||
dp_peer_set_bw(soc, peer->txrx_peer, sta_desc->bw);
|
||||
|
||||
dp_rx_flush_rx_cached(peer, false);
|
||||
|
||||
if (IS_MLO_DP_LINK_PEER(peer) && peer->first_link) {
|
||||
@@ -5185,6 +5223,8 @@ QDF_STATUS dp_register_peer(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
|
||||
peer->state = OL_TXRX_PEER_STATE_CONN;
|
||||
qdf_spin_unlock_bh(&peer->peer_info_lock);
|
||||
|
||||
dp_peer_set_bw(soc, peer->txrx_peer, sta_desc->bw);
|
||||
|
||||
dp_rx_flush_rx_cached(peer, false);
|
||||
|
||||
dp_peer_unref_delete(peer, DP_MOD_ID_CDP);
|
||||
|
Reference in New Issue
Block a user