Skip to content

Commit

Permalink
staging: rtl8192e: Convert typedef RT_HIGH_THROUGHPUT to struct rt_hi…
Browse files Browse the repository at this point in the history
…_throughput

Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
  • Loading branch information
Larry Finger authored and Larry Finger committed Aug 24, 2011
1 parent 74724de commit 7796d93
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/rtl8192e/rtl819x_HT.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ typedef enum _HT_AGGRE_MODE_E{
}HT_AGGRE_MODE_E, *PHT_AGGRE_MODE_E;


typedef struct _RT_HIGH_THROUGHPUT{
struct rt_hi_throughput {
u8 bEnableHT;
u8 bCurrentHTSupport;

Expand Down Expand Up @@ -295,7 +295,7 @@ typedef struct _RT_HIGH_THROUGHPUT{
u8 WAIotTH;

u8 bAcceptAddbaReq;
} __attribute__ ((packed)) RT_HIGH_THROUGHPUT, *PRT_HIGH_THROUGHPUT;
} __packed;



Expand Down
36 changes: 18 additions & 18 deletions drivers/staging/rtl8192e/rtl819x_HTProc.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static u8 CISCO_BROADCOM[3] = {0x00, 0x17, 0x94};
static u8 LINKSYS_MARVELL_4400N[3] = {0x00, 0x14, 0xa4};
void HTUpdateDefaultSetting(struct rtllib_device* ieee)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;

pHTInfo->bAcceptAddbaReq = 1;

Expand Down Expand Up @@ -182,7 +182,7 @@ void HTDebugHTInfo(u8* InfoIE, u8* TitleString)
bool IsHTHalfNmode40Bandwidth(struct rtllib_device* ieee)
{
bool retValue = false;
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;

if (pHTInfo->bCurrentHTSupport == false )
retValue = false;
Expand All @@ -201,7 +201,7 @@ bool IsHTHalfNmode40Bandwidth(struct rtllib_device* ieee)
bool IsHTHalfNmodeSGI(struct rtllib_device* ieee, bool is40MHz)
{
bool retValue = false;
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;

if (pHTInfo->bCurrentHTSupport == false )
retValue = false;
Expand Down Expand Up @@ -240,7 +240,7 @@ u16 HTHalfMcsToDataRate(struct rtllib_device* ieee, u8 nMcsRate)

u16 HTMcsToDataRate( struct rtllib_device* ieee, u8 nMcsRate)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;

u8 is40MHz = (pHTInfo->bCurBW40MHz)?1:0;
u8 isShortGI = (pHTInfo->bCurBW40MHz)?
Expand Down Expand Up @@ -318,7 +318,7 @@ bool IsHTHalfNmodeAPs(struct rtllib_device* ieee)

void HTIOTPeerDetermine(struct rtllib_device* ieee)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
struct rtllib_network* net = &ieee->current_network;
if (net->bssht.bdRT2RTAggregation){
pHTInfo->IOTPeer = HT_IOT_PEER_REALTEK;
Expand Down Expand Up @@ -409,7 +409,7 @@ u8 HTIOTActIsMgntUseCCK6M(struct rtllib_device* ieee,struct rtllib_network *netw
u8
HTIOTActWAIOTBroadcom(struct rtllib_device* ieee)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
u8 retValue = false;
u8 boundary=59;

Expand Down Expand Up @@ -494,7 +494,7 @@ u8
HTIOTActDisableShortGI(struct rtllib_device* ieee,struct rtllib_network *network)
{
u8 retValue = 0;
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;

if (pHTInfo->IOTPeer==HT_IOT_PEER_RALINK)
{
Expand All @@ -515,7 +515,7 @@ HTIOTActDisableHighPower(struct rtllib_device* ieee,struct rtllib_network *netwo
void
HTIOTActDetermineRaFunc(struct rtllib_device* ieee, bool bPeerRx2ss)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
pHTInfo->IOTRaFunc &= HT_IOT_RAFUNC_DISABLE_ALL;

if (pHTInfo->IOTPeer == HT_IOT_PEER_RALINK && !bPeerRx2ss)
Expand Down Expand Up @@ -573,7 +573,7 @@ HTIOTActIsNullDataPowerSaving(struct rtllib_device* ieee,struct rtllib_network *
}

void HTResetIOTSetting(
PRT_HIGH_THROUGHPUT pHTInfo
struct rt_hi_throughput *pHTInfo
)
{
pHTInfo->IOTAction = 0;
Expand All @@ -584,7 +584,7 @@ void HTResetIOTSetting(

void HTConstructCapabilityElement(struct rtllib_device* ieee, u8* posHTCap, u8* len, u8 IsEncrypt, bool bAssoc)
{
PRT_HIGH_THROUGHPUT pHT = ieee->pHTInfo;
struct rt_hi_throughput *pHT = ieee->pHTInfo;
PHT_CAPABILITY_ELE pCapELE = NULL;

if ((posHTCap == NULL) || (pHT == NULL))
Expand Down Expand Up @@ -675,7 +675,7 @@ void HTConstructCapabilityElement(struct rtllib_device* ieee, u8* posHTCap, u8*
}
void HTConstructInfoElement(struct rtllib_device* ieee, u8* posHTInfo, u8* len, u8 IsEncrypt)
{
PRT_HIGH_THROUGHPUT pHT = ieee->pHTInfo;
struct rt_hi_throughput *pHT = ieee->pHTInfo;
PHT_INFORMATION_ELE pHTInfoEle = (PHT_INFORMATION_ELE)posHTInfo;
if ((posHTInfo == NULL) || (pHTInfoEle == NULL))
{
Expand Down Expand Up @@ -834,7 +834,7 @@ u8 HTFilterMCSRate( struct rtllib_device* ieee, u8* pSupportMCS, u8* pOperateMCS
void HTSetConnectBwMode(struct rtllib_device* ieee, HT_CHANNEL_WIDTH Bandwidth, HT_EXTCHNL_OFFSET Offset);
void HTOnAssocRsp(struct rtllib_device *ieee)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
PHT_CAPABILITY_ELE pPeerHTCap = NULL;
PHT_INFORMATION_ELE pPeerHTInfo = NULL;
u16 nMaxAMSDUSize = 0;
Expand Down Expand Up @@ -946,7 +946,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
void HTSetConnectBwModeCallback(struct rtllib_device* ieee);
void HTInitializeHTInfo(struct rtllib_device* ieee)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;

RTLLIB_DEBUG(RTLLIB_DL_HT, "===========>%s()\n", __func__);
pHTInfo->bCurrentHTSupport = false;
Expand Down Expand Up @@ -1008,7 +1008,7 @@ void HTInitializeBssDesc(PBSS_HT pBssHT)

void HTResetSelfAndSavePeerSetting(struct rtllib_device* ieee, struct rtllib_network * pNetwork)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
u8 bIOTAction = 0;

RTLLIB_DEBUG(RTLLIB_DL_HT, "==============>%s()\n", __func__);
Expand Down Expand Up @@ -1077,7 +1077,7 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device* ieee, struct rtllib_net

void HTUpdateSelfAndPeerSetting(struct rtllib_device* ieee, struct rtllib_network * pNetwork)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
PHT_INFORMATION_ELE pPeerHTInfo = (PHT_INFORMATION_ELE)pNetwork->bssht.bdHTInfoBuf;

if (pHTInfo->bCurrentHTSupport)
Expand All @@ -1090,7 +1090,7 @@ void HTUpdateSelfAndPeerSetting(struct rtllib_device* ieee, struct rtllib_networ

void HTUseDefaultSetting(struct rtllib_device* ieee)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;

if (pHTInfo->bEnableHT) {
pHTInfo->bCurrentHTSupport = true;
Expand Down Expand Up @@ -1139,7 +1139,7 @@ u8 HTCCheck(struct rtllib_device* ieee, u8* pFrame)

void HTSetConnectBwMode(struct rtllib_device* ieee, HT_CHANNEL_WIDTH Bandwidth, HT_EXTCHNL_OFFSET Offset)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;

if (pHTInfo->bRegBW40MHz == false)
return;
Expand Down Expand Up @@ -1178,7 +1178,7 @@ void HTSetConnectBwMode(struct rtllib_device* ieee, HT_CHANNEL_WIDTH Bandwidth,

void HTSetConnectBwModeCallback(struct rtllib_device* ieee)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;

RTLLIB_DEBUG(RTLLIB_DL_HT, "======>%s()\n", __func__);
if (pHTInfo->bCurBW40MHz)
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/rtl8192e/rtl_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ extern void init_rate_adaptive(struct net_device * dev)
static void dm_check_rate_adaptive(struct net_device * dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
PRT_HIGH_THROUGHPUT pHTInfo = priv->rtllib->pHTInfo;
struct rt_hi_throughput *pHTInfo = priv->rtllib->pHTInfo;
prate_adaptive pra = (prate_adaptive)&priv->rate_adaptive;
u32 currentRATR, targetRATR = 0;
u32 LowRSSIThreshForRA = 0, HighRSSIThreshForRA = 0;
Expand Down Expand Up @@ -2493,7 +2493,7 @@ static void dm_check_edca_turbo(
struct net_device * dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
PRT_HIGH_THROUGHPUT pHTInfo = priv->rtllib->pHTInfo;
struct rt_hi_throughput *pHTInfo = priv->rtllib->pHTInfo;

static unsigned long lastTxOkCnt = 0;
static unsigned long lastRxOkCnt = 0;
Expand Down Expand Up @@ -2621,7 +2621,7 @@ static void dm_init_ctstoself(struct net_device * dev)
static void dm_ctstoself(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv((struct net_device *)dev);
PRT_HIGH_THROUGHPUT pHTInfo = priv->rtllib->pHTInfo;
struct rt_hi_throughput *pHTInfo = priv->rtllib->pHTInfo;
static unsigned long lastTxOkCnt = 0;
static unsigned long lastRxOkCnt = 0;
unsigned long curTxOkCnt = 0;
Expand Down Expand Up @@ -2655,7 +2655,7 @@ static void
dm_Init_WA_Broadcom_IOT(struct net_device * dev)
{
struct r8192_priv *priv = rtllib_priv((struct net_device *)dev);
PRT_HIGH_THROUGHPUT pHTInfo = priv->rtllib->pHTInfo;
struct rt_hi_throughput *pHTInfo = priv->rtllib->pHTInfo;

pHTInfo->bWAIotBroadcom = false;
pHTInfo->WAIotTH = WAIotTHVal;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/rtl8192e/rtllib.h
Original file line number Diff line number Diff line change
Expand Up @@ -2139,7 +2139,7 @@ struct rtllib_device {
RT_RF_CHANGE_SOURCE RfOffReason;
bool is_set_key;
bool wx_set_enc;
PRT_HIGH_THROUGHPUT pHTInfo;
struct rt_hi_throughput *pHTInfo;
spinlock_t bw_spinlock;

spinlock_t reorder_spinlock;
Expand Down Expand Up @@ -2905,7 +2905,7 @@ extern u8 HTGetHighestMCSRate(struct rtllib_device* ieee, u8* pMCSRateSet, u8* p
extern u8 MCS_FILTER_ALL[];
extern u16 MCS_DATA_RATE[2][2][77] ;
extern u8 HTCCheck(struct rtllib_device* ieee, u8* pFrame);
extern void HTResetIOTSetting(PRT_HIGH_THROUGHPUT pHTInfo);
extern void HTResetIOTSetting(struct rt_hi_throughput *pHTInfo);
extern bool IsHTHalfNmodeAPs(struct rtllib_device* ieee);
extern u16 HTHalfMcsToDataRate(struct rtllib_device* ieee, u8 nMcsRate);
extern u16 HTMcsToDataRate( struct rtllib_device* ieee, u8 nMcsRate);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8192e/rtllib_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ struct net_device *alloc_rtllib(int sizeof_priv)
memset(ieee->swcamtable,0,sizeof(SW_CAM_TABLE)*32);
rtllib_softmac_init(ieee);

ieee->pHTInfo = (RT_HIGH_THROUGHPUT*)kzalloc(sizeof(RT_HIGH_THROUGHPUT), GFP_KERNEL);
ieee->pHTInfo = (struct rt_hi_throughput*)kzalloc(sizeof(struct rt_hi_throughput), GFP_KERNEL);
if (ieee->pHTInfo == NULL)
{
RTLLIB_DEBUG(RTLLIB_DL_ERR, "can't alloc memory for HTInfo\n");
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8192e/rtllib_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee,
struct rx_ts_record *pTS,
u16 SeqNum)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
PRX_REORDER_ENTRY pReorderEntry = NULL;
struct rtllib_rxb* prxbIndicateArray[REORDER_WIN_SIZE];
u8 WinSize = pHTInfo->RxReorderWinSize;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/rtl8192e/rtllib_softmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ MgntQuery_TxRateExcludeCCKRates(struct rtllib_device *ieee)

u8 MgntQuery_MgntFrameTxRate(struct rtllib_device *ieee)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
u8 rate;

if (pHTInfo->IOTAction & HT_IOT_ACT_MGNT_USE_CCK_6M)
Expand Down Expand Up @@ -884,7 +884,7 @@ static struct sk_buff* rtllib_probe_resp(struct rtllib_device *ieee, u8 *dest)
u8 tmp_ht_cap_len = 0;
u8* tmp_ht_info_buf = NULL;
u8 tmp_ht_info_len = 0;
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
u8* tmp_generic_ie_buf = NULL;
u8 tmp_generic_ie_len = 0;

Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/rtl8192e/rtllib_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ rtllib_classify(struct sk_buff *skb, u8 bIsAmsdu)
#define SN_LESS(a, b) (((a-b)&0x800)!=0)
void rtllib_tx_query_agg_cap(struct rtllib_device* ieee, struct sk_buff* skb, cb_desc* tcb_desc)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
struct tx_ts_record *pTxTs = NULL;
struct rtllib_hdr_1addr* hdr = (struct rtllib_hdr_1addr*)skb->data;

Expand Down Expand Up @@ -375,7 +375,7 @@ extern void rtllib_qurey_ShortPreambleMode(struct rtllib_device* ieee, cb_desc*
extern void
rtllib_query_HTCapShortGI(struct rtllib_device *ieee, cb_desc *tcb_desc)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;

tcb_desc->bUseShortGI = false;

Expand All @@ -396,7 +396,7 @@ rtllib_query_HTCapShortGI(struct rtllib_device *ieee, cb_desc *tcb_desc)

void rtllib_query_BandwidthMode(struct rtllib_device* ieee, cb_desc *tcb_desc)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;

tcb_desc->bPacketBW = false;

Expand Down Expand Up @@ -444,7 +444,7 @@ void rtllib_query_protectionmode(struct rtllib_device* ieee, cb_desc* tcb_desc,
}
else
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
while (true)
{
if (pHTInfo->IOTAction & HT_IOT_ACT_FORCED_CTS2SELF)
Expand Down

0 comments on commit 7796d93

Please sign in to comment.