qcacmn: Fixes for IPA enablement for lithium/Hastings

- Support to pass IPA enabled(disabled) flag from ini to DP layer
- Use ioremap call to translate tx_comp_doorbell_paddr obtained from
  calling ipa_setup api to tx_comp_doorbell_vaddr. This is needed to
  write the initial value of HP at the doorbell address.
- Change REO_DST_RING_SIZE and WLAN_CFG_TX_RING_SIZE to 1023
  for napier/hastings if IPA is enabled. This is needed because,
  ipa_setup API can handle only 16-bit values for the size param(bytes)
  of the ring.
- Disable hash based flow steering for SAP peers in case IPA is enabled
  and set default reo_dest_ring_4 as default RX ring. Since IPA will be
  reaping RX packets from reo_dest_ring_4 only, flow steering is not
  needed for SAP peers.
- Unmap pre-allocated TX buffers for IPA in the TX completion ring.
- Donot execute IPA functionality if IPA is disabled from ini.

Change-Id: I6855bfe293a457ccc0abd1ad5567f5c95232a9d2
CRs-Fixed: 2183519
This commit is contained in:
Mohit Khanna
2018-08-16 20:50:43 -07:00
committed by nshrivas
parent f83015ce04
commit 81179cb75e
9 changed files with 391 additions and 184 deletions

View File

@@ -93,12 +93,22 @@ static void hal_update_srng_hp_tp_address(void *hal_soc,
srng = hal_get_srng(hal_soc, ring_id);
if (ring_config->ring_dir == HAL_SRNG_DST_RING)
if (ring_config->ring_dir == HAL_SRNG_DST_RING) {
srng->u.dst_ring.tp_addr = SHADOW_REGISTER(shadow_config_index)
+ hal->dev_base_addr;
else
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO,
"%s: tp_addr=%pK dev base addr %pK index %u",
__func__, srng->u.dst_ring.tp_addr,
hal->dev_base_addr, shadow_config_index);
} else {
srng->u.src_ring.hp_addr = SHADOW_REGISTER(shadow_config_index)
+ hal->dev_base_addr;
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO,
"%s: hp_addr=%pK dev base addr %pK index %u",
__func__, srng->u.src_ring.hp_addr,
hal->dev_base_addr, shadow_config_index);
}
}
QDF_STATUS hal_set_one_shadow_config(void *hal_soc,
@@ -132,9 +142,11 @@ QDF_STATUS hal_set_one_shadow_config(void *hal_soc,
ring_num);
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_INFO,
"%s: target_reg %x, shadow_index %x, ring_type %d, ring num %d",
__func__, target_register, shadow_config_index,
ring_type, ring_num);
"%s: target_reg %x, shadow register 0x%x shadow_index 0x%x, ring_type %d, ring num %d",
__func__, target_register,
SHADOW_REGISTER(shadow_config_index),
shadow_config_index,
ring_type, ring_num);
return QDF_STATUS_SUCCESS;
}
@@ -435,14 +447,20 @@ void hal_srng_dst_set_hp_paddr(struct hal_srng *srng,
void hal_srng_dst_init_hp(struct hal_srng *srng,
uint32_t *vaddr)
{
if (!srng)
return;
srng->u.dst_ring.hp_addr = vaddr;
SRNG_DST_REG_WRITE(srng, HP, srng->u.dst_ring.cached_hp);
*(srng->u.dst_ring.hp_addr) = srng->u.dst_ring.cached_hp;
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
"hp_addr=%pK, cached_hp=%d, hp=%d",
(void *)srng->u.dst_ring.hp_addr, srng->u.dst_ring.cached_hp,
*(srng->u.dst_ring.hp_addr));
if (vaddr) {
*srng->u.dst_ring.hp_addr = srng->u.dst_ring.cached_hp;
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
"hp_addr=%pK, cached_hp=%d, hp=%d",
(void *)srng->u.dst_ring.hp_addr,
srng->u.dst_ring.cached_hp,
*srng->u.dst_ring.hp_addr);
}
}
/**