|
@@ -3569,10 +3569,7 @@ static void __lim_process_sme_addts_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
|
|
|
|
|
|
if (!LIM_IS_STA_ROLE(psessionEntry)) {
|
|
|
pe_err("AddTs received on AP - ignoring");
|
|
|
- lim_send_sme_addts_rsp(pMac, pSirAddts->rspReqd, eSIR_FAILURE,
|
|
|
- psessionEntry, pSirAddts->req.tspec,
|
|
|
- smesessionId, smetransactionId);
|
|
|
- return;
|
|
|
+ goto send_failure_addts_rsp;
|
|
|
}
|
|
|
|
|
|
pStaDs =
|
|
@@ -3581,19 +3578,13 @@ static void __lim_process_sme_addts_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
|
|
|
|
|
|
if (pStaDs == NULL) {
|
|
|
pe_err("Cannot find AP context for addts req");
|
|
|
- lim_send_sme_addts_rsp(pMac, pSirAddts->rspReqd, eSIR_FAILURE,
|
|
|
- psessionEntry, pSirAddts->req.tspec,
|
|
|
- smesessionId, smetransactionId);
|
|
|
- return;
|
|
|
+ goto send_failure_addts_rsp;
|
|
|
}
|
|
|
|
|
|
if ((!pStaDs->valid) || (pStaDs->mlmStaContext.mlmState !=
|
|
|
eLIM_MLM_LINK_ESTABLISHED_STATE)) {
|
|
|
pe_err("AddTs received in invalid MLM state");
|
|
|
- lim_send_sme_addts_rsp(pMac, pSirAddts->rspReqd, eSIR_FAILURE,
|
|
|
- psessionEntry, pSirAddts->req.tspec,
|
|
|
- smesessionId, smetransactionId);
|
|
|
- return;
|
|
|
+ goto send_failure_addts_rsp;
|
|
|
}
|
|
|
|
|
|
pSirAddts->req.wsmTspecPresent = 0;
|
|
@@ -3610,20 +3601,14 @@ static void __lim_process_sme_addts_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
|
|
|
pSirAddts->req.lleTspecPresent = 1;
|
|
|
else {
|
|
|
pe_warn("ADDTS_REQ ignore - qos is disabled");
|
|
|
- lim_send_sme_addts_rsp(pMac, pSirAddts->rspReqd, eSIR_FAILURE,
|
|
|
- psessionEntry, pSirAddts->req.tspec,
|
|
|
- smesessionId, smetransactionId);
|
|
|
- return;
|
|
|
+ goto send_failure_addts_rsp;
|
|
|
}
|
|
|
|
|
|
if ((psessionEntry->limSmeState != eLIM_SME_ASSOCIATED_STATE) &&
|
|
|
(psessionEntry->limSmeState != eLIM_SME_LINK_EST_STATE)) {
|
|
|
pe_err("AddTs received in invalid LIMsme state (%d)",
|
|
|
psessionEntry->limSmeState);
|
|
|
- lim_send_sme_addts_rsp(pMac, pSirAddts->rspReqd, eSIR_FAILURE,
|
|
|
- psessionEntry, pSirAddts->req.tspec,
|
|
|
- smesessionId, smetransactionId);
|
|
|
- return;
|
|
|
+ goto send_failure_addts_rsp;
|
|
|
}
|
|
|
|
|
|
if (pMac->lim.gLimAddtsSent) {
|
|
@@ -3632,10 +3617,7 @@ static void __lim_process_sme_addts_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
|
|
|
pMac->lim.gLimAddtsReq.req.tspec.tsinfo.traffic.tsid,
|
|
|
pMac->lim.gLimAddtsReq.req.tspec.tsinfo.traffic.
|
|
|
userPrio);
|
|
|
- lim_send_sme_addts_rsp(pMac, pSirAddts->rspReqd, eSIR_FAILURE,
|
|
|
- psessionEntry, pSirAddts->req.tspec,
|
|
|
- smesessionId, smetransactionId);
|
|
|
- return;
|
|
|
+ goto send_failure_addts_rsp;
|
|
|
}
|
|
|
|
|
|
sir_copy_mac_addr(peerMac, psessionEntry->bssId);
|
|
@@ -3656,21 +3638,21 @@ static void __lim_process_sme_addts_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
|
|
|
eSIR_SUCCESS) {
|
|
|
pe_err("Unable to get Cfg param %d (Addts Rsp Timeout)",
|
|
|
WNI_CFG_ADDTS_RSP_TIMEOUT);
|
|
|
- return;
|
|
|
+ goto send_failure_addts_rsp;
|
|
|
}
|
|
|
|
|
|
timeout = SYS_MS_TO_TICKS(timeout);
|
|
|
if (tx_timer_change(&pMac->lim.limTimers.gLimAddtsRspTimer, timeout, 0)
|
|
|
!= TX_SUCCESS) {
|
|
|
pe_err("AddtsRsp timer change failed!");
|
|
|
- return;
|
|
|
+ goto send_failure_addts_rsp;
|
|
|
}
|
|
|
pMac->lim.gLimAddtsRspTimerCount++;
|
|
|
if (tx_timer_change_context(&pMac->lim.limTimers.gLimAddtsRspTimer,
|
|
|
pMac->lim.gLimAddtsRspTimerCount) !=
|
|
|
TX_SUCCESS) {
|
|
|
pe_err("AddtsRsp timer change failed!");
|
|
|
- return;
|
|
|
+ goto send_failure_addts_rsp;
|
|
|
}
|
|
|
MTRACE(mac_trace
|
|
|
(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId,
|
|
@@ -3681,9 +3663,14 @@ static void __lim_process_sme_addts_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
|
|
|
if (tx_timer_activate(&pMac->lim.limTimers.gLimAddtsRspTimer) !=
|
|
|
TX_SUCCESS) {
|
|
|
pe_err("AddtsRsp timer activation failed!");
|
|
|
- return;
|
|
|
+ goto send_failure_addts_rsp;
|
|
|
}
|
|
|
return;
|
|
|
+
|
|
|
+send_failure_addts_rsp:
|
|
|
+ lim_send_sme_addts_rsp(pMac, pSirAddts->rspReqd, eSIR_FAILURE,
|
|
|
+ psessionEntry, pSirAddts->req.tspec,
|
|
|
+ smesessionId, smetransactionId);
|
|
|
}
|
|
|
|
|
|
static void __lim_process_sme_delts_req(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
|