From 70708abcf3dae493f0c3f1dd0d401f2a20a011e8 Mon Sep 17 00:00:00 2001 From: hqu Date: Tue, 10 Oct 2017 17:52:01 +0800 Subject: [PATCH] qcacld-3.0: Add device_mode check in hdd_ipa_send_pkt_to_tl Add device_mode check in hdd_ipa_send_pkt_to_tl, WLAN_HDD_GET_AP_CTX_PTR only can be used in SAP/P2P_GO mode. Change-Id: Ieb4ce8fb28251432c9f3e22eb945b32f47776380 CRs-Fixed: 2123952 --- core/hdd/src/wlan_hdd_ipa.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 788cd17b31e4..8acfd73b0132 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -4112,12 +4112,15 @@ static void hdd_ipa_send_pkt_to_tl( * During CAC period, data packets shouldn't be sent over the air so * drop all the packets here */ - if (WLAN_HDD_GET_AP_CTX_PTR(adapter)->dfs_cac_block_tx) { - ipa_free_skb(ipa_tx_desc); - qdf_spin_unlock_bh(&iface_context->interface_lock); - iface_context->stats.num_tx_cac_drop++; - hdd_ipa_rm_try_release(hdd_ipa); - return; + if (QDF_SAP_MODE == adapter->device_mode || + QDF_P2P_GO_MODE == adapter->device_mode) { + if (WLAN_HDD_GET_AP_CTX_PTR(adapter)->dfs_cac_block_tx) { + ipa_free_skb(ipa_tx_desc); + qdf_spin_unlock_bh(&iface_context->interface_lock); + iface_context->stats.num_tx_cac_drop++; + hdd_ipa_rm_try_release(hdd_ipa); + return; + } } ++adapter->stats.tx_packets;