qcacmn: Add direct rx buffer changes for CFR requirements
CFR needs to correlate data received from direct dma ring and WMI event for tx completion. These two events can come in any order. To facilitate correlation CFR module has to hold on to the buffer until both events are received and then replenish buffer back to direct dma ring. To facilitate this requirement direct rx buf module is modified to change callback return to bool to indicate whether buffer can be replenished immediatley or not. Also add API to indiciate buffer release/replenish later. Change-Id: I848c0e7cf0118156fff7cf37ac9027cdf8e2e416 CRs-Fixed: 2403395
This commit is contained in:

committed by
nshrivas

parent
09a3b065f9
commit
22b6ccb1ae
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -60,12 +60,16 @@ struct wlan_lmac_if_tx_ops;
|
||||
* struct direct_buf_rx_data - direct buffer rx data
|
||||
* @dbr_len: Length of the buffer DMAed
|
||||
* @vaddr: Virtual address of the buffer that has DMAed data
|
||||
* @cookie: Cookie for the buffer rxed from target
|
||||
* @paddr: physical address of buffer corresponding to vaddr
|
||||
* @meta_data_valid: Indicates that metadata is valid
|
||||
* @meta_data: Meta data
|
||||
*/
|
||||
struct direct_buf_rx_data {
|
||||
size_t dbr_len;
|
||||
void *vaddr;
|
||||
uint32_t cookie;
|
||||
qdf_dma_addr_t paddr;
|
||||
bool meta_data_valid;
|
||||
struct direct_buf_rx_metadata meta_data;
|
||||
};
|
||||
@@ -105,4 +109,31 @@ QDF_STATUS direct_buf_rx_target_attach(struct wlan_objmgr_psoc *psoc,
|
||||
void target_if_direct_buf_rx_register_tx_ops(
|
||||
struct wlan_lmac_if_tx_ops *tx_ops);
|
||||
|
||||
/**
|
||||
* target_if_dbr_cookie_lookup() - Function to retrieve cookie from
|
||||
* buffer address(paddr)
|
||||
* @pdev: pointer to pdev object
|
||||
* @mod_id: module id indicating the module using direct buffer rx framework
|
||||
* @paddr: Physical address of buffer for which cookie info is required
|
||||
* @cookie: cookie will be returned in this param
|
||||
*
|
||||
* Return: QDF status of operation
|
||||
*/
|
||||
QDF_STATUS target_if_dbr_cookie_lookup(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t mod_id, qdf_dma_addr_t paddr,
|
||||
uint32_t *cookie);
|
||||
|
||||
/**
|
||||
* target_if_dbr_buf_release() - Notify direct buf that a previously provided
|
||||
* buffer can be released.
|
||||
* @pdev: pointer to pdev object
|
||||
* @mod_id: module id indicating the module using direct buffer rx framework
|
||||
* @paddr: Physical address of buffer for which cookie info is required
|
||||
* @cookie: cookie value corresponding to the paddr
|
||||
*
|
||||
* Return: QDF status of operation
|
||||
*/
|
||||
QDF_STATUS target_if_dbr_buf_release(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t mod_id, qdf_dma_addr_t paddr,
|
||||
uint32_t cookie);
|
||||
#endif /* _TARGET_IF_DIRECT_BUF_RX_API_H_ */
|
||||
|
Reference in New Issue
Block a user