|
@@ -132,22 +132,22 @@ int8_t rrm_get_mgmt_tx_power(tpAniSirGlobal pMac, tpPESession pSessionEntry)
|
|
|
* @param pSessionEntry session entry.
|
|
|
* @return None
|
|
|
*/
|
|
|
-tSirRetStatus
|
|
|
+QDF_STATUS
|
|
|
rrm_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower,
|
|
|
tpPESession pSessionEntry)
|
|
|
{
|
|
|
tpMaxTxPowerParams pMaxTxParams;
|
|
|
- tSirRetStatus retCode = eSIR_SUCCESS;
|
|
|
+ QDF_STATUS retCode = QDF_STATUS_SUCCESS;
|
|
|
struct scheduler_msg msgQ = {0};
|
|
|
|
|
|
if (pSessionEntry == NULL) {
|
|
|
pe_err("Invalid parameters");
|
|
|
- return eSIR_FAILURE;
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
pMaxTxParams = qdf_mem_malloc(sizeof(tMaxTxPowerParams));
|
|
|
if (NULL == pMaxTxParams) {
|
|
|
pe_err("Unable to allocate memory for pMaxTxParams");
|
|
|
- return eSIR_MEM_ALLOC_FAILED;
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
|
|
|
}
|
|
|
/* Allocated memory for pMaxTxParams...will be freed in other module */
|
|
@@ -168,7 +168,7 @@ rrm_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower,
|
|
|
|
|
|
MTRACE(mac_trace_msg_tx(pMac, pSessionEntry->peSessionId, msgQ.type));
|
|
|
retCode = wma_post_ctrl_msg(pMac, &msgQ);
|
|
|
- if (eSIR_SUCCESS != retCode) {
|
|
|
+ if (QDF_STATUS_SUCCESS != retCode) {
|
|
|
pe_err("Posting WMA_SET_MAX_TX_POWER_REQ to HAL failed, reason=%X",
|
|
|
retCode);
|
|
|
qdf_mem_free(pMaxTxParams);
|
|
@@ -193,10 +193,10 @@ rrm_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower,
|
|
|
* @param pSessionEntry session entry.
|
|
|
* @return None
|
|
|
*/
|
|
|
-tSirRetStatus rrm_set_max_tx_power_rsp(tpAniSirGlobal pMac,
|
|
|
- struct scheduler_msg *limMsgQ)
|
|
|
+QDF_STATUS rrm_set_max_tx_power_rsp(tpAniSirGlobal pMac,
|
|
|
+ struct scheduler_msg *limMsgQ)
|
|
|
{
|
|
|
- tSirRetStatus retCode = eSIR_SUCCESS;
|
|
|
+ QDF_STATUS retCode = QDF_STATUS_SUCCESS;
|
|
|
tpMaxTxPowerParams pMaxTxParams = (tpMaxTxPowerParams) limMsgQ->bodyptr;
|
|
|
tpPESession pSessionEntry;
|
|
|
uint8_t sessionId, i;
|
|
@@ -214,7 +214,7 @@ tSirRetStatus rrm_set_max_tx_power_rsp(tpAniSirGlobal pMac,
|
|
|
pMaxTxParams->bssId.bytes,
|
|
|
&sessionId);
|
|
|
if (pSessionEntry == NULL) {
|
|
|
- retCode = eSIR_FAILURE;
|
|
|
+ retCode = QDF_STATUS_E_FAILURE;
|
|
|
} else {
|
|
|
rrm_cache_mgmt_tx_power(pMac, pMaxTxParams->power,
|
|
|
pSessionEntry);
|
|
@@ -243,7 +243,7 @@ tSirRetStatus rrm_set_max_tx_power_rsp(tpAniSirGlobal pMac,
|
|
|
* @param pSessionEntry session entry.
|
|
|
* @return None
|
|
|
*/
|
|
|
-tSirRetStatus
|
|
|
+QDF_STATUS
|
|
|
rrm_process_link_measurement_request(tpAniSirGlobal pMac,
|
|
|
uint8_t *pRxPacketInfo,
|
|
|
tDot11fLinkMeasurementRequest *pLinkReq,
|
|
@@ -257,7 +257,7 @@ rrm_process_link_measurement_request(tpAniSirGlobal pMac,
|
|
|
|
|
|
if (pRxPacketInfo == NULL || pLinkReq == NULL || pSessionEntry == NULL) {
|
|
|
pe_err("Invalid parameters - Ignoring the request");
|
|
|
- return eSIR_FAILURE;
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
pHdr = WMA_GET_RX_MAC_HEADER(pRxPacketInfo);
|
|
|
|
|
@@ -267,7 +267,7 @@ rrm_process_link_measurement_request(tpAniSirGlobal pMac,
|
|
|
nTxPowerCap);
|
|
|
|
|
|
if ((LinkReport.txPower != (uint8_t) (pSessionEntry->maxTxPower)) &&
|
|
|
- (eSIR_SUCCESS == rrm_send_set_max_tx_power_req(pMac,
|
|
|
+ (QDF_STATUS_SUCCESS == rrm_send_set_max_tx_power_req(pMac,
|
|
|
LinkReport.txPower,
|
|
|
pSessionEntry))) {
|
|
|
pe_warn("maxTx power in link report is not same as local..."
|
|
@@ -318,12 +318,12 @@ rrm_process_link_measurement_request(tpAniSirGlobal pMac,
|
|
|
* @param pSessionEntry session entry.
|
|
|
* @return None
|
|
|
*/
|
|
|
-tSirRetStatus
|
|
|
+QDF_STATUS
|
|
|
rrm_process_neighbor_report_response(tpAniSirGlobal pMac,
|
|
|
tDot11fNeighborReportResponse *pNeighborRep,
|
|
|
tpPESession pSessionEntry)
|
|
|
{
|
|
|
- tSirRetStatus status = eSIR_FAILURE;
|
|
|
+ QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
|
|
tpSirNeighborReportInd pSmeNeighborRpt = NULL;
|
|
|
uint16_t length;
|
|
|
uint8_t i;
|
|
@@ -340,11 +340,11 @@ rrm_process_neighbor_report_response(tpAniSirGlobal pMac,
|
|
|
if (pMac->rrm.rrmPEContext.DialogToken !=
|
|
|
pNeighborRep->DialogToken.token) {
|
|
|
pe_err("Dialog token mismatch in the received Neighbor report");
|
|
|
- return eSIR_FAILURE;
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
if (pNeighborRep->num_NeighborReport == 0) {
|
|
|
pe_err("No neighbor report in the frame...Dropping it");
|
|
|
- return eSIR_FAILURE;
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
pe_debug("RRM:received num neighbor reports: %d",
|
|
|
pNeighborRep->num_NeighborReport);
|
|
@@ -358,7 +358,7 @@ rrm_process_neighbor_report_response(tpAniSirGlobal pMac,
|
|
|
pSmeNeighborRpt = qdf_mem_malloc(length);
|
|
|
if (NULL == pSmeNeighborRpt) {
|
|
|
pe_err("Unable to allocate memory");
|
|
|
- return eSIR_MEM_ALLOC_FAILED;
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
}
|
|
|
|
|
|
/* Allocated memory for pSmeNeighborRpt...will be freed by other module */
|
|
@@ -437,24 +437,24 @@ rrm_process_neighbor_report_response(tpAniSirGlobal pMac,
|
|
|
* @param pNeighborReq Neighbor report request params .
|
|
|
* @return None
|
|
|
*/
|
|
|
-tSirRetStatus
|
|
|
+QDF_STATUS
|
|
|
rrm_process_neighbor_report_req(tpAniSirGlobal pMac,
|
|
|
tpSirNeighborReportReqInd pNeighborReq)
|
|
|
{
|
|
|
- tSirRetStatus status = eSIR_SUCCESS;
|
|
|
+ QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
tSirMacNeighborReportReq NeighborReportReq;
|
|
|
tpPESession pSessionEntry;
|
|
|
uint8_t sessionId;
|
|
|
|
|
|
if (pNeighborReq == NULL) {
|
|
|
pe_err("NeighborReq is NULL");
|
|
|
- return eSIR_FAILURE;
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
pSessionEntry = pe_find_session_by_bssid(pMac, pNeighborReq->bssId,
|
|
|
&sessionId);
|
|
|
if (pSessionEntry == NULL) {
|
|
|
pe_err("session does not exist for given bssId");
|
|
|
- return eSIR_FAILURE;
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
|
pe_debug("SSID present: %d", pNeighborReq->noSSID);
|
|
@@ -668,7 +668,8 @@ rrm_process_beacon_report_req(tpAniSirGlobal pMac,
|
|
|
mmhMsg.bodyptr = pSmeBcnReportReq;
|
|
|
MTRACE(mac_trace(pMac, TRACE_CODE_TX_SME_MSG,
|
|
|
pSessionEntry->peSessionId, mmhMsg.type));
|
|
|
- if (eSIR_SUCCESS != lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT))
|
|
|
+ if (QDF_STATUS_SUCCESS !=
|
|
|
+ lim_sys_process_mmh_msg_api(pMac, &mmhMsg, ePROT))
|
|
|
return eRRM_FAILURE;
|
|
|
return eRRM_SUCCESS;
|
|
|
}
|
|
@@ -760,13 +761,13 @@ rrm_fill_beacon_ies(tpAniSirGlobal pMac,
|
|
|
*
|
|
|
* Create a Radio measurement report action frame and send it to peer.
|
|
|
*
|
|
|
- * Return: tSirRetStatus
|
|
|
+ * Return: QDF_STATUS
|
|
|
*/
|
|
|
-tSirRetStatus
|
|
|
+QDF_STATUS
|
|
|
rrm_process_beacon_report_xmit(tpAniSirGlobal mac_ctx,
|
|
|
tpSirBeaconReportXmitInd beacon_xmit_ind)
|
|
|
{
|
|
|
- tSirRetStatus status = eSIR_SUCCESS;
|
|
|
+ QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
tSirMacRadioMeasureReport *report = NULL;
|
|
|
tSirMacBeaconReport *beacon_report;
|
|
|
tpSirBssDescription bss_desc;
|
|
@@ -781,12 +782,12 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal mac_ctx,
|
|
|
|
|
|
if (NULL == beacon_xmit_ind) {
|
|
|
pe_err("Received beacon_xmit_ind is NULL in PE");
|
|
|
- return eSIR_FAILURE;
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
|
if (NULL == curr_req) {
|
|
|
pe_err("Received report xmit while there is no request pending in PE");
|
|
|
- status = eSIR_FAILURE;
|
|
|
+ status = QDF_STATUS_E_FAILURE;
|
|
|
goto end;
|
|
|
}
|
|
|
|
|
@@ -799,7 +800,7 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal mac_ctx,
|
|
|
beacon_xmit_ind->bssId, &session_id);
|
|
|
if (NULL == session_entry) {
|
|
|
pe_err("session does not exist for given bssId");
|
|
|
- status = eSIR_FAILURE;
|
|
|
+ status = QDF_STATUS_E_FAILURE;
|
|
|
goto end;
|
|
|
}
|
|
|
|
|
@@ -808,7 +809,7 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal mac_ctx,
|
|
|
|
|
|
if (NULL == report) {
|
|
|
pe_err("RRM Report is NULL, allocation failed");
|
|
|
- status = eSIR_MEM_ALLOC_FAILED;
|
|
|
+ status = QDF_STATUS_E_NOMEM;
|
|
|
goto end;
|
|
|
}
|
|
|
|
|
@@ -1001,14 +1002,14 @@ static void rrm_process_beacon_request_failure(tpAniSirGlobal pMac,
|
|
|
* Update structure sRRMReq and sSirMacRadioMeasureReport and pass it to
|
|
|
* rrm_process_beacon_report_req().
|
|
|
*
|
|
|
- * Return: tSirRetStatus
|
|
|
+ * Return: QDF_STATUS
|
|
|
*/
|
|
|
static
|
|
|
-tSirRetStatus rrm_process_beacon_req(tpAniSirGlobal mac_ctx, tSirMacAddr peer,
|
|
|
- tpPESession session_entry, tpRRMReq curr_req,
|
|
|
- tpSirMacRadioMeasureReport *radiomes_report,
|
|
|
- tDot11fRadioMeasurementRequest *rrm_req,
|
|
|
- uint8_t *num_report, int index)
|
|
|
+QDF_STATUS rrm_process_beacon_req(tpAniSirGlobal mac_ctx, tSirMacAddr peer,
|
|
|
+ tpPESession session_entry, tpRRMReq curr_req,
|
|
|
+ tpSirMacRadioMeasureReport *radiomes_report,
|
|
|
+ tDot11fRadioMeasurementRequest *rrm_req,
|
|
|
+ uint8_t *num_report, int index)
|
|
|
{
|
|
|
tRrmRetStatus rrm_status = eRRM_SUCCESS;
|
|
|
tpSirMacRadioMeasureReport report;
|
|
@@ -1023,7 +1024,7 @@ tSirRetStatus rrm_process_beacon_req(tpAniSirGlobal mac_ctx, tSirMacAddr peer,
|
|
|
(rrm_req->num_MeasurementRequest - index));
|
|
|
if (NULL == *radiomes_report) {
|
|
|
pe_err("Unable to allocate memory during RRM Req processing");
|
|
|
- return eSIR_MEM_ALLOC_FAILED;
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
}
|
|
|
pe_debug("rrm beacon type refused of %d report in beacon table",
|
|
|
*num_report);
|
|
@@ -1034,13 +1035,13 @@ tSirRetStatus rrm_process_beacon_req(tpAniSirGlobal mac_ctx, tSirMacAddr peer,
|
|
|
report[*num_report].token =
|
|
|
rrm_req->MeasurementRequest[index].measurement_token;
|
|
|
(*num_report)++;
|
|
|
- return eSIR_SUCCESS;
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
} else {
|
|
|
curr_req = qdf_mem_malloc(sizeof(*curr_req));
|
|
|
if (NULL == curr_req) {
|
|
|
pe_err("Unable to allocate memory during RRM Req processing");
|
|
|
qdf_mem_free(*radiomes_report);
|
|
|
- return eSIR_MEM_ALLOC_FAILED;
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
}
|
|
|
pe_debug("Processing Beacon Report request");
|
|
|
curr_req->dialog_token = rrm_req->DialogToken.token;
|
|
@@ -1056,7 +1057,7 @@ tSirRetStatus rrm_process_beacon_req(tpAniSirGlobal mac_ctx, tSirMacAddr peer,
|
|
|
rrm_cleanup(mac_ctx);
|
|
|
}
|
|
|
}
|
|
|
- return eSIR_SUCCESS;
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1069,13 +1070,13 @@ tSirRetStatus rrm_process_beacon_req(tpAniSirGlobal mac_ctx, tSirMacAddr peer,
|
|
|
*
|
|
|
* Send a report with incapabale bit set
|
|
|
*
|
|
|
- * Return: tSirRetStatus
|
|
|
+ * Return: QDF_STATUS
|
|
|
*/
|
|
|
static
|
|
|
-tSirRetStatus update_rrm_report(tpAniSirGlobal mac_ctx,
|
|
|
- tpSirMacRadioMeasureReport report,
|
|
|
- tDot11fRadioMeasurementRequest *rrm_req,
|
|
|
- uint8_t *num_report, int index)
|
|
|
+QDF_STATUS update_rrm_report(tpAniSirGlobal mac_ctx,
|
|
|
+ tpSirMacRadioMeasureReport report,
|
|
|
+ tDot11fRadioMeasurementRequest *rrm_req,
|
|
|
+ uint8_t *num_report, int index)
|
|
|
{
|
|
|
if (report == NULL) {
|
|
|
/*
|
|
@@ -1086,7 +1087,7 @@ tSirRetStatus update_rrm_report(tpAniSirGlobal mac_ctx,
|
|
|
(rrm_req->num_MeasurementRequest - index));
|
|
|
if (NULL == report) {
|
|
|
pe_err("Unable to allocate memory during RRM Req processing");
|
|
|
- return eSIR_MEM_ALLOC_FAILED;
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
}
|
|
|
pe_debug("rrm beacon type incapable of %d report",
|
|
|
*num_report);
|
|
@@ -1097,7 +1098,7 @@ tSirRetStatus update_rrm_report(tpAniSirGlobal mac_ctx,
|
|
|
report[*num_report].token =
|
|
|
rrm_req->MeasurementRequest[index].measurement_token;
|
|
|
(*num_report)++;
|
|
|
- return eSIR_SUCCESS;
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
@@ -1110,16 +1111,16 @@ tSirRetStatus update_rrm_report(tpAniSirGlobal mac_ctx,
|
|
|
*
|
|
|
* Processes the Radio Resource Measurement request.
|
|
|
*
|
|
|
- * Return: tSirRetStatus
|
|
|
+ * Return: QDF_STATUS
|
|
|
*/
|
|
|
-tSirRetStatus
|
|
|
+QDF_STATUS
|
|
|
rrm_process_radio_measurement_request(tpAniSirGlobal mac_ctx,
|
|
|
tSirMacAddr peer,
|
|
|
tDot11fRadioMeasurementRequest *rrm_req,
|
|
|
tpPESession session_entry)
|
|
|
{
|
|
|
uint8_t i;
|
|
|
- tSirRetStatus status = eSIR_SUCCESS;
|
|
|
+ QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
tpSirMacRadioMeasureReport report = NULL;
|
|
|
uint8_t num_report = 0;
|
|
|
tpRRMReq curr_req = mac_ctx->rrm.rrmPEContext.pCurrentReq;
|
|
@@ -1128,7 +1129,7 @@ rrm_process_radio_measurement_request(tpAniSirGlobal mac_ctx,
|
|
|
report = qdf_mem_malloc(sizeof(tSirMacRadioMeasureReport));
|
|
|
if (NULL == report) {
|
|
|
pe_err("Unable to allocate memory during RRM Req processing");
|
|
|
- return eSIR_MEM_ALLOC_FAILED;
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
}
|
|
|
pe_err("No requestIes in the measurement request, sending incapable report");
|
|
|
report->incapable = 1;
|
|
@@ -1137,7 +1138,7 @@ rrm_process_radio_measurement_request(tpAniSirGlobal mac_ctx,
|
|
|
rrm_req->DialogToken.token, num_report, NULL,
|
|
|
report, peer, session_entry);
|
|
|
qdf_mem_free(report);
|
|
|
- return eSIR_FAILURE;
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
/* PF Fix */
|
|
|
if (rrm_req->NumOfRepetitions.repetitions > 0) {
|
|
@@ -1150,7 +1151,7 @@ rrm_process_radio_measurement_request(tpAniSirGlobal mac_ctx,
|
|
|
report = qdf_mem_malloc(sizeof(tSirMacRadioMeasureReport));
|
|
|
if (NULL == report) {
|
|
|
pe_err("Unable to allocate memory during RRM Req processing");
|
|
|
- return eSIR_MEM_ALLOC_FAILED;
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
}
|
|
|
report->incapable = 1;
|
|
|
report->type = rrm_req->MeasurementRequest[0].measurement_type;
|
|
@@ -1165,7 +1166,7 @@ rrm_process_radio_measurement_request(tpAniSirGlobal mac_ctx,
|
|
|
status = rrm_process_beacon_req(mac_ctx, peer,
|
|
|
session_entry, curr_req, &report, rrm_req,
|
|
|
&num_report, i);
|
|
|
- if (eSIR_SUCCESS != status)
|
|
|
+ if (QDF_STATUS_SUCCESS != status)
|
|
|
return status;
|
|
|
break;
|
|
|
case SIR_MAC_RRM_LCI_TYPE:
|
|
@@ -1178,7 +1179,7 @@ rrm_process_radio_measurement_request(tpAniSirGlobal mac_ctx,
|
|
|
/* Send a report with incapabale bit set. */
|
|
|
status = update_rrm_report(mac_ctx, report, rrm_req,
|
|
|
&num_report, i);
|
|
|
- if (eSIR_SUCCESS != status)
|
|
|
+ if (QDF_STATUS_SUCCESS != status)
|
|
|
return status;
|
|
|
break;
|
|
|
}
|
|
@@ -1274,7 +1275,7 @@ tpRRMCaps rrm_get_capabilities(tpAniSirGlobal pMac, tpPESession pSessionEntry)
|
|
|
* @return None
|
|
|
*/
|
|
|
|
|
|
-tSirRetStatus rrm_initialize(tpAniSirGlobal pMac)
|
|
|
+QDF_STATUS rrm_initialize(tpAniSirGlobal pMac)
|
|
|
{
|
|
|
tpRRMCaps pRRMCaps = &pMac->rrm.rrmPEContext.rrmEnabledCaps;
|
|
|
|
|
@@ -1298,7 +1299,7 @@ tSirRetStatus rrm_initialize(tpAniSirGlobal pMac)
|
|
|
pRRMCaps->operatingChanMax = 3;
|
|
|
pRRMCaps->nonOperatingChanMax = 3;
|
|
|
|
|
|
- return eSIR_SUCCESS;
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
@@ -1319,7 +1320,7 @@ tSirRetStatus rrm_initialize(tpAniSirGlobal pMac)
|
|
|
* @return None
|
|
|
*/
|
|
|
|
|
|
-tSirRetStatus rrm_cleanup(tpAniSirGlobal pMac)
|
|
|
+QDF_STATUS rrm_cleanup(tpAniSirGlobal pMac)
|
|
|
{
|
|
|
if (pMac->rrm.rrmPEContext.pCurrentReq) {
|
|
|
if (pMac->rrm.rrmPEContext.pCurrentReq->request.Beacon.reqIes.
|
|
@@ -1332,7 +1333,7 @@ tSirRetStatus rrm_cleanup(tpAniSirGlobal pMac)
|
|
|
}
|
|
|
|
|
|
pMac->rrm.rrmPEContext.pCurrentReq = NULL;
|
|
|
- return eSIR_SUCCESS;
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
/**
|