Commit 3b83db43 authored by Larry Finger's avatar Larry Finger

staging: rtl8192e: Convert typedef cb_desc to struct cb_desc

Remove typedef from struct.
Rename struct.
Rename uses.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
parent 43267fef
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
struct rt_firmware *pfirmware = priv->pFirmware; struct rt_firmware *pfirmware = priv->pFirmware;
struct sk_buff *skb; struct sk_buff *skb;
unsigned char *seg_ptr; unsigned char *seg_ptr;
cb_desc *tcb_desc; struct cb_desc *tcb_desc;
u8 bLastIniPkt; u8 bLastIniPkt;
struct tx_fwinfo_8190pci *pTxFwInfo = NULL; struct tx_fwinfo_8190pci *pTxFwInfo = NULL;
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
} }
memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev)); 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->queue_index = TXCMD_QUEUE;
tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_NORMAL; tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_NORMAL;
tcb_desc->bLastIniPkt = bLastIniPkt; tcb_desc->bLastIniPkt = bLastIniPkt;
......
...@@ -1155,7 +1155,7 @@ u8 rtl8192_MapHwQueueToFirmwareQueue(u8 QueueID, u8 priority) ...@@ -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); struct r8192_priv *priv = rtllib_priv(dev);
dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, PCI_DMA_TODEVICE); 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 ...@@ -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, 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); struct r8192_priv *priv = rtllib_priv(dev);
dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, PCI_DMA_TODEVICE); 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) ...@@ -2265,7 +2265,7 @@ bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev)
return Reval; 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; u8 tmp_Short;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "r8190P_def.h" #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_GetHalfNmodeSupportByAPs(struct net_device* dev);
bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev); bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev);
bool rtl8192_HalTxCheckStuck(struct net_device *dev); bool rtl8192_HalTxCheckStuck(struct net_device *dev);
...@@ -45,10 +45,10 @@ void rtl8192_get_eeprom_size(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); bool rtl8192_adapter_start(struct net_device *dev);
void rtl8192_link_change(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_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); struct sk_buff* skb);
void rtl8192_tx_fill_cmd_desc(struct net_device* dev, struct tx_desc_cmd * entry, 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, bool rtl8192_rx_query_status_desc(struct net_device* dev, struct rtllib_rx_stats *stats,
struct rx_desc *pdesc, struct sk_buff* skb); struct rx_desc *pdesc, struct sk_buff* skb);
void rtl8192_halt_adapter(struct net_device *dev, bool reset); void rtl8192_halt_adapter(struct net_device *dev, bool reset);
......
...@@ -42,7 +42,7 @@ bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buff ...@@ -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 rt_firmware *pfirmware = priv->pFirmware;
struct sk_buff *skb; struct sk_buff *skb;
unsigned char *seg_ptr; unsigned char *seg_ptr;
cb_desc *tcb_desc; struct cb_desc *tcb_desc;
u8 bLastIniPkt; u8 bLastIniPkt;
firmware_init_param(dev); firmware_init_param(dev);
...@@ -60,7 +60,7 @@ bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buff ...@@ -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); skb = dev_alloc_skb(frag_length + 4);
memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev)); 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->queue_index = TXCMD_QUEUE;
tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_INIT; tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_INIT;
tcb_desc->bLastIniPkt = bLastIniPkt; tcb_desc->bLastIniPkt = bLastIniPkt;
...@@ -103,14 +103,14 @@ fwSendNullPacket( ...@@ -103,14 +103,14 @@ fwSendNullPacket(
bool rtStatus = true; bool rtStatus = true;
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct sk_buff *skb; struct sk_buff *skb;
cb_desc *tcb_desc; struct cb_desc *tcb_desc;
unsigned char *ptr_buf; unsigned char *ptr_buf;
bool bLastInitPacket = false; bool bLastInitPacket = false;
skb = dev_alloc_skb(Length+ 4); skb = dev_alloc_skb(Length+ 4);
memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev)); 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->queue_index = TXCMD_QUEUE;
tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_INIT; tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_INIT;
tcb_desc->bLastIniPkt = bLastInitPacket; tcb_desc->bLastIniPkt = bLastInitPacket;
......
...@@ -798,7 +798,7 @@ void rtl8192_prepare_beacon(struct r8192_priv *priv) ...@@ -798,7 +798,7 @@ void rtl8192_prepare_beacon(struct r8192_priv *priv)
{ {
struct net_device *dev = priv->rtllib->dev; struct net_device *dev = priv->rtllib->dev;
struct sk_buff *pskb = NULL, *pnewskb = NULL; 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 rtl8192_tx_ring *ring = NULL;
struct tx_desc *pdesc = NULL; struct tx_desc *pdesc = NULL;
...@@ -811,7 +811,7 @@ void rtl8192_prepare_beacon(struct r8192_priv *priv) ...@@ -811,7 +811,7 @@ void rtl8192_prepare_beacon(struct r8192_priv *priv)
if (!pnewskb) if (!pnewskb)
return; return;
tcb_desc = (cb_desc *)(pnewskb->cb + 8); tcb_desc = (struct cb_desc *)(pnewskb->cb + 8);
tcb_desc->queue_index = BEACON_QUEUE; tcb_desc->queue_index = BEACON_QUEUE;
tcb_desc->data_rate = 2; tcb_desc->data_rate = 2;
tcb_desc->RATRIndex = 7; tcb_desc->RATRIndex = 7;
...@@ -1425,7 +1425,7 @@ rtl819x_TxCheckStuck(struct net_device *dev) ...@@ -1425,7 +1425,7 @@ rtl819x_TxCheckStuck(struct net_device *dev)
bool bCheckFwTxCnt = false; bool bCheckFwTxCnt = false;
struct rtl8192_tx_ring *ring = NULL; struct rtl8192_tx_ring *ring = NULL;
struct sk_buff* skb = NULL; struct sk_buff* skb = NULL;
cb_desc * tcb_desc = NULL; struct cb_desc * tcb_desc = NULL;
unsigned long flags = 0; unsigned long flags = 0;
switch (priv->rtllib->ps) switch (priv->rtllib->ps)
...@@ -1456,7 +1456,7 @@ rtl819x_TxCheckStuck(struct net_device *dev) ...@@ -1456,7 +1456,7 @@ rtl819x_TxCheckStuck(struct net_device *dev)
else else
{ {
skb = (&ring->queue)->next; 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++; tcb_desc->nStuckCount++;
bCheckFwTxCnt = true; bCheckFwTxCnt = true;
if (tcb_desc->nStuckCount > 1) if (tcb_desc->nStuckCount > 1)
...@@ -1911,7 +1911,7 @@ void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rat ...@@ -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); struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
int ret; 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; u8 queue_index = tcb_desc->queue_index;
if ((priv->rtllib->eRFPowerState == eRfOff) || IS_NIC_DOWN(priv) || priv->bResetInProgress){ 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) ...@@ -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); struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
int ret; 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; u8 queue_index = tcb_desc->queue_index;
if (queue_index != TXCMD_QUEUE){ if (queue_index != TXCMD_QUEUE){
...@@ -2009,7 +2009,7 @@ void rtl8192_tx_cmd(struct net_device *dev, struct sk_buff *skb) ...@@ -2009,7 +2009,7 @@ void rtl8192_tx_cmd(struct net_device *dev, struct sk_buff *skb)
struct rtl8192_tx_ring *ring; struct rtl8192_tx_ring *ring;
struct tx_desc_cmd * entry; struct tx_desc_cmd * entry;
unsigned int idx; unsigned int idx;
cb_desc *tcb_desc; struct cb_desc *tcb_desc;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&priv->irq_th_lock,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) ...@@ -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; idx = (ring->idx + skb_queue_len(&ring->queue)) % ring->entries;
entry = (struct tx_desc_cmd *) &ring->desc[idx]; 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); 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) ...@@ -2033,7 +2033,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb)
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rtl8192_tx_ring *ring; struct rtl8192_tx_ring *ring;
unsigned long flags; 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 tx_desc *pdesc = NULL;
struct rtllib_hdr_1addr * header = NULL; struct rtllib_hdr_1addr * header = NULL;
u16 fc=0, type=0,stype=0; u16 fc=0, type=0,stype=0;
......
...@@ -532,8 +532,8 @@ struct rtl819x_ops{ ...@@ -532,8 +532,8 @@ struct rtl819x_ops{
void (* init_before_adapter_start)(struct net_device* dev); void (* init_before_adapter_start)(struct net_device* dev);
bool (* initialize_adapter)(struct net_device* dev); bool (* initialize_adapter)(struct net_device* dev);
void (*link_change)(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_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, 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_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); 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); void (* stop_adapter)(struct net_device *dev, bool reset);
......
...@@ -147,7 +147,7 @@ static inline void *netdev_priv_rsl(struct net_device *dev) ...@@ -147,7 +147,7 @@ static inline void *netdev_priv_rsl(struct net_device *dev)
/* defined for skb cb field */ /* defined for skb cb field */
/* At most 28 byte */ /* At most 28 byte */
typedef struct cb_desc { struct cb_desc {
/* Tx Desc Related flags (8-9) */ /* Tx Desc Related flags (8-9) */
u8 bLastIniPkt:1; u8 bLastIniPkt:1;
u8 bCmdOrInit:1; u8 bCmdOrInit:1;
...@@ -202,7 +202,7 @@ typedef struct cb_desc { ...@@ -202,7 +202,7 @@ typedef struct cb_desc {
u8 bBTTxPacket; u8 bBTTxPacket;
u8 bIsBTProbRsp; u8 bIsBTProbRsp;
}cb_desc, *pcb_desc; };//, *pcb_desc;
/*--------------------------Define -------------------------------------------*/ /*--------------------------Define -------------------------------------------*/
#define MGN_1M 0x02 #define MGN_1M 0x02
......
...@@ -192,7 +192,7 @@ static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -192,7 +192,7 @@ static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
int data_len, i; int data_len, i;
u8 *pos; u8 *pos;
struct rtllib_hdr_4addr *hdr; 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 || if (skb_headroom(skb) < CCMP_HDR_LEN ||
skb_tailroom(skb) < CCMP_MIC_LEN || skb_tailroom(skb) < CCMP_MIC_LEN ||
skb->len < hdr_len) skb->len < hdr_len)
...@@ -262,7 +262,7 @@ static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -262,7 +262,7 @@ static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
struct rtllib_ccmp_data *key = priv; struct rtllib_ccmp_data *key = priv;
u8 keyidx, *pos; u8 keyidx, *pos;
struct rtllib_hdr_4addr *hdr; 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]; u8 pn[6];
if (skb->len < hdr_len + CCMP_HDR_LEN + CCMP_MIC_LEN) { if (skb->len < hdr_len + CCMP_HDR_LEN + CCMP_MIC_LEN) {
......
...@@ -303,7 +303,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -303,7 +303,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
int len; int len;
u8 *pos; u8 *pos;
struct rtllib_hdr_4addr *hdr; 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}; struct blkcipher_desc desc = {.tfm = tkey->tx_tfm_arc4};
int ret = 0; int ret = 0;
u8 rc4key[16], *icv; u8 rc4key[16], *icv;
...@@ -384,7 +384,7 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -384,7 +384,7 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
u32 iv32; u32 iv32;
u16 iv16; u16 iv16;
struct rtllib_hdr_4addr *hdr; 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}; struct blkcipher_desc desc = {.tfm = tkey->rx_tfm_arc4};
u8 rc4key[16]; u8 rc4key[16];
u8 icv[4]; u8 icv[4];
......
...@@ -101,7 +101,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -101,7 +101,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
u32 klen, len; u32 klen, len;
u8 key[WEP_KEY_LEN + 3]; u8 key[WEP_KEY_LEN + 3];
u8 *pos; 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}; struct blkcipher_desc desc = {.tfm = wep->tx_tfm};
u32 crc; u32 crc;
u8 *icv; u8 *icv;
...@@ -170,7 +170,7 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -170,7 +170,7 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
u32 klen, plen; u32 klen, plen;
u8 key[WEP_KEY_LEN + 3]; u8 key[WEP_KEY_LEN + 3];
u8 keyidx, *pos; 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}; struct blkcipher_desc desc = {.tfm = wep->rx_tfm};
u32 crc; u32 crc;
u8 icv[4]; u8 icv[4];
......
...@@ -291,7 +291,7 @@ rtllib_rx_frame_decrypt(struct rtllib_device* ieee, struct sk_buff *skb, ...@@ -291,7 +291,7 @@ rtllib_rx_frame_decrypt(struct rtllib_device* ieee, struct sk_buff *skb,
if (ieee->hwsec_active) 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; tcb_desc->bHwSec = 1;
if (ieee->need_sw_enc) if (ieee->need_sw_enc)
...@@ -332,7 +332,7 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device* ieee, struct sk_buff *skb, ...@@ -332,7 +332,7 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device* ieee, struct sk_buff *skb,
return 0; return 0;
if (ieee->hwsec_active) 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; tcb_desc->bHwSec = 1;
if (ieee->need_sw_enc) if (ieee->need_sw_enc)
......
...@@ -242,7 +242,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee) ...@@ -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 *header=
(struct rtllib_hdr_3addr *) skb->data; (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); spin_lock_irqsave(&ieee->lock, flags);
/* called with 2nd param 0, no mgmt lock required */ /* called with 2nd param 0, no mgmt lock required */
...@@ -311,7 +311,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, ...@@ -311,7 +311,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb,
struct rtllib_hdr_3addr *header = struct rtllib_hdr_3addr *header =
(struct rtllib_hdr_3addr *) skb->data; (struct rtllib_hdr_3addr *) skb->data;
u16 fc,type,stype; 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; fc = header->frame_ctl;
type = WLAN_FC_GET_TYPE(fc); type = WLAN_FC_GET_TYPE(fc);
...@@ -2552,7 +2552,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee) ...@@ -2552,7 +2552,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee)
unsigned int queue_index = txb->queue_index; unsigned int queue_index = txb->queue_index;
unsigned long flags; unsigned long flags;
int i; int i;
cb_desc *tcb_desc = NULL; struct cb_desc *tcb_desc = NULL;
unsigned long queue_len = 0; unsigned long queue_len = 0;
spin_lock_irqsave(&ieee->lock,flags); spin_lock_irqsave(&ieee->lock,flags);
...@@ -2561,7 +2561,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee) ...@@ -2561,7 +2561,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee)
rtllib_sta_wakeup(ieee,0); rtllib_sta_wakeup(ieee,0);
/* update the tx status */ /* 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) { if (tcb_desc->bMulticast) {
ieee->stats.multicast++; ieee->stats.multicast++;
} }
......
...@@ -287,7 +287,7 @@ rtllib_classify(struct sk_buff *skb, u8 bIsAmsdu) ...@@ -287,7 +287,7 @@ rtllib_classify(struct sk_buff *skb, u8 bIsAmsdu)
} }
#define SN_LESS(a, b) (((a-b)&0x800)!=0) #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 rt_hi_throughput *pHTInfo = ieee->pHTInfo;
struct tx_ts_record *pTxTs = NULL; struct tx_ts_record *pTxTs = NULL;
...@@ -358,7 +358,7 @@ void rtllib_tx_query_agg_cap(struct rtllib_device* ieee, struct sk_buff* skb, cb ...@@ -358,7 +358,7 @@ void rtllib_tx_query_agg_cap(struct rtllib_device* ieee, struct sk_buff* skb, cb
return; 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; tcb_desc->bUseShortPreamble = false;
if (tcb_desc->data_rate == 2) if (tcb_desc->data_rate == 2)
...@@ -373,7 +373,7 @@ extern void rtllib_qurey_ShortPreambleMode(struct rtllib_device* ieee, cb_desc* ...@@ -373,7 +373,7 @@ extern void rtllib_qurey_ShortPreambleMode(struct rtllib_device* ieee, cb_desc*
} }
extern void 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; struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
...@@ -394,7 +394,7 @@ rtllib_query_HTCapShortGI(struct rtllib_device *ieee, cb_desc *tcb_desc) ...@@ -394,7 +394,7 @@ rtllib_query_HTCapShortGI(struct rtllib_device *ieee, cb_desc *tcb_desc)
tcb_desc->bUseShortGI = true; 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; struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
...@@ -413,7 +413,7 @@ void rtllib_query_BandwidthMode(struct rtllib_device* ieee, cb_desc *tcb_desc) ...@@ -413,7 +413,7 @@ void rtllib_query_BandwidthMode(struct rtllib_device* ieee, cb_desc *tcb_desc)
return; 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->bRTSSTBC = false;
tcb_desc->bRTSUseShortGI = false; tcb_desc->bRTSUseShortGI = false;
...@@ -513,7 +513,7 @@ void rtllib_query_protectionmode(struct rtllib_device* ieee, cb_desc* tcb_desc, ...@@ -513,7 +513,7 @@ void rtllib_query_protectionmode(struct rtllib_device* ieee, cb_desc* tcb_desc,
} }
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) if (ieee->bTxDisableRateFallBack)
tcb_desc->bTxDisableRateFallBack = true; tcb_desc->bTxDisableRateFallBack = true;
...@@ -586,7 +586,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) ...@@ -586,7 +586,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
u8 dest[ETH_ALEN], src[ETH_ALEN]; u8 dest[ETH_ALEN], src[ETH_ALEN];
int qos_actived = ieee->current_network.qos_data.active; int qos_actived = ieee->current_network.qos_data.active;
struct rtllib_crypt_data* crypt = NULL; struct rtllib_crypt_data* crypt = NULL;
cb_desc *tcb_desc; struct cb_desc *tcb_desc;
u8 bIsMulticast = false; u8 bIsMulticast = false;
u8 IsAmsdu = false; u8 IsAmsdu = false;
...@@ -778,7 +778,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) ...@@ -778,7 +778,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
for (i = 0; i < nr_frags; i++) { for (i = 0; i < nr_frags; i++) {
skb_frag = txb->fragments[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){ if (qos_actived){
skb_frag->priority = skb->priority; skb_frag->priority = skb->priority;
tcb_desc->queue_index = UP2AC(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) ...@@ -873,7 +873,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
success: success:
if (txb) 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->bTxEnableFwCalcDur = 1;
tcb_desc->priority = skb->priority; tcb_desc->priority = skb->priority;
......
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