From 2c0b34295001cfa50c685a4e3982b60fd3f05072 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Thu, 23 Aug 2018 11:05:26 +0530 Subject: [PATCH] Revert "qcacld-3.0: Host sends VDEV_DELETE cmd to fw before stop_bss" While handling IPA event in case if, __wlan_ipa_wlan_evt() queue WLAN_AP_DISCONNECT cmd for later processing in work-queue context and in the meanwhile sme close session deletes vdev then, as part of work queue context driver process WLAN_AP_DISCONNECT and sends WMA_IPA_OFFLOAD_ENABLE_DISABLE cmd to firmware for the VDEV which is already deleted by sme_close_session. This result asserts in firmware. This reverts commit Ief9318bb476b480fd52f4155a0788a34c1e2ed53 Change-Id: I6128fb489fc40cc7ed01cbdf9c419a6a6b20c6d4 CRs-Fixed: 2295672 --- core/hdd/src/wlan_hdd_hostapd.c | 22 ---------------------- core/hdd/src/wlan_hdd_hostapd.h | 10 ---------- core/hdd/src/wlan_hdd_main.c | 3 --- core/hdd/src/wlan_hdd_softap_tx_rx.c | 10 ++++++++++ 4 files changed, 10 insertions(+), 35 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 202cbebded4f..cc13d55cafbb 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -756,7 +756,6 @@ static int hdd_stop_bss_link(struct hdd_adapter *adapter) return errno; if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags)) { - hdd_ipa_ap_disconnect(adapter); status = wlansap_stop_bss( WLAN_HDD_GET_SAP_CTX_PTR(adapter)); if (QDF_IS_STATUS_SUCCESS(status)) @@ -5316,7 +5315,6 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, WLAN_HDD_GET_SAP_CTX_PTR(adapter), true); qdf_event_reset(&hostapd_state->qdf_stop_bss_event); - hdd_ipa_ap_disconnect(adapter); status = wlansap_stop_bss(WLAN_HDD_GET_SAP_CTX_PTR(adapter)); if (QDF_IS_STATUS_SUCCESS(status)) { qdf_status = @@ -6007,23 +6005,3 @@ bool hdd_is_peer_associated(struct hdd_adapter *adapter, return false; } - -void hdd_ipa_ap_disconnect(struct hdd_adapter *adapter) -{ - struct hdd_context *hdd_ctx; - struct hdd_ap_ctx *ap_ctx; - - hdd_ctx = WLAN_HDD_GET_CTX(adapter); - ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter); - - if (ucfg_ipa_is_enabled()) { - if (ucfg_ipa_wlan_evt(hdd_ctx->hdd_pdev, - adapter->dev, adapter->device_mode, - ap_ctx->broadcast_sta_id, - adapter->session_id, - WLAN_IPA_AP_DISCONNECT, - adapter->dev->dev_addr) != QDF_STATUS_SUCCESS) - hdd_err("WLAN_AP_DISCONNECT event failed"); - } -} - diff --git a/core/hdd/src/wlan_hdd_hostapd.h b/core/hdd/src/wlan_hdd_hostapd.h index b25acb519f5a..58a15829ce3c 100644 --- a/core/hdd/src/wlan_hdd_hostapd.h +++ b/core/hdd/src/wlan_hdd_hostapd.h @@ -194,14 +194,4 @@ QDF_STATUS wlan_hdd_config_acs(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter); void hdd_sap_indicate_disconnect_for_sta(struct hdd_adapter *adapter); - -/** - * hdd_ipa_ap_disconnect() - call hdd_ipa_wlan_evt if - * ipa is enabled - * @pAdapter: pointer to adapter context - * - * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error - */ -void hdd_ipa_ap_disconnect(struct hdd_adapter *adapter); - #endif /* end #if !defined(WLAN_HDD_HOSTAPD_H) */ diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index bacad931ab3f..0afb46458df9 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -5280,7 +5280,6 @@ QDF_STATUS hdd_stop_adapter_ext(struct hdd_context *hdd_ctx, QDF_STATUS status; QDF_STATUS qdf_status; - hdd_ipa_ap_disconnect(adapter); /* Stop Bss. */ status = wlansap_stop_bss( WLAN_HDD_GET_SAP_CTX_PTR(adapter)); @@ -12143,7 +12142,6 @@ void wlan_hdd_stop_sap(struct hdd_adapter *ap_adapter) hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter); hdd_debug("Now doing SAP STOPBSS"); qdf_event_reset(&hostapd_state->qdf_stop_bss_event); - hdd_ipa_ap_disconnect(ap_adapter); if (QDF_STATUS_SUCCESS == wlansap_stop_bss(hdd_ap_ctx-> sap_context)) { qdf_status = qdf_wait_for_event_completion(&hostapd_state-> @@ -13987,7 +13985,6 @@ void hdd_restart_sap(struct hdd_adapter *ap_adapter) wlan_hdd_del_station(ap_adapter); hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter); qdf_event_reset(&hostapd_state->qdf_stop_bss_event); - hdd_ipa_ap_disconnect(ap_adapter); if (QDF_STATUS_SUCCESS == wlansap_stop_bss(sap_ctx)) { qdf_status = qdf_wait_for_event_completion(&hostapd_state-> diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 4dc92159ebe9..b3b2268840b6 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -1183,6 +1183,16 @@ QDF_STATUS hdd_softap_stop_bss(struct hdd_adapter *adapter) sme_update_channel_list(hdd_ctx->mac_handle); } + if (ucfg_ipa_is_enabled()) { + if (ucfg_ipa_wlan_evt(hdd_ctx->hdd_pdev, + adapter->dev, adapter->device_mode, + ap_ctx->broadcast_sta_id, + adapter->session_id, + WLAN_IPA_AP_DISCONNECT, + adapter->dev->dev_addr) != QDF_STATUS_SUCCESS) + hdd_err("WLAN_AP_DISCONNECT event failed"); + } + return qdf_status; }