diff --git a/dp/inc/cdp_txrx_handle.h b/dp/inc/cdp_txrx_handle.h index 6f47452267..000e62d400 100644 --- a/dp/inc/cdp_txrx_handle.h +++ b/dp/inc/cdp_txrx_handle.h @@ -29,5 +29,6 @@ struct cdp_cfg; struct cdp_pdev; struct cdp_vdev; +struct cdp_raw_ast; #endif diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index 9052584952..d2e0915815 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -471,8 +471,9 @@ struct cdp_wds_ops { struct cdp_raw_ops { int (*txrx_get_nwifi_mode)(struct cdp_vdev *vdev); - int - (*rsim_tx_encap)(struct cdp_vdev *vdev, qdf_nbuf_t *pnbuf); + void (*rsim_get_astentry)(struct cdp_vdev *vdev, + qdf_nbuf_t *pnbuf, + struct cdp_raw_ast *raw_ast); }; #ifdef CONFIG_WIN diff --git a/dp/inc/cdp_txrx_raw.h b/dp/inc/cdp_txrx_raw.h index f86b509a17..98b554ccc0 100644 --- a/dp/inc/cdp_txrx_raw.h +++ b/dp/inc/cdp_txrx_raw.h @@ -42,34 +42,31 @@ static inline int cdp_get_nwifi_mode(ol_txrx_soc_handle soc, return soc->ops->raw_ops->txrx_get_nwifi_mode(vdev); return 0; } -/* Questionable -- should this be in OL AND/OR is this used? */ -/* Called by ol_tx_ll_umac_raw_process() */ + /** - * @brief encap nbuf(s) from Ethernet II format to 802.11 Raw format - * @details - * Note that in the case of IP fragments, the function takes two fragments at a - * time and creates an A-MSDU. If it has seen the first of such fragments, it - * returns 0 to indicate that it needs to consume one more. In this case, the - * caller shouldn't pass the nbuf to lower layers. - * The function is simple and doesn't dynamically take decisions on A-MSDU - * formation. It can be extended to pack more fragments into an A-MSDU if - * required, but in this case there can be greater losses due to the - * environment. The objective of the function is only to simulate regular - * scatter/gather. + * @brief finds the ast entry for the packet + * @details: Finds the ast entry i.e 4th address for the packet based on the + * details in the netbuf. * * @param vdev - the data virtual device object * @param pnbuf - pointer to nbuf + * @param raw_ast - pointer to fill ast information * * @return - 0 on success, -1 on error, 1 if more nbufs need to be consumed. */ -static inline int -cdp_rsim_tx_encap(ol_txrx_soc_handle soc, - struct cdp_vdev *vdev, qdf_nbuf_t *pnbuf) +static inline void +cdp_rawsim_get_astentry (ol_txrx_soc_handle soc, struct cdp_vdev *vdev, + qdf_nbuf_t *pnbuf, struct cdp_raw_ast *raw_ast) { - if (soc->ops->raw_ops->rsim_tx_encap) - return soc->ops->raw_ops->rsim_tx_encap(vdev, pnbuf); - return 0; + + if (!soc || !soc->ops || !soc->ops->raw_ops) + return; + + if (soc->ops->raw_ops->rsim_get_astentry) + soc->ops->raw_ops->rsim_get_astentry(vdev, pnbuf, raw_ast); + + return; } #endif