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
This commit is contained in:
gaurank kathpalia 2020-06-26 19:10:49 +05:30 committed by nshrivas
parent 2d357482b9
commit 6ebfc3c01b
2 changed files with 8 additions and 5 deletions

View File

@ -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;
}

View File

@ -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;
}