staging: rtl8192e: Convert typedef cb_desc to struct cb_desc
authorLarry Finger <Larry.Finger@lwfinger.net>
Tue, 19 Jul 2011 05:01:29 +0000 (00:01 -0500)
committerLarry Finger <Larry.Finger@lwfinger.net>
Wed, 24 Aug 2011 06:42:49 +0000 (01:42 -0500)
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
13 files changed:
drivers/staging/rtl8192e/r8192E_cmdpkt.c
drivers/staging/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/r8192E_dev.h
drivers/staging/rtl8192e/r8192E_firmware.c
drivers/staging/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtl_core.h
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
drivers/staging/rtl8192e/rtllib_crypt_tkip.c
drivers/staging/rtl8192e/rtllib_crypt_wep.c
drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_softmac.c
drivers/staging/rtl8192e/rtllib_tx.c

index aa15255cffae29abe580965a5a018de43b16b664..d306e1034cf2a49f3da732a59dcc509e195ab9df 100644 (file)
@@ -48,7 +48,7 @@
        struct rt_firmware *pfirmware = priv->pFirmware;
        struct sk_buff          *skb;
        unsigned char           *seg_ptr;
-       cb_desc                 *tcb_desc;
+       struct cb_desc *tcb_desc;
        u8                              bLastIniPkt;
 
        struct tx_fwinfo_8190pci *pTxFwInfo = NULL;
@@ -75,7 +75,7 @@
                }
 
                memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev));
-               tcb_desc = (cb_desc*)(skb->cb + MAX_DEV_ADDR_SIZE);
+               tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
                tcb_desc->queue_index = TXCMD_QUEUE;
                tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_NORMAL;
                tcb_desc->bLastIniPkt = bLastIniPkt;
index 1935c30da8aa9bf3f5d6f9f7728f1e51abb13006..5da21855f7783974013ed22c1b550d991b448bea 100644 (file)
@@ -1155,7 +1155,7 @@ u8 rtl8192_MapHwQueueToFirmwareQueue(u8 QueueID, u8 priority)
 }
 
 
-void  rtl8192_tx_fill_desc(struct net_device* dev, struct tx_desc * pdesc, cb_desc * cb_desc, struct sk_buff* skb)
+void  rtl8192_tx_fill_desc(struct net_device* dev, struct tx_desc * pdesc, struct cb_desc *cb_desc, struct sk_buff* skb)
 {
     struct r8192_priv *priv = rtllib_priv(dev);
     dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, PCI_DMA_TODEVICE);
@@ -1257,7 +1257,7 @@ void  rtl8192_tx_fill_desc(struct net_device* dev, struct tx_desc * pdesc, cb_de
 }
 
 void  rtl8192_tx_fill_cmd_desc(struct net_device* dev, struct tx_desc_cmd * entry,
-               cb_desc * cb_desc, struct sk_buff* skb)
+               struct cb_desc *cb_desc, struct sk_buff* skb)
 {
     struct r8192_priv *priv = rtllib_priv(dev);
     dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, PCI_DMA_TODEVICE);
@@ -2265,7 +2265,7 @@ bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev)
        return Reval;
 }
 
-u8 rtl8192_QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc)
+u8 rtl8192_QueryIsShort(u8 TxHT, u8 TxRate, struct cb_desc *tcb_desc)
 {
        u8   tmp_Short;
 
index 3843c8d1550d02fe3378ba4ea6004dba7798b90e..4f31307c1fa77bedd90062fca44f3b74ac2073a6 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "r8190P_def.h"
 
-u8 rtl8192_QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc);
+u8 rtl8192_QueryIsShort(u8 TxHT, u8 TxRate, struct cb_desc *tcb_desc);
 bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev);
 bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev);
 bool rtl8192_HalTxCheckStuck(struct net_device *dev);
@@ -45,10 +45,10 @@ void rtl8192_get_eeprom_size(struct net_device* dev);
 bool rtl8192_adapter_start(struct net_device *dev);
 void rtl8192_link_change(struct net_device *dev);
 void rtl8192_AllowAllDestAddr(struct net_device* dev, bool bAllowAllDA, bool WriteIntoReg);
-void  rtl8192_tx_fill_desc(struct net_device* dev, struct tx_desc * pdesc, cb_desc * cb_desc,
+void  rtl8192_tx_fill_desc(struct net_device* dev, struct tx_desc * pdesc, struct cb_desc *cb_desc,
                           struct sk_buff* skb);
 void  rtl8192_tx_fill_cmd_desc(struct net_device* dev, struct tx_desc_cmd * entry,
-                              cb_desc * cb_desc, struct sk_buff* skb);
+                              struct cb_desc *cb_desc, struct sk_buff* skb);
 bool rtl8192_rx_query_status_desc(struct net_device* dev, struct rtllib_rx_stats *stats,
                                  struct rx_desc *pdesc, struct sk_buff* skb);
 void rtl8192_halt_adapter(struct net_device *dev, bool reset);
index 574d8dcc24ce8bc94b7d40f60ff51c38a2b190a3..41a6144a3433d17a95757cc4682ffec0de12f8fb 100644 (file)
@@ -42,7 +42,7 @@ bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buff
        struct rt_firmware *pfirmware = priv->pFirmware;
        struct sk_buff      *skb;
        unsigned char       *seg_ptr;
-       cb_desc             *tcb_desc;
+       struct cb_desc *tcb_desc;
        u8                  bLastIniPkt;
 
        firmware_init_param(dev);
@@ -60,7 +60,7 @@ bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buff
 
                skb  = dev_alloc_skb(frag_length + 4);
                memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev));
-               tcb_desc = (cb_desc*)(skb->cb + MAX_DEV_ADDR_SIZE);
+               tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
                tcb_desc->queue_index = TXCMD_QUEUE;
                tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_INIT;
                tcb_desc->bLastIniPkt = bLastIniPkt;
@@ -103,14 +103,14 @@ fwSendNullPacket(
        bool    rtStatus = true;
        struct r8192_priv   *priv = rtllib_priv(dev);
        struct sk_buff      *skb;
-       cb_desc             *tcb_desc;
+       struct cb_desc *tcb_desc;
        unsigned char       *ptr_buf;
        bool    bLastInitPacket = false;
 
 
        skb  = dev_alloc_skb(Length+ 4);
        memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev));
-       tcb_desc = (cb_desc*)(skb->cb + MAX_DEV_ADDR_SIZE);
+       tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
        tcb_desc->queue_index = TXCMD_QUEUE;
        tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_INIT;
        tcb_desc->bLastIniPkt = bLastInitPacket;
index 5fe3e8ee9c0413842624de44a03444b45c7e9af9..e8e6d601479c7a7770094ee7322d199cc531d078 100644 (file)
@@ -798,7 +798,7 @@ void rtl8192_prepare_beacon(struct r8192_priv *priv)
 {
        struct net_device *dev = priv->rtllib->dev;
        struct sk_buff *pskb = NULL, *pnewskb = NULL;
-       cb_desc *tcb_desc = NULL;
+       struct cb_desc *tcb_desc = NULL;
        struct rtl8192_tx_ring *ring = NULL;
        struct tx_desc *pdesc = NULL;
 
@@ -811,7 +811,7 @@ void rtl8192_prepare_beacon(struct r8192_priv *priv)
        if (!pnewskb)
                return;
 
-       tcb_desc = (cb_desc *)(pnewskb->cb + 8);
+       tcb_desc = (struct cb_desc *)(pnewskb->cb + 8);
        tcb_desc->queue_index = BEACON_QUEUE;
        tcb_desc->data_rate = 2;
        tcb_desc->RATRIndex = 7;
@@ -1425,7 +1425,7 @@ rtl819x_TxCheckStuck(struct net_device *dev)
        bool                    bCheckFwTxCnt = false;
        struct rtl8192_tx_ring  *ring = NULL;
        struct sk_buff* skb = NULL;
-       cb_desc * tcb_desc = NULL;
+       struct cb_desc * tcb_desc = NULL;
        unsigned long flags = 0;
 
        switch (priv->rtllib->ps)
@@ -1456,7 +1456,7 @@ rtl819x_TxCheckStuck(struct net_device *dev)
                else
                {
                        skb = (&ring->queue)->next;
-                       tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
+                       tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
                        tcb_desc->nStuckCount++;
                        bCheckFwTxCnt = true;
                        if (tcb_desc->nStuckCount > 1)
@@ -1911,7 +1911,7 @@ void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rat
 {
        struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
        int ret;
-       cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
+       struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
        u8 queue_index = tcb_desc->queue_index;
 
        if ((priv->rtllib->eRFPowerState == eRfOff) || IS_NIC_DOWN(priv) || priv->bResetInProgress){
@@ -1942,7 +1942,7 @@ int rtl8192_hard_start_xmit(struct sk_buff *skb,struct net_device *dev)
 {
        struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
        int ret;
-       cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
+       struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
        u8 queue_index = tcb_desc->queue_index;
 
        if (queue_index != TXCMD_QUEUE){
@@ -2009,7 +2009,7 @@ void rtl8192_tx_cmd(struct net_device *dev, struct sk_buff *skb)
     struct rtl8192_tx_ring *ring;
     struct tx_desc_cmd * entry;
     unsigned int idx;
-    cb_desc *tcb_desc;
+    struct cb_desc *tcb_desc;
     unsigned long flags;
 
     spin_lock_irqsave(&priv->irq_th_lock,flags);
@@ -2018,7 +2018,7 @@ void rtl8192_tx_cmd(struct net_device *dev, struct sk_buff *skb)
     idx = (ring->idx + skb_queue_len(&ring->queue)) % ring->entries;
     entry = (struct tx_desc_cmd *) &ring->desc[idx];
 
-    tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
+    tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
 
     priv->ops->tx_fill_cmd_descriptor(dev, entry, tcb_desc, skb);
 
@@ -2033,7 +2033,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb)
        struct r8192_priv *priv = rtllib_priv(dev);
        struct rtl8192_tx_ring  *ring;
        unsigned long flags;
-       cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
+       struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
        struct tx_desc *pdesc = NULL;
        struct rtllib_hdr_1addr * header = NULL;
        u16 fc=0, type=0,stype=0;
index cb2879236432310a9e2da324747e89283fa4b506..705ccdee0db16166934996454a978707c931b85f 100644 (file)
@@ -532,8 +532,8 @@ struct rtl819x_ops{
        void (* init_before_adapter_start)(struct net_device* dev);
        bool (* initialize_adapter)(struct net_device* dev);
        void (*link_change)(struct net_device* dev);
-       void (* tx_fill_descriptor)(struct net_device* dev, struct tx_desc *tx_desc, cb_desc * cb_desc, struct sk_buff *skb);
-       void (* tx_fill_cmd_descriptor)(struct net_device* dev, struct tx_desc_cmd * entry, cb_desc * cb_desc, struct sk_buff *skb);
+       void (* tx_fill_descriptor)(struct net_device* dev, struct tx_desc *tx_desc, struct cb_desc *cb_desc, struct sk_buff *skb);
+       void (* tx_fill_cmd_descriptor)(struct net_device* dev, struct tx_desc_cmd * entry, struct cb_desc *cb_desc, struct sk_buff *skb);
        bool (* rx_query_status_descriptor)(struct net_device* dev, struct rtllib_rx_stats*  stats, struct rx_desc *pdesc, struct sk_buff* skb);
        bool (* rx_command_packet_handler)(struct net_device *dev, struct sk_buff* skb, struct rx_desc *pdesc);
        void (* stop_adapter)(struct net_device *dev, bool reset);
index 2bf090c41c1f32847f803ff9bb1509760c70030a..4b1a6d8dcc2b1b0392f013f88e073703a54ac0ad 100644 (file)
@@ -147,7 +147,7 @@ static inline void *netdev_priv_rsl(struct net_device *dev)
 
 /* defined for skb cb field */
 /* At most 28 byte */
-typedef struct cb_desc {
+struct cb_desc {
        /* Tx Desc Related flags (8-9) */
        u8 bLastIniPkt:1;
        u8 bCmdOrInit:1;
@@ -202,7 +202,7 @@ typedef struct cb_desc {
 
        u8 bBTTxPacket;
        u8 bIsBTProbRsp;
-}cb_desc, *pcb_desc;
+};//, *pcb_desc;
 
 /*--------------------------Define -------------------------------------------*/
 #define MGN_1M                  0x02
index ef17c999009e16d74138512b797620ee8b5e0679..9e640c24b89b13d6bad1bf19358068cbbec5e6a1 100644 (file)
@@ -192,7 +192,7 @@ static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
        int data_len, i;
        u8 *pos;
        struct rtllib_hdr_4addr *hdr;
-       cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
+       struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
        if (skb_headroom(skb) < CCMP_HDR_LEN ||
            skb_tailroom(skb) < CCMP_MIC_LEN ||
            skb->len < hdr_len)
@@ -262,7 +262,7 @@ static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        struct rtllib_ccmp_data *key = priv;
        u8 keyidx, *pos;
        struct rtllib_hdr_4addr *hdr;
-       cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
+       struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
        u8 pn[6];
 
        if (skb->len < hdr_len + CCMP_HDR_LEN + CCMP_MIC_LEN) {
index 8918aa5760a92c70fe32a556f22aa489884af157..89da28de571e50ba6e227107f9cc1792c279d569 100644 (file)
@@ -303,7 +303,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
                int len;
        u8 *pos;
        struct rtllib_hdr_4addr *hdr;
-       cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
+       struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
        struct blkcipher_desc desc = {.tfm = tkey->tx_tfm_arc4};
        int ret = 0;
        u8 rc4key[16],  *icv;
@@ -384,7 +384,7 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        u32 iv32;
        u16 iv16;
        struct rtllib_hdr_4addr *hdr;
-       cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
+       struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
        struct blkcipher_desc desc = {.tfm = tkey->rx_tfm_arc4};
        u8 rc4key[16];
        u8 icv[4];
index 201e2ec5d3a91c7b5588e889a4e7037e8d16dca9..05aa2e2a90e24c6a569de0271f24debb124b2916 100644 (file)
@@ -101,7 +101,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
        u32 klen, len;
        u8 key[WEP_KEY_LEN + 3];
        u8 *pos;
-       cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
+       struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
        struct blkcipher_desc desc = {.tfm = wep->tx_tfm};
        u32 crc;
        u8 *icv;
@@ -170,7 +170,7 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
        u32  klen, plen;
        u8 key[WEP_KEY_LEN + 3];
        u8 keyidx, *pos;
-       cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
+       struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
        struct blkcipher_desc desc = {.tfm = wep->rx_tfm};
        u32 crc;
        u8 icv[4];
index 03e9df1e918ca2888d3c87825b2591e22ae79136..909a2f5e8de6653b077a82a9cb265c22fd3cdad2 100644 (file)
@@ -291,7 +291,7 @@ rtllib_rx_frame_decrypt(struct rtllib_device* ieee, struct sk_buff *skb,
 
        if (ieee->hwsec_active)
        {
-               cb_desc *tcb_desc = (cb_desc *)(skb->cb+ MAX_DEV_ADDR_SIZE);
+               struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb+ MAX_DEV_ADDR_SIZE);
                tcb_desc->bHwSec = 1;
 
                if (ieee->need_sw_enc)
@@ -332,7 +332,7 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device* ieee, struct sk_buff *skb,
                return 0;
        if (ieee->hwsec_active)
        {
-               cb_desc *tcb_desc = (cb_desc *)(skb->cb+ MAX_DEV_ADDR_SIZE);
+               struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb+ MAX_DEV_ADDR_SIZE);
                tcb_desc->bHwSec = 1;
 
                if (ieee->need_sw_enc)
index 64574acc0fdd46593926824f882369a80e11d54e..11433c61bdafa48221467f68c9dd6c716eed4bd9 100644 (file)
@@ -242,7 +242,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee)
        struct rtllib_hdr_3addr  *header=
                (struct rtllib_hdr_3addr  *) skb->data;
 
-       cb_desc *tcb_desc = (cb_desc *)(skb->cb + 8);
+       struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + 8);
        spin_lock_irqsave(&ieee->lock, flags);
 
        /* called with 2nd param 0, no mgmt lock required */
@@ -311,7 +311,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb,
        struct rtllib_hdr_3addr  *header =
                (struct rtllib_hdr_3addr  *) skb->data;
        u16 fc,type,stype;
-       cb_desc *tcb_desc = (cb_desc *)(skb->cb + 8);
+       struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + 8);
 
        fc = header->frame_ctl;
        type = WLAN_FC_GET_TYPE(fc);
@@ -2552,7 +2552,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee)
        unsigned int queue_index = txb->queue_index;
        unsigned long flags;
        int  i;
-       cb_desc *tcb_desc = NULL;
+       struct cb_desc *tcb_desc = NULL;
        unsigned long queue_len = 0;
 
        spin_lock_irqsave(&ieee->lock,flags);
@@ -2561,7 +2561,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee)
        rtllib_sta_wakeup(ieee,0);
 
        /* update the tx status */
-       tcb_desc = (cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE);
+       tcb_desc = (struct cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE);
        if (tcb_desc->bMulticast) {
                ieee->stats.multicast++;
        }
index dd89b0bebec7514f4fd748faa9d0ffcd0c3b7d2e..d03b5aa02cc98c8b9957796cd9e72e623e97598b 100644 (file)
@@ -287,7 +287,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)
+void rtllib_tx_query_agg_cap(struct rtllib_device* ieee, struct sk_buff* skb, struct cb_desc * tcb_desc)
 {
        struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
        struct tx_ts_record *pTxTs = NULL;
@@ -358,7 +358,7 @@ FORCED_AGG_SETTING:
                return;
 }
 
-extern void rtllib_qurey_ShortPreambleMode(struct rtllib_device* ieee, cb_desc* tcb_desc)
+extern void rtllib_qurey_ShortPreambleMode(struct rtllib_device* ieee, struct cb_desc * tcb_desc)
 {
        tcb_desc->bUseShortPreamble = false;
        if (tcb_desc->data_rate == 2)
@@ -373,7 +373,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)
+rtllib_query_HTCapShortGI(struct rtllib_device *ieee, struct cb_desc *tcb_desc)
 {
        struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
@@ -394,7 +394,7 @@ rtllib_query_HTCapShortGI(struct rtllib_device *ieee, cb_desc *tcb_desc)
                tcb_desc->bUseShortGI = true;
 }
 
-void rtllib_query_BandwidthMode(struct rtllib_device* ieee, cb_desc *tcb_desc)
+void rtllib_query_BandwidthMode(struct rtllib_device* ieee, struct cb_desc *tcb_desc)
 {
        struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
 
@@ -413,7 +413,7 @@ void rtllib_query_BandwidthMode(struct rtllib_device* ieee, cb_desc *tcb_desc)
        return;
 }
 
-void rtllib_query_protectionmode(struct rtllib_device* ieee, cb_desc* tcb_desc, struct sk_buff* skb)
+void rtllib_query_protectionmode(struct rtllib_device* ieee, struct cb_desc * tcb_desc, struct sk_buff* skb)
 {
        tcb_desc->bRTSSTBC                      = false;
        tcb_desc->bRTSUseShortGI                = false;
@@ -513,7 +513,7 @@ NO_PROTECTION:
 }
 
 
-void rtllib_txrate_selectmode(struct rtllib_device* ieee, cb_desc* tcb_desc)
+void rtllib_txrate_selectmode(struct rtllib_device* ieee, struct cb_desc * tcb_desc)
 {
        if (ieee->bTxDisableRateFallBack)
                tcb_desc->bTxDisableRateFallBack = true;
@@ -586,7 +586,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
        u8 dest[ETH_ALEN], src[ETH_ALEN];
        int qos_actived = ieee->current_network.qos_data.active;
        struct rtllib_crypt_data* crypt = NULL;
-       cb_desc *tcb_desc;
+       struct cb_desc *tcb_desc;
        u8 bIsMulticast = false;
        u8 IsAmsdu = false;
 
@@ -778,7 +778,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
 
                for (i = 0; i < nr_frags; i++) {
                        skb_frag = txb->fragments[i];
-                       tcb_desc = (cb_desc *)(skb_frag->cb + MAX_DEV_ADDR_SIZE);
+                       tcb_desc = (struct cb_desc *)(skb_frag->cb + MAX_DEV_ADDR_SIZE);
                        if (qos_actived){
                                skb_frag->priority = skb->priority;
                                tcb_desc->queue_index =  UP2AC(skb->priority);
@@ -873,7 +873,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
  success:
        if (txb)
        {
-               cb_desc *tcb_desc = (cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE);
+               struct cb_desc *tcb_desc = (struct cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE);
                tcb_desc->bTxEnableFwCalcDur = 1;
                tcb_desc->priority = skb->priority;