qcacmn: Set search idx and cache mapping for ppeds
Set search idx and cache mapping for ppeds in sta mode Change-Id: I1f892d329878e093d19324a178566b87715e1736 CRs-Fixed: 3367824
This commit is contained in:

committed by
Madan Koyyalamudi

parent
166a30648f
commit
4e0ae9b556
@@ -2493,6 +2493,8 @@ void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
|
||||
arch_ops->dp_register_ppeds_interrupts = dp_register_ppeds_interrupts;
|
||||
arch_ops->dp_free_ppeds_interrupts = dp_free_ppeds_interrupts;
|
||||
arch_ops->dp_tx_ppeds_inuse_desc = dp_ppeds_inuse_desc;
|
||||
arch_ops->dp_tx_ppeds_cfg_astidx_cache_mapping =
|
||||
dp_tx_ppeds_cfg_astidx_cache_mapping;
|
||||
#endif
|
||||
dp_init_near_full_arch_ops_be(arch_ops);
|
||||
arch_ops->get_reo_qdesc_addr = dp_rx_get_reo_qdesc_addr_be;
|
||||
|
@@ -98,6 +98,7 @@ enum CMEM_MEM_CLIENTS {
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
#define DP_PPEDS_STAMODE_ASTIDX_MAP_REG_IDX 1
|
||||
/* The MAX PPE PRI2TID */
|
||||
#define DP_TX_INT_PRI2TID_MAX 15
|
||||
|
||||
|
@@ -3053,6 +3053,23 @@ void dp_rx_reset_roaming_peer(struct dp_soc *soc, uint8_t vdev_id,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
static void
|
||||
dp_tx_ppeds_cfg_astidx_cache_mapping(struct dp_soc *soc, struct dp_vdev *vdev,
|
||||
bool peer_map)
|
||||
{
|
||||
if (soc->arch_ops.dp_tx_ppeds_cfg_astidx_cache_mapping)
|
||||
soc->arch_ops.dp_tx_ppeds_cfg_astidx_cache_mapping(soc, vdev,
|
||||
peer_map);
|
||||
}
|
||||
#else
|
||||
static void
|
||||
dp_tx_ppeds_cfg_astidx_cache_mapping(struct dp_soc *soc, struct dp_vdev *vdev,
|
||||
bool peer_map)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* dp_rx_peer_map_handler() - handle peer map event from firmware
|
||||
* @soc_handle - generic soc handle
|
||||
@@ -3117,6 +3134,8 @@ dp_rx_peer_map_handler(struct dp_soc *soc, uint16_t peer_id,
|
||||
CDP_LINK_PEER_TYPE);
|
||||
|
||||
if (peer) {
|
||||
bool peer_map = true;
|
||||
|
||||
/* Updating ast_hash and ast_idx in peer level */
|
||||
peer->ast_hash = ast_hash;
|
||||
peer->ast_idx = hw_peer_id;
|
||||
@@ -3137,6 +3156,9 @@ dp_rx_peer_map_handler(struct dp_soc *soc, uint16_t peer_id,
|
||||
ast_hash, hw_peer_id);
|
||||
vdev->bss_ast_hash = ast_hash;
|
||||
vdev->bss_ast_idx = hw_peer_id;
|
||||
|
||||
dp_tx_ppeds_cfg_astidx_cache_mapping(soc, vdev,
|
||||
peer_map);
|
||||
}
|
||||
|
||||
/* Add ast entry incase self ast entry is
|
||||
@@ -3270,6 +3292,15 @@ dp_rx_peer_unmap_handler(struct dp_soc *soc, uint16_t peer_id,
|
||||
*/
|
||||
dp_peer_rx_reo_shared_qaddr_delete(soc, peer);
|
||||
|
||||
vdev = peer->vdev;
|
||||
|
||||
/* only if peer is in STA mode and not tdls peer */
|
||||
if (wlan_op_mode_sta == vdev->opmode && !peer->is_tdls_peer) {
|
||||
bool peer_map = false;
|
||||
|
||||
dp_tx_ppeds_cfg_astidx_cache_mapping(soc, vdev, peer_map);
|
||||
}
|
||||
|
||||
dp_peer_find_id_to_obj_remove(soc, peer_id);
|
||||
|
||||
if (soc->arch_ops.dp_partner_chips_unmap)
|
||||
@@ -3288,7 +3319,6 @@ dp_rx_peer_unmap_handler(struct dp_soc *soc, uint16_t peer_id,
|
||||
peer_id, vdev_id, mac_addr);
|
||||
}
|
||||
|
||||
vdev = peer->vdev;
|
||||
dp_update_vdev_stats_on_peer_unmap(vdev, peer);
|
||||
|
||||
dp_peer_update_state(soc, peer, DP_PEER_STATE_INACTIVE);
|
||||
|
@@ -2038,6 +2038,9 @@ struct dp_arch_ops {
|
||||
#ifdef WLAN_SUPPORT_PPEDS
|
||||
void (*dp_txrx_ppeds_rings_status)(struct dp_soc *soc);
|
||||
void (*dp_tx_ppeds_inuse_desc)(struct dp_soc *soc);
|
||||
void (*dp_tx_ppeds_cfg_astidx_cache_mapping)(struct dp_soc *soc,
|
||||
struct dp_vdev *vdev,
|
||||
bool peer_map);
|
||||
#endif
|
||||
QDF_STATUS (*txrx_soc_ppeds_start)(struct dp_soc *soc);
|
||||
void (*txrx_soc_ppeds_stop)(struct dp_soc *soc);
|
||||
|
@@ -895,6 +895,24 @@ hal_tx_populate_ppe_vp_entry(hal_soc_handle_t hal_soc_hdl,
|
||||
hal_soc->ops->hal_tx_set_ppe_vp_entry(hal_soc_hdl, vp_cfg, ppe_vp_idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_ppeds_cfg_ast_override_map_reg - Set ppe index mapping table value
|
||||
* @hal_soc: HAL SoC context
|
||||
* @reg_idx: index into the table
|
||||
* @ppeds_astoveride_map: HAL PPE INDEX MAPPING config
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void
|
||||
hal_ppeds_cfg_ast_override_map_reg(hal_soc_handle_t hal_soc_hdl,
|
||||
uint8_t reg_idx, union hal_tx_ppe_idx_map_config *ppeds_astoveride_map)
|
||||
{
|
||||
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
|
||||
|
||||
hal_soc->ops->hal_ppeds_cfg_ast_override_map_reg(hal_soc_hdl, reg_idx,
|
||||
ppeds_astoveride_map);
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_tx_set_int_pri2id - Set the prit2tid table.
|
||||
* @hal_soc: HAL SoC context
|
||||
|
@@ -165,6 +165,7 @@ typedef struct rx_msdu_desc_info *rx_msdu_desc_info_t;
|
||||
union hal_tx_ppe_vp_config;
|
||||
union hal_tx_cmn_config_ppe;
|
||||
union hal_tx_bank_config;
|
||||
union hal_tx_ppe_idx_map_config;
|
||||
|
||||
/* TBD: This should be movded to shared HW header file */
|
||||
enum hal_srng_ring_id {
|
||||
@@ -965,6 +966,8 @@ struct hal_hw_txrx_ops {
|
||||
void (*hal_tx_set_ppe_vp_entry)(hal_soc_handle_t hal_soc_hdl,
|
||||
union hal_tx_ppe_vp_config *vp_cfg,
|
||||
int ppe_vp_idx);
|
||||
void (*hal_ppeds_cfg_ast_override_map_reg)(hal_soc_handle_t hal_soc_hdl,
|
||||
uint8_t idx, union hal_tx_ppe_idx_map_config *ppeds_idx_map);
|
||||
void (*hal_tx_set_ppe_pri2tid)(hal_soc_handle_t hal_soc_hdl,
|
||||
uint32_t val,
|
||||
uint8_t map_no);
|
||||
|
@@ -1553,6 +1553,8 @@ static void hal_hw_txrx_ops_attach_qcn9224(struct hal_soc *hal_soc)
|
||||
hal_tx_set_ppe_cmn_config_9224;
|
||||
hal_soc->ops->hal_tx_set_ppe_vp_entry =
|
||||
hal_tx_set_ppe_vp_entry_9224;
|
||||
hal_soc->ops->hal_ppeds_cfg_ast_override_map_reg =
|
||||
hal_ppeds_cfg_ast_override_map_reg_9224;
|
||||
hal_soc->ops->hal_tx_set_ppe_pri2tid =
|
||||
hal_tx_set_ppe_pri2tid_map_9224;
|
||||
hal_soc->ops->hal_tx_update_ppe_pri2tid =
|
||||
|
@@ -431,6 +431,29 @@ void hal_tx_set_ppe_vp_entry_9224(hal_soc_handle_t hal_soc_hdl,
|
||||
HAL_REG_WRITE(soc, reg_addr, cfg->val);
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_ppeds_cfg_ast_override_map_reg_9224() - Set the PPE index mapping table
|
||||
* @hal_soc_hdl: HAL SoC context
|
||||
* @idx: index into the table
|
||||
* @idx_map: HAL PPE INDESX MAPPING config
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline void
|
||||
hal_ppeds_cfg_ast_override_map_reg_9224(hal_soc_handle_t hal_soc_hdl,
|
||||
uint8_t idx,
|
||||
union hal_tx_ppe_idx_map_config *idx_map)
|
||||
{
|
||||
struct hal_soc *soc = (struct hal_soc *)hal_soc_hdl;
|
||||
uint32_t reg_addr;
|
||||
|
||||
reg_addr =
|
||||
HWIO_TCL_R0_PPE_INDEX_MAPPING_TABLE_n_ADDR(MAC_TCL_REG_REG_BASE,
|
||||
idx);
|
||||
|
||||
HAL_REG_WRITE(soc, reg_addr, idx_map->val);
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_tx_set_ppe_pri2tid_map1_9224()
|
||||
* @hal_soc_hdl: HAL SoC handle
|
||||
|
Reference in New Issue
Block a user