summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c1
-rw-r--r--core/hdd/src/wlan_hdd_main.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 559a6717f3e9..bf299934952b 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -7674,6 +7674,7 @@ 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;
}
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 75c5aec1d67f..bfbee90dfc03 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -3463,7 +3463,6 @@ static void hdd_wait_for_sme_close_sesion(hdd_context_t *hdd_ctx,
sme_close_session(hdd_ctx->hHal, adapter->sessionId,
hdd_sme_close_session_callback,
adapter)) {
- adapter->sessionId = HDD_SESSION_ID_INVALID;
/*
* Block on a completion variable. Can't wait
* forever though.
@@ -3477,7 +3476,9 @@ static void hdd_wait_for_sme_close_sesion(hdd_context_t *hdd_ctx,
if (adapter->device_mode == QDF_NDI_MODE)
hdd_ndp_session_end_handler(adapter);
clear_bit(SME_SESSION_OPENED, &adapter->event_flags);
+ return;
}
+ adapter->sessionId = HDD_SESSION_ID_INVALID;
}
}