|
@@ -5453,10 +5453,22 @@ QDF_STATUS hdd_stop_adapter_ext(struct hdd_context *hdd_ctx,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (wlan_hdd_try_disconnect(adapter)) {
|
|
|
- hdd_err("Can't disconnect adapter");
|
|
|
- return QDF_STATUS_E_FAILURE;
|
|
|
- }
|
|
|
+ /*
|
|
|
+ * During vdev destroy, if any STA is in connecting state the
|
|
|
+ * roam command will be in active queue and thus vdev destroy is
|
|
|
+ * queued in pending queue. In case STA tries to connect to
|
|
|
+ * multiple BSSID and fails to connect, due to auth/assoc
|
|
|
+ * timeouts it may take more than vdev destroy time to get
|
|
|
+ * completed. On vdev destroy timeout vdev is moved to logically
|
|
|
+ * deleted state. Once connection is completed, vdev destroy is
|
|
|
+ * activated and to release the self-peer ref count it try to
|
|
|
+ * get the ref of the vdev, which fails as vdev is logically
|
|
|
+ * deleted and this leads to peer ref leak. So before vdev
|
|
|
+ * destroy is queued abort any STA ongoing connection to avoid
|
|
|
+ * vdev destroy timeout.
|
|
|
+ */
|
|
|
+ if (test_bit(SME_SESSION_OPENED, &adapter->event_flags))
|
|
|
+ hdd_abort_ongoing_sta_connection(hdd_ctx);
|
|
|
|
|
|
hdd_vdev_destroy(adapter);
|
|
|
break;
|
|
@@ -5495,6 +5507,23 @@ QDF_STATUS hdd_stop_adapter_ext(struct hdd_context *hdd_ctx,
|
|
|
hdd_deregister_tx_flow_control(adapter);
|
|
|
hdd_destroy_acs_timer(adapter);
|
|
|
|
|
|
+ /**
|
|
|
+ * During vdev destroy, If any STA is in connecting state the
|
|
|
+ * roam command will be in active queue and thus vdev destroy is
|
|
|
+ * queued in pending queue. In case STA is tries to connected to
|
|
|
+ * multiple BSSID and fails to connect, due to auth/assoc
|
|
|
+ * timeouts it may take more than vdev destroy time to get
|
|
|
+ * completes. If vdev destroy timeout vdev is moved to logically
|
|
|
+ * deleted state. Once connection is completed, vdev destroy is
|
|
|
+ * activated and to release the self-peer ref count it try to
|
|
|
+ * get the ref of the vdev, which fails as vdev is logically
|
|
|
+ * deleted and this leads to peer ref leak. So before vdev
|
|
|
+ * destroy is queued abort any STA ongoing connection to avoid
|
|
|
+ * vdev destroy timeout.
|
|
|
+ */
|
|
|
+ if (test_bit(SME_SESSION_OPENED, &adapter->event_flags))
|
|
|
+ hdd_abort_ongoing_sta_connection(hdd_ctx);
|
|
|
+
|
|
|
mutex_lock(&hdd_ctx->sap_lock);
|
|
|
if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags)) {
|
|
|
status = wlansap_stop_bss(
|