Skip to content

Commit

Permalink
staging: rtl8192e: Convert typedef tx_desc to struct tx_desc
Browse files Browse the repository at this point in the history
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 b0d7de7 commit bc27e89
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/rtl8192e/r8190P_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/rtl8192e/r8192E_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8192e/r8192E_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 6 additions & 6 deletions drivers/staging/rtl8192e/rtl_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/rtl8192e/rtl_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit bc27e89

Please sign in to comment.