From 01deb2cbbaf6a9f59abec539c0fc170cc599d532 Mon Sep 17 00:00:00 2001 From: Yun Park Date: Wed, 14 Jun 2017 15:21:44 -0700 Subject: [PATCH] qcacld-3.0: Set IPA ownership for intra-BSS Tx packets Set IPA ownership for intra-BSS Tx packets to avoid skb_orphan(), and clear the ownership after check it to avoid ipa_free_skb() is called when Tx completed. Change-Id: I03883773e418bb5518ea63a324d22503173ea436 CRs-Fixed: 2062911 --- core/hdd/src/wlan_hdd_ipa.c | 4 ++++ core/hdd/src/wlan_hdd_softap_tx_rx.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index cc87f50f6943..788cd17b31e4 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -3815,6 +3815,10 @@ static void hdd_ipa_forward(struct hdd_ipa_priv *hdd_ipa, struct hdd_ipa_pm_tx_cb *pm_tx_cb; qdf_spin_lock_bh(&hdd_ipa->pm_lock); + + /* Set IPA ownership for intra-BSS Tx packets to avoid skb_orphan */ + qdf_nbuf_ipa_owned_set(skb); + /* WLAN subsystem is in suspend, put int queue */ if (hdd_ipa->suspended) { qdf_spin_unlock_bh(&hdd_ipa->pm_lock); diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 3c69145be9c6..37fa81cc5fc0 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -398,6 +398,12 @@ static int __hdd_softap_hard_start_xmit(struct sk_buff *skb, goto drop_pkt_accounting; #if defined(IPA_OFFLOAD) + } else { + /* + * Clear the IPA ownership after check it to avoid ipa_free_skb + * is called when Tx completed for intra-BSS Tx packets + */ + qdf_nbuf_ipa_owned_clear(skb); } #endif