qcacmn: For me pkts, unmap buffer that holds dest mac
Before freeing me packets, the buffer holding the dest mac address must be unmapped. Change-Id: I551666efb0a17245d7d654cdf362a470410ceda4
This commit is contained in:
@@ -988,7 +988,8 @@ dp_tx_me_alloc_buf(struct dp_pdev *pdev)
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_tx_me_free_buf() - Free me descriptor and add it to pool
|
||||
* dp_tx_me_free_buf() - Unmap the buffer holding the dest
|
||||
* address, free me descriptor and add it to the free-pool
|
||||
* @pdev: DP_PDEV handle for datapath
|
||||
* @buf : Allocated ME BUF
|
||||
*
|
||||
@@ -997,6 +998,20 @@ dp_tx_me_alloc_buf(struct dp_pdev *pdev)
|
||||
static inline void
|
||||
dp_tx_me_free_buf(struct dp_pdev *pdev, struct dp_tx_me_buf_t *buf)
|
||||
{
|
||||
/*
|
||||
* If the buf containing mac address was mapped,
|
||||
* it must be unmapped before freeing the me_buf.
|
||||
* The "paddr_macbuf" member in the me_buf structure
|
||||
* holds the mapped physical address and it must be
|
||||
* set to 0 after unmapping.
|
||||
*/
|
||||
if (buf->paddr_macbuf) {
|
||||
qdf_mem_unmap_nbytes_single(pdev->soc->osdev,
|
||||
buf->paddr_macbuf,
|
||||
QDF_DMA_TO_DEVICE,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
buf->paddr_macbuf = 0;
|
||||
}
|
||||
qdf_spin_lock_bh(&pdev->tx_mutex);
|
||||
buf->next = pdev->me_buf.freelist;
|
||||
pdev->me_buf.freelist = buf;
|
||||
|
@@ -2781,12 +2781,14 @@ struct dp_invalid_peer_msg {
|
||||
* dp_tx_me_buf_t: ME buffer
|
||||
* next: pointer to next buffer
|
||||
* data: Destination Mac address
|
||||
* paddr_macbuf: physical address for dest_mac
|
||||
*/
|
||||
struct dp_tx_me_buf_t {
|
||||
/* Note: ME buf pool initialization logic expects next pointer to
|
||||
* be the first element. Dont add anything before next */
|
||||
struct dp_tx_me_buf_t *next;
|
||||
uint8_t data[QDF_MAC_ADDR_SIZE];
|
||||
qdf_dma_addr_t paddr_macbuf;
|
||||
};
|
||||
|
||||
#if defined(WLAN_SUPPORT_RX_FLOW_TAG) || defined(WLAN_SUPPORT_RX_FISA)
|
||||
|
Reference in New Issue
Block a user