diff --git a/core/hif/inc/hif.h b/core/hif/inc/hif.h index aa0b60555d66..dd2c89832867 100644 --- a/core/hif/inc/hif.h +++ b/core/hif/inc/hif.h @@ -85,7 +85,11 @@ typedef void __iomem *A_target_id_t; #define TARGET_TYPE_ADRASTEA 16 struct CE_state; +#ifdef QCA_WIFI_3_0_ADRASTEA +#define CE_COUNT_MAX 12 +#else #define CE_COUNT_MAX 8 +#endif /* These numbers are selected so that the product is close to current higher limit of packets HIF services at one shot (1000) */ diff --git a/core/hif/src/adrastea_reg_def.h b/core/hif/src/adrastea_reg_def.h index 743d22ef5c28..a87884a784c5 100644 --- a/core/hif/src/adrastea_reg_def.h +++ b/core/hif/src/adrastea_reg_def.h @@ -2159,7 +2159,7 @@ struct hostdef_s adrastea_hostdef = { .d_SOC_PCIE_BASE_ADDRESS = SOC_PCIE_BASE_ADDRESS, .d_MSI_MAGIC_ADR_ADDRESS = MSI_MAGIC_ADR_ADDRESS, .d_MSI_MAGIC_ADDRESS = MSI_MAGIC_ADDRESS, - .d_HOST_CE_COUNT = 8, + .d_HOST_CE_COUNT = ADRASTEA_CE_COUNT, .d_ENABLE_MSI = 0, .d_MUX_ID_MASK = 0xf000, .d_TRANSACTION_ID_MASK = 0x0fff, diff --git a/core/hif/src/ce/ce_assignment.h b/core/hif/src/ce/ce_assignment.h index b493d55502cd..9ff907f23fbf 100644 --- a/core/hif/src/ce/ce_assignment.h +++ b/core/hif/src/ce/ce_assignment.h @@ -92,6 +92,12 @@ static struct CE_attr host_ce_config_wlan[] = { /* ce_diag, the Diagnostic Window */ { /* CE7 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL,}, + /* Target to uMC */ + { /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,}, + /*The following CEs are not being used yet */ + { /* CE9 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,}, + { /* CE10 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,}, + { /* CE11 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,}, }; static struct CE_pipe_config target_ce_config_wlan[] = { @@ -116,7 +122,11 @@ static struct CE_pipe_config target_ce_config_wlan[] = { { /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0, (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,}, /* CE8 used only by IPA */ - { /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,} + { /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}, + /*The following CEs are not being used yet*/ + { /* CE9 */ 9, PIPEDIR_IN, 0, 0, CE_ATTR_FLAGS, 0,}, + { /* CE10 */ 9, PIPEDIR_IN, 0, 0, CE_ATTR_FLAGS, 0,}, + { /* CE11 */ 9, PIPEDIR_IN, 0, 0, CE_ATTR_FLAGS, 0,}, }; static struct CE_attr host_ce_config_wlan_epping_poll[] = { diff --git a/core/hif/src/ce/ce_service.c b/core/hif/src/ce/ce_service.c index a898d0b63104..4b6c37bc7ccc 100644 --- a/core/hif/src/ce/ce_service.c +++ b/core/hif/src/ce/ce_service.c @@ -1509,6 +1509,10 @@ ce_send_cb_register(struct CE_handle *copyeng, { struct CE_state *CE_state = (struct CE_state *)copyeng; + if (CE_state == NULL) { + pr_err("%s: Error CE state = NULL\n", __func__); + return; + } cdf_spin_lock(&CE_state->scn->target_lock); CE_state->send_cb = fn_ptr; CE_state->send_context = ce_send_context; @@ -1523,6 +1527,10 @@ ce_recv_cb_register(struct CE_handle *copyeng, { struct CE_state *CE_state = (struct CE_state *)copyeng; + if (CE_state == NULL) { + pr_err("%s: ERROR CE state = NULL\n", __func__); + return; + } cdf_spin_lock(&CE_state->scn->target_lock); CE_state->recv_cb = fn_ptr; CE_state->recv_context = CE_recv_context;