Commit 8cf33316 authored by Larry Finger's avatar Larry Finger

staging: rtl8192e: Convert typedef BA_RECORD to struct ba_record

Remove typedef from struct.
Rename struct.
Rename uses.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
parent e92b71d5
...@@ -66,13 +66,13 @@ typedef union _DELBA_PARAM_SET { ...@@ -66,13 +66,13 @@ typedef union _DELBA_PARAM_SET {
} field; } field;
} DELBA_PARAM_SET, *PDELBA_PARAM_SET; } DELBA_PARAM_SET, *PDELBA_PARAM_SET;
typedef struct _BA_RECORD { struct ba_record {
struct timer_list Timer; struct timer_list Timer;
u8 bValid; u8 bValid;
u8 DialogToken; u8 DialogToken;
BA_PARAM_SET BaParamSet; BA_PARAM_SET BaParamSet;
u16 BaTimeoutValue; u16 BaTimeoutValue;
SEQUENCE_CONTROL BaStartSeqCtrl; SEQUENCE_CONTROL BaStartSeqCtrl;
} BA_RECORD, *PBA_RECORD; };
#endif #endif
...@@ -20,22 +20,22 @@ ...@@ -20,22 +20,22 @@
#include "rtl819x_BA.h" #include "rtl819x_BA.h"
#include "rtl_core.h" #include "rtl_core.h"
void ActivateBAEntry(struct rtllib_device* ieee, PBA_RECORD pBA, u16 Time) void ActivateBAEntry(struct rtllib_device* ieee, struct ba_record *pBA, u16 Time)
{ {
pBA->bValid = true; pBA->bValid = true;
if (Time != 0) if (Time != 0)
mod_timer(&pBA->Timer, jiffies + MSECS(Time)); mod_timer(&pBA->Timer, jiffies + MSECS(Time));
} }
void DeActivateBAEntry( struct rtllib_device* ieee, PBA_RECORD pBA) void DeActivateBAEntry( struct rtllib_device* ieee, struct ba_record *pBA)
{ {
pBA->bValid = false; pBA->bValid = false;
del_timer_sync(&pBA->Timer); del_timer_sync(&pBA->Timer);
} }
u8 TxTsDeleteBA( struct rtllib_device* ieee, struct tx_ts_record *pTxTs) u8 TxTsDeleteBA( struct rtllib_device* ieee, struct tx_ts_record *pTxTs)
{ {
PBA_RECORD pAdmittedBa = &pTxTs->TxAdmittedBARecord; struct ba_record *pAdmittedBa = &pTxTs->TxAdmittedBARecord;
PBA_RECORD pPendingBa = &pTxTs->TxPendingBARecord; struct ba_record *pPendingBa = &pTxTs->TxPendingBARecord;
u8 bSendDELBA = false; u8 bSendDELBA = false;
if (pPendingBa->bValid) if (pPendingBa->bValid)
...@@ -55,7 +55,7 @@ u8 TxTsDeleteBA( struct rtllib_device* ieee, struct tx_ts_record *pTxTs) ...@@ -55,7 +55,7 @@ u8 TxTsDeleteBA( struct rtllib_device* ieee, struct tx_ts_record *pTxTs)
u8 RxTsDeleteBA( struct rtllib_device* ieee, struct rx_ts_record *pRxTs) u8 RxTsDeleteBA( struct rtllib_device* ieee, struct rx_ts_record *pRxTs)
{ {
PBA_RECORD pBa = &pRxTs->RxAdmittedBARecord; struct ba_record *pBa = &pRxTs->RxAdmittedBARecord;
u8 bSendDELBA = false; u8 bSendDELBA = false;
if (pBa->bValid) if (pBa->bValid)
...@@ -67,7 +67,7 @@ u8 RxTsDeleteBA( struct rtllib_device* ieee, struct rx_ts_record *pRxTs) ...@@ -67,7 +67,7 @@ u8 RxTsDeleteBA( struct rtllib_device* ieee, struct rx_ts_record *pRxTs)
return bSendDELBA; return bSendDELBA;
} }
void ResetBaEntry( PBA_RECORD pBA) void ResetBaEntry( struct ba_record *pBA)
{ {
pBA->bValid = false; pBA->bValid = false;
pBA->BaParamSet.shortData = 0; pBA->BaParamSet.shortData = 0;
...@@ -75,7 +75,7 @@ void ResetBaEntry( PBA_RECORD pBA) ...@@ -75,7 +75,7 @@ void ResetBaEntry( PBA_RECORD pBA)
pBA->DialogToken = 0; pBA->DialogToken = 0;
pBA->BaStartSeqCtrl.ShortData = 0; pBA->BaStartSeqCtrl.ShortData = 0;
} }
static struct sk_buff* rtllib_ADDBA(struct rtllib_device* ieee, u8* Dst, PBA_RECORD pBA, u16 StatusCode, u8 type) static struct sk_buff* rtllib_ADDBA(struct rtllib_device* ieee, u8* Dst, struct ba_record *pBA, u16 StatusCode, u8 type)
{ {
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
struct rtllib_hdr_3addr* BAReq = NULL; struct rtllib_hdr_3addr* BAReq = NULL;
...@@ -139,7 +139,7 @@ static struct sk_buff* rtllib_ADDBA(struct rtllib_device* ieee, u8* Dst, PBA_REC ...@@ -139,7 +139,7 @@ static struct sk_buff* rtllib_ADDBA(struct rtllib_device* ieee, u8* Dst, PBA_REC
static struct sk_buff* rtllib_DELBA( static struct sk_buff* rtllib_DELBA(
struct rtllib_device* ieee, struct rtllib_device* ieee,
u8* dst, u8* dst,
PBA_RECORD pBA, struct ba_record *pBA,
TR_SELECT TxRxSelect, TR_SELECT TxRxSelect,
u16 ReasonCode u16 ReasonCode
) )
...@@ -193,7 +193,7 @@ static struct sk_buff* rtllib_DELBA( ...@@ -193,7 +193,7 @@ static struct sk_buff* rtllib_DELBA(
return skb; return skb;
} }
void rtllib_send_ADDBAReq(struct rtllib_device* ieee, u8* dst, PBA_RECORD pBA) void rtllib_send_ADDBAReq(struct rtllib_device* ieee, u8* dst, struct ba_record *pBA)
{ {
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
skb = rtllib_ADDBA(ieee, dst, pBA, 0, ACT_ADDBAREQ); skb = rtllib_ADDBA(ieee, dst, pBA, 0, ACT_ADDBAREQ);
...@@ -207,7 +207,7 @@ void rtllib_send_ADDBAReq(struct rtllib_device* ieee, u8* dst, PBA_RECORD pBA) ...@@ -207,7 +207,7 @@ void rtllib_send_ADDBAReq(struct rtllib_device* ieee, u8* dst, PBA_RECORD pBA)
return; return;
} }
void rtllib_send_ADDBARsp(struct rtllib_device* ieee, u8* dst, PBA_RECORD pBA, u16 StatusCode) void rtllib_send_ADDBARsp(struct rtllib_device* ieee, u8* dst, struct ba_record *pBA, u16 StatusCode)
{ {
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
skb = rtllib_ADDBA(ieee, dst, pBA, StatusCode, ACT_ADDBARSP); skb = rtllib_ADDBA(ieee, dst, pBA, StatusCode, ACT_ADDBARSP);
...@@ -220,7 +220,7 @@ void rtllib_send_ADDBARsp(struct rtllib_device* ieee, u8* dst, PBA_RECORD pBA, u ...@@ -220,7 +220,7 @@ void rtllib_send_ADDBARsp(struct rtllib_device* ieee, u8* dst, PBA_RECORD pBA, u
} }
void rtllib_send_DELBA(struct rtllib_device* ieee, u8* dst, PBA_RECORD pBA, TR_SELECT TxRxSelect, u16 ReasonCode) void rtllib_send_DELBA(struct rtllib_device* ieee, u8* dst, struct ba_record *pBA, TR_SELECT TxRxSelect, u16 ReasonCode)
{ {
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
skb = rtllib_DELBA(ieee, dst, pBA, TxRxSelect, ReasonCode); skb = rtllib_DELBA(ieee, dst, pBA, TxRxSelect, ReasonCode);
...@@ -240,7 +240,7 @@ int rtllib_rx_ADDBAReq( struct rtllib_device* ieee, struct sk_buff *skb) ...@@ -240,7 +240,7 @@ int rtllib_rx_ADDBAReq( struct rtllib_device* ieee, struct sk_buff *skb)
struct rtllib_hdr_3addr* req = NULL; struct rtllib_hdr_3addr* req = NULL;
u16 rc = 0; u16 rc = 0;
u8 * dst = NULL, *pDialogToken = NULL, *tag = NULL; u8 * dst = NULL, *pDialogToken = NULL, *tag = NULL;
PBA_RECORD pBA = NULL; struct ba_record *pBA = NULL;
PBA_PARAM_SET pBaParamSet = NULL; PBA_PARAM_SET pBaParamSet = NULL;
u16* pBaTimeoutVal = NULL; u16* pBaTimeoutVal = NULL;
PSEQUENCE_CONTROL pBaStartSeqCtrl = NULL; PSEQUENCE_CONTROL pBaStartSeqCtrl = NULL;
...@@ -314,7 +314,7 @@ int rtllib_rx_ADDBAReq( struct rtllib_device* ieee, struct sk_buff *skb) ...@@ -314,7 +314,7 @@ int rtllib_rx_ADDBAReq( struct rtllib_device* ieee, struct sk_buff *skb)
OnADDBAReq_Fail: OnADDBAReq_Fail:
{ {
BA_RECORD BA; struct ba_record BA;
BA.BaParamSet = *pBaParamSet; BA.BaParamSet = *pBaParamSet;
BA.BaTimeoutValue = *pBaTimeoutVal; BA.BaTimeoutValue = *pBaTimeoutVal;
BA.DialogToken = *pDialogToken; BA.DialogToken = *pDialogToken;
...@@ -328,7 +328,7 @@ int rtllib_rx_ADDBAReq( struct rtllib_device* ieee, struct sk_buff *skb) ...@@ -328,7 +328,7 @@ int rtllib_rx_ADDBAReq( struct rtllib_device* ieee, struct sk_buff *skb)
int rtllib_rx_ADDBARsp( struct rtllib_device* ieee, struct sk_buff *skb) int rtllib_rx_ADDBARsp( struct rtllib_device* ieee, struct sk_buff *skb)
{ {
struct rtllib_hdr_3addr* rsp = NULL; struct rtllib_hdr_3addr* rsp = NULL;
PBA_RECORD pPendingBA, pAdmittedBA; struct ba_record *pPendingBA, *pAdmittedBA;
struct tx_ts_record *pTS = NULL; struct tx_ts_record *pTS = NULL;
u8* dst = NULL, *pDialogToken = NULL, *tag = NULL; u8* dst = NULL, *pDialogToken = NULL, *tag = NULL;
u16* pStatusCode = NULL, *pBaTimeoutVal = NULL; u16* pStatusCode = NULL, *pBaTimeoutVal = NULL;
...@@ -419,7 +419,7 @@ int rtllib_rx_ADDBARsp( struct rtllib_device* ieee, struct sk_buff *skb) ...@@ -419,7 +419,7 @@ int rtllib_rx_ADDBARsp( struct rtllib_device* ieee, struct sk_buff *skb)
OnADDBARsp_Reject: OnADDBARsp_Reject:
{ {
BA_RECORD BA; struct ba_record BA;
BA.BaParamSet = *pBaParamSet; BA.BaParamSet = *pBaParamSet;
rtllib_send_DELBA(ieee, dst, &BA, TX_DIR, ReasonCode); rtllib_send_DELBA(ieee, dst, &BA, TX_DIR, ReasonCode);
return 0; return 0;
...@@ -506,7 +506,7 @@ TsInitAddBA( ...@@ -506,7 +506,7 @@ TsInitAddBA(
u8 bOverwritePending u8 bOverwritePending
) )
{ {
PBA_RECORD pBA = &pTS->TxPendingBARecord; struct ba_record *pBA = &pTS->TxPendingBARecord;
if (pBA->bValid==true && bOverwritePending==false) if (pBA->bValid==true && bOverwritePending==false)
return; return;
......
...@@ -45,8 +45,8 @@ struct ts_common_info { ...@@ -45,8 +45,8 @@ struct ts_common_info {
struct tx_ts_record { struct tx_ts_record {
struct ts_common_info TsCommonInfo; struct ts_common_info TsCommonInfo;
u16 TxCurSeq; u16 TxCurSeq;
BA_RECORD TxPendingBARecord; struct ba_record TxPendingBARecord;
BA_RECORD TxAdmittedBARecord; struct ba_record TxAdmittedBARecord;
u8 bAddBaReqInProgress; u8 bAddBaReqInProgress;
u8 bAddBaReqDelayed; u8 bAddBaReqDelayed;
u8 bUsingBa; u8 bUsingBa;
...@@ -61,7 +61,7 @@ struct rx_ts_record { ...@@ -61,7 +61,7 @@ struct rx_ts_record {
u16 RxTimeoutIndicateSeq; u16 RxTimeoutIndicateSeq;
struct list_head RxPendingPktList; struct list_head RxPendingPktList;
struct timer_list RxPktPendingTimer; struct timer_list RxPktPendingTimer;
BA_RECORD RxAdmittedBARecord; struct ba_record RxAdmittedBARecord;
u16 RxLastSeqNum; u16 RxLastSeqNum;
u8 RxLastFragNum; u8 RxLastFragNum;
u8 num; u8 num;
......
...@@ -2918,7 +2918,7 @@ extern void TsInitDelBA( struct rtllib_device* ieee, struct ts_common_info *pTsC ...@@ -2918,7 +2918,7 @@ extern void TsInitDelBA( struct rtllib_device* ieee, struct ts_common_info *pTsC
extern void BaSetupTimeOut(unsigned long data); extern void BaSetupTimeOut(unsigned long data);
extern void TxBaInactTimeout(unsigned long data); extern void TxBaInactTimeout(unsigned long data);
extern void RxBaInactTimeout(unsigned long data); extern void RxBaInactTimeout(unsigned long data);
extern void ResetBaEntry( PBA_RECORD pBA); extern void ResetBaEntry( struct ba_record *pBA);
extern bool GetTs( extern bool GetTs(
struct rtllib_device* ieee, struct rtllib_device* ieee,
struct ts_common_info **ppTS, struct ts_common_info **ppTS,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment