From 186fdd20c3528c86e02ddbdd01ea0a4ada889dee Mon Sep 17 00:00:00 2001 From: bings Date: Tue, 30 Jul 2019 10:05:08 +0800 Subject: [PATCH] qcacld-3.0: Drop assoc req if SAP is not UP If SAP is not up, it is meaningless to handle assoc req. If assoc req is handled, ref peer may be created without deleted in DFS CAC state, which causes FW does not work. Change-Id: Ia489fa8cfb4406e782fc240c553f5e3074982380 CRs-Fixed: 2487946 --- core/mac/src/pe/lim/lim_process_assoc_req_frame.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c index 85774822b0d6..6d9594ca1296 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c @@ -2117,6 +2117,7 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in tpSirAssocReq assoc_req; bool dup_entry = false, force_1x1 = false; QDF_STATUS status; + struct wlan_objmgr_vdev *vdev; lim_get_phy_mode(mac_ctx, &phy_mode, session); @@ -2151,6 +2152,18 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in eLIM_MLM_WT_DEL_BSS_RSP_STATE); return; } + vdev = session->vdev; + if (!vdev) { + pe_err("vdev is NULL"); + return; + } + + if (wlan_vdev_is_up(vdev) != QDF_STATUS_SUCCESS) { + pe_err("SAP is not up, drop ASSOC REQ on sessionid: %d", + session->peSessionId); + + return; + } /* * If a STA is already present in DPH and it is initiating a Assoc