From 389f591af86fa7c0242216969190717b0e2f2dda Mon Sep 17 00:00:00 2001 From: Tiger Yu Date: Thu, 29 Nov 2018 15:06:41 +0800 Subject: [PATCH] qcacld-3.0: Drop packet if SAP is not started Drop packet if SAP is not started to avoid abnormal state. Change-Id: If09abb0d03b4a34805178d4219ef479dd39b6418 CRs-Fixed: 2357973 --- core/hdd/src/wlan_hdd_softap_tx_rx.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 24a9649f276c..5847186535c9 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -482,6 +482,14 @@ static netdev_tx_t __hdd_softap_hard_start_xmit(struct sk_buff *skb, if (ap_ctx->dfs_cac_block_tx) goto drop_pkt; + if (ap_ctx->hostapd_state.bss_state != BSS_START) { + QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_INFO_HIGH, + "%s: SAP is not in START state (%d). Ignore!!!", + __func__, + ap_ctx->hostapd_state.bss_state); + goto drop_pkt; + } + /* * If a transmit function is not registered, drop packet */