mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-09 04:12:08 -05:00
qcacld-3.0: Cleanup SME_CSA_OFFLOAD_EVENT msg to flush BSSID
With new scan module there is no need for LIM to send msg eWNI_SME_CSA_OFFLOAD_EVENT to CSR to flush scan cache. Lim can call the scan flush API directly. Change-Id: I30390a7a6407ab24089b735f55ded1aa354fc17e CRs-Fixed: 2417852
This commit is contained in:
parent
2b431b6376
commit
ecc2c7597f
9 changed files with 45 additions and 46 deletions
|
|
@ -1720,12 +1720,6 @@ typedef struct sSmeMaxAssocInd {
|
|||
struct qdf_mac_addr peer_mac;
|
||||
} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
|
||||
|
||||
typedef struct sSmeCsaOffloadInd {
|
||||
uint16_t mesgType; /* eWNI_SME_CSA_OFFLOAD_EVENT */
|
||||
uint16_t mesgLen;
|
||||
struct qdf_mac_addr bssid; /* BSSID */
|
||||
} tSmeCsaOffloadInd, *tpSmeCsaOffloadInd;
|
||||
|
||||
#define SIR_MAX_NAME_SIZE 64
|
||||
#define SIR_MAX_TEXT_SIZE 32
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,6 @@ enum eWniMsgTypes {
|
|||
eWNI_SME_STATS_EXT_EVENT = SIR_SME_MSG_TYPES_BEGIN + 89,
|
||||
eWNI_SME_GET_PEER_INFO_IND = SIR_SME_MSG_TYPES_BEGIN + 90,
|
||||
eWNI_SME_GET_PEER_INFO_EXT_IND = SIR_SME_MSG_TYPES_BEGIN + 91,
|
||||
eWNI_SME_CSA_OFFLOAD_EVENT = SIR_SME_MSG_TYPES_BEGIN + 92,
|
||||
/* indicates Additional IE from hdd to PE */
|
||||
eWNI_SME_UPDATE_ADDITIONAL_IES = SIR_SME_MSG_TYPES_BEGIN + 93,
|
||||
/* To indicate IE modify from hdd to PE */
|
||||
|
|
|
|||
|
|
@ -1636,10 +1636,8 @@ void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
|
|||
struct scheduler_msg *msg)
|
||||
{
|
||||
struct pe_session *session_entry;
|
||||
struct scheduler_msg mmh_msg = {0};
|
||||
struct csa_offload_params *csa_params =
|
||||
(struct csa_offload_params *) (msg->bodyptr);
|
||||
tpSmeCsaOffloadInd csa_offload_ind;
|
||||
tpDphHashNode sta_ds = NULL;
|
||||
uint8_t session_id;
|
||||
uint16_t aid = 0;
|
||||
|
|
@ -1656,17 +1654,12 @@ void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
|
|||
return;
|
||||
}
|
||||
|
||||
csa_offload_ind = qdf_mem_malloc(sizeof(tSmeCsaOffloadInd));
|
||||
if (!csa_offload_ind)
|
||||
goto err;
|
||||
|
||||
session_entry =
|
||||
pe_find_session_by_bssid(mac_ctx,
|
||||
csa_params->bssId, &session_id);
|
||||
if (!session_entry) {
|
||||
pe_err("Session does not exists for %pM",
|
||||
csa_params->bssId);
|
||||
qdf_mem_free(csa_offload_ind);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
@ -1675,13 +1668,11 @@ void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
|
|||
|
||||
if (!sta_ds) {
|
||||
pe_err("sta_ds does not exist");
|
||||
qdf_mem_free(csa_offload_ind);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!LIM_IS_STA_ROLE(session_entry)) {
|
||||
pe_debug("Invalid role to handle CSA");
|
||||
qdf_mem_free(csa_offload_ind);
|
||||
goto err;
|
||||
}
|
||||
/*
|
||||
|
|
@ -1856,7 +1847,6 @@ void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
|
|||
(session_entry->ch_width ==
|
||||
session_entry->gLimChannelSwitch.ch_width)) {
|
||||
pe_debug("Ignore CSA, no change in ch and bw");
|
||||
qdf_mem_free(csa_offload_ind);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
@ -1876,22 +1866,13 @@ void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
|
|||
|
||||
lim_prepare_for11h_channel_switch(mac_ctx, session_entry);
|
||||
|
||||
csa_offload_ind->mesgType = eWNI_SME_CSA_OFFLOAD_EVENT;
|
||||
csa_offload_ind->mesgLen = sizeof(tSmeCsaOffloadInd);
|
||||
qdf_mem_copy(csa_offload_ind->bssid.bytes, session_entry->bssId,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
mmh_msg.type = eWNI_SME_CSA_OFFLOAD_EVENT;
|
||||
mmh_msg.bodyptr = csa_offload_ind;
|
||||
mmh_msg.bodyval = 0;
|
||||
pe_debug("Sending eWNI_SME_CSA_OFFLOAD_EVENT to SME");
|
||||
MTRACE(mac_trace_msg_tx
|
||||
(mac_ctx, session_entry->peSessionId, mmh_msg.type));
|
||||
lim_flush_bssid(mac_ctx, session_entry->bssId);
|
||||
|
||||
#ifdef FEATURE_WLAN_DIAG_SUPPORT
|
||||
lim_diag_event_report(mac_ctx,
|
||||
WLAN_PE_DIAG_SWITCH_CHL_IND_EVENT, session_entry,
|
||||
QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
|
||||
#endif
|
||||
lim_sys_process_mmh_msg_api(mac_ctx, &mmh_msg);
|
||||
|
||||
err:
|
||||
qdf_mem_free(csa_params);
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@
|
|||
#include "wlan_mlme_main.h"
|
||||
#include "qdf_util.h"
|
||||
#include "wlan_qct_sys.h"
|
||||
#include <wlan_scan_ucfg_api.h>
|
||||
|
||||
#define ASCII_SPACE_CHARACTER 0x20
|
||||
|
||||
|
|
@ -359,8 +360,6 @@ char *lim_msg_str(uint32_t msgType)
|
|||
case eWNI_SME_GET_TSM_STATS_RSP:
|
||||
return "eWNI_SME_GET_TSM_STATS_RSP";
|
||||
#endif /* FEATURE_WLAN_ESE */
|
||||
case eWNI_SME_CSA_OFFLOAD_EVENT:
|
||||
return "eWNI_SME_CSA_OFFLOAD_EVENT";
|
||||
case eWNI_SME_SET_HW_MODE_REQ:
|
||||
return "eWNI_SME_SET_HW_MODE_REQ";
|
||||
case eWNI_SME_SET_HW_MODE_RESP:
|
||||
|
|
@ -8372,3 +8371,36 @@ QDF_STATUS lim_get_capability_info(struct mac_context *mac, uint16_t *pcap,
|
|||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void lim_flush_bssid(struct mac_context *mac_ctx, uint8_t *bssid)
|
||||
{
|
||||
struct scan_filter *filter;
|
||||
struct wlan_objmgr_pdev *pdev = NULL;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!bssid)
|
||||
return;
|
||||
|
||||
filter = qdf_mem_malloc(sizeof(*filter));
|
||||
if (!filter)
|
||||
return;
|
||||
|
||||
filter->num_of_bssid = 1;
|
||||
qdf_mem_copy(filter->bssid_list[0].bytes, bssid, QDF_MAC_ADDR_SIZE);
|
||||
|
||||
pdev = wlan_objmgr_get_pdev_by_id(mac_ctx->psoc, 0, WLAN_LEGACY_MAC_ID);
|
||||
if (!pdev) {
|
||||
pe_err("pdev is NULL");
|
||||
qdf_mem_free(filter);
|
||||
return;
|
||||
}
|
||||
status = ucfg_scan_flush_results(pdev, filter);
|
||||
|
||||
wlan_objmgr_pdev_release_ref(pdev, WLAN_LEGACY_MAC_ID);
|
||||
|
||||
if (QDF_IS_STATUS_SUCCESS(status))
|
||||
pe_debug("Removed BSS entry:%pM", bssid);
|
||||
|
||||
if (filter)
|
||||
qdf_mem_free(filter);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1711,4 +1711,13 @@ int8_t lim_get_regulatory_max_transmit_power(struct mac_context *mac,
|
|||
QDF_STATUS lim_get_capability_info(struct mac_context *mac, uint16_t *pCap,
|
||||
struct pe_session *pe_session);
|
||||
|
||||
/**
|
||||
* lim_flush_bssid() - flush bssid from scan cache
|
||||
* @mac_ctx: pointer to mac data
|
||||
* @bssid: bssid to be flushed
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void lim_flush_bssid(struct mac_context *mac_ctx, uint8_t *bssid);
|
||||
|
||||
#endif /* __LIM_UTILS_H */
|
||||
|
|
|
|||
|
|
@ -288,7 +288,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
|
|||
CASE_RETURN_STRING(eWNI_SME_DFS_BEACON_CHAN_SW_IE_REQ);
|
||||
CASE_RETURN_STRING(eWNI_SME_DFS_CSAIE_TX_COMPLETE_IND);
|
||||
CASE_RETURN_STRING(eWNI_SME_STATS_EXT_EVENT);
|
||||
CASE_RETURN_STRING(eWNI_SME_CSA_OFFLOAD_EVENT);
|
||||
CASE_RETURN_STRING(eWNI_SME_UPDATE_ADDITIONAL_IES);
|
||||
CASE_RETURN_STRING(eWNI_SME_MODIFY_ADDITIONAL_IES);
|
||||
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
|
||||
|
|
|
|||
|
|
@ -2115,12 +2115,6 @@ QDF_STATUS sme_process_msg(struct mac_context *mac, struct scheduler_msg *pMsg)
|
|||
case eWNI_SME_FW_STATUS_IND:
|
||||
status = sme_fw_state_resp(mac);
|
||||
break;
|
||||
case eWNI_SME_CSA_OFFLOAD_EVENT:
|
||||
if (pMsg->bodyptr) {
|
||||
csr_scan_flush_bss_entry(mac, pMsg->bodyptr);
|
||||
qdf_mem_free(pMsg->bodyptr);
|
||||
}
|
||||
break;
|
||||
case eWNI_SME_TSF_EVENT:
|
||||
if (mac->sme.get_tsf_cb) {
|
||||
mac->sme.get_tsf_cb(mac->sme.get_tsf_cxt,
|
||||
|
|
|
|||
|
|
@ -3009,13 +3009,6 @@ static inline void csr_flush_bssid(struct mac_context *mac_ctx,
|
|||
qdf_mem_free(filter);
|
||||
}
|
||||
|
||||
void csr_scan_flush_bss_entry(struct mac_context *mac_ctx,
|
||||
tpSmeCsaOffloadInd csa_off_ind)
|
||||
{
|
||||
csr_flush_bssid(mac_ctx,
|
||||
csa_off_ind->bssid.bytes);
|
||||
}
|
||||
|
||||
void csr_remove_bssid_from_scan_list(struct mac_context *mac_ctx,
|
||||
tSirMacAddr bssid)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -469,8 +469,6 @@ QDF_STATUS csr_queue_sme_command(struct mac_context *mac, tSmeCmd *pCommand,
|
|||
tSmeCmd *csr_get_command_buffer(struct mac_context *mac);
|
||||
void csr_release_command(struct mac_context *mac, tSmeCmd *pCommand);
|
||||
void csr_release_command_buffer(struct mac_context *mac, tSmeCmd *pCommand);
|
||||
void csr_scan_flush_bss_entry(struct mac_context *mac,
|
||||
tpSmeCsaOffloadInd pCsaOffloadInd);
|
||||
|
||||
#ifdef FEATURE_WLAN_WAPI
|
||||
bool csr_is_profile_wapi(struct csr_roam_profile *pProfile);
|
||||
|
|
|
|||
Loading…
Reference in a new issue