]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
staging: rtl8192e: Convert typedef HT_CAPABILITY_ELE to struct ht_capab_ele
authorLarry Finger <Larry.Finger@lwfinger.net>
Tue, 19 Jul 2011 01:34:19 +0000 (20:34 -0500)
committerLarry Finger <Larry.Finger@lwfinger.net>
Wed, 24 Aug 2011 05:56:09 +0000 (00:56 -0500)
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
drivers/staging/rtl8192e/rtl819x_HT.h
drivers/staging/rtl8192e/rtl819x_HTProc.c
drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_wx.c

index 505789710a056a9064a68700324dcb21d58ba78a..f2916e667b95b5510bd46e90a29ad5135d0818d6 100644 (file)
@@ -135,7 +135,7 @@ typedef enum _HT_Bandwidth_40MHZ_Sub_Carrier{
        SC_MODE_FULL40MHZ = 3,
 }HT_BW40_SC_E;
 
-typedef        struct _HT_CAPABILITY_ELE{
+struct ht_capab_ele {
 
        u8      AdvCoding:1;
        u8      ChlWidth:1;
@@ -165,7 +165,7 @@ typedef     struct _HT_CAPABILITY_ELE{
 
        u8      ASCap;
 
-} __attribute__ ((packed)) HT_CAPABILITY_ELE, *PHT_CAPABILITY_ELE;
+} __packed;
 
 
 struct ht_info_ele {
@@ -232,7 +232,7 @@ struct rt_hi_throughput {
        HT_SPEC_VER                     ePeerHTSpecVer;
 
 
-       HT_CAPABILITY_ELE       SelfHTCap;
+       struct ht_capab_ele SelfHTCap;
        struct ht_info_ele SelfHTInfo;
 
        u8                              PeerHTCapBuf[32];
index 3ac6891718190525caa1653e5c78af700f53bb37..10cce89b10e60c5ed0930a534030599fb47c5c6b 100644 (file)
@@ -98,14 +98,14 @@ void HTDebugHTCapability(u8* CapIE, u8* TitleString )
 {
 
        static u8       EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
-       PHT_CAPABILITY_ELE              pCapELE;
+       struct ht_capab_ele *pCapELE;
 
        if (!memcmp(CapIE, EWC11NHTCap, sizeof(EWC11NHTCap)))
        {
                RTLLIB_DEBUG(RTLLIB_DL_HT, "EWC IE in %s()\n", __func__);
-               pCapELE = (PHT_CAPABILITY_ELE)(&CapIE[4]);
+               pCapELE = (struct ht_capab_ele *)(&CapIE[4]);
        }else
-               pCapELE = (PHT_CAPABILITY_ELE)(&CapIE[0]);
+               pCapELE = (struct ht_capab_ele *)(&CapIE[0]);
 
        RTLLIB_DEBUG(RTLLIB_DL_HT, "<Log HT Capability>. Called by %s\n", TitleString );
 
@@ -190,7 +190,7 @@ bool IsHTHalfNmode40Bandwidth(struct rtllib_device* ieee)
                retValue = false;
        else if (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
                retValue = false;
-       else if (((PHT_CAPABILITY_ELE)(pHTInfo->PeerHTCapBuf))->ChlWidth)
+       else if (((struct ht_capab_ele *)(pHTInfo->PeerHTCapBuf))->ChlWidth)
                retValue = true;
        else
                retValue = false;
@@ -209,14 +209,14 @@ bool IsHTHalfNmodeSGI(struct rtllib_device* ieee, bool is40MHz)
                retValue = false;
        else if (is40MHz)
        {
-               if (((PHT_CAPABILITY_ELE)(pHTInfo->PeerHTCapBuf))->ShortGI40Mhz)
+               if (((struct ht_capab_ele *)(pHTInfo->PeerHTCapBuf))->ShortGI40Mhz)
                        retValue = true;
                else
                        retValue = false;
        }
        else
        {
-               if (((PHT_CAPABILITY_ELE)(pHTInfo->PeerHTCapBuf))->ShortGI20Mhz)
+               if (((struct ht_capab_ele *)(pHTInfo->PeerHTCapBuf))->ShortGI20Mhz)
                        retValue = true;
                else
                        retValue = false;
@@ -585,7 +585,7 @@ void HTResetIOTSetting(
 void HTConstructCapabilityElement(struct rtllib_device* ieee, u8* posHTCap, u8* len, u8 IsEncrypt, bool bAssoc)
 {
        struct rt_hi_throughput *pHT = ieee->pHTInfo;
-       PHT_CAPABILITY_ELE      pCapELE = NULL;
+       struct ht_capab_ele *pCapELE = NULL;
 
        if ((posHTCap == NULL) || (pHT == NULL))
        {
@@ -598,11 +598,11 @@ void HTConstructCapabilityElement(struct rtllib_device* ieee, u8* posHTCap, u8*
        {
                u8      EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
                memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap));
-               pCapELE = (PHT_CAPABILITY_ELE)&(posHTCap[4]);
+               pCapELE = (struct ht_capab_ele *)&(posHTCap[4]);
                *len = 30 + 2;
        }else
        {
-               pCapELE = (PHT_CAPABILITY_ELE)posHTCap;
+               pCapELE = (struct ht_capab_ele *)posHTCap;
                *len = 26 + 2;
        }
 
@@ -835,7 +835,7 @@ void HTSetConnectBwMode(struct rtllib_device* ieee, HT_CHANNEL_WIDTH        Bandwidth,
 void HTOnAssocRsp(struct rtllib_device *ieee)
 {
        struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
-       PHT_CAPABILITY_ELE              pPeerHTCap = NULL;
+       struct ht_capab_ele *pPeerHTCap = NULL;
        struct ht_info_ele *pPeerHTInfo = NULL;
        u16     nMaxAMSDUSize = 0;
        u8*     pMcsFilter = NULL;
@@ -851,16 +851,16 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
        RTLLIB_DEBUG(RTLLIB_DL_HT, "===> HTOnAssocRsp_wq(): HT_ENABLE\n");
 
        if (!memcmp(pHTInfo->PeerHTCapBuf,EWC11NHTCap, sizeof(EWC11NHTCap)))
-               pPeerHTCap = (PHT_CAPABILITY_ELE)(&pHTInfo->PeerHTCapBuf[4]);
+               pPeerHTCap = (struct ht_capab_ele *)(&pHTInfo->PeerHTCapBuf[4]);
        else
-               pPeerHTCap = (PHT_CAPABILITY_ELE)(pHTInfo->PeerHTCapBuf);
+               pPeerHTCap = (struct ht_capab_ele *)(pHTInfo->PeerHTCapBuf);
 
        if (!memcmp(pHTInfo->PeerHTInfoBuf, EWC11NHTInfo, sizeof(EWC11NHTInfo)))
                pPeerHTInfo = (struct ht_info_ele *)(&pHTInfo->PeerHTInfoBuf[4]);
        else
                pPeerHTInfo = (struct ht_info_ele *)(pHTInfo->PeerHTInfoBuf);
 
-       RTLLIB_DEBUG_DATA(RTLLIB_DL_DATA|RTLLIB_DL_HT, pPeerHTCap, sizeof(HT_CAPABILITY_ELE));
+       RTLLIB_DEBUG_DATA(RTLLIB_DL_DATA|RTLLIB_DL_HT, pPeerHTCap, sizeof(struct ht_capab_ele));
        HTSetConnectBwMode(ieee, (HT_CHANNEL_WIDTH)(pPeerHTCap->ChlWidth), (HT_EXTCHNL_OFFSET)(pPeerHTInfo->ExtChlOffset));
        pHTInfo->bCurTxBW40MHz = ((pPeerHTInfo->RecommemdedTxWidth == 1)?true:false);
 
index a6a27847adac6f26fdda8783ae58130a791f5ab4..ff69523a79df1c57c94ed1ff32e5fb83c700730b 100644 (file)
@@ -1949,7 +1949,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
                                }
                                if (tmp_htcap_len != 0){
                                        network->bssht.bdSupportHT = true;
-                                       network->bssht.bdHT1R = ((((PHT_CAPABILITY_ELE)(network->bssht.bdHTCapBuf))->MCS[1]) == 0);
+                                       network->bssht.bdHT1R = ((((struct ht_capab_ele *)(network->bssht.bdHTCapBuf))->MCS[1]) == 0);
                                }else{
                                        network->bssht.bdSupportHT = false;
                                        network->bssht.bdHT1R = false;
@@ -2155,9 +2155,9 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
                                memcpy(network->bssht.bdHTCapBuf,info_element->data,network->bssht.bdHTCapLen);
 
                                network->bssht.bdSupportHT = true;
-                               network->bssht.bdHT1R = ((((PHT_CAPABILITY_ELE)(network->bssht.bdHTCapBuf))->MCS[1]) == 0);
+                               network->bssht.bdHT1R = ((((struct ht_capab_ele *)(network->bssht.bdHTCapBuf))->MCS[1]) == 0);
 
-                               network->bssht.bdBandWidth = (HT_CHANNEL_WIDTH)(((PHT_CAPABILITY_ELE)(network->bssht.bdHTCapBuf))->ChlWidth);
+                               network->bssht.bdBandWidth = (HT_CHANNEL_WIDTH)(((struct ht_capab_ele *)(network->bssht.bdHTCapBuf))->ChlWidth);
                        }
                        else{
                                network->bssht.bdSupportHT = false;
index db4c5684a4e26ca48d9d12973ff5d2a1780fa998..39c6644f11b513f2f5c78241e12b20c2540090e6 100644 (file)
@@ -148,13 +148,13 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee,
 
        if (network->mode >= IEEE_N_24G)
        {
-               PHT_CAPABILITY_ELE ht_cap = NULL;
+               struct ht_capab_ele *ht_cap = NULL;
                bool is40M = false, isShortGI = false;
                u8 max_mcs = 0;
                if (!memcmp(network->bssht.bdHTCapBuf, EWC11NHTCap, 4))
-                       ht_cap = (PHT_CAPABILITY_ELE)&network->bssht.bdHTCapBuf[4];
+                       ht_cap = (struct ht_capab_ele *)&network->bssht.bdHTCapBuf[4];
                else
-                       ht_cap = (PHT_CAPABILITY_ELE)&network->bssht.bdHTCapBuf[0];
+                       ht_cap = (struct ht_capab_ele *)&network->bssht.bdHTCapBuf[0];
                is40M = (ht_cap->ChlWidth)?1:0;
                isShortGI = (ht_cap->ChlWidth)?
                                                ((ht_cap->ShortGI40Mhz)?1:0):