From 0c45d6ac1947bad5294da35e227f8606d3625e69 Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Tue, 23 May 2017 18:53:36 +0800 Subject: [PATCH] qcacld-3.0: close session for P2P GO properly It will clean session id at then end of cfg80211 stop ap and won't set flag SME_SESSION_OPENED after sap session started, which case session for P2P GO can't be closed properly. Change-Id: I0c6f21f3616ededd9e827b3eac9cbbe2c26bc60c CRs-Fixed: 2050994 --- core/hdd/src/wlan_hdd_hostapd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 91f3580a19f4..3621fbb21152 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -6054,6 +6054,9 @@ QDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter, bool reinit) return status; } + /* set SME_SESSION_OPENED since sap session started */ + set_bit(SME_SESSION_OPENED, &pAdapter->event_flags); + ret = hdd_vdev_ready(pAdapter); if (ret) { hdd_err("failed to raise vdev ready event: %d", ret); @@ -8210,8 +8213,8 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, global_p2p_connection_status = P2P_NOT_ACTIVE; } #endif - pAdapter->sessionId = HDD_SESSION_ID_INVALID; EXIT(); + return ret; }