|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
|
|
+ * Copyright (c) 2016-2018 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
|
|
@@ -81,7 +81,8 @@ void dp_rx_desc_pool_free(struct dp_soc *soc, uint32_t pool_id,
|
|
|
qdf_spin_lock_bh(&soc->rx_desc_mutex[pool_id]);
|
|
|
for (i = 0; i < rx_desc_pool->pool_size; i++) {
|
|
|
if (rx_desc_pool->array[i].rx_desc.in_use) {
|
|
|
- qdf_nbuf_unmap_single(soc->osdev,
|
|
|
+ if (!(rx_desc_pool->array[i].rx_desc.unmapped))
|
|
|
+ qdf_nbuf_unmap_single(soc->osdev,
|
|
|
rx_desc_pool->array[i].rx_desc.nbuf,
|
|
|
QDF_DMA_BIDIRECTIONAL);
|
|
|
qdf_nbuf_free(rx_desc_pool->array[i].rx_desc.nbuf);
|