Merge "qcacld-3.0: Remove legacy implementation of get station api" into wlan-cld3.driver.lnx.2.0
Cette révision appartient à :

révisé par
Gerrit - the friendly Code Review server

révision
3c0a625154
@@ -5583,7 +5583,6 @@ int wlan_hdd_get_peer_info(struct hdd_adapter *adapter,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef QCA_SUPPORT_CP_STATS
|
||||
int wlan_hdd_get_station_stats(struct hdd_adapter *adapter)
|
||||
{
|
||||
int ret = 0;
|
||||
@@ -5662,121 +5661,6 @@ int wlan_hdd_get_station_stats(struct hdd_adapter *adapter)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else /* QCA_SUPPORT_CP_STATS */
|
||||
struct station_stats {
|
||||
tCsrSummaryStatsInfo summary_stats;
|
||||
tCsrGlobalClassAStatsInfo class_a_stats;
|
||||
struct csr_per_chain_rssi_stats_info per_chain_rssi_stats;
|
||||
};
|
||||
|
||||
/**
|
||||
* hdd_get_station_statistics_cb() - Get stats callback function
|
||||
* @stats: pointer to combined station stats
|
||||
* @context: user context originally registered with SME (always the
|
||||
* cookie from the request context)
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void hdd_get_station_statistics_cb(void *stats, void *context)
|
||||
{
|
||||
struct osif_request *request;
|
||||
struct station_stats *priv;
|
||||
tCsrSummaryStatsInfo *summary_stats;
|
||||
tCsrGlobalClassAStatsInfo *class_a_stats;
|
||||
struct csr_per_chain_rssi_stats_info *per_chain_rssi_stats;
|
||||
|
||||
if ((!stats) || (!context)) {
|
||||
hdd_err("Bad param, stats [%pK] context [%pK]",
|
||||
stats, context);
|
||||
return;
|
||||
}
|
||||
|
||||
request = osif_request_get(context);
|
||||
if (!request) {
|
||||
hdd_err("Obsolete request");
|
||||
return;
|
||||
}
|
||||
|
||||
summary_stats = (tCsrSummaryStatsInfo *) stats;
|
||||
class_a_stats = (tCsrGlobalClassAStatsInfo *) (summary_stats + 1);
|
||||
per_chain_rssi_stats = (struct csr_per_chain_rssi_stats_info *)
|
||||
(class_a_stats + 1);
|
||||
priv = osif_request_priv(request);
|
||||
|
||||
/* copy over the stats. do so as a struct copy */
|
||||
priv->summary_stats = *summary_stats;
|
||||
priv->class_a_stats = *class_a_stats;
|
||||
priv->per_chain_rssi_stats = *per_chain_rssi_stats;
|
||||
|
||||
osif_request_complete(request);
|
||||
osif_request_put(request);
|
||||
}
|
||||
|
||||
int wlan_hdd_get_station_stats(struct hdd_adapter *adapter)
|
||||
{
|
||||
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||
QDF_STATUS status;
|
||||
int errno;
|
||||
void *cookie;
|
||||
struct osif_request *request;
|
||||
struct station_stats *priv;
|
||||
static const struct osif_request_params params = {
|
||||
.priv_size = sizeof(*priv),
|
||||
.timeout_ms = WLAN_WAIT_TIME_STATS,
|
||||
};
|
||||
|
||||
if (!adapter) {
|
||||
hdd_err("adapter is NULL");
|
||||
return 0;
|
||||
}
|
||||
|
||||
request = osif_request_alloc(¶ms);
|
||||
if (!request) {
|
||||
hdd_err("Request allocation failure");
|
||||
return -ENOMEM;
|
||||
}
|
||||
cookie = osif_request_cookie(request);
|
||||
|
||||
/* query only for Summary & Class A statistics */
|
||||
status = sme_get_statistics(adapter->hdd_ctx->mac_handle,
|
||||
eCSR_HDD,
|
||||
SME_SUMMARY_STATS |
|
||||
SME_GLOBAL_CLASSA_STATS |
|
||||
SME_PER_CHAIN_RSSI_STATS,
|
||||
hdd_get_station_statistics_cb,
|
||||
sta_ctx->conn_info.sta_id[0],
|
||||
cookie,
|
||||
adapter->vdev_id);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
hdd_err("Failed to retrieve statistics, status %d", status);
|
||||
goto put_request;
|
||||
}
|
||||
|
||||
/* request was sent -- wait for the response */
|
||||
errno = osif_request_wait_for_response(request);
|
||||
if (errno) {
|
||||
hdd_err("Failed to wait for statistics, errno %d", errno);
|
||||
goto put_request;
|
||||
}
|
||||
|
||||
/* update the adapter with the fresh results */
|
||||
priv = osif_request_priv(request);
|
||||
adapter->hdd_stats.summary_stat = priv->summary_stats;
|
||||
adapter->hdd_stats.class_a_stat = priv->class_a_stats;
|
||||
adapter->hdd_stats.per_chain_rssi_stats = priv->per_chain_rssi_stats;
|
||||
|
||||
put_request:
|
||||
/*
|
||||
* either we never sent a request, we sent a request and
|
||||
* received a response or we sent a request and timed out.
|
||||
* regardless we are done with the request.
|
||||
*/
|
||||
osif_request_put(request);
|
||||
|
||||
/* either callback updated adapter stats or it has cached data */
|
||||
return 0;
|
||||
}
|
||||
#endif /* QCA_SUPPORT_CP_STATS */
|
||||
|
||||
struct temperature_priv {
|
||||
int temperature;
|
||||
|
@@ -9040,113 +9040,10 @@ static int iw_set_packet_filter_params(struct net_device *dev,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef QCA_SUPPORT_CP_STATS
|
||||
static int hdd_get_wlan_stats(struct hdd_adapter *adapter)
|
||||
{
|
||||
return wlan_hdd_get_station_stats(adapter);
|
||||
}
|
||||
#else /* QCA_SUPPORT_CP_STATS */
|
||||
struct hdd_statistics_priv {
|
||||
tCsrSummaryStatsInfo summary_stats;
|
||||
tCsrGlobalClassAStatsInfo class_a_stats;
|
||||
tCsrGlobalClassDStatsInfo class_d_stats;
|
||||
};
|
||||
|
||||
/**
|
||||
* hdd_statistics_cb() - "Get statistics" callback function
|
||||
* @stats: statistics payload
|
||||
* @context: opaque context originally passed to SME. HDD always passes
|
||||
* a cookie for the request context
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void hdd_statistics_cb(void *stats, void *context)
|
||||
{
|
||||
struct osif_request *request;
|
||||
struct hdd_statistics_priv *priv;
|
||||
tCsrSummaryStatsInfo *summary_stats;
|
||||
tCsrGlobalClassAStatsInfo *class_a_stats;
|
||||
tCsrGlobalClassDStatsInfo *class_d_stats;
|
||||
|
||||
request = osif_request_get(context);
|
||||
if (!request) {
|
||||
hdd_err("Obsolete request");
|
||||
return;
|
||||
}
|
||||
|
||||
priv = osif_request_priv(request);
|
||||
|
||||
summary_stats = (tCsrSummaryStatsInfo *)stats;
|
||||
priv->summary_stats = *summary_stats;
|
||||
|
||||
class_a_stats = (tCsrGlobalClassAStatsInfo *)(summary_stats + 1);
|
||||
priv->class_a_stats = *class_a_stats;
|
||||
|
||||
class_d_stats = (tCsrGlobalClassDStatsInfo *)(class_a_stats + 1);
|
||||
priv->class_d_stats = *class_d_stats;
|
||||
|
||||
osif_request_complete(request);
|
||||
osif_request_put(request);
|
||||
}
|
||||
|
||||
static int hdd_get_wlan_stats(struct hdd_adapter *adapter)
|
||||
{
|
||||
int ret = 0;
|
||||
void *cookie;
|
||||
QDF_STATUS status;
|
||||
struct osif_request *request;
|
||||
struct hdd_station_ctx *sta_ctx;
|
||||
struct hdd_statistics_priv *priv;
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
static const struct osif_request_params params = {
|
||||
.priv_size = sizeof(*priv),
|
||||
.timeout_ms = WLAN_WAIT_TIME_STATS,
|
||||
};
|
||||
|
||||
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
||||
request = osif_request_alloc(¶ms);
|
||||
if (!request) {
|
||||
hdd_warn("request allocation failed");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
cookie = osif_request_cookie(request);
|
||||
status = sme_get_statistics(hdd_ctx->mac_handle, eCSR_HDD,
|
||||
SME_SUMMARY_STATS |
|
||||
SME_GLOBAL_CLASSA_STATS |
|
||||
SME_GLOBAL_CLASSD_STATS,
|
||||
hdd_statistics_cb,
|
||||
sta_ctx->conn_info.sta_id[0],
|
||||
cookie, adapter->vdev_id);
|
||||
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
hdd_warn("Unable to retrieve SME statistics");
|
||||
goto put_request;
|
||||
}
|
||||
|
||||
/* request was sent -- wait for the response */
|
||||
ret = osif_request_wait_for_response(request);
|
||||
if (ret) {
|
||||
hdd_err("Failed to wait for statistics, errno %d", ret);
|
||||
goto put_request;
|
||||
}
|
||||
|
||||
/* update the adapter cache with the fresh results */
|
||||
priv = osif_request_priv(request);
|
||||
adapter->hdd_stats.summary_stat = priv->summary_stats;
|
||||
adapter->hdd_stats.class_a_stat = priv->class_a_stats;
|
||||
adapter->hdd_stats.class_d_stat = priv->class_d_stats;
|
||||
|
||||
put_request:
|
||||
/*
|
||||
* either we never sent a request, we sent a request and
|
||||
* received a response or we sent a request and timed out.
|
||||
* regardless we are done with the request.
|
||||
*/
|
||||
osif_request_put(request);
|
||||
return ret;
|
||||
}
|
||||
#endif /* QCA_SUPPORT_CP_STATS */
|
||||
|
||||
static int __iw_get_statistics(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
|
@@ -1381,23 +1381,6 @@ struct set_context_rsp {
|
||||
struct qdf_mac_addr peer_macaddr;
|
||||
};
|
||||
|
||||
/*******************PE Statistics*************************/
|
||||
|
||||
/*
|
||||
* tpAniGetPEStatsReq is tied to
|
||||
* for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
|
||||
* for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
|
||||
*/
|
||||
typedef struct sAniGetPEStatsReq {
|
||||
/* Common for all types are requests */
|
||||
uint16_t msgType; /* message type is same as the request type */
|
||||
uint16_t msgLen; /* length of the entire request */
|
||||
uint32_t staId; /* Per STA stats request must contain valid */
|
||||
/* categories of stats requested. look at ePEStatsMask */
|
||||
uint32_t statsMask;
|
||||
uint8_t sessionId;
|
||||
} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
|
||||
|
||||
/*
|
||||
* tpAniGetPEStatsRsp is tied to
|
||||
* for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
|
||||
|
@@ -70,11 +70,9 @@ enum eWniMsgTypes {
|
||||
eWNI_SME_DELTS_REQ = SIR_SME_MSG_TYPES_BEGIN + 30,
|
||||
eWNI_SME_DELTS_RSP = SIR_SME_MSG_TYPES_BEGIN + 31,
|
||||
eWNI_SME_DELTS_IND = SIR_SME_MSG_TYPES_BEGIN + 32,
|
||||
eWNI_SME_GET_STATISTICS_REQ = SIR_SME_MSG_TYPES_BEGIN + 33,
|
||||
eWNI_SME_GET_STATISTICS_RSP = SIR_SME_MSG_TYPES_BEGIN + 34,
|
||||
/*
|
||||
* unused SIR_SME_MSG_TYPES_BEGIN + 35
|
||||
* and SIR_SME_MSG_TYPES_BEGIN + 36
|
||||
* unused SIR_SME_MSG_TYPES_BEGIN + 33 to
|
||||
* to SIR_SME_MSG_TYPES_BEGIN + 36
|
||||
*/
|
||||
eWNI_SME_WPS_PBC_PROBE_REQ_IND = SIR_SME_MSG_TYPES_BEGIN + 37,
|
||||
eWNI_SME_UPPER_LAYER_ASSOC_CNF = SIR_SME_MSG_TYPES_BEGIN + 38,
|
||||
|
@@ -275,12 +275,9 @@ struct sir_cfg_action_frm_tb_ppdu {
|
||||
#define SIR_HAL_GET_TX_POWER_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 72)
|
||||
/*
|
||||
* (SIR_HAL_ITC_MSG_TYPES_BEGIN + 73) thru
|
||||
* (SIR_HAL_ITC_MSG_TYPES_BEGIN + 87) are unused
|
||||
* (SIR_HAL_ITC_MSG_TYPES_BEGIN + 89) are unused
|
||||
*/
|
||||
|
||||
/* / PE <-> HAL statistics messages */
|
||||
#define SIR_HAL_GET_STATISTICS_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 88)
|
||||
#define SIR_HAL_GET_STATISTICS_RSP (SIR_HAL_ITC_MSG_TYPES_BEGIN + 89)
|
||||
#define SIR_HAL_SET_KEY_DONE (SIR_HAL_ITC_MSG_TYPES_BEGIN + 90)
|
||||
|
||||
/* / PE <-> HAL BTC messages */
|
||||
|
@@ -1722,7 +1722,6 @@ static void lim_process_messages(struct mac_context *mac_ctx,
|
||||
case eWNI_SME_FT_PRE_AUTH_REQ:
|
||||
case eWNI_SME_FT_AGGR_QOS_REQ:
|
||||
case eWNI_SME_REGISTER_MGMT_FRAME_REQ:
|
||||
case eWNI_SME_GET_STATISTICS_REQ:
|
||||
#ifdef FEATURE_WLAN_ESE
|
||||
case eWNI_SME_GET_TSM_STATS_REQ:
|
||||
#endif /* FEATURE_WLAN_ESE */
|
||||
@@ -1880,10 +1879,6 @@ static void lim_process_messages(struct mac_context *mac_ctx,
|
||||
case WMA_SET_STAKEY_RSP:
|
||||
lim_process_mlm_set_sta_key_rsp(mac_ctx, msg);
|
||||
break;
|
||||
case WMA_GET_STATISTICS_RSP:
|
||||
lim_send_sme_pe_statistics_rsp(mac_ctx, msg->type,
|
||||
(void *)msg->bodyptr);
|
||||
break;
|
||||
case WMA_SET_MIMOPS_RSP:
|
||||
case WMA_SET_TX_POWER_RSP:
|
||||
qdf_mem_free((void *)msg->bodyptr);
|
||||
|
@@ -3448,44 +3448,6 @@ void lim_process_sme_addts_rsp_timeout(struct mac_context *mac, uint32_t param)
|
||||
pe_session->smeSessionId);
|
||||
}
|
||||
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
/**
|
||||
* __lim_process_sme_get_statistics_request() - Post WMA_GET_STATISTICS_REQ to
|
||||
* wma
|
||||
* @mac Pointer to Global MAC structure
|
||||
* @msg_buf A pointer to the SME message buffer
|
||||
*
|
||||
* @Return None
|
||||
*/
|
||||
static void __lim_process_sme_get_statistics_request(struct mac_context *mac,
|
||||
uint32_t *msg_buf)
|
||||
{
|
||||
tpAniGetPEStatsReq pPEStatsReq;
|
||||
struct scheduler_msg msgQ = {0};
|
||||
|
||||
pPEStatsReq = (tpAniGetPEStatsReq)msg_buf;
|
||||
|
||||
msgQ.type = WMA_GET_STATISTICS_REQ;
|
||||
|
||||
msgQ.reserved = 0;
|
||||
msgQ.bodyptr = msg_buf;
|
||||
msgQ.bodyval = 0;
|
||||
MTRACE(mac_trace_msg_tx(mac, NO_SESSION, msgQ.type));
|
||||
|
||||
if (QDF_STATUS_SUCCESS != (wma_post_ctrl_msg(mac, &msgQ))) {
|
||||
qdf_mem_free(msg_buf);
|
||||
msg_buf = NULL;
|
||||
pe_err("Unable to forward request");
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
#else
|
||||
static void __lim_process_sme_get_statistics_request(
|
||||
struct mac_context *mac_ctx, uint32_t *msg_buf) {}
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_WLAN_ESE
|
||||
/**
|
||||
* __lim_process_sme_get_tsm_stats_request() - get tsm stats request
|
||||
@@ -4784,14 +4746,6 @@ bool lim_process_sme_req_messages(struct mac_context *mac,
|
||||
lim_process_sme_addts_rsp_timeout(mac, pMsg->bodyval);
|
||||
break;
|
||||
|
||||
case eWNI_SME_GET_STATISTICS_REQ:
|
||||
__lim_process_sme_get_statistics_request(mac, msg_buf);
|
||||
/*
|
||||
* HAL consumes msg_buf. It will be freed there.
|
||||
* Set bufConsumed to false.
|
||||
*/
|
||||
bufConsumed = false;
|
||||
break;
|
||||
#ifdef FEATURE_WLAN_ESE
|
||||
case eWNI_SME_GET_TSM_STATS_REQ:
|
||||
__lim_process_sme_get_tsm_stats_request(mac, msg_buf);
|
||||
|
@@ -1345,66 +1345,6 @@ lim_send_sme_delts_ind(struct mac_context *mac, struct delts_req_info *delts,
|
||||
lim_sys_process_mmh_msg_api(mac, &mmhMsg);
|
||||
}
|
||||
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
/**
|
||||
* lim_send_sme_pe_statistics_rsp()
|
||||
*
|
||||
***FUNCTION:
|
||||
* This function is called to send 802.11 statistics response to HDD.
|
||||
* This function posts the result back to HDD. This is a response to
|
||||
* HDD's request for statistics.
|
||||
*
|
||||
***PARAMS:
|
||||
*
|
||||
***LOGIC:
|
||||
*
|
||||
***ASSUMPTIONS:
|
||||
* NA
|
||||
*
|
||||
***NOTE:
|
||||
* NA
|
||||
*
|
||||
* @param mac Pointer to Global MAC structure
|
||||
* @param p80211Stats Statistics sent in response
|
||||
* @param resultCode TODO:
|
||||
*
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
|
||||
void
|
||||
lim_send_sme_pe_statistics_rsp(struct mac_context *mac, uint16_t msgType, void *stats)
|
||||
{
|
||||
struct scheduler_msg mmhMsg = {0};
|
||||
uint8_t sessionId;
|
||||
tAniGetPEStatsRsp *pPeStats = (tAniGetPEStatsRsp *) stats;
|
||||
struct pe_session *pPeSessionEntry;
|
||||
|
||||
/* Get the Session Id based on Sta Id */
|
||||
pPeSessionEntry =
|
||||
pe_find_session_by_sta_id(mac, pPeStats->staId, &sessionId);
|
||||
|
||||
/* Fill the Session Id */
|
||||
if (pPeSessionEntry) {
|
||||
/* Fill the Session Id */
|
||||
pPeStats->sessionId = pPeSessionEntry->smeSessionId;
|
||||
}
|
||||
|
||||
pPeStats->msgType = eWNI_SME_GET_STATISTICS_RSP;
|
||||
|
||||
/* msgType should be WMA_GET_STATISTICS_RSP */
|
||||
mmhMsg.type = eWNI_SME_GET_STATISTICS_RSP;
|
||||
|
||||
mmhMsg.bodyptr = stats;
|
||||
mmhMsg.bodyval = 0;
|
||||
MTRACE(mac_trace(mac, TRACE_CODE_TX_SME_MSG, NO_SESSION, mmhMsg.type));
|
||||
lim_sys_process_mmh_msg_api(mac, &mmhMsg);
|
||||
|
||||
return;
|
||||
|
||||
} /*** end lim_send_sme_pe_statistics_rsp() ***/
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_WLAN_ESE
|
||||
/**
|
||||
* lim_send_sme_pe_ese_tsm_rsp() - send tsm response
|
||||
|
@@ -215,14 +215,6 @@ void lim_send_sme_delts_ind(struct mac_context *mac,
|
||||
struct delts_req_info *delts,
|
||||
uint16_t aid, struct pe_session *);
|
||||
|
||||
#ifdef QCA_SUPPORT_CP_STATS
|
||||
static inline void lim_send_sme_pe_statistics_rsp(struct mac_context *mac,
|
||||
uint16_t msgtype, void *stats) {}
|
||||
#else
|
||||
void lim_send_sme_pe_statistics_rsp(struct mac_context *mac, uint16_t msgtype,
|
||||
void *stats);
|
||||
#endif /* QCA_SUPPORT_CP_STATS */
|
||||
|
||||
#ifdef FEATURE_WLAN_ESE
|
||||
void lim_send_sme_pe_ese_tsm_rsp(struct mac_context *mac, tAniGetTsmStatsRsp *pStats);
|
||||
#endif
|
||||
|
@@ -245,8 +245,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
|
||||
CASE_RETURN_STRING(eWNI_SME_DELTS_REQ);
|
||||
CASE_RETURN_STRING(eWNI_SME_DELTS_RSP);
|
||||
CASE_RETURN_STRING(eWNI_SME_DELTS_IND);
|
||||
CASE_RETURN_STRING(eWNI_SME_GET_STATISTICS_REQ);
|
||||
CASE_RETURN_STRING(eWNI_SME_GET_STATISTICS_RSP);
|
||||
CASE_RETURN_STRING(eWNI_SME_WPS_PBC_PROBE_REQ_IND);
|
||||
CASE_RETURN_STRING(eWNI_SME_UPPER_LAYER_ASSOC_CNF);
|
||||
CASE_RETURN_STRING(eWNI_SME_SESSION_UPDATE_PARAM);
|
||||
@@ -445,8 +443,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
|
||||
|
||||
CASE_RETURN_STRING(WMA_ENABLE_UAPSD_REQ);
|
||||
CASE_RETURN_STRING(WMA_DISABLE_UAPSD_REQ);
|
||||
CASE_RETURN_STRING(WMA_GET_STATISTICS_REQ);
|
||||
CASE_RETURN_STRING(WMA_GET_STATISTICS_RSP);
|
||||
CASE_RETURN_STRING(WMA_SET_KEY_DONE);
|
||||
|
||||
CASE_RETURN_STRING(WMA_BTC_SET_CFG);
|
||||
|
@@ -682,13 +682,6 @@ typedef enum {
|
||||
|
||||
} eCsrRoamWmmUserModeType;
|
||||
|
||||
typedef enum {
|
||||
eCSR_REQUESTER_MIN = 0,
|
||||
eCSR_DIAG,
|
||||
eCSR_UMA_GAN,
|
||||
eCSR_HDD
|
||||
} eCsrStatsRequesterType;
|
||||
|
||||
typedef struct tagPmkidCandidateInfo {
|
||||
struct qdf_mac_addr BSSID;
|
||||
bool preAuthSupported;
|
||||
@@ -1426,7 +1419,6 @@ QDF_STATUS csr_set_channels(struct mac_context *mac,
|
||||
const char *get_e_roam_cmd_status_str(eRoamCmdStatus val);
|
||||
const char *get_e_csr_roam_result_str(eCsrRoamResult val);
|
||||
const char *csr_phy_mode_str(eCsrPhyMode phy_mode);
|
||||
typedef void (*tCsrStatsCallback)(void *stats, void *pContext);
|
||||
typedef void (*tCsrRssiCallback)(int8_t rssi, uint32_t staId, void *pContext);
|
||||
|
||||
#ifdef FEATURE_WLAN_ESE
|
||||
|
@@ -479,36 +479,6 @@ struct csr_roam_connectedinfo {
|
||||
uint8_t staId;
|
||||
};
|
||||
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
struct csr_pestats_reqinfo {
|
||||
tListElem link; /* list links */
|
||||
uint32_t statsMask;
|
||||
bool rspPending;
|
||||
uint8_t staId;
|
||||
uint8_t numClient;
|
||||
struct mac_context *mac;
|
||||
uint8_t sessionId;
|
||||
};
|
||||
|
||||
struct csr_statsclient_reqinfo {
|
||||
tListElem link; /* list links */
|
||||
eCsrStatsRequesterType requesterId;
|
||||
tCsrStatsCallback callback;
|
||||
void *pContext;
|
||||
uint32_t statsMask;
|
||||
struct csr_pestats_reqinfo *pPeStaEntry;
|
||||
uint8_t staId;
|
||||
qdf_mc_timer_t timer;
|
||||
bool timerExpired;
|
||||
struct mac_context *mac; /* TODO: Confirm this change BTAMP */
|
||||
uint8_t sessionId;
|
||||
};
|
||||
|
||||
struct csr_tlstats_reqinfo {
|
||||
uint8_t numClient;
|
||||
};
|
||||
#endif /* QCA_SUPPORT_CP_STATS */
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
enum csr_roamoffload_authstatus {
|
||||
/* reassociation is done but couldn't finish security handshake */
|
||||
@@ -721,9 +691,6 @@ struct csr_roamstruct {
|
||||
tCsrGlobalClassAStatsInfo classAStatsInfo;
|
||||
tCsrGlobalClassDStatsInfo classDStatsInfo;
|
||||
struct csr_per_chain_rssi_stats_info per_chain_rssi_stats;
|
||||
tDblLinkList statsClientReqList;
|
||||
tDblLinkList peStatsReqList;
|
||||
struct csr_tlstats_reqinfo tlStatsReqInfo;
|
||||
#endif
|
||||
struct csr_timer_info WaitForKeyTimerInfo;
|
||||
struct csr_roam_session *roamSession;
|
||||
@@ -944,10 +911,6 @@ bool csr_is_valid_mc_concurrent_session(struct mac_context *mac,
|
||||
struct bss_description *bss_desc);
|
||||
bool csr_is_conn_state_connected_infra_ap(struct mac_context *mac,
|
||||
uint32_t sessionId);
|
||||
QDF_STATUS csr_get_statistics(struct mac_context *mac,
|
||||
eCsrStatsRequesterType requesterId,
|
||||
uint32_t statsMask, tCsrStatsCallback callback,
|
||||
uint8_t staId, void *pContext, uint8_t sessionId);
|
||||
QDF_STATUS csr_get_snr(struct mac_context *mac, tCsrSnrCallback callback,
|
||||
uint8_t staId, struct qdf_mac_addr bssId, void *pContext);
|
||||
QDF_STATUS csr_get_config_param(struct mac_context *mac,
|
||||
|
@@ -49,11 +49,6 @@
|
||||
Preprocessor definitions and constants
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
#define SME_SUMMARY_STATS (1 << eCsrSummaryStats)
|
||||
#define SME_GLOBAL_CLASSA_STATS (1 << eCsrGlobalClassAStats)
|
||||
#define SME_GLOBAL_CLASSD_STATS (1 << eCsrGlobalClassDStats)
|
||||
#define SME_PER_CHAIN_RSSI_STATS (1 << csr_per_chain_rssi_stats)
|
||||
|
||||
#define sme_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_SME, params)
|
||||
#define sme_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_SME, params)
|
||||
#define sme_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_SME, params)
|
||||
@@ -593,12 +588,6 @@ QDF_STATUS sme_roam_get_wpa_rsn_rsp_ie(mac_handle_t mac_handle,
|
||||
|
||||
QDF_STATUS sme_get_config_param(mac_handle_t mac_handle,
|
||||
struct sme_config_params *pParam);
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
QDF_STATUS sme_get_statistics(mac_handle_t mac_handle,
|
||||
eCsrStatsRequesterType requesterId,
|
||||
uint32_t statsMask, tCsrStatsCallback callback,
|
||||
uint8_t staId, void *pContext, uint8_t sessionId);
|
||||
#endif
|
||||
QDF_STATUS sme_get_snr(mac_handle_t mac_handle,
|
||||
tCsrSnrCallback callback,
|
||||
uint8_t staId, struct qdf_mac_addr bssId, void *pContext);
|
||||
|
@@ -3509,46 +3509,6 @@ QDF_STATUS sme_get_snr(mac_handle_t mac_handle,
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
/*
|
||||
* sme_get_statistics() -
|
||||
* A wrapper function that client calls to register a callback to get
|
||||
* different PHY level statistics from CSR.
|
||||
*
|
||||
* requesterId - different client requesting for statistics,
|
||||
* HDD, UMA/GAN etc
|
||||
* statsMask - The different category/categories of stats requester
|
||||
* is looking for
|
||||
* callback - SME sends back the requested stats using the callback
|
||||
* periodicity - If requester needs periodic update in millisec, 0 means
|
||||
* it's an one time request
|
||||
* cache - If requester is happy with cached stats
|
||||
* staId - The station ID for which the stats is requested for
|
||||
* pContext - user context to be passed back along with the callback
|
||||
* sessionId - sme session interface
|
||||
* Return QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS sme_get_statistics(mac_handle_t mac_handle,
|
||||
eCsrStatsRequesterType requesterId,
|
||||
uint32_t statsMask, tCsrStatsCallback callback,
|
||||
uint8_t staId, void *pContext, uint8_t sessionId)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
||||
|
||||
status = sme_acquire_global_lock(&mac->sme);
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
status = csr_get_statistics(mac, requesterId, statsMask,
|
||||
callback, staId, pContext,
|
||||
sessionId);
|
||||
sme_release_global_lock(&mac->sme);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS sme_get_link_status(mac_handle_t mac_handle,
|
||||
csr_link_status_callback callback,
|
||||
void *context, uint8_t session_id)
|
||||
|
@@ -436,34 +436,6 @@ static QDF_STATUS csr_send_mb_set_context_req_msg(struct mac_context *mac,
|
||||
uint8_t *pKeyRsc);
|
||||
static void csr_roam_link_up(struct mac_context *mac, struct qdf_mac_addr bssid);
|
||||
static void csr_roam_link_down(struct mac_context *mac, uint32_t sessionId);
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
static QDF_STATUS csr_send_mb_stats_req_msg(struct mac_context *mac,
|
||||
uint32_t statsMask, uint8_t staId,
|
||||
uint8_t sessionId);
|
||||
/* pStaEntry is no longer invalid upon the return of this function. */
|
||||
static void csr_roam_remove_stat_list_entry(struct mac_context *mac,
|
||||
tListElem *pEntry);
|
||||
struct csr_statsclient_reqinfo *csr_roam_insert_entry_into_list(
|
||||
struct mac_context *mac, tDblLinkList *pStaList,
|
||||
struct csr_statsclient_reqinfo *
|
||||
pStaEntry);
|
||||
static void csr_roam_report_statistics(struct mac_context *mac,
|
||||
uint32_t statsMask, tCsrStatsCallback callback, uint8_t staId,
|
||||
void *pContext);
|
||||
tListElem *csr_roam_check_client_req_list(
|
||||
struct mac_context *mac, uint32_t statsMask);
|
||||
static void csr_roam_remove_entry_from_pe_stats_req_list(
|
||||
struct mac_context *mac, struct csr_pestats_reqinfo *pPeStaEntry);
|
||||
tListElem *csr_roam_find_in_pe_stats_req_list(
|
||||
struct mac_context *mac,
|
||||
uint32_t statsMask);
|
||||
static QDF_STATUS csr_roam_dereg_statistics_req(struct mac_context *mac);
|
||||
#else
|
||||
static QDF_STATUS csr_roam_dereg_statistics_req(struct mac_context *mac)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
static enum csr_cfgdot11mode
|
||||
csr_roam_get_phy_mode_band_for_bss(struct mac_context *mac,
|
||||
struct csr_roam_profile *pProfile,
|
||||
@@ -564,32 +536,6 @@ static void csr_roam_de_init_globals(struct mac_context *mac)
|
||||
mac->roam.roamSession = NULL;
|
||||
}
|
||||
|
||||
#ifdef QCA_SUPPORT_CP_STATS
|
||||
static QDF_STATUS csr_open_stats_ll(struct mac_context *mac_ctx)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void csr_close_stats_ll(struct mac_context *mac_ctx) {}
|
||||
#else
|
||||
static QDF_STATUS csr_open_stats_ll(struct mac_context *mac_ctx)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
|
||||
status = csr_ll_open(&mac_ctx->roam.statsClientReqList);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return status;
|
||||
|
||||
return csr_ll_open(&mac_ctx->roam.peStatsReqList);
|
||||
}
|
||||
|
||||
static void csr_close_stats_ll(struct mac_context *mac_ctx)
|
||||
{
|
||||
csr_ll_close(&mac_ctx->roam.statsClientReqList);
|
||||
csr_ll_close(&mac_ctx->roam.peStatsReqList);
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS csr_open(struct mac_context *mac)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
@@ -616,11 +562,6 @@ QDF_STATUS csr_open(struct mac_context *mac)
|
||||
break;
|
||||
}
|
||||
mac->roam.nextRoamId = 1; /* Must not be 0 */
|
||||
status = csr_open_stats_ll(mac);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
csr_roam_free_globals();
|
||||
break;
|
||||
}
|
||||
} while (0);
|
||||
|
||||
return status;
|
||||
@@ -678,7 +619,6 @@ QDF_STATUS csr_close(struct mac_context *mac)
|
||||
|
||||
csr_roam_close(mac);
|
||||
csr_scan_close(mac);
|
||||
csr_close_stats_ll(mac);
|
||||
/* DeInit Globals */
|
||||
csr_roam_de_init_globals(mac);
|
||||
return status;
|
||||
@@ -1407,10 +1347,6 @@ QDF_STATUS csr_roam_start(struct mac_context *mac)
|
||||
void csr_roam_stop(struct mac_context *mac, uint32_t sessionId)
|
||||
{
|
||||
csr_roam_stop_roaming_timer(mac, sessionId);
|
||||
/* deregister the clients requesting stats from PE/TL & also stop
|
||||
* the corresponding timers
|
||||
*/
|
||||
csr_roam_dereg_statistics_req(mac);
|
||||
}
|
||||
|
||||
QDF_STATUS csr_roam_copy_connect_profile(struct mac_context *mac,
|
||||
@@ -9970,10 +9906,6 @@ void csr_roam_joined_state_msg_processor(struct mac_context *mac, void *msg_buf)
|
||||
tSirSmeRsp *pSirMsg = (tSirSmeRsp *)msg_buf;
|
||||
|
||||
switch (pSirMsg->messageType) {
|
||||
case eWNI_SME_GET_STATISTICS_RSP:
|
||||
sme_debug("Stats rsp from PE");
|
||||
csr_roam_stats_rsp_processor(mac, pSirMsg);
|
||||
break;
|
||||
case eWNI_SME_UPPER_LAYER_ASSOC_CNF:
|
||||
{
|
||||
struct csr_roam_session *pSession;
|
||||
@@ -12377,10 +12309,6 @@ void csr_roam_check_for_link_status_change(struct mac_context *mac,
|
||||
case eWNI_SME_SETCONTEXT_RSP:
|
||||
csr_roam_chk_lnk_set_ctx_rsp(mac, pSirMsg);
|
||||
break;
|
||||
case eWNI_SME_GET_STATISTICS_RSP:
|
||||
sme_debug("Stats rsp from PE");
|
||||
csr_roam_stats_rsp_processor(mac, pSirMsg);
|
||||
break;
|
||||
#ifdef FEATURE_WLAN_ESE
|
||||
case eWNI_SME_GET_TSM_STATS_RSP:
|
||||
sme_debug("TSM Stats rsp from PE");
|
||||
@@ -17349,10 +17277,6 @@ static void csr_roam_link_down(struct mac_context *mac, uint32_t sessionId)
|
||||
eCSR_ROAM_LOSTLINK,
|
||||
eCSR_ROAM_RESULT_LOSTLINK);
|
||||
}
|
||||
/* deregister the clients requesting stats from PE/TL & also stop the
|
||||
* corresponding timers
|
||||
*/
|
||||
csr_roam_dereg_statistics_req(mac);
|
||||
/* Indicate the neighbor roal algorithm about the disconnect
|
||||
* indication
|
||||
*/
|
||||
@@ -17368,288 +17292,6 @@ static void csr_roam_link_down(struct mac_context *mac, uint32_t sessionId)
|
||||
|
||||
}
|
||||
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
QDF_STATUS csr_send_mb_stats_req_msg(struct mac_context *mac, uint32_t statsMask,
|
||||
uint8_t staId, uint8_t sessionId)
|
||||
{
|
||||
tAniGetPEStatsReq *pMsg;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
pMsg = qdf_mem_malloc(sizeof(tAniGetPEStatsReq));
|
||||
if (!pMsg)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
/* need to initiate a stats request to PE */
|
||||
pMsg->msgType = eWNI_SME_GET_STATISTICS_REQ;
|
||||
pMsg->msgLen = (uint16_t) sizeof(tAniGetPEStatsReq);
|
||||
pMsg->staId = staId;
|
||||
pMsg->statsMask = statsMask;
|
||||
pMsg->sessionId = sessionId;
|
||||
status = umac_send_mb_message_to_mac(pMsg);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
sme_debug("Failed to send down the stats req ");
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* csr_update_stats() - updates correct stats struct in mac_ctx
|
||||
* @mac: mac global context
|
||||
* @stats_type: stats type
|
||||
* @sme_stats_rsp: stats rsp msg packet
|
||||
* @stats: input stats data buffer to fill in mac_ctx struct
|
||||
* @length: out param - stats length
|
||||
*
|
||||
* This function fills corresponding stats struct in mac_cts based on stats type
|
||||
* passed
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void
|
||||
csr_update_stats(struct mac_context *mac, uint8_t stats_type,
|
||||
tAniGetPEStatsRsp *sme_stats_rsp,
|
||||
uint8_t **stats, uint32_t *length)
|
||||
{
|
||||
switch (stats_type) {
|
||||
case eCsrSummaryStats:
|
||||
sme_debug("summary stats");
|
||||
qdf_mem_copy((uint8_t *) &mac->roam.summaryStatsInfo, *stats,
|
||||
sizeof(tCsrSummaryStatsInfo));
|
||||
*stats += sizeof(tCsrSummaryStatsInfo);
|
||||
*length -= sizeof(tCsrSummaryStatsInfo);
|
||||
break;
|
||||
case eCsrGlobalClassAStats:
|
||||
sme_debug("ClassA stats");
|
||||
qdf_mem_copy((uint8_t *) &mac->roam.classAStatsInfo, *stats,
|
||||
sizeof(tCsrGlobalClassAStatsInfo));
|
||||
*stats += sizeof(tCsrGlobalClassAStatsInfo);
|
||||
*length -= sizeof(tCsrGlobalClassAStatsInfo);
|
||||
break;
|
||||
case csr_per_chain_rssi_stats:
|
||||
sme_debug("csrRoamStatsRspProcessor:Per Chain RSSI stats");
|
||||
qdf_mem_copy((uint8_t *)&mac->roam.per_chain_rssi_stats,
|
||||
*stats, sizeof(struct csr_per_chain_rssi_stats_info));
|
||||
*stats += sizeof(struct csr_per_chain_rssi_stats_info);
|
||||
*length -= sizeof(struct csr_per_chain_rssi_stats_info);
|
||||
break;
|
||||
default:
|
||||
sme_warn("unknown stats type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* csr_roam_stats_rsp_processor() - processes stats rsp msg
|
||||
* @mac mac global context
|
||||
* @pSirMsg: incoming message
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void csr_roam_stats_rsp_processor(struct mac_context *mac, tSirSmeRsp *pSirMsg)
|
||||
{
|
||||
tAniGetPEStatsRsp *pSmeStatsRsp;
|
||||
tListElem *pEntry = NULL;
|
||||
struct csr_statsclient_reqinfo *pTempStaEntry = NULL;
|
||||
struct csr_pestats_reqinfo *pPeStaEntry = NULL;
|
||||
uint32_t tempMask = 0;
|
||||
uint8_t counter = 0;
|
||||
uint8_t *pStats = NULL;
|
||||
uint32_t length = 0;
|
||||
int8_t rssi = 0, snr = 0;
|
||||
uint32_t *pRssi = NULL, *pSnr = NULL;
|
||||
uint32_t linkCapacity;
|
||||
|
||||
pSmeStatsRsp = (tAniGetPEStatsRsp *) pSirMsg;
|
||||
if (pSmeStatsRsp->rc) {
|
||||
sme_warn("stats rsp from PE shows failure");
|
||||
goto post_update;
|
||||
}
|
||||
tempMask = pSmeStatsRsp->statsMask;
|
||||
pStats = ((uint8_t *) &pSmeStatsRsp->statsMask) +
|
||||
sizeof(pSmeStatsRsp->statsMask);
|
||||
/*
|
||||
* subtract all statistics from this length, and after processing the
|
||||
* entire 'stat' part of the message, if the length is not zero, then
|
||||
* rssi is piggy packed in this 'stats' message.
|
||||
*/
|
||||
length = pSmeStatsRsp->msgLen - sizeof(tAniGetPEStatsRsp);
|
||||
/* new stats info from PE, fill up the stats strucutres in PMAC */
|
||||
while (tempMask) {
|
||||
if (tempMask & 1)
|
||||
csr_update_stats(mac, counter, pSmeStatsRsp,
|
||||
&pStats, &length);
|
||||
tempMask >>= 1;
|
||||
counter++;
|
||||
}
|
||||
if (length != 0) {
|
||||
pRssi = (uint32_t *) pStats;
|
||||
rssi = (int8_t) *pRssi;
|
||||
pStats += sizeof(uint32_t);
|
||||
length -= sizeof(uint32_t);
|
||||
} else
|
||||
/* If riva is not sending rssi, continue to use the hack */
|
||||
rssi = RSSI_HACK_BMPS;
|
||||
|
||||
if (length != 0) {
|
||||
linkCapacity = *(uint32_t *) pStats;
|
||||
pStats += sizeof(uint32_t);
|
||||
length -= sizeof(uint32_t);
|
||||
} else
|
||||
linkCapacity = 0;
|
||||
|
||||
if (length != 0) {
|
||||
pSnr = (uint32_t *) pStats;
|
||||
snr = (int8_t) *pSnr;
|
||||
} else
|
||||
snr = SNR_HACK_BMPS;
|
||||
|
||||
post_update:
|
||||
/* make sure to update the pe stats req list */
|
||||
pEntry = csr_roam_find_in_pe_stats_req_list(mac,
|
||||
pSmeStatsRsp->statsMask);
|
||||
if (pEntry) {
|
||||
pPeStaEntry = GET_BASE_ADDR(pEntry,
|
||||
struct csr_pestats_reqinfo, link);
|
||||
pPeStaEntry->rspPending = false;
|
||||
|
||||
}
|
||||
/* check the one timer cases */
|
||||
pEntry = csr_roam_check_client_req_list(mac, pSmeStatsRsp->statsMask);
|
||||
if (pEntry) {
|
||||
pTempStaEntry =
|
||||
GET_BASE_ADDR(pEntry,
|
||||
struct csr_statsclient_reqinfo, link);
|
||||
if (pTempStaEntry->timerExpired) {
|
||||
/* send up the stats report */
|
||||
csr_roam_report_statistics(mac,
|
||||
pTempStaEntry->statsMask,
|
||||
pTempStaEntry->callback,
|
||||
pTempStaEntry->staId,
|
||||
pTempStaEntry->pContext);
|
||||
/* also remove from the client list */
|
||||
csr_roam_remove_stat_list_entry(mac, pEntry);
|
||||
pTempStaEntry = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tListElem *csr_roam_find_in_pe_stats_req_list(
|
||||
struct mac_context *mac, uint32_t statsMask)
|
||||
{
|
||||
tListElem *pEntry = NULL;
|
||||
struct csr_pestats_reqinfo *pTempStaEntry = NULL;
|
||||
|
||||
pEntry = csr_ll_peek_head(&mac->roam.peStatsReqList, LL_ACCESS_LOCK);
|
||||
if (!pEntry) {
|
||||
sme_debug("List empty, no request to PE");
|
||||
return NULL;
|
||||
}
|
||||
while (pEntry) {
|
||||
pTempStaEntry = GET_BASE_ADDR(pEntry, struct csr_pestats_reqinfo, link);
|
||||
if (pTempStaEntry->statsMask == statsMask)
|
||||
break;
|
||||
pEntry =
|
||||
csr_ll_next(&mac->roam.peStatsReqList, pEntry,
|
||||
LL_ACCESS_NOLOCK);
|
||||
}
|
||||
return pEntry;
|
||||
}
|
||||
|
||||
static
|
||||
tListElem *csr_roam_checkn_update_client_req_list(
|
||||
struct mac_context *mac, struct csr_statsclient_reqinfo *pStaEntry,
|
||||
bool update)
|
||||
{
|
||||
tListElem *pEntry;
|
||||
struct csr_statsclient_reqinfo *pTempStaEntry;
|
||||
|
||||
pEntry = csr_ll_peek_head(&mac->roam.statsClientReqList,
|
||||
LL_ACCESS_LOCK);
|
||||
if (!pEntry) {
|
||||
/* list empty */
|
||||
sme_debug("List empty, no request from upper layer client(s)");
|
||||
return NULL;
|
||||
}
|
||||
while (pEntry) {
|
||||
pTempStaEntry =
|
||||
GET_BASE_ADDR(pEntry,
|
||||
struct csr_statsclient_reqinfo, link);
|
||||
if ((pTempStaEntry->requesterId == pStaEntry->requesterId)
|
||||
&& (pTempStaEntry->statsMask == pStaEntry->statsMask)) {
|
||||
if (update) {
|
||||
pTempStaEntry->callback = pStaEntry->callback;
|
||||
pTempStaEntry->pContext = pStaEntry->pContext;
|
||||
}
|
||||
break;
|
||||
}
|
||||
pEntry =
|
||||
csr_ll_next(&mac->roam.statsClientReqList, pEntry,
|
||||
LL_ACCESS_NOLOCK);
|
||||
}
|
||||
return pEntry;
|
||||
}
|
||||
|
||||
tListElem *csr_roam_check_client_req_list(struct mac_context *mac,
|
||||
uint32_t statsMask)
|
||||
{
|
||||
tListElem *pEntry;
|
||||
struct csr_statsclient_reqinfo *pTempStaEntry;
|
||||
|
||||
pEntry = csr_ll_peek_head(&mac->roam.statsClientReqList,
|
||||
LL_ACCESS_LOCK);
|
||||
if (!pEntry) {
|
||||
/* list empty */
|
||||
sme_debug("List empty, no request from upper layer client(s)");
|
||||
return NULL;
|
||||
}
|
||||
while (pEntry) {
|
||||
pTempStaEntry =
|
||||
GET_BASE_ADDR(pEntry,
|
||||
struct csr_statsclient_reqinfo, link);
|
||||
if ((pTempStaEntry->
|
||||
statsMask & ~(1 << eCsrGlobalClassDStats)) == statsMask) {
|
||||
break;
|
||||
}
|
||||
pEntry =
|
||||
csr_ll_next(&mac->roam.statsClientReqList, pEntry,
|
||||
LL_ACCESS_NOLOCK);
|
||||
}
|
||||
return pEntry;
|
||||
}
|
||||
|
||||
struct csr_statsclient_reqinfo *csr_roam_insert_entry_into_list(
|
||||
struct mac_context *mac, tDblLinkList *pStaList,
|
||||
struct csr_statsclient_reqinfo *
|
||||
pStaEntry)
|
||||
{
|
||||
struct csr_statsclient_reqinfo *pNewStaEntry = NULL;
|
||||
/*
|
||||
* if same entity requested for same set of stats with different
|
||||
* callback update it
|
||||
*/
|
||||
if (!csr_roam_checkn_update_client_req_list(mac, pStaEntry,
|
||||
true)) {
|
||||
|
||||
pNewStaEntry = qdf_mem_malloc(sizeof(struct csr_statsclient_reqinfo));
|
||||
if (!pNewStaEntry)
|
||||
return NULL;
|
||||
|
||||
pNewStaEntry->callback = pStaEntry->callback;
|
||||
pNewStaEntry->pContext = pStaEntry->pContext;
|
||||
pNewStaEntry->requesterId = pStaEntry->requesterId;
|
||||
pNewStaEntry->statsMask = pStaEntry->statsMask;
|
||||
pNewStaEntry->pPeStaEntry = pStaEntry->pPeStaEntry;
|
||||
pNewStaEntry->mac = pStaEntry->mac;
|
||||
pNewStaEntry->staId = pStaEntry->staId;
|
||||
pNewStaEntry->timerExpired = pStaEntry->timerExpired;
|
||||
|
||||
csr_ll_insert_tail(pStaList, &pNewStaEntry->link,
|
||||
LL_ACCESS_LOCK);
|
||||
}
|
||||
return pNewStaEntry;
|
||||
}
|
||||
#endif /* QCA_SUPPORT_CP_STATS */
|
||||
|
||||
QDF_STATUS csr_get_snr(struct mac_context *mac,
|
||||
tCsrSnrCallback callback,
|
||||
uint8_t staId, struct qdf_mac_addr bssId, void *pContext)
|
||||
@@ -17691,141 +17333,6 @@ QDF_STATUS csr_get_snr(struct mac_context *mac,
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
/**
|
||||
* csr_deregister_client_request() - deregisters a get stats request
|
||||
* @mac_ctx: mac global context
|
||||
* @sta_entry: stats request entry
|
||||
*
|
||||
* Return: status of operation
|
||||
*/
|
||||
static QDF_STATUS
|
||||
csr_deregister_client_request(struct mac_context *mac_ctx,
|
||||
struct csr_statsclient_reqinfo *sta_entry)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
tListElem *entry = NULL;
|
||||
struct csr_statsclient_reqinfo *ptr_sta_entry = NULL;
|
||||
|
||||
entry = csr_roam_checkn_update_client_req_list(mac_ctx, sta_entry,
|
||||
false);
|
||||
if (!entry) {
|
||||
sme_err("callback is empty in the request & couldn't find any existing request in statsClientReqList");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
/* clean up & return */
|
||||
ptr_sta_entry = GET_BASE_ADDR(entry,
|
||||
struct csr_statsclient_reqinfo, link);
|
||||
if (ptr_sta_entry->pPeStaEntry) {
|
||||
ptr_sta_entry->pPeStaEntry->numClient--;
|
||||
/* check if we need to delete the entry from peStatsReqList */
|
||||
if (!ptr_sta_entry->pPeStaEntry->numClient)
|
||||
csr_roam_remove_entry_from_pe_stats_req_list(mac_ctx,
|
||||
ptr_sta_entry->pPeStaEntry);
|
||||
}
|
||||
/* check if we need to stop the tl stats timer too */
|
||||
mac_ctx->roam.tlStatsReqInfo.numClient--;
|
||||
qdf_mc_timer_stop(&ptr_sta_entry->timer);
|
||||
/* Destroy the qdf timer... */
|
||||
status = qdf_mc_timer_destroy(&ptr_sta_entry->timer);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
sme_err(
|
||||
"failed to destroy Client req timer");
|
||||
|
||||
csr_roam_remove_stat_list_entry(mac_ctx, entry);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* csr_insert_stats_request_to_list() - inserts request to existing list
|
||||
* @mac_ctx: mac global context
|
||||
* @sta_entry: stats request entry
|
||||
*
|
||||
* Return: status of operation
|
||||
*/
|
||||
static QDF_STATUS
|
||||
csr_insert_stats_request_to_list(struct mac_context *mac_ctx,
|
||||
struct csr_statsclient_reqinfo *sta_entry)
|
||||
{
|
||||
struct csr_statsclient_reqinfo *ptr_sta_entry = csr_roam_insert_entry_into_list(
|
||||
mac_ctx, &mac_ctx->roam.statsClientReqList,
|
||||
sta_entry);
|
||||
if (!ptr_sta_entry) {
|
||||
sme_err("Failed to insert req in statsClientReqList");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS csr_get_statistics(struct mac_context *mac,
|
||||
eCsrStatsRequesterType requesterId,
|
||||
uint32_t statsMask,
|
||||
tCsrStatsCallback callback,
|
||||
uint8_t staId,
|
||||
void *pContext,
|
||||
uint8_t sessionId)
|
||||
{
|
||||
struct csr_statsclient_reqinfo staEntry;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
bool insertInClientList = false;
|
||||
uint32_t temp_mask = 0;
|
||||
|
||||
if (csr_is_all_session_disconnected(mac))
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (csr_neighbor_middle_of_roaming(mac, sessionId)) {
|
||||
sme_debug("in the middle of roaming states");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if ((!statsMask) && (!callback)) {
|
||||
sme_err("statsMask & callback empty in the request");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
/* for the search list method for deregister */
|
||||
staEntry.requesterId = requesterId;
|
||||
staEntry.statsMask = statsMask;
|
||||
/* requester wants to deregister or just an error */
|
||||
if ((statsMask) && (!callback))
|
||||
return csr_deregister_client_request(mac, &staEntry);
|
||||
|
||||
/* add the request in the client req list */
|
||||
staEntry.callback = callback;
|
||||
staEntry.pContext = pContext;
|
||||
staEntry.pPeStaEntry = NULL;
|
||||
staEntry.staId = staId;
|
||||
staEntry.mac = mac;
|
||||
staEntry.timerExpired = false;
|
||||
staEntry.sessionId = sessionId;
|
||||
|
||||
temp_mask = statsMask & ~(1 << eCsrGlobalClassDStats);
|
||||
if (temp_mask) {
|
||||
/* send down a req */
|
||||
status = csr_send_mb_stats_req_msg(mac,
|
||||
temp_mask, staId, sessionId);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
sme_err("failed to send down stats req");
|
||||
/*
|
||||
* so that when the stats rsp comes back from PE we
|
||||
* respond to upper layer right away
|
||||
*/
|
||||
staEntry.timerExpired = true;
|
||||
insertInClientList = true;
|
||||
}
|
||||
/* if looking for stats from TL only */
|
||||
if (!insertInClientList) {
|
||||
/* return the stats */
|
||||
csr_roam_report_statistics(mac, statsMask, callback,
|
||||
staId, pContext);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
if (insertInClientList)
|
||||
return csr_insert_stats_request_to_list(mac, &staEntry);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* QCA_SUPPORT_CP_STATS */
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
/**
|
||||
* csr_roam_set_key_mgmt_offload() - enable/disable key mgmt offload
|
||||
@@ -19857,188 +19364,6 @@ csr_roam_offload_scan_rsp_hdlr(struct mac_context *mac,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
/* pStaEntry is no longer invalid upon the return of this function. */
|
||||
static void csr_roam_remove_stat_list_entry(struct mac_context *mac,
|
||||
tListElem *pEntry)
|
||||
{
|
||||
if (pEntry) {
|
||||
if (csr_ll_remove_entry(&mac->roam.statsClientReqList,
|
||||
pEntry, LL_ACCESS_LOCK))
|
||||
qdf_mem_free(GET_BASE_ADDR(pEntry,
|
||||
struct csr_statsclient_reqinfo, link));
|
||||
}
|
||||
}
|
||||
|
||||
static void csr_roam_remove_entry_from_pe_stats_req_list(
|
||||
struct mac_context *mac, struct csr_pestats_reqinfo *pPeStaEntry)
|
||||
{
|
||||
tListElem *pEntry;
|
||||
struct csr_pestats_reqinfo *pTempStaEntry;
|
||||
|
||||
pEntry = csr_ll_peek_head(&mac->roam.peStatsReqList, LL_ACCESS_LOCK);
|
||||
if (!pEntry) {
|
||||
sme_err("List empty, no stats req for PE");
|
||||
return;
|
||||
}
|
||||
while (pEntry) {
|
||||
pTempStaEntry = GET_BASE_ADDR(pEntry,
|
||||
struct csr_pestats_reqinfo, link);
|
||||
if (!pTempStaEntry
|
||||
|| (pTempStaEntry->statsMask !=
|
||||
pPeStaEntry->statsMask)) {
|
||||
pEntry = csr_ll_next(&mac->roam.peStatsReqList, pEntry,
|
||||
LL_ACCESS_NOLOCK);
|
||||
continue;
|
||||
}
|
||||
sme_debug("Match found");
|
||||
if (csr_ll_remove_entry(&mac->roam.peStatsReqList, pEntry,
|
||||
LL_ACCESS_LOCK)) {
|
||||
qdf_mem_free(pTempStaEntry);
|
||||
pTempStaEntry = NULL;
|
||||
break;
|
||||
}
|
||||
pEntry = csr_ll_next(&mac->roam.peStatsReqList, pEntry,
|
||||
LL_ACCESS_NOLOCK);
|
||||
} /* end of while loop */
|
||||
}
|
||||
|
||||
static void csr_roam_report_statistics(struct mac_context *mac,
|
||||
uint32_t statsMask,
|
||||
tCsrStatsCallback callback, uint8_t staId,
|
||||
void *pContext)
|
||||
{
|
||||
uint8_t stats[500];
|
||||
uint8_t *pStats = NULL;
|
||||
uint32_t tempMask = 0;
|
||||
uint8_t counter = 0;
|
||||
|
||||
if (!callback) {
|
||||
sme_err("Cannot report callback NULL");
|
||||
return;
|
||||
}
|
||||
if (!statsMask) {
|
||||
sme_err("Cannot report statsMask is 0");
|
||||
return;
|
||||
}
|
||||
pStats = stats;
|
||||
tempMask = statsMask;
|
||||
while (tempMask) {
|
||||
if (tempMask & 1) {
|
||||
/* new stats info from PE, fill up the stats
|
||||
* strucutres in PMAC
|
||||
*/
|
||||
switch (counter) {
|
||||
case eCsrSummaryStats:
|
||||
sme_debug("Summary stats");
|
||||
qdf_mem_copy(pStats,
|
||||
(uint8_t *) &mac->roam.
|
||||
summaryStatsInfo,
|
||||
sizeof(tCsrSummaryStatsInfo));
|
||||
pStats += sizeof(tCsrSummaryStatsInfo);
|
||||
break;
|
||||
case eCsrGlobalClassAStats:
|
||||
sme_debug("ClassA stats");
|
||||
qdf_mem_copy(pStats,
|
||||
(uint8_t *) &mac->roam.
|
||||
classAStatsInfo,
|
||||
sizeof(tCsrGlobalClassAStatsInfo));
|
||||
pStats += sizeof(tCsrGlobalClassAStatsInfo);
|
||||
break;
|
||||
case eCsrGlobalClassDStats:
|
||||
sme_debug("ClassD stats");
|
||||
qdf_mem_copy(pStats,
|
||||
(uint8_t *) &mac->roam.
|
||||
classDStatsInfo,
|
||||
sizeof(tCsrGlobalClassDStatsInfo));
|
||||
pStats += sizeof(tCsrGlobalClassDStatsInfo);
|
||||
break;
|
||||
case csr_per_chain_rssi_stats:
|
||||
sme_debug("Per Chain RSSI stats");
|
||||
qdf_mem_copy(pStats,
|
||||
(uint8_t *)&mac->roam.per_chain_rssi_stats,
|
||||
sizeof(struct csr_per_chain_rssi_stats_info));
|
||||
pStats += sizeof(
|
||||
struct csr_per_chain_rssi_stats_info);
|
||||
break;
|
||||
default:
|
||||
sme_err(
|
||||
"Unknown stats type and counter %d",
|
||||
counter);
|
||||
break;
|
||||
}
|
||||
}
|
||||
tempMask >>= 1;
|
||||
counter++;
|
||||
}
|
||||
callback(stats, pContext);
|
||||
}
|
||||
|
||||
static QDF_STATUS csr_roam_dereg_statistics_req(
|
||||
struct mac_context *mac)
|
||||
{
|
||||
tListElem *pEntry = NULL;
|
||||
tListElem *pPrevEntry = NULL;
|
||||
struct csr_statsclient_reqinfo *pTempStaEntry = NULL;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
pEntry = csr_ll_peek_head(&mac->roam.statsClientReqList,
|
||||
LL_ACCESS_LOCK);
|
||||
if (!pEntry) {
|
||||
/* list empty */
|
||||
sme_debug("List empty, no request from upper layer client(s)");
|
||||
return status;
|
||||
}
|
||||
while (pEntry) {
|
||||
if (pPrevEntry) {
|
||||
pTempStaEntry =
|
||||
GET_BASE_ADDR(pPrevEntry,
|
||||
struct csr_statsclient_reqinfo, link);
|
||||
/* send up the stats report */
|
||||
csr_roam_report_statistics(mac,
|
||||
pTempStaEntry->statsMask,
|
||||
pTempStaEntry->callback,
|
||||
pTempStaEntry->staId,
|
||||
pTempStaEntry->pContext);
|
||||
csr_roam_remove_stat_list_entry(mac, pPrevEntry);
|
||||
}
|
||||
pTempStaEntry =
|
||||
GET_BASE_ADDR(pEntry, struct csr_statsclient_reqinfo, link);
|
||||
if (pTempStaEntry->pPeStaEntry) {
|
||||
/* pPeStaEntry can be NULL */
|
||||
pTempStaEntry->pPeStaEntry->numClient--;
|
||||
/* check if we need to delete the entry from
|
||||
* peStatsReqList too
|
||||
*/
|
||||
if (!pTempStaEntry->pPeStaEntry->numClient) {
|
||||
csr_roam_remove_entry_from_pe_stats_req_list(
|
||||
mac,
|
||||
pTempStaEntry->
|
||||
pPeStaEntry);
|
||||
}
|
||||
}
|
||||
/* check if we need to stop the tl stats timer too */
|
||||
mac->roam.tlStatsReqInfo.numClient--;
|
||||
pPrevEntry = pEntry;
|
||||
pEntry = csr_ll_next(&mac->roam.statsClientReqList, pEntry,
|
||||
LL_ACCESS_NOLOCK);
|
||||
}
|
||||
/* the last one */
|
||||
if (pPrevEntry) {
|
||||
pTempStaEntry =
|
||||
GET_BASE_ADDR(pPrevEntry, struct csr_statsclient_reqinfo, link);
|
||||
/* send up the stats report */
|
||||
csr_roam_report_statistics(mac, pTempStaEntry->statsMask,
|
||||
pTempStaEntry->callback,
|
||||
pTempStaEntry->staId,
|
||||
pTempStaEntry->pContext);
|
||||
csr_roam_remove_stat_list_entry(mac, pPrevEntry);
|
||||
}
|
||||
return status;
|
||||
|
||||
}
|
||||
#endif /* QCA_SUPPORT_CP_STATS */
|
||||
|
||||
tSmeCmd *csr_get_command_buffer(struct mac_context *mac)
|
||||
{
|
||||
tSmeCmd *pCmd = sme_get_command_buffer(mac);
|
||||
|
@@ -62,12 +62,6 @@ QDF_STATUS csr_msg_processor(struct mac_context *mac_ctx, void *msg_buf)
|
||||
break;
|
||||
|
||||
default:
|
||||
if (sme_rsp->messageType ==
|
||||
eWNI_SME_GET_STATISTICS_RSP) {
|
||||
csr_roam_joined_state_msg_processor(mac_ctx,
|
||||
msg_buf);
|
||||
break;
|
||||
}
|
||||
|
||||
if (sme_rsp->messageType ==
|
||||
eWNI_SME_UPPER_LAYER_ASSOC_CNF) {
|
||||
|
@@ -248,13 +248,6 @@ csr_roam_save_connected_information(struct mac_context *mac,
|
||||
void csr_roam_check_for_link_status_change(struct mac_context *mac,
|
||||
tSirSmeRsp *pSirMsg);
|
||||
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
void csr_roam_stats_rsp_processor(struct mac_context *mac, tSirSmeRsp *pSirMsg);
|
||||
#else
|
||||
static inline void csr_roam_stats_rsp_processor(struct mac_context *mac,
|
||||
tSirSmeRsp *pSirMsg) {}
|
||||
#endif /* QCA_SUPPORT_CP_STATS */
|
||||
|
||||
QDF_STATUS csr_roam_issue_start_bss(struct mac_context *mac, uint32_t sessionId,
|
||||
struct csr_roamstart_bssparams *pParam,
|
||||
struct csr_roam_profile *pProfile,
|
||||
|
@@ -1019,13 +1019,6 @@ int32_t wma_txrx_fw_stats_reset(tp_wma_handle wma_handle,
|
||||
int32_t wma_set_txrx_fw_stats_level(tp_wma_handle wma_handle,
|
||||
uint8_t vdev_id, uint32_t value);
|
||||
|
||||
#ifdef QCA_SUPPORT_CP_STATS
|
||||
static inline void wma_get_stats_req(WMA_HANDLE handle,
|
||||
struct sAniGetPEStatsReq *get_stats_param) {}
|
||||
#else
|
||||
void wma_get_stats_req(WMA_HANDLE handle,
|
||||
struct sAniGetPEStatsReq *get_stats_param);
|
||||
#endif
|
||||
/*
|
||||
* wma_features.c functions declarations
|
||||
*/
|
||||
|
@@ -186,9 +186,6 @@
|
||||
#define WMA_ENABLE_UAPSD_REQ SIR_HAL_ENABLE_UAPSD_REQ
|
||||
#define WMA_DISABLE_UAPSD_REQ SIR_HAL_DISABLE_UAPSD_REQ
|
||||
|
||||
/* / PE <-> HAL statistics messages */
|
||||
#define WMA_GET_STATISTICS_REQ SIR_HAL_GET_STATISTICS_REQ
|
||||
#define WMA_GET_STATISTICS_RSP SIR_HAL_GET_STATISTICS_RSP
|
||||
#define WMA_SET_KEY_DONE SIR_HAL_SET_KEY_DONE
|
||||
|
||||
/* / PE <-> HAL BTC messages */
|
||||
|
@@ -8646,10 +8646,6 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
break;
|
||||
#endif
|
||||
case WMA_GET_STATISTICS_REQ:
|
||||
wma_get_stats_req(wma_handle,
|
||||
(tAniGetPEStatsReq *) msg->bodyptr);
|
||||
break;
|
||||
|
||||
case WMA_UPDATE_OP_MODE:
|
||||
wma_process_update_opmode(wma_handle,
|
||||
|
@@ -2648,21 +2648,6 @@ static void wma_update_vdev_stats(tp_wma_handle wma,
|
||||
wma_vdev_stats_lost_link_helper(wma, vdev_stats);
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_post_stats() - update stats to PE
|
||||
* @wma: wma handle
|
||||
* @node: txrx node
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static void wma_post_stats(tp_wma_handle wma, struct wma_txrx_node *node)
|
||||
{
|
||||
/* send response to UMAC */
|
||||
wma_send_msg(wma, WMA_GET_STATISTICS_RSP, node->stats_rsp, 0);
|
||||
node->stats_rsp = NULL;
|
||||
node->fw_stats_set = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_update_peer_stats() - update peer stats
|
||||
* @wma: wma handle
|
||||
@@ -3222,12 +3207,6 @@ int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < wma->max_bssid; i++) {
|
||||
node = &wma->interfaces[i];
|
||||
if (node->fw_stats_set & FW_PEER_STATS_SET)
|
||||
wma_post_stats(wma, node);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* QCA_SUPPORT_CP_STATS */
|
||||
@@ -3754,129 +3733,6 @@ int32_t wma_set_txrx_fw_stats_level(tp_wma_handle wma_handle,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
/**
|
||||
* wma_get_stats_rsp_buf() - fill get stats response buffer
|
||||
* @get_stats_param: get stats parameters
|
||||
*
|
||||
* Return: stats response buffer
|
||||
*/
|
||||
static tAniGetPEStatsRsp *wma_get_stats_rsp_buf
|
||||
(tAniGetPEStatsReq *get_stats_param)
|
||||
{
|
||||
tAniGetPEStatsRsp *stats_rsp_params;
|
||||
uint32_t len, temp_mask;
|
||||
|
||||
len = sizeof(tAniGetPEStatsRsp);
|
||||
temp_mask = get_stats_param->statsMask;
|
||||
|
||||
if (temp_mask & (1 << eCsrSummaryStats))
|
||||
len += sizeof(tCsrSummaryStatsInfo);
|
||||
|
||||
if (temp_mask & (1 << eCsrGlobalClassAStats))
|
||||
len += sizeof(tCsrGlobalClassAStatsInfo);
|
||||
|
||||
if (temp_mask & (1 << eCsrGlobalClassDStats))
|
||||
len += sizeof(tCsrGlobalClassDStatsInfo);
|
||||
|
||||
if (temp_mask & (1 << csr_per_chain_rssi_stats))
|
||||
len += sizeof(struct csr_per_chain_rssi_stats_info);
|
||||
|
||||
stats_rsp_params = qdf_mem_malloc(len);
|
||||
if (!stats_rsp_params) {
|
||||
QDF_ASSERT(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
stats_rsp_params->staId = get_stats_param->staId;
|
||||
stats_rsp_params->statsMask = get_stats_param->statsMask;
|
||||
stats_rsp_params->msgType = WMA_GET_STATISTICS_RSP;
|
||||
stats_rsp_params->msgLen = len - sizeof(tAniGetPEStatsRsp);
|
||||
stats_rsp_params->rc = QDF_STATUS_SUCCESS;
|
||||
return stats_rsp_params;
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_get_stats_req() - get stats request
|
||||
* @handle: wma handle
|
||||
* @get_stats_param: stats params
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void wma_get_stats_req(WMA_HANDLE handle,
|
||||
tAniGetPEStatsReq *get_stats_param)
|
||||
{
|
||||
tp_wma_handle wma_handle = (tp_wma_handle) handle;
|
||||
struct wma_txrx_node *node;
|
||||
struct stats_request_params cmd = {0};
|
||||
tAniGetPEStatsRsp *pGetPEStatsRspParams;
|
||||
|
||||
|
||||
WMA_LOGD("%s: Enter", __func__);
|
||||
node = &wma_handle->interfaces[get_stats_param->sessionId];
|
||||
if (node->stats_rsp) {
|
||||
pGetPEStatsRspParams = node->stats_rsp;
|
||||
if (pGetPEStatsRspParams->staId == get_stats_param->staId &&
|
||||
pGetPEStatsRspParams->statsMask ==
|
||||
get_stats_param->statsMask) {
|
||||
WMA_LOGD("Stats for staId %d with stats mask %d is pending.. ignore new request",
|
||||
get_stats_param->staId,
|
||||
get_stats_param->statsMask);
|
||||
pGetPEStatsRspParams =
|
||||
wma_get_stats_rsp_buf(get_stats_param);
|
||||
if (!pGetPEStatsRspParams) {
|
||||
WMA_LOGE("failed to allocate memory for stats response");
|
||||
goto end;
|
||||
}
|
||||
goto req_pending;
|
||||
} else {
|
||||
qdf_mem_free(node->stats_rsp);
|
||||
node->stats_rsp = NULL;
|
||||
node->fw_stats_set = 0;
|
||||
}
|
||||
}
|
||||
|
||||
pGetPEStatsRspParams = wma_get_stats_rsp_buf(get_stats_param);
|
||||
if (!pGetPEStatsRspParams)
|
||||
goto end;
|
||||
|
||||
node->fw_stats_set = 0;
|
||||
if (node->stats_rsp) {
|
||||
WMA_LOGD(FL("stats_rsp is not null, prev_value: %pK"),
|
||||
node->stats_rsp);
|
||||
qdf_mem_free(node->stats_rsp);
|
||||
node->stats_rsp = NULL;
|
||||
}
|
||||
node->stats_rsp = pGetPEStatsRspParams;
|
||||
wma_handle->get_sta_peer_info = false;
|
||||
WMA_LOGD("stats_rsp allocated: %pK, sta_id: %d, mask: %d, vdev_id: %d",
|
||||
node->stats_rsp, node->stats_rsp->staId,
|
||||
node->stats_rsp->statsMask, get_stats_param->sessionId);
|
||||
|
||||
cmd.vdev_id = get_stats_param->sessionId;
|
||||
cmd.stats_id = get_stats_param->statsMask;
|
||||
if (wmi_unified_stats_request_send(wma_handle->wmi_handle,
|
||||
node->bssid,
|
||||
&cmd)) {
|
||||
WMA_LOGE("%s: Failed to send WMI_REQUEST_STATS_CMDID",
|
||||
__func__);
|
||||
goto failed;
|
||||
}
|
||||
|
||||
goto end;
|
||||
failed:
|
||||
node->stats_rsp = NULL;
|
||||
req_pending:
|
||||
pGetPEStatsRspParams->rc = QDF_STATUS_E_FAILURE;
|
||||
/* send response to UMAC */
|
||||
wma_send_msg(wma_handle, WMA_GET_STATISTICS_RSP, pGetPEStatsRspParams,
|
||||
0);
|
||||
end:
|
||||
qdf_mem_free(get_stats_param);
|
||||
WMA_LOGD("%s: Exit", __func__);
|
||||
}
|
||||
#endif /* QCA_SUPPORT_CP_STATS */
|
||||
|
||||
/**
|
||||
* wma_get_cca_stats() - send request to fw to get CCA
|
||||
* @wma_handle: wma handle
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur