Commit 406a5082 authored by Kevin McKinney's avatar Kevin McKinney Committed by Greg Kroah-Hartman

Staging: bcm: Remove typedef for _ETH_HEADER_STRUC and call directly.

This patch removes typedef for _ETH_HEADER_STRUC,
changes the name of the struct from
_ETH_HEADER_STRUC to bcm_eth_header.
In addition, any calls to the following typedefs
"ETH_HEADER_STRUC, *PETH_HEADER_STRUC" are
changed to call the struct directly.
Signed-off-by: default avatarKevin McKinney <klmckinney1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7a27a2cc
...@@ -528,12 +528,11 @@ typedef struct _MINI_ADAPTER MINI_ADAPTER, *PMINI_ADAPTER; ...@@ -528,12 +528,11 @@ typedef struct _MINI_ADAPTER MINI_ADAPTER, *PMINI_ADAPTER;
#define GET_BCM_ADAPTER(net_dev) netdev_priv(net_dev) #define GET_BCM_ADAPTER(net_dev) netdev_priv(net_dev)
struct _ETH_HEADER_STRUC { struct bcm_eth_header {
UCHAR au8DestinationAddress[6]; UCHAR au8DestinationAddress[6];
UCHAR au8SourceAddress[6]; UCHAR au8SourceAddress[6];
USHORT u16Etype; USHORT u16Etype;
} __packed; } __packed;
typedef struct _ETH_HEADER_STRUC ETH_HEADER_STRUC, *PETH_HEADER_STRUC;
struct bcm_firmware_info { struct bcm_firmware_info {
void __user *pvMappedFirmwareAddress; void __user *pvMappedFirmwareAddress;
......
...@@ -55,7 +55,7 @@ typedef struct _S_ETHCS_PKT_INFO ...@@ -55,7 +55,7 @@ typedef struct _S_ETHCS_PKT_INFO
typedef struct _ETH_CS_802_Q_FRAME typedef struct _ETH_CS_802_Q_FRAME
{ {
ETH_HEADER_STRUC EThHdr; struct bcm_eth_header EThHdr;
USHORT UserPriority:3; USHORT UserPriority:3;
USHORT CFI:1; USHORT CFI:1;
USHORT VLANID:12; USHORT VLANID:12;
...@@ -64,7 +64,7 @@ typedef struct _ETH_CS_802_Q_FRAME ...@@ -64,7 +64,7 @@ typedef struct _ETH_CS_802_Q_FRAME
typedef struct _ETH_CS_802_LLC_FRAME typedef struct _ETH_CS_802_LLC_FRAME
{ {
ETH_HEADER_STRUC EThHdr; struct bcm_eth_header EThHdr;
unsigned char DSAP; unsigned char DSAP;
unsigned char SSAP; unsigned char SSAP;
unsigned char Control; unsigned char Control;
...@@ -72,7 +72,7 @@ typedef struct _ETH_CS_802_LLC_FRAME ...@@ -72,7 +72,7 @@ typedef struct _ETH_CS_802_LLC_FRAME
typedef struct _ETH_CS_802_LLC_SNAP_FRAME typedef struct _ETH_CS_802_LLC_SNAP_FRAME
{ {
ETH_HEADER_STRUC EThHdr; struct bcm_eth_header EThHdr;
unsigned char DSAP; unsigned char DSAP;
unsigned char SSAP; unsigned char SSAP;
unsigned char Control; unsigned char Control;
...@@ -82,7 +82,7 @@ typedef struct _ETH_CS_802_LLC_SNAP_FRAME ...@@ -82,7 +82,7 @@ typedef struct _ETH_CS_802_LLC_SNAP_FRAME
typedef struct _ETH_CS_ETH2_FRAME typedef struct _ETH_CS_ETH2_FRAME
{ {
ETH_HEADER_STRUC EThHdr; struct bcm_eth_header EThHdr;
} __attribute__((packed)) ETH_CS_ETH2_FRAME; } __attribute__((packed)) ETH_CS_ETH2_FRAME;
#define ETHERNET_FRAMETYPE_IPV4 ntohs(0x0800) #define ETHERNET_FRAMETYPE_IPV4 ntohs(0x0800)
......
...@@ -733,7 +733,7 @@ static BOOLEAN EthCSMatchVLANRules(S_CLASSIFIER_RULE *pstClassifierRule,struct s ...@@ -733,7 +733,7 @@ static BOOLEAN EthCSMatchVLANRules(S_CLASSIFIER_RULE *pstClassifierRule,struct s
if(pstEthCsPktInfo->eNwpktEthFrameType!=eEth802QVLANFrame) if(pstEthCsPktInfo->eNwpktEthFrameType!=eEth802QVLANFrame)
return FALSE; return FALSE;
uPriority = (ntohs(*(USHORT *)(skb->data + sizeof(ETH_HEADER_STRUC))) & 0xF000) >> 13; uPriority = (ntohs(*(USHORT *)(skb->data + sizeof(struct bcm_eth_header))) & 0xF000) >> 13;
if((uPriority >= pstClassifierRule->usUserPriority[0]) && (uPriority <= pstClassifierRule->usUserPriority[1])) if((uPriority >= pstClassifierRule->usUserPriority[0]) && (uPriority <= pstClassifierRule->usUserPriority[1]))
bClassificationSucceed = TRUE; bClassificationSucceed = TRUE;
...@@ -751,7 +751,7 @@ static BOOLEAN EthCSMatchVLANRules(S_CLASSIFIER_RULE *pstClassifierRule,struct s ...@@ -751,7 +751,7 @@ static BOOLEAN EthCSMatchVLANRules(S_CLASSIFIER_RULE *pstClassifierRule,struct s
if(pstEthCsPktInfo->eNwpktEthFrameType!=eEth802QVLANFrame) if(pstEthCsPktInfo->eNwpktEthFrameType!=eEth802QVLANFrame)
return FALSE; return FALSE;
usVLANID = ntohs(*(USHORT *)(skb->data + sizeof(ETH_HEADER_STRUC))) & 0xFFF; usVLANID = ntohs(*(USHORT *)(skb->data + sizeof(struct bcm_eth_header))) & 0xFFF;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s Pkt VLANID %x Priority: %d\n",__FUNCTION__,usVLANID, uPriority); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s Pkt VLANID %x Priority: %d\n",__FUNCTION__,usVLANID, uPriority);
...@@ -774,12 +774,12 @@ static BOOLEAN EThCSClassifyPkt(PMINI_ADAPTER Adapter,struct sk_buff* skb, ...@@ -774,12 +774,12 @@ static BOOLEAN EThCSClassifyPkt(PMINI_ADAPTER Adapter,struct sk_buff* skb,
B_UINT8 EthCSCupport) B_UINT8 EthCSCupport)
{ {
BOOLEAN bClassificationSucceed = FALSE; BOOLEAN bClassificationSucceed = FALSE;
bClassificationSucceed = EthCSMatchSrcMACAddress(pstClassifierRule,((ETH_HEADER_STRUC *)(skb->data))->au8SourceAddress); bClassificationSucceed = EthCSMatchSrcMACAddress(pstClassifierRule,((struct bcm_eth_header *)(skb->data))->au8SourceAddress);
if(!bClassificationSucceed) if(!bClassificationSucceed)
return FALSE; return FALSE;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS SrcMAC Matched\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS SrcMAC Matched\n");
bClassificationSucceed = EthCSMatchDestMACAddress(pstClassifierRule,((ETH_HEADER_STRUC*)(skb->data))->au8DestinationAddress); bClassificationSucceed = EthCSMatchDestMACAddress(pstClassifierRule,((struct bcm_eth_header *)(skb->data))->au8DestinationAddress);
if(!bClassificationSucceed) if(!bClassificationSucceed)
return FALSE; return FALSE;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS DestMAC Matched\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS DestMAC Matched\n");
...@@ -804,7 +804,7 @@ static BOOLEAN EThCSClassifyPkt(PMINI_ADAPTER Adapter,struct sk_buff* skb, ...@@ -804,7 +804,7 @@ static BOOLEAN EThCSClassifyPkt(PMINI_ADAPTER Adapter,struct sk_buff* skb,
static void EThCSGetPktInfo(PMINI_ADAPTER Adapter,PVOID pvEthPayload, static void EThCSGetPktInfo(PMINI_ADAPTER Adapter,PVOID pvEthPayload,
PS_ETHCS_PKT_INFO pstEthCsPktInfo) PS_ETHCS_PKT_INFO pstEthCsPktInfo)
{ {
USHORT u16Etype = ntohs(((ETH_HEADER_STRUC*)pvEthPayload)->u16Etype); USHORT u16Etype = ntohs(((struct bcm_eth_header *)pvEthPayload)->u16Etype);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "EthCSGetPktInfo : Eth Hdr Type : %X\n",u16Etype); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "EthCSGetPktInfo : Eth Hdr Type : %X\n",u16Etype);
if(u16Etype > 0x5dc) if(u16Etype > 0x5dc)
...@@ -845,7 +845,7 @@ static void EThCSGetPktInfo(PMINI_ADAPTER Adapter,PVOID pvEthPayload, ...@@ -845,7 +845,7 @@ static void EThCSGetPktInfo(PMINI_ADAPTER Adapter,PVOID pvEthPayload,
else else
pstEthCsPktInfo->eNwpktIPFrameType = eNonIPPacket; pstEthCsPktInfo->eNwpktIPFrameType = eNonIPPacket;
pstEthCsPktInfo->usEtherType = ((ETH_HEADER_STRUC*)pvEthPayload)->u16Etype; pstEthCsPktInfo->usEtherType = ((struct bcm_eth_header *)pvEthPayload)->u16Etype;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "EthCsPktInfo->eNwpktIPFrameType : %x\n",pstEthCsPktInfo->eNwpktIPFrameType); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "EthCsPktInfo->eNwpktIPFrameType : %x\n",pstEthCsPktInfo->eNwpktIPFrameType);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "EthCsPktInfo->eNwpktEthFrameType : %x\n",pstEthCsPktInfo->eNwpktEthFrameType); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "EthCsPktInfo->eNwpktEthFrameType : %x\n",pstEthCsPktInfo->eNwpktEthFrameType);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "EthCsPktInfo->usEtherType : %x\n",pstEthCsPktInfo->usEtherType); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "EthCsPktInfo->usEtherType : %x\n",pstEthCsPktInfo->usEtherType);
......
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