Staging: bcm: Remove typedef for _ETH_HEADER_STRUC and call directly.
authorKevin McKinney <klmckinney1@gmail.com>
Sat, 26 May 2012 16:04:57 +0000 (12:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Jun 2012 04:06:35 +0000 (21:06 -0700)
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: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm/Adapter.h
drivers/staging/bcm/Protocol.h
drivers/staging/bcm/Qos.c

index 12a43fb92c181f5696758e619c716efbce63f3df..338f1acfdd184358a07b66d821104f165beae6ac 100644 (file)
@@ -528,12 +528,11 @@ typedef struct _MINI_ADAPTER MINI_ADAPTER, *PMINI_ADAPTER;
 
 #define GET_BCM_ADAPTER(net_dev) netdev_priv(net_dev)
 
-struct _ETH_HEADER_STRUC {
+struct bcm_eth_header {
        UCHAR   au8DestinationAddress[6];
        UCHAR   au8SourceAddress[6];
        USHORT  u16Etype;
 } __packed;
-typedef struct _ETH_HEADER_STRUC ETH_HEADER_STRUC, *PETH_HEADER_STRUC;
 
 struct bcm_firmware_info {
        void    __user *pvMappedFirmwareAddress;
index b8a4009bdf0cb74568ce20321cdc92db078b4a27..562d4dd81a7c13d18a564e791f3fff2014dae7bc 100644 (file)
@@ -55,7 +55,7 @@ typedef struct _S_ETHCS_PKT_INFO
 
 typedef struct _ETH_CS_802_Q_FRAME
 {
-       ETH_HEADER_STRUC EThHdr;
+       struct bcm_eth_header EThHdr;
        USHORT UserPriority:3;
        USHORT CFI:1;
        USHORT VLANID:12;
@@ -64,7 +64,7 @@ typedef struct _ETH_CS_802_Q_FRAME
 
 typedef struct _ETH_CS_802_LLC_FRAME
 {
-       ETH_HEADER_STRUC EThHdr;
+       struct bcm_eth_header EThHdr;
        unsigned char DSAP;
        unsigned char SSAP;
        unsigned char Control;
@@ -72,7 +72,7 @@ typedef struct _ETH_CS_802_LLC_FRAME
 
 typedef struct _ETH_CS_802_LLC_SNAP_FRAME
 {
-       ETH_HEADER_STRUC EThHdr;
+       struct bcm_eth_header EThHdr;
        unsigned char DSAP;
        unsigned char SSAP;
        unsigned char Control;
@@ -82,7 +82,7 @@ typedef struct _ETH_CS_802_LLC_SNAP_FRAME
 
 typedef struct _ETH_CS_ETH2_FRAME
 {
-       ETH_HEADER_STRUC EThHdr;
+       struct bcm_eth_header EThHdr;
 } __attribute__((packed)) ETH_CS_ETH2_FRAME;
 
 #define ETHERNET_FRAMETYPE_IPV4                ntohs(0x0800)
index c97020f0fb6a3aa26d82c0373df39b01e4c06dc9..9bf61ff6ac78c080fcbffd0d1286f533b72b8328 100644 (file)
@@ -733,7 +733,7 @@ static BOOLEAN EthCSMatchVLANRules(S_CLASSIFIER_RULE *pstClassifierRule,struct s
                if(pstEthCsPktInfo->eNwpktEthFrameType!=eEth802QVLANFrame)
                                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]))
                                bClassificationSucceed = TRUE;
@@ -751,7 +751,7 @@ static BOOLEAN EthCSMatchVLANRules(S_CLASSIFIER_RULE *pstClassifierRule,struct s
                if(pstEthCsPktInfo->eNwpktEthFrameType!=eEth802QVLANFrame)
                                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);
 
@@ -774,12 +774,12 @@ static BOOLEAN EThCSClassifyPkt(PMINI_ADAPTER Adapter,struct sk_buff* skb,
                                B_UINT8 EthCSCupport)
 {
        BOOLEAN bClassificationSucceed = FALSE;
-       bClassificationSucceed = EthCSMatchSrcMACAddress(pstClassifierRule,((ETH_HEADER_STRUC *)(skb->data))->au8SourceAddress);
+       bClassificationSucceed = EthCSMatchSrcMACAddress(pstClassifierRule,((struct bcm_eth_header *)(skb->data))->au8SourceAddress);
        if(!bClassificationSucceed)
                return FALSE;
        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)
                return FALSE;
        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,
 static void EThCSGetPktInfo(PMINI_ADAPTER Adapter,PVOID pvEthPayload,
                            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);
        if(u16Etype > 0x5dc)
@@ -845,7 +845,7 @@ static void EThCSGetPktInfo(PMINI_ADAPTER Adapter,PVOID pvEthPayload,
        else
                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->eNwpktEthFrameType : %x\n",pstEthCsPktInfo->eNwpktEthFrameType);
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,  "EthCsPktInfo->usEtherType : %x\n",pstEthCsPktInfo->usEtherType);