qcacmn: Initialize ppe related function pointer to null

Initialize ppe related function pointers to null for 5332 and add a
check before calling the function pointer.

Change-Id: Idcaecfa839ff6822ab385053405256c201579bda
CRs-Fixed: 3378893
This commit is contained in:
Nandha Kishore Easwaran
2023-01-10 16:27:00 +05:30
committed by Madan Koyyalamudi
parent 5b69a94a15
commit c7de5d4ddc
2 changed files with 8 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
/* /*
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -899,18 +899,20 @@ hal_tx_populate_ppe_vp_entry(hal_soc_handle_t hal_soc_hdl,
* hal_ppeds_cfg_ast_override_map_reg - Set ppe index mapping table value * hal_ppeds_cfg_ast_override_map_reg - Set ppe index mapping table value
* @hal_soc: HAL SoC context * @hal_soc: HAL SoC context
* @reg_idx: index into the table * @reg_idx: index into the table
* @ppeds_astoveride_map: HAL PPE INDEX MAPPING config * @overide_map: HAL PPE INDEX MAPPING config
* *
* Return: void * Return: void
*/ */
static inline void static inline void
hal_ppeds_cfg_ast_override_map_reg(hal_soc_handle_t hal_soc_hdl, 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) uint8_t reg_idx, union hal_tx_ppe_idx_map_config *overide_map)
{ {
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl; 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, if (hal_soc->ops->hal_ppeds_cfg_ast_override_map_reg)
ppeds_astoveride_map); hal_soc->ops->hal_ppeds_cfg_ast_override_map_reg(hal_soc_hdl,
reg_idx,
overide_map);
} }
/** /**

View File

@@ -1354,6 +1354,7 @@ static void hal_hw_txrx_ops_attach_qca5332(struct hal_soc *hal_soc)
hal_soc->ops->hal_tx_dump_ppe_vp_entry = NULL; hal_soc->ops->hal_tx_dump_ppe_vp_entry = NULL;
hal_soc->ops->hal_tx_get_num_ppe_vp_tbl_entries = NULL; hal_soc->ops->hal_tx_get_num_ppe_vp_tbl_entries = NULL;
hal_soc->ops->hal_tx_enable_pri2tid_map = NULL; hal_soc->ops->hal_tx_enable_pri2tid_map = NULL;
hal_soc->ops->hal_ppeds_cfg_ast_override_map_reg = NULL;
hal_soc->ops->hal_tx_config_rbm_mapping_be = hal_soc->ops->hal_tx_config_rbm_mapping_be =
hal_tx_config_rbm_mapping_be_5332; hal_tx_config_rbm_mapping_be_5332;