qcacld-3.0: Add support of request peer stats info(part 2)
qcacld-2.0 to qcacld-3.0 propagation FW has limitation to support old WMI_REQUEST_STATS_CMDID and WMI_UPDATE_STATS_EVENTID interface on AP vDev. FW suggest to use new WMI_REQUEST_PEER_STATS_INFO_CMDID and WMI_PEER_STATS_INFO_EVENTID to get tx/rx rate. This checkin is about LIM/SME/SAP layer, provide SME APIs/callbacks to HDD layer to get SAP's peer station tx/rx related information, fill these information from wma layer get-peer-stat-info APIs and peer station's association request frame. It also fixed function csr_send_assoc_ind_to_upper_layer_cnf_msg when copy information between different structures and using offset style. Change-Id: Icb1aaa126663af7eaedd1c4db86ca25c40ce6ee9 CRs-Fixed: 2051628
This commit is contained in:

committad av
snandini

förälder
57ce4dfde2
incheckning
558f8085c4
@@ -1450,6 +1450,17 @@ typedef struct tagCsrRoamInfo {
|
||||
tDot11fIEVHTOperation vht_operation;
|
||||
tDot11fIEHTInfo ht_operation;
|
||||
bool reassoc;
|
||||
bool ampdu;
|
||||
bool sgi_enable;
|
||||
bool tx_stbc;
|
||||
bool rx_stbc;
|
||||
tSirMacHTChannelWidth ch_width;
|
||||
enum sir_sme_phy_mode mode;
|
||||
uint8_t max_supp_idx;
|
||||
uint8_t max_ext_idx;
|
||||
uint8_t max_mcs_idx;
|
||||
uint8_t rx_mcs_map;
|
||||
uint8_t tx_mcs_map;
|
||||
} tCsrRoamInfo;
|
||||
|
||||
typedef struct tagCsrFreqScanInfo {
|
||||
@@ -1477,6 +1488,17 @@ typedef struct sSirSmeAssocIndToUpperLayerCnf {
|
||||
uint8_t timingMeasCap;
|
||||
tSirSmeChanInfo chan_info;
|
||||
uint8_t target_channel;
|
||||
bool ampdu;
|
||||
bool sgi_enable;
|
||||
bool tx_stbc;
|
||||
tSirMacHTChannelWidth ch_width;
|
||||
enum sir_sme_phy_mode mode;
|
||||
bool rx_stbc;
|
||||
uint8_t max_supp_idx;
|
||||
uint8_t max_ext_idx;
|
||||
uint8_t max_mcs_idx;
|
||||
uint8_t rx_mcs_map;
|
||||
uint8_t tx_mcs_map;
|
||||
} tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf;
|
||||
|
||||
typedef struct tagCsrSummaryStatsInfo {
|
||||
|
@@ -1627,4 +1627,37 @@ int sme_cli_set_command(int vdev_id, int param_id, int sval, int vpdev);
|
||||
QDF_STATUS sme_set_bt_activity_info_cb(tHalHandle hal,
|
||||
void (*cb)(void *, uint32_t profile_info));
|
||||
|
||||
/**
|
||||
* sme_get_peer_info() - sme api to get peer info
|
||||
* @hal: hal handle for getting global mac struct
|
||||
* @req: peer info request struct send to wma
|
||||
* @context: context of callback function
|
||||
* @callbackfn: hdd callback function when receive response
|
||||
*
|
||||
* This function will send WMA_GET_PEER_INFO to WMA
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS or non-zero on failure
|
||||
*/
|
||||
QDF_STATUS sme_get_peer_info(tHalHandle hal,
|
||||
struct sir_peer_info_req req,
|
||||
void *context,
|
||||
void (*callbackfn)(struct sir_peer_info_resp *param,
|
||||
void *pcontext));
|
||||
|
||||
/**
|
||||
* sme_get_peer_info_ext() - sme api to get peer ext info
|
||||
* @hal: hal handle for getting global mac struct
|
||||
* @req: peer ext info request struct send to wma
|
||||
* @context: context of callback function
|
||||
* @callbackfn: hdd callback function when receive response
|
||||
*
|
||||
* This function will send WMA_GET_PEER_INFO_EXT to WMA
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS or non-zero on failure
|
||||
*/
|
||||
QDF_STATUS sme_get_peer_info_ext(tHalHandle hal,
|
||||
struct sir_peer_info_ext_req *req,
|
||||
void *context,
|
||||
void (*callbackfn)(struct sir_peer_info_ext_resp *param,
|
||||
void *pcontext));
|
||||
#endif /* #if !defined( __SME_API_H ) */
|
||||
|
@@ -197,6 +197,14 @@ typedef struct tagSmeStruct {
|
||||
void (*pLinkSpeedIndCb)(tSirLinkSpeedInfo *indParam,
|
||||
void *pDevContext);
|
||||
void *pLinkSpeedCbContext;
|
||||
/* get peer info callback */
|
||||
void (*pget_peer_info_ind_cb)(struct sir_peer_info_resp *param,
|
||||
void *pcontext);
|
||||
void *pget_peer_info_cb_context;
|
||||
/* get extended peer info callback */
|
||||
void (*pget_peer_info_ext_ind_cb)(struct sir_peer_info_ext_resp *param,
|
||||
void *pcontext);
|
||||
void *pget_peer_info_ext_cb_context;
|
||||
#ifdef FEATURE_WLAN_EXTSCAN
|
||||
void (*pExtScanIndCb)(void *, const uint16_t, void *);
|
||||
#endif /* FEATURE_WLAN_EXTSCAN */
|
||||
|
@@ -2413,6 +2413,18 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, struct scheduler_msg *pMsg)
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case eWNI_SME_GET_PEER_INFO_IND:
|
||||
if (pMac->sme.pget_peer_info_ind_cb)
|
||||
pMac->sme.pget_peer_info_ind_cb(pMsg->bodyptr,
|
||||
pMac->sme.pget_peer_info_cb_context);
|
||||
qdf_mem_free(pMsg->bodyptr);
|
||||
break;
|
||||
case eWNI_SME_GET_PEER_INFO_EXT_IND:
|
||||
if (pMac->sme.pget_peer_info_ext_ind_cb)
|
||||
pMac->sme.pget_peer_info_ext_ind_cb(pMsg->bodyptr,
|
||||
pMac->sme.pget_peer_info_ext_cb_context);
|
||||
qdf_mem_free(pMsg->bodyptr);
|
||||
break;
|
||||
case eWNI_SME_CSA_OFFLOAD_EVENT:
|
||||
if (pMsg->bodyptr) {
|
||||
csr_scan_flush_bss_entry(pMac, pMsg->bodyptr);
|
||||
@@ -9686,6 +9698,100 @@ QDF_STATUS sme_get_link_speed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq,
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS sme_get_peer_info(tHalHandle hal, struct sir_peer_info_req req,
|
||||
void *context,
|
||||
void (*callbackfn)(struct sir_peer_info_resp *param,
|
||||
void *pcontext))
|
||||
{
|
||||
|
||||
QDF_STATUS status;
|
||||
QDF_STATUS qdf_status;
|
||||
tpAniSirGlobal mac = PMAC_STRUCT(hal);
|
||||
struct scheduler_msg message;
|
||||
|
||||
status = sme_acquire_global_lock(&mac->sme);
|
||||
if (QDF_STATUS_SUCCESS == status) {
|
||||
if (NULL == callbackfn) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Indication Call back is NULL",
|
||||
__func__);
|
||||
sme_release_global_lock(&mac->sme);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
mac->sme.pget_peer_info_ind_cb = callbackfn;
|
||||
mac->sme.pget_peer_info_cb_context = context;
|
||||
|
||||
/* serialize the req through MC thread */
|
||||
message.bodyptr = qdf_mem_malloc(sizeof(req));
|
||||
if (NULL == message.bodyptr) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Memory allocation failed.", __func__);
|
||||
sme_release_global_lock(&mac->sme);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
qdf_mem_copy(message.bodyptr, &req, sizeof(req));
|
||||
message.type = WMA_GET_PEER_INFO;
|
||||
qdf_status = scheduler_post_msg(QDF_MODULE_ID_WMA, &message);
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Post get peer info msg fail", __func__);
|
||||
qdf_mem_free(message.bodyptr);
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
sme_release_global_lock(&mac->sme);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS sme_get_peer_info_ext(tHalHandle hal,
|
||||
struct sir_peer_info_ext_req *req,
|
||||
void *context,
|
||||
void (*callbackfn)(struct sir_peer_info_ext_resp *param,
|
||||
void *pcontext))
|
||||
{
|
||||
QDF_STATUS status;
|
||||
QDF_STATUS qdf_status;
|
||||
tpAniSirGlobal mac = PMAC_STRUCT(hal);
|
||||
struct scheduler_msg message;
|
||||
|
||||
status = sme_acquire_global_lock(&mac->sme);
|
||||
if (QDF_STATUS_SUCCESS == status) {
|
||||
if (NULL == callbackfn) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Indication Call back is NULL",
|
||||
__func__);
|
||||
sme_release_global_lock(&mac->sme);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
mac->sme.pget_peer_info_ext_ind_cb = callbackfn;
|
||||
mac->sme.pget_peer_info_ext_cb_context = context;
|
||||
|
||||
/* serialize the req through MC thread */
|
||||
message.bodyptr =
|
||||
qdf_mem_malloc(sizeof(struct sir_peer_info_ext_req));
|
||||
if (NULL == message.bodyptr) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Memory allocation failed.", __func__);
|
||||
sme_release_global_lock(&mac->sme);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
qdf_mem_copy(message.bodyptr,
|
||||
req,
|
||||
sizeof(struct sir_peer_info_ext_req));
|
||||
message.type = WMA_GET_PEER_INFO_EXT;
|
||||
qdf_status = scheduler_post_msg(QDF_MODULE_ID_WMA, &message);
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Post get rssi msg fail", __func__);
|
||||
qdf_mem_free(message.bodyptr);
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
sme_release_global_lock(&mac->sme);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* SME API to enable/disable WLAN driver initiated SSR
|
||||
|
@@ -9852,6 +9852,17 @@ void csr_roam_joined_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf)
|
||||
qdf_mem_copy(&pRoamInfo->chan_info,
|
||||
&pUpperLayerAssocCnf->chan_info,
|
||||
sizeof(tSirSmeChanInfo));
|
||||
pRoamInfo->ampdu = pUpperLayerAssocCnf->ampdu;
|
||||
pRoamInfo->sgi_enable = pUpperLayerAssocCnf->sgi_enable;
|
||||
pRoamInfo->tx_stbc = pUpperLayerAssocCnf->tx_stbc;
|
||||
pRoamInfo->tx_stbc = pUpperLayerAssocCnf->rx_stbc;
|
||||
pRoamInfo->ch_width = pUpperLayerAssocCnf->ch_width;
|
||||
pRoamInfo->mode = pUpperLayerAssocCnf->mode;
|
||||
pRoamInfo->max_supp_idx = pUpperLayerAssocCnf->max_supp_idx;
|
||||
pRoamInfo->max_ext_idx = pUpperLayerAssocCnf->max_ext_idx;
|
||||
pRoamInfo->max_mcs_idx = pUpperLayerAssocCnf->max_mcs_idx;
|
||||
pRoamInfo->rx_mcs_map = pUpperLayerAssocCnf->rx_mcs_map;
|
||||
pRoamInfo->tx_mcs_map = pUpperLayerAssocCnf->tx_mcs_map;
|
||||
if (CSR_IS_INFRA_AP(pRoamInfo->u.pConnectedProfile)) {
|
||||
pMac->roam.roamSession[sessionId].connectState =
|
||||
eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED;
|
||||
@@ -15171,54 +15182,90 @@ QDF_STATUS csr_send_assoc_ind_to_upper_layer_cnf_msg(tpAniSirGlobal pMac,
|
||||
else
|
||||
statusCode = eSIR_SME_ASSOC_REFUSED;
|
||||
qdf_mem_copy(pBuf, &statusCode, sizeof(tSirResultCodes));
|
||||
pBuf += sizeof(tSirResultCodes);
|
||||
/* bssId */
|
||||
qdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->bssId,
|
||||
sizeof(tSirMacAddr));
|
||||
pBuf += sizeof(tSirMacAddr);
|
||||
pBuf = (uint8_t *)&pMsg->bssId;
|
||||
qdf_mem_copy((tSirMacAddr *)pBuf, pAssocInd->bssId,
|
||||
sizeof(tSirMacAddr));
|
||||
/* peerMacAddr */
|
||||
qdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->peerMacAddr,
|
||||
sizeof(tSirMacAddr));
|
||||
pBuf += sizeof(tSirMacAddr);
|
||||
pBuf = (uint8_t *)&pMsg->peerMacAddr;
|
||||
qdf_mem_copy((tSirMacAddr *)pBuf, pAssocInd->peerMacAddr,
|
||||
sizeof(tSirMacAddr));
|
||||
/* StaId */
|
||||
pBuf = (uint8_t *)&pMsg->aid;
|
||||
wTmp = pAssocInd->staId;
|
||||
qdf_mem_copy(pBuf, &wTmp, sizeof(uint16_t));
|
||||
pBuf += sizeof(uint16_t);
|
||||
/* alternateBssId */
|
||||
qdf_mem_copy((tSirMacAddr *) pBuf, pAssocInd->bssId,
|
||||
sizeof(tSirMacAddr));
|
||||
pBuf += sizeof(tSirMacAddr);
|
||||
pBuf = (uint8_t *)&pMsg->alternateBssId;
|
||||
qdf_mem_copy((tSirMacAddr *)pBuf, pAssocInd->bssId,
|
||||
sizeof(tSirMacAddr));
|
||||
/* alternateChannelId */
|
||||
pBuf = (uint8_t *)&pMsg->alternateChannelId;
|
||||
*pBuf = 11;
|
||||
pBuf += sizeof(uint8_t);
|
||||
/* Instead of copying roam Info, we just copy only WmmEnabled,
|
||||
* RsnIE information
|
||||
/*
|
||||
* Instead of copying roam Info,just copy WmmEnabled,
|
||||
* RsnIE information.
|
||||
* Wmm
|
||||
*/
|
||||
/* Wmm */
|
||||
pBuf = (uint8_t *)&pMsg->wmmEnabledSta;
|
||||
*pBuf = pAssocInd->wmmEnabledSta;
|
||||
pBuf += sizeof(uint8_t);
|
||||
/* RSN IE */
|
||||
qdf_mem_copy((tSirRSNie *) pBuf, &pAssocInd->rsnIE,
|
||||
sizeof(tSirRSNie));
|
||||
pBuf += sizeof(tSirRSNie);
|
||||
pBuf = (uint8_t *)&pMsg->rsnIE;
|
||||
qdf_mem_copy((tSirRSNie *)pBuf, &pAssocInd->rsnIE,
|
||||
sizeof(tSirRSNie));
|
||||
#ifdef FEATURE_WLAN_WAPI
|
||||
/* WAPI IE */
|
||||
qdf_mem_copy((tSirWAPIie *) pBuf, &pAssocInd->wapiIE,
|
||||
sizeof(tSirWAPIie));
|
||||
pBuf += sizeof(tSirWAPIie);
|
||||
pBuf = (uint8_t *)&pMsg->wapiIE;
|
||||
qdf_mem_copy((tSirWAPIie *)pBuf, &pAssocInd->wapiIE,
|
||||
sizeof(tSirWAPIie));
|
||||
#endif
|
||||
/* Additional IE */
|
||||
qdf_mem_copy((void *)pBuf, &pAssocInd->addIE,
|
||||
sizeof(tSirAddie));
|
||||
pBuf += sizeof(tSirAddie);
|
||||
pBuf = (uint8_t *)&pMsg->addIE;
|
||||
qdf_mem_copy((tSirAddie *)pBuf, &pAssocInd->addIE,
|
||||
sizeof(tSirAddie));
|
||||
/* reassocReq */
|
||||
pBuf = (uint8_t *)&pMsg->reassocReq;
|
||||
*pBuf = pAssocInd->reassocReq;
|
||||
pBuf += sizeof(uint8_t);
|
||||
/* timingMeasCap */
|
||||
pBuf = (uint8_t *)&pMsg->timingMeasCap;
|
||||
*pBuf = pAssocInd->timingMeasCap;
|
||||
pBuf += sizeof(uint8_t);
|
||||
/* chan_info */
|
||||
pBuf = (uint8_t *)&pMsg->chan_info;
|
||||
qdf_mem_copy((void *)pBuf, &pAssocInd->chan_info,
|
||||
sizeof(tSirSmeChanInfo));
|
||||
sizeof(tSirSmeChanInfo));
|
||||
/* ampdu */
|
||||
pBuf = (uint8_t *)&pMsg->ampdu;
|
||||
*((bool *)pBuf) = pAssocInd->ampdu;
|
||||
/* sgi_enable */
|
||||
pBuf = (uint8_t *)&pMsg->sgi_enable;
|
||||
*((bool *)pBuf) = pAssocInd->sgi_enable;
|
||||
/* tx stbc */
|
||||
pBuf = (uint8_t *)&pMsg->tx_stbc;
|
||||
*((bool *)pBuf) = pAssocInd->tx_stbc;
|
||||
/* ch_width */
|
||||
pBuf = (uint8_t *)&pMsg->ch_width;
|
||||
*((tSirMacHTChannelWidth *)pBuf) = pAssocInd->ch_width;
|
||||
/* mode */
|
||||
pBuf = (uint8_t *)&pMsg->mode;
|
||||
*((enum sir_sme_phy_mode *)pBuf) = pAssocInd->mode;
|
||||
/* rx stbc */
|
||||
pBuf = (uint8_t *)&pMsg->rx_stbc;
|
||||
*((bool *)pBuf) = pAssocInd->rx_stbc;
|
||||
/* max supported idx */
|
||||
pBuf = (uint8_t *)&pMsg->max_supp_idx;
|
||||
*pBuf = pAssocInd->max_supp_idx;
|
||||
/* max extended idx */
|
||||
pBuf = (uint8_t *)&pMsg->max_ext_idx;
|
||||
*pBuf = pAssocInd->max_ext_idx;
|
||||
/* max ht mcs idx */
|
||||
pBuf = (uint8_t *)&pMsg->max_mcs_idx;
|
||||
*pBuf = pAssocInd->max_mcs_idx;
|
||||
/* vht rx mcs map */
|
||||
pBuf = (uint8_t *)&pMsg->rx_mcs_map;
|
||||
*pBuf = pAssocInd->rx_mcs_map;
|
||||
/* vht tx mcs map */
|
||||
pBuf = (uint8_t *)&pMsg->tx_mcs_map;
|
||||
*pBuf = pAssocInd->tx_mcs_map;
|
||||
|
||||
msgQ.type = eWNI_SME_UPPER_LAYER_ASSOC_CNF;
|
||||
msgQ.bodyptr = pMsg;
|
||||
msgQ.bodyval = 0;
|
||||
|
Referens i nytt ärende
Block a user