From fc22c052e20496935ee165609ed814eed336cd4a Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Tue, 19 Jul 2011 00:32:34 -0500 Subject: [PATCH] staging: rtl8192e: Convert typedef buffer to struct buffer Remove typedef from struct. Rename struct. Rename uses. Signed-off-by: Larry Finger --- drivers/staging/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/r8192E_firmware.c | 2 +- drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- drivers/staging/rtl8192e/rtl_core.h | 5 ++--- drivers/staging/rtl8192e/rtllib.h | 12 ++++++------ drivers/staging/rtl8192e/rtllib_crypt.h | 2 +- drivers/staging/rtl8192e/rtllib_crypt_wep.c | 2 +- drivers/staging/rtl8192e/rtllib_rx.c | 14 +++++++------- 8 files changed, 20 insertions(+), 21 deletions(-) diff --git a/drivers/staging/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/r8192E_dev.c index 830616ad6be6..d610de92b1d5 100644 --- a/drivers/staging/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/r8192E_dev.c @@ -1599,7 +1599,7 @@ void rtl8192_query_rxphystatus( } } -void rtl8192_process_phyinfo(struct r8192_priv * priv, u8* buffer,struct rtllib_rx_stats * pprevious_stats, struct rtllib_rx_stats * pcurrent_stats) +void rtl8192_process_phyinfo(struct r8192_priv * priv, u8 *buffer,struct rtllib_rx_stats * pprevious_stats, struct rtllib_rx_stats * pcurrent_stats) { bool bcheck = false; u8 rfpath; diff --git a/drivers/staging/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/r8192E_firmware.c index bacee9e9e2a9..7d2042194089 100644 --- a/drivers/staging/rtl8192e/r8192E_firmware.c +++ b/drivers/staging/rtl8192e/r8192E_firmware.c @@ -303,7 +303,7 @@ bool init_firmware(struct net_device *dev) goto download_firmware_fail; } if (fw_entry->size > sizeof(pfirmware->firmware_buf[init_step])) { - RT_TRACE(COMP_FIRMWARE, "img file size exceed the container buffer fail!\n"); + RT_TRACE(COMP_FIRMWARE, "img file size exceed the container struct buffer fail!\n"); goto download_firmware_fail; } diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c index d2043612462a..172ee46087fc 100644 --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c @@ -76,7 +76,7 @@ void RxPktPendingTimeout(unsigned long data) pRxTs->RxTimeoutIndicateSeq = 0xffff; if (index > REORDER_WIN_SIZE){ - RTLLIB_DEBUG(RTLLIB_DL_ERR, "RxReorderIndicatePacket(): Rx Reorer buffer full!! \n"); + RTLLIB_DEBUG(RTLLIB_DL_ERR, "RxReorderIndicatePacket(): Rx Reorer struct buffer full!! \n"); spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags); return; } diff --git a/drivers/staging/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl_core.h index e0c56b9fa3c0..9f576ffc231e 100644 --- a/drivers/staging/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl_core.h @@ -344,13 +344,12 @@ typedef enum _PCI_BRIDGE_VENDOR { PCI_BRIDGE_VENDOR_MAX , } PCI_BRIDGE_VENDOR; -typedef struct buffer -{ +struct buffer { struct buffer *next; u32 *buf; dma_addr_t dma; -} buffer; +}; struct rtl_reg_debug { unsigned int cmd; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 94120ab61472..296488ef4f9b 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -761,18 +761,18 @@ do { if (rtllib_debug_level & (level)) \ if ((_Comp) & level) \ { \ int __i; \ - u8 buffer[MAX_STR_LEN]; \ + u8 struct buffer[MAX_STR_LEN]; \ int length = (_Len\n", _Len, buffer); \ + printk(": %d, <%s>\n", _Len, struct buffer); \ } #ifndef ETH_P_PAE #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ diff --git a/drivers/staging/rtl8192e/rtllib_crypt.h b/drivers/staging/rtl8192e/rtllib_crypt.h index 5772252af538..b01410550c43 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt.h +++ b/drivers/staging/rtl8192e/rtllib_crypt.h @@ -61,7 +61,7 @@ struct rtllib_crypto_ops { /* maximum number of bytes added by encryption; encrypt buf is * allocated with extra_prefix_len bytes, copy of in_buf, and * extra_postfix_len; encrypt need not use all this space, but - * the result must start at the beginning of the buffer and correct + * the result must start at the beginning of the struct buffer and correct * length must be returned */ int extra_prefix_len, extra_postfix_len; diff --git a/drivers/staging/rtl8192e/rtllib_crypt_wep.c b/drivers/staging/rtl8192e/rtllib_crypt_wep.c index 05aa2e2a90e2..78a749f5efa9 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_wep.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_wep.c @@ -157,7 +157,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) } -/* Perform WEP decryption on given buffer. Buffer includes whole WEP part of +/* Perform WEP decryption on given struct buffer. Buffer includes whole WEP part of * the frame: IV (4 bytes), encrypted payload (including SNAP header), * ICV (4 bytes). len includes both IV and ICV. * diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 909a2f5e8de6..68f4aeed9e56 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -618,7 +618,7 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee, /* * Indication process. * After Packet dropping and Sliding Window shifting as above, we can now just indicate the packets - * with the SeqNum smaller than latest WinStart and buffer other packets. + * with the SeqNum smaller than latest WinStart and struct buffer other packets. */ /* For Rx Reorder condition: * 1. All packets with SeqNum smaller than WinStart => Indicate @@ -654,14 +654,14 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee, } } else { RTLLIB_DEBUG(RTLLIB_DL_REORDER, - "Pkt insert into buffer!! IndicateSeq: %d, NewSeq: %d\n",pTS->RxIndicateSeq, SeqNum); + "Pkt insert into struct buffer!! IndicateSeq: %d, NewSeq: %d\n",pTS->RxIndicateSeq, SeqNum); } } else { /* * Packets are dropped if there is not enough reorder entries. * This part shall be modified!! We can just indicate all the - * packets in buffer and get reorder entries. + * packets in struct buffer and get reorder entries. */ RTLLIB_DEBUG(RTLLIB_DL_ERR, "RxReorderIndicatePacket(): There is no reorder entry!! Packet is dropped!!\n"); { @@ -683,7 +683,7 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee, if ( SN_LESS(pReorderEntry->SeqNum, pTS->RxIndicateSeq) || SN_EQUAL(pReorderEntry->SeqNum, pTS->RxIndicateSeq)) { - /* This protect buffer from overflow. */ + /* This protect struct buffer from overflow. */ if (index >= REORDER_WIN_SIZE) { RTLLIB_DEBUG(RTLLIB_DL_ERR, "RxReorderIndicatePacket(): Buffer overflow!! \n"); bPktInBuf = true; @@ -714,7 +714,7 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee, pTS->RxTimeoutIndicateSeq = 0xffff; if (index>REORDER_WIN_SIZE){ - RTLLIB_DEBUG(RTLLIB_DL_ERR, "RxReorderIndicatePacket(): Rx Reorer buffer full!! \n"); + RTLLIB_DEBUG(RTLLIB_DL_ERR, "RxReorderIndicatePacket(): Rx Reorer struct buffer full!! \n"); spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags); return; } @@ -771,7 +771,7 @@ u8 parse_subframe(struct rtllib_device* ieee,struct sk_buff *skb, rxb->nr_subframes = 1; /* altered by clark 3/30/2010 - * The buffer size of the skb indicated to upper layer + * The struct buffer size of the skb indicated to upper layer * must be less than 5000, or the defraged IP datagram * in the IP layer will exceed "ipfrag_high_tresh" and be * discarded. so there must not use the function @@ -813,7 +813,7 @@ u8 parse_subframe(struct rtllib_device* ieee,struct sk_buff *skb, skb_pull(skb, ETHERNET_HEADER_SIZE); /* altered by clark 3/30/2010 - * The buffer size of the skb indicated to upper layer + * The struct buffer size of the skb indicated to upper layer * must be less than 5000, or the defraged IP datagram * in the IP layer will exceed "ipfrag_high_tresh" and be * discarded. so there must not use the function -- 2.20.1