Staging: bcm: Remove typedef for _TCP_HEADER and call directly.
This patch removes typedef for _TCP_HEADER, and changes the name of the struct to bcm_tcp_header. In addition, any calls to struct "TCP_HEADER, or *PTCP_HEADER" are changed to call directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
57b49adaf1
commit
16c3f8b04c
|
@ -110,7 +110,7 @@ typedef enum _E_SERVICEFLOW_CS_SPEC_ {
|
||||||
#define ARP_PKT_SIZE 60
|
#define ARP_PKT_SIZE 60
|
||||||
|
|
||||||
/* This is the format for the TCP packet header */
|
/* This is the format for the TCP packet header */
|
||||||
typedef struct _TCP_HEADER {
|
struct bcm_tcp_header {
|
||||||
unsigned short usSrcPort;
|
unsigned short usSrcPort;
|
||||||
unsigned short usDestPort;
|
unsigned short usDestPort;
|
||||||
unsigned long ulSeqNumber;
|
unsigned long ulSeqNumber;
|
||||||
|
@ -120,9 +120,9 @@ typedef struct _TCP_HEADER {
|
||||||
unsigned short usWindowsSize;
|
unsigned short usWindowsSize;
|
||||||
unsigned short usChkSum;
|
unsigned short usChkSum;
|
||||||
unsigned short usUrgetPtr;
|
unsigned short usUrgetPtr;
|
||||||
} TCP_HEADER, *PTCP_HEADER;
|
};
|
||||||
|
|
||||||
#define TCP_HEADER_LEN sizeof(TCP_HEADER)
|
#define TCP_HEADER_LEN sizeof(struct bcm_tcp_header)
|
||||||
#define TCP_ACK 0x10 /* Bit 4 in tcpflags field. */
|
#define TCP_ACK 0x10 /* Bit 4 in tcpflags field. */
|
||||||
#define GET_TCP_HEADER_LEN(byte) ((byte&0xF0)>>4)
|
#define GET_TCP_HEADER_LEN(byte) ((byte&0xF0)>>4)
|
||||||
|
|
||||||
|
|
|
@ -454,7 +454,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter,struct sk_buff* skb)
|
||||||
BOOLEAN bFragmentedPkt=FALSE,bClassificationSucceed=FALSE;
|
BOOLEAN bFragmentedPkt=FALSE,bClassificationSucceed=FALSE;
|
||||||
USHORT usCurrFragment =0;
|
USHORT usCurrFragment =0;
|
||||||
|
|
||||||
PTCP_HEADER pTcpHeader;
|
struct bcm_tcp_header *pTcpHeader;
|
||||||
UCHAR IpHeaderLength;
|
UCHAR IpHeaderLength;
|
||||||
UCHAR TcpHeaderLength;
|
UCHAR TcpHeaderLength;
|
||||||
|
|
||||||
|
@ -614,7 +614,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter,struct sk_buff* skb)
|
||||||
if((TCP == pIpHeader->protocol ) && !bFragmentedPkt && (ETH_AND_IP_HEADER_LEN + TCP_HEADER_LEN <= skb->len) )
|
if((TCP == pIpHeader->protocol ) && !bFragmentedPkt && (ETH_AND_IP_HEADER_LEN + TCP_HEADER_LEN <= skb->len) )
|
||||||
{
|
{
|
||||||
IpHeaderLength = pIpHeader->ihl;
|
IpHeaderLength = pIpHeader->ihl;
|
||||||
pTcpHeader = (PTCP_HEADER)(((PUCHAR)pIpHeader)+(IpHeaderLength*4));
|
pTcpHeader = (struct bcm_tcp_header *)(((PUCHAR)pIpHeader)+(IpHeaderLength*4));
|
||||||
TcpHeaderLength = GET_TCP_HEADER_LEN(pTcpHeader->HeaderLength);
|
TcpHeaderLength = GET_TCP_HEADER_LEN(pTcpHeader->HeaderLength);
|
||||||
|
|
||||||
if((pTcpHeader->ucFlags & TCP_ACK) &&
|
if((pTcpHeader->ucFlags & TCP_ACK) &&
|
||||||
|
|
Loading…
Reference in New Issue