From bc27e89b27e9b96075c1dc1d93c848b65aee3b3f Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 18 Jul 2011 22:27:06 -0500 Subject: [PATCH] staging: rtl8192e: Convert typedef tx_desc to struct tx_desc Remove typedef from struct. Rename struct. Rename uses. Signed-off-by: Larry Finger --- drivers/staging/rtl8192e/r8190P_def.h | 6 +++--- drivers/staging/rtl8192e/r8192E_dev.c | 4 ++-- drivers/staging/rtl8192e/r8192E_dev.h | 2 +- drivers/staging/rtl8192e/rtl_core.c | 12 ++++++------ drivers/staging/rtl8192e/rtl_core.h | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8192e/r8190P_def.h b/drivers/staging/rtl8192e/r8190P_def.h index d91c3180d010..e481455a8f6e 100644 --- a/drivers/staging/rtl8192e/r8190P_def.h +++ b/drivers/staging/rtl8192e/r8190P_def.h @@ -305,7 +305,7 @@ typedef struct _phy_cck_rx_status_report_819xpci #define PHY_RSSI_SLID_WIN_MAX 100 #define PHY_Beacon_RSSI_SLID_WIN_MAX 10 -typedef struct _tx_desc_819x_pci { +struct tx_desc { u16 PktSize; u8 Offset; u8 Reserved1:3; @@ -341,10 +341,10 @@ typedef struct _tx_desc_819x_pci { u32 Reserved5; u32 Reserved6; u32 Reserved7; -}tx_desc, *ptx_desc; +};//, *ptx_desc; -typedef struct _tx_desc_cmd_819x_pci { +typedef struct tx_desc_cmd_819x_pci { u16 PktSize; u8 Reserved1; u8 CmdType:3; diff --git a/drivers/staging/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/r8192E_dev.c index 2b3da4dbd5a8..688b4f536bcb 100644 --- a/drivers/staging/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/r8192E_dev.c @@ -1155,7 +1155,7 @@ u8 rtl8192_MapHwQueueToFirmwareQueue(u8 QueueID, u8 priority) } -void rtl8192_tx_fill_desc(struct net_device* dev, tx_desc * pdesc, cb_desc * cb_desc, struct sk_buff* skb) +void rtl8192_tx_fill_desc(struct net_device* dev, struct tx_desc * pdesc, 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); @@ -1269,7 +1269,7 @@ void rtl8192_tx_fill_cmd_desc(struct net_device* dev, tx_desc_cmd * entry, if (cb_desc->bCmdOrInit == DESC_PACKET_TYPE_INIT) { entry->CmdInit = DESC_PACKET_TYPE_INIT; } else { - tx_desc* entry_tmp = (tx_desc*)entry; + struct tx_desc * entry_tmp = (struct tx_desc *)entry; entry_tmp->CmdInit = DESC_PACKET_TYPE_NORMAL; entry_tmp->Offset = sizeof(struct tx_fwinfo_8190pci) + 8; entry_tmp->PktSize = (u16)(cb_desc->pkt_size + entry_tmp->Offset); diff --git a/drivers/staging/rtl8192e/r8192E_dev.h b/drivers/staging/rtl8192e/r8192E_dev.h index f8021c7a6618..93d915318fc2 100644 --- a/drivers/staging/rtl8192e/r8192E_dev.h +++ b/drivers/staging/rtl8192e/r8192E_dev.h @@ -45,7 +45,7 @@ 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, tx_desc * pdesc, cb_desc * cb_desc, +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_cmd_desc(struct net_device* dev, tx_desc_cmd * entry, cb_desc * cb_desc, struct sk_buff* skb); diff --git a/drivers/staging/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl_core.c index b7eebf42b52d..a44161d82ec6 100644 --- a/drivers/staging/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl_core.c @@ -800,7 +800,7 @@ void rtl8192_prepare_beacon(struct r8192_priv *priv) struct sk_buff *pskb = NULL, *pnewskb = NULL; cb_desc *tcb_desc = NULL; struct rtl8192_tx_ring *ring = NULL; - tx_desc *pdesc = NULL; + struct tx_desc *pdesc = NULL; ring = &priv->tx_ring[BEACON_QUEUE]; pskb = __skb_dequeue(&ring->queue); @@ -1884,7 +1884,7 @@ static void rtl8192_free_tx_ring(struct net_device *dev, unsigned int prio) struct rtl8192_tx_ring *ring = &priv->tx_ring[prio]; while (skb_queue_len(&ring->queue)) { - tx_desc *entry = &ring->desc[ring->idx]; + struct tx_desc *entry = &ring->desc[ring->idx]; struct sk_buff *skb = __skb_dequeue(&ring->queue); pci_unmap_single(priv->pdev, le32_to_cpu(entry->TxBuffAddr), @@ -1982,7 +1982,7 @@ void rtl8192_tx_isr(struct net_device *dev, int prio) struct rtl8192_tx_ring *ring = &priv->tx_ring[prio]; while (skb_queue_len(&ring->queue)) { - tx_desc *entry = &ring->desc[ring->idx]; + struct tx_desc *entry = &ring->desc[ring->idx]; struct sk_buff *skb; if (prio != BEACON_QUEUE) { @@ -2034,7 +2034,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb) struct rtl8192_tx_ring *ring; unsigned long flags; cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); - tx_desc *pdesc = NULL; + struct tx_desc *pdesc = NULL; struct rtllib_hdr_1addr * header = NULL; u16 fc=0, type=0,stype=0; bool multi_addr=false,broad_addr=false,uni_addr=false; @@ -2150,7 +2150,7 @@ static int rtl8192_alloc_tx_desc_ring(struct net_device *dev, unsigned int prio, unsigned int entries) { struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); - tx_desc *ring; + struct tx_desc *ring; dma_addr_t dma; int i; @@ -2225,7 +2225,7 @@ void rtl8192_pci_resetdescring(struct net_device *dev) struct rtl8192_tx_ring *ring = &priv->tx_ring[i]; while (skb_queue_len(&ring->queue)) { - tx_desc *entry = &ring->desc[ring->idx]; + struct tx_desc *entry = &ring->desc[ring->idx]; struct sk_buff *skb = __skb_dequeue(&ring->queue); pci_unmap_single(priv->pdev, le32_to_cpu(entry->TxBuffAddr), diff --git a/drivers/staging/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl_core.h index a764f18aa244..c4d70e3ccd88 100644 --- a/drivers/staging/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl_core.h @@ -519,7 +519,7 @@ typedef struct _tx_ring{ }__attribute__ ((packed)) tx_ring, * ptx_ring; struct rtl8192_tx_ring { - tx_desc *desc; + struct tx_desc *desc; dma_addr_t dma; unsigned int idx; unsigned int entries; @@ -535,7 +535,7 @@ 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, 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, cb_desc * cb_desc, struct sk_buff *skb); void (* tx_fill_cmd_descriptor)(struct net_device* dev, tx_desc_cmd * entry, cb_desc * cb_desc, struct sk_buff *skb); bool (* rx_query_status_descriptor)(struct net_device* dev, struct rtllib_rx_stats* stats, rx_desc *pdesc, struct sk_buff* skb); bool (* rx_command_packet_handler)(struct net_device *dev, struct sk_buff* skb, rx_desc *pdesc); -- 2.34.1