Commit fc22c052 authored by Larry Finger's avatar Larry Finger

staging: rtl8192e: Convert typedef buffer to struct buffer

Remove typedef from struct.
Rename struct.
Rename uses.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
parent e3e37629
...@@ -1599,7 +1599,7 @@ void rtl8192_query_rxphystatus( ...@@ -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; bool bcheck = false;
u8 rfpath; u8 rfpath;
......
...@@ -303,7 +303,7 @@ bool init_firmware(struct net_device *dev) ...@@ -303,7 +303,7 @@ bool init_firmware(struct net_device *dev)
goto download_firmware_fail; goto download_firmware_fail;
} }
if (fw_entry->size > sizeof(pfirmware->firmware_buf[init_step])) { 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; goto download_firmware_fail;
} }
......
...@@ -76,7 +76,7 @@ void RxPktPendingTimeout(unsigned long data) ...@@ -76,7 +76,7 @@ void RxPktPendingTimeout(unsigned long data)
pRxTs->RxTimeoutIndicateSeq = 0xffff; pRxTs->RxTimeoutIndicateSeq = 0xffff;
if (index > REORDER_WIN_SIZE){ 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); spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
return; return;
} }
......
...@@ -344,13 +344,12 @@ typedef enum _PCI_BRIDGE_VENDOR { ...@@ -344,13 +344,12 @@ typedef enum _PCI_BRIDGE_VENDOR {
PCI_BRIDGE_VENDOR_MAX , PCI_BRIDGE_VENDOR_MAX ,
} PCI_BRIDGE_VENDOR; } PCI_BRIDGE_VENDOR;
typedef struct buffer struct buffer {
{
struct buffer *next; struct buffer *next;
u32 *buf; u32 *buf;
dma_addr_t dma; dma_addr_t dma;
} buffer; };
struct rtl_reg_debug { struct rtl_reg_debug {
unsigned int cmd; unsigned int cmd;
......
...@@ -761,18 +761,18 @@ do { if (rtllib_debug_level & (level)) \ ...@@ -761,18 +761,18 @@ do { if (rtllib_debug_level & (level)) \
if ((_Comp) & level) \ if ((_Comp) & level) \
{ \ { \
int __i; \ int __i; \
u8 buffer[MAX_STR_LEN]; \ u8 struct buffer[MAX_STR_LEN]; \
int length = (_Len<MAX_STR_LEN)? _Len : (MAX_STR_LEN-1) ; \ int length = (_Len<MAX_STR_LEN)? _Len : (MAX_STR_LEN-1) ; \
memset(buffer, 0, MAX_STR_LEN); \ memset(struct buffer, 0, MAX_STR_LEN); \
memcpy(buffer, (u8 *)_Ptr, length ); \ memcpy(struct buffer, (u8 *)_Ptr, length ); \
for ( __i=0; __i<MAX_STR_LEN; __i++ ) \ for ( __i=0; __i<MAX_STR_LEN; __i++ ) \
{ \ { \
if ( !PRINTABLE(buffer[__i]) ) buffer[__i] = '?'; \ if ( !PRINTABLE(struct buffer[__i]) ) struct buffer[__i] = '?'; \
} \ } \
buffer[length] = '\0'; \ struct buffer[length] = '\0'; \
printk("Rtl819x: "); \ printk("Rtl819x: "); \
printk(_TitleString); \ printk(_TitleString); \
printk(": %d, <%s>\n", _Len, buffer); \ printk(": %d, <%s>\n", _Len, struct buffer); \
} }
#ifndef ETH_P_PAE #ifndef ETH_P_PAE
#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
......
...@@ -61,7 +61,7 @@ struct rtllib_crypto_ops { ...@@ -61,7 +61,7 @@ struct rtllib_crypto_ops {
/* maximum number of bytes added by encryption; encrypt buf is /* maximum number of bytes added by encryption; encrypt buf is
* allocated with extra_prefix_len bytes, copy of in_buf, and * allocated with extra_prefix_len bytes, copy of in_buf, and
* extra_postfix_len; encrypt need not use all this space, but * 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 */ * length must be returned */
int extra_prefix_len, extra_postfix_len; int extra_prefix_len, extra_postfix_len;
......
...@@ -157,7 +157,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -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), * the frame: IV (4 bytes), encrypted payload (including SNAP header),
* ICV (4 bytes). len includes both IV and ICV. * ICV (4 bytes). len includes both IV and ICV.
* *
......
...@@ -618,7 +618,7 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee, ...@@ -618,7 +618,7 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee,
/* /*
* Indication process. * Indication process.
* After Packet dropping and Sliding Window shifting as above, we can now just indicate the packets * 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: /* For Rx Reorder condition:
* 1. All packets with SeqNum smaller than WinStart => Indicate * 1. All packets with SeqNum smaller than WinStart => Indicate
...@@ -654,14 +654,14 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee, ...@@ -654,14 +654,14 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee,
} }
} else { } else {
RTLLIB_DEBUG(RTLLIB_DL_REORDER, 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 { else {
/* /*
* Packets are dropped if there is not enough reorder entries. * Packets are dropped if there is not enough reorder entries.
* This part shall be modified!! We can just indicate all the * 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"); 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, ...@@ -683,7 +683,7 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee,
if ( SN_LESS(pReorderEntry->SeqNum, pTS->RxIndicateSeq) || if ( SN_LESS(pReorderEntry->SeqNum, pTS->RxIndicateSeq) ||
SN_EQUAL(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) { if (index >= REORDER_WIN_SIZE) {
RTLLIB_DEBUG(RTLLIB_DL_ERR, "RxReorderIndicatePacket(): Buffer overflow!! \n"); RTLLIB_DEBUG(RTLLIB_DL_ERR, "RxReorderIndicatePacket(): Buffer overflow!! \n");
bPktInBuf = true; bPktInBuf = true;
...@@ -714,7 +714,7 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee, ...@@ -714,7 +714,7 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee,
pTS->RxTimeoutIndicateSeq = 0xffff; pTS->RxTimeoutIndicateSeq = 0xffff;
if (index>REORDER_WIN_SIZE){ 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); spin_unlock_irqrestore(&(ieee->reorder_spinlock), flags);
return; return;
} }
...@@ -771,7 +771,7 @@ u8 parse_subframe(struct rtllib_device* ieee,struct sk_buff *skb, ...@@ -771,7 +771,7 @@ u8 parse_subframe(struct rtllib_device* ieee,struct sk_buff *skb,
rxb->nr_subframes = 1; rxb->nr_subframes = 1;
/* altered by clark 3/30/2010 /* 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 * must be less than 5000, or the defraged IP datagram
* in the IP layer will exceed "ipfrag_high_tresh" and be * in the IP layer will exceed "ipfrag_high_tresh" and be
* discarded. so there must not use the function * discarded. so there must not use the function
...@@ -813,7 +813,7 @@ u8 parse_subframe(struct rtllib_device* ieee,struct sk_buff *skb, ...@@ -813,7 +813,7 @@ u8 parse_subframe(struct rtllib_device* ieee,struct sk_buff *skb,
skb_pull(skb, ETHERNET_HEADER_SIZE); skb_pull(skb, ETHERNET_HEADER_SIZE);
/* altered by clark 3/30/2010 /* 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 * must be less than 5000, or the defraged IP datagram
* in the IP layer will exceed "ipfrag_high_tresh" and be * in the IP layer will exceed "ipfrag_high_tresh" and be
* discarded. so there must not use the function * discarded. so there must not use the function
......
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