qcacld-3.0: fix non-linear data TX dma failed issue
Currently non-linear, non-tso TX data is not handled correctly,
only the non-tso, single linear data is supported. the frag paged
data in skb is missed while packet length for HW access
is entire packet length, HW DMA failed.
temporarily to linearize skb so that non-linear data could be TX
correctly.
Change-Id: Ic0f2b7a0b021ca190c870551a66181f50ae72c65
CRs-Fixed: 2180318
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index 2496df8..8d13e4f 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -597,6 +597,16 @@
(uint8_t *)&skb->data[QDF_DP_TRACE_RECORD_SIZE],
(qdf_nbuf_len(skb)-QDF_DP_TRACE_RECORD_SIZE), QDF_TX));
+ /* check whether need to linearize skb, like non-linear udp data */
+ if (hdd_skb_nontso_linearize(skb) != QDF_STATUS_SUCCESS) {
+ QDF_TRACE(QDF_MODULE_ID_HDD_DATA,
+ QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: skb %pK linearize failed. drop the pkt",
+ __func__, skb);
+ ++adapter->hdd_stats.tx_rx_stats.tx_dropped_ac[ac];
+ goto drop_pkt_and_release_skb;
+ }
+
if (adapter->tx_fn(adapter->txrx_vdev,
(qdf_nbuf_t) skb) != NULL) {
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_INFO_HIGH,