diff options
| author | Chris Guo <kangxu@codeaurora.org> | 2016-09-12 14:39:22 +0800 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-09-15 13:21:31 +0530 |
| commit | 67b4bbfb2336e8415d4c9abb11b5705d8ba66f2e (patch) | |
| tree | 04b654f41e72c6d3bf24f9510bc09e7c101df6a1 | |
| parent | 045c236ff82e4fd8603713274ce360accf34ae0c (diff) | |
qcacld-2.0: Fix DMA MAP address overwriten in IPA exception path
To avoid overflow of bounce buffer, LL WLAN does not do DMA map to
skb before queueing packets in driver queue. But the above design
is not well implemented(If357377cc49a596a7eedb15f52f4dfd1c5685708)
for IPA exception path and will overwrite the advance frag_ptr. So
bypass this logic for IPA exception path.
Change-Id: I7fb6a6658cda0cb531953f6d5fe8ee393dfc6483
CRs-Fixed: 1065541
| -rw-r--r-- | CORE/CLD_TXRX/TXRX/ol_tx.c | 4 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/adf/adf_nbuf.h | 21 |
2 files changed, 24 insertions, 1 deletions
diff --git a/CORE/CLD_TXRX/TXRX/ol_tx.c b/CORE/CLD_TXRX/TXRX/ol_tx.c index 890303999a85..4251aef996f1 100644 --- a/CORE/CLD_TXRX/TXRX/ol_tx.c +++ b/CORE/CLD_TXRX/TXRX/ol_tx.c @@ -102,8 +102,10 @@ ol_tx_ll(ol_txrx_vdev_handle vdev, adf_nbuf_t msdu_list) msdu_info.htt.info.ext_tid = adf_nbuf_get_tid(msdu); msdu_info.peer = NULL; - adf_nbuf_map_single(adf_ctx, msdu, + if (!adf_nbuf_is_ipa_nbuf(msdu)) { + adf_nbuf_map_single(adf_ctx, msdu, ADF_OS_DMA_TO_DEVICE); + } ol_tx_prepare_ll(tx_desc, vdev, msdu, &msdu_info); /* diff --git a/CORE/SERVICES/COMMON/adf/adf_nbuf.h b/CORE/SERVICES/COMMON/adf/adf_nbuf.h index 5d367c20f605..e155da2bd8dc 100644 --- a/CORE/SERVICES/COMMON/adf/adf_nbuf.h +++ b/CORE/SERVICES/COMMON/adf/adf_nbuf.h @@ -1314,6 +1314,27 @@ adf_nbuf_set_fwd_flag(adf_nbuf_t buf, uint8_t flag) } /** + * adf_nbuf_is_ipa_nbuf() - Check if frame owner is IPA + * @skb: Pointer to skb + * + * Returns: TRUE if the owner is IPA else FALSE + * + */ +#if (defined(QCA_MDM_DEVICE) && defined(IPA_OFFLOAD)) +static inline bool +adf_nbuf_is_ipa_nbuf(adf_nbuf_t buf) +{ + return (NBUF_OWNER_ID(buf) == IPA_NBUF_OWNER_ID); +} +#else +static inline bool +adf_nbuf_is_ipa_nbuf(adf_nbuf_t buf) +{ + return false; +} +#endif /* QCA_MDM_DEVICE && IPA_OFFLOAD*/ + +/** * @brief This function registers protocol trace callback * * @param[in] adf_nbuf_trace_update_t callback pointer |
