Browse Source

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
Tiger Yu 6 years ago
parent
commit
389f591af8
1 changed files with 8 additions and 0 deletions
  1. 8 0
      core/hdd/src/wlan_hdd_softap_tx_rx.c

+ 8 - 0
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
 	 */