From 6ebfc3c01b49a95cb34e4afb5cf838d462545586 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Fri, 26 Jun 2020 19:10:49 +0530 Subject: [PATCH] qcacld-3.0: Add AP to BLM reject list Currently the driver calls the BLM API to add the BSSID to the reject list if STA kickout event comes from the FW. Now since the event comes in interrupt context and BLM takes a mutex lock, it is not allowed. Fix is to change the context and call the BLM API from lim del sta which would execute in scheduler thread. Change-Id: I3c2726ea152eeeee6ae30d80388aedac631f6c39 CRs-Fixed: 2716192 --- core/mac/src/pe/lim/lim_link_monitoring_algo.c | 8 ++++++++ core/wma/src/wma_mgmt.c | 5 ----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/mac/src/pe/lim/lim_link_monitoring_algo.c b/core/mac/src/pe/lim/lim_link_monitoring_algo.c index 12b1de31f61a..d96b891049ee 100644 --- a/core/mac/src/pe/lim/lim_link_monitoring_algo.c +++ b/core/mac/src/pe/lim/lim_link_monitoring_algo.c @@ -44,6 +44,7 @@ #include "lim_ft_defs.h" #include "lim_session.h" #include "lim_ser_des_utils.h" +#include "wlan_blm_api.h" /** * lim_delete_sta_util - utility function for deleting station context @@ -183,6 +184,7 @@ void lim_delete_sta_context(struct mac_context *mac_ctx, struct pe_session *session_entry; tpDphHashNode sta_ds; enum eSirMacReasonCodes reason_code; + struct reject_ap_info ap_info; if (!msg) { pe_err("Invalid body pointer in message"); @@ -237,6 +239,12 @@ void lim_delete_sta_context(struct mac_context *mac_ctx, session_entry->peSessionId, reason_code, eLIM_LINK_MONITORING_DEAUTH); + qdf_mem_copy(&ap_info.bssid, msg->addr2, + QDF_MAC_ADDR_SIZE); + ap_info.reject_ap_type = DRIVER_AVOID_TYPE; + wlan_blm_add_bssid_to_reject_list(mac_ctx->pdev, + &ap_info); + /* only break for STA role (non TDLS) */ break; } diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index d4c95981984b..df8de4120362 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -331,7 +331,6 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event, uint8_t *addr, *bssid; struct wlan_objmgr_vdev *vdev; void *soc = cds_get_context(QDF_MODULE_ID_SOC); - struct reject_ap_info ap_info; param_buf = (WMI_PEER_STA_KICKOUT_EVENTID_param_tlvs *) event; kickout_event = param_buf->fixed_param; @@ -459,10 +458,6 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event, 0); wma_lost_link_info_handler(wma, vdev_id, del_sta_ctx->rssi); - qdf_mem_copy(&ap_info.bssid, macaddr, QDF_MAC_ADDR_SIZE); - ap_info.reject_ap_type = DRIVER_AVOID_TYPE; - wlan_blm_add_bssid_to_reject_list(wma->pdev, &ap_info); - exit_handler: return 0; }