aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rt2860/common/ba_action.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/rt2860/common/ba_action.c')
-rw-r--r--drivers/staging/rt2860/common/ba_action.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/staging/rt2860/common/ba_action.c b/drivers/staging/rt2860/common/ba_action.c
index b95a341caacd..b7bbe99d4d57 100644
--- a/drivers/staging/rt2860/common/ba_action.c
+++ b/drivers/staging/rt2860/common/ba_action.c
@@ -531,12 +531,10 @@ VOID BAOriSessionSetUp(
pBAEntry->TimeOutValue = TimeOut;
pBAEntry->pAdapter = pAd;
-#ifdef RT30xx
DBGPRINT(RT_DEBUG_TRACE,("Send AddBA to %02x:%02x:%02x:%02x:%02x:%02x Tid:%d isForced:%d Wcid:%d\n"
,pEntry->Addr[0],pEntry->Addr[1],pEntry->Addr[2]
,pEntry->Addr[3],pEntry->Addr[4],pEntry->Addr[5]
,TID,isForced,pEntry->Aid));
-#endif
if (!(pEntry->TXBAbitmap & (1<<TID)))
{
@@ -869,6 +867,8 @@ VOID BAOriSessionTearDown(
// force send specified TID DelBA
MLME_DELBA_REQ_STRUCT DelbaReq;
MLME_QUEUE_ELEM *Elem = (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), MEM_ALLOC_FLAG);
+ if (Elem == NULL)
+ return;
NdisZeroMemory(&DelbaReq, sizeof(DelbaReq));
NdisZeroMemory(Elem, sizeof(MLME_QUEUE_ELEM));
@@ -902,6 +902,8 @@ VOID BAOriSessionTearDown(
{
MLME_DELBA_REQ_STRUCT DelbaReq;
MLME_QUEUE_ELEM *Elem = (MLME_QUEUE_ELEM *) kmalloc(sizeof(MLME_QUEUE_ELEM), MEM_ALLOC_FLAG);
+ if (Elem == NULL)
+ return;
NdisZeroMemory(&DelbaReq, sizeof(DelbaReq));
NdisZeroMemory(Elem, sizeof(MLME_QUEUE_ELEM));
@@ -1078,16 +1080,11 @@ VOID BAOriSessionSetupTimeout(
AddbaReq.Token = pBAEntry->Token;
MlmeEnqueue(pAd, ACTION_STATE_MACHINE, MT2_MLME_ADD_BA_CATE, sizeof(MLME_ADDBA_REQ_STRUCT), (PVOID)&AddbaReq);
RT28XX_MLME_HANDLER(pAd);
-#ifndef RT30xx
- DBGPRINT(RT_DEBUG_TRACE,("BA Ori Session Timeout(%d) : Send ADD BA again\n", pBAEntry->Token));
-#endif
-#ifdef RT30xx
DBGPRINT(RT_DEBUG_TRACE,("BA Ori Session Timeout(%d) to %02x:%02x:%02x:%02x:%02x:%02x Tid:%d Wcid:%d\n"
,pBAEntry->Token
,pEntry->Addr[0],pEntry->Addr[1],pEntry->Addr[2]
,pEntry->Addr[3],pEntry->Addr[4],pEntry->Addr[5]
,pBAEntry->TID,pEntry->Aid));
-#endif
pBAEntry->Token++;
RTMPSetTimer(&pBAEntry->ORIBATimer, ORI_BA_SESSION_TIMEOUT);
}
@@ -1391,10 +1388,8 @@ VOID SendPSMPAction(
//ULONG Idx;
FRAME_PSMP_ACTION Frame;
ULONG FrameLen;
-#ifdef RT30xx
UCHAR bbpdata=0;
UINT32 macdata;
-#endif // RT30xx //
NStatus = MlmeAllocateMemory(pAd, &pOutBuffer); //Get an unused nonpaged memory
if (NStatus != NDIS_STATUS_SUCCESS)
@@ -1410,7 +1405,6 @@ VOID SendPSMPAction(
switch (Psmp)
{
case MMPS_ENABLE:
-#ifdef RT30xx
if (IS_RT3090(pAd))
{
// disable MMPS BBP control register
@@ -1423,11 +1417,9 @@ VOID SendPSMPAction(
macdata &= ~(0x09); //bit 0, 3
RTMP_IO_WRITE32(pAd, 0x1210, macdata);
}
-#endif // RT30xx //
Frame.Psmp = 0;
break;
case MMPS_DYNAMIC:
-#ifdef RT30xx
if (IS_RT3090(pAd))
{
// enable MMPS BBP control register
@@ -1440,11 +1432,9 @@ VOID SendPSMPAction(
macdata |= 0x09; //bit 0, 3
RTMP_IO_WRITE32(pAd, 0x1210, macdata);
}
-#endif // RT30xx //
Frame.Psmp = 3;
break;
case MMPS_STATIC:
-#ifdef RT30xx
if (IS_RT3090(pAd))
{
// enable MMPS BBP control register
@@ -1457,7 +1447,6 @@ VOID SendPSMPAction(
macdata |= 0x09; //bit 0, 3
RTMP_IO_WRITE32(pAd, 0x1210, macdata);
}
-#endif // RT30xx //
Frame.Psmp = 1;
break;
}