qcacmn: Support RX 2K jump/OOR frame handling from REO2TCL ring

Support RX 2K jump/OOR frame handling from REO2TCL ring.
(a) configure REO error destination ring register to route 2K jump
/OOR frame to REO2TCL ring.
(b) for 2K jump RX frame, only accept ARP frame and drop others,
meanwhile, send delba action frame to remote peer once receive first
2K jump data.
(c) for OOR RX frame, accept ARP/EAPOL/DHCP/IPV6_DHCP frame, otherwise
drop it.

Change-Id: I7cb33279a8ba543686da4eba547e40f86813e057
CRs-Fixed: 2631949
This commit is contained in:
Jinwei Chen
2020-03-07 20:46:41 +08:00
committed by nshrivas
parent b869cb0dde
commit b3e587db52
18 changed files with 542 additions and 82 deletions

View File

@@ -815,6 +815,15 @@ extern void *hal_srng_setup(void *hal_soc, int ring_type, int ring_num,
#define REO_REMAP_FW 6
#define REO_REMAP_UNUSED 7
/*
* Macro to access HWIO_REO_R0_ERROR_DESTINATION_RING_CTRL_IX_0
* to map destination to rings
*/
#define HAL_REO_ERR_REMAP_IX0(_VALUE, _OFFSET) \
((_VALUE) << \
(HWIO_REO_R0_ERROR_DESTINATION_MAPPING_IX_0_ERROR_ ## \
DESTINATION_RING_ ## _OFFSET ## _SHFT))
/*
* Macro to access HWIO_REO_R0_DESTINATION_RING_CTRL_IX_0
* to map destination to rings
@@ -2052,4 +2061,20 @@ hal_rx_sw_mon_desc_info_get(struct hal_soc *hal,
{
return hal->ops->hal_rx_sw_mon_desc_info_get(ring_desc, desc_info);
}
/**
* hal_reo_set_err_dst_remap() - Set REO error destination ring remap
* register value.
*
* @hal_soc_hdl: Opaque HAL soc handle
*
* Return: None
*/
static inline void hal_reo_set_err_dst_remap(hal_soc_handle_t hal_soc_hdl)
{
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
if (hal_soc->ops->hal_reo_set_err_dst_remap)
hal_soc->ops->hal_reo_set_err_dst_remap(hal_soc);
}
#endif /* _HAL_APIH_ */