From 9f97242cdbc3c443f0c3e7e9abab1877e68993eb Mon Sep 17 00:00:00 2001 From: Amruta Kulkarni Date: Tue, 23 Feb 2021 13:17:42 -0800 Subject: [PATCH] qcacld-3.0: Add Reject AP to BLM list after context change In scenario, when ROAM HO failure is piggybacked on WOW wake up, the blm reject AP addition fails as mutex can't be acquired in interrupt context. With this change, the reject bssid blm addition will happen after changing context to scheduler thread. Change-Id: I685501b7ea48e4461922a7a50fb39c52d4d607f3 CRs-Fixed: 2880712 --- core/mac/inc/sir_api.h | 1 + core/sme/src/csr/csr_api_roam.c | 7 +++++++ core/wma/src/wma_scan_roam.c | 9 ++------- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index a05b4a3fa66a..3f2d25dd7591 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -2937,6 +2937,7 @@ struct roam_offload_synch_ind { #ifdef WLAN_FEATURE_ROAM_OFFLOAD struct handoff_failure_ind { uint8_t vdev_id; + struct qdf_mac_addr bssid; }; struct roam_offload_synch_fail { diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 02407de22739..f356b97636ce 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -19787,6 +19787,7 @@ void csr_process_ho_fail_ind(struct mac_context *mac_ctx, void *msg_buf) struct handoff_failure_ind *pSmeHOFailInd = msg_buf; struct mlme_roam_after_data_stall *vdev_roam_params; struct wlan_objmgr_vdev *vdev; + struct reject_ap_info ap_info; uint32_t sessionId; if (!pSmeHOFailInd) { @@ -19795,6 +19796,12 @@ void csr_process_ho_fail_ind(struct mac_context *mac_ctx, void *msg_buf) } sessionId = pSmeHOFailInd->vdev_id; + ap_info.bssid = pSmeHOFailInd->bssid; + ap_info.reject_ap_type = DRIVER_AVOID_TYPE; + ap_info.reject_reason = REASON_ROAM_HO_FAILURE; + ap_info.source = ADDED_BY_DRIVER; + wlan_blm_add_bssid_to_reject_list(mac_ctx->pdev, &ap_info); + /* Roaming is supported only on Infra STA Mode. */ if (!csr_roam_is_sta_mode(mac_ctx, sessionId)) { diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index 959d336a9d59..d6e4b7796412 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -2582,19 +2582,14 @@ wma_roam_ho_fail_handler(tp_wma_handle wma, uint32_t vdev_id, struct handoff_failure_ind *ho_failure_ind; struct scheduler_msg sme_msg = { 0 }; QDF_STATUS qdf_status; - struct reject_ap_info ap_info; - - ap_info.bssid = bssid; - ap_info.reject_ap_type = DRIVER_AVOID_TYPE; - ap_info.reject_reason = REASON_ROAM_HO_FAILURE; - ap_info.source = ADDED_BY_DRIVER; - wlan_blm_add_bssid_to_reject_list(wma->pdev, &ap_info); ho_failure_ind = qdf_mem_malloc(sizeof(*ho_failure_ind)); if (!ho_failure_ind) return; ho_failure_ind->vdev_id = vdev_id; + ho_failure_ind->bssid = bssid; + sme_msg.type = eWNI_SME_HO_FAIL_IND; sme_msg.bodyptr = ho_failure_ind; sme_msg.bodyval = 0;