Commit fac290a1 authored by Max Tottenham's avatar Max Tottenham Committed by Greg Kroah-Hartman

Staging: bcm: IPv6Protocol.c coding style fix

Fourth patch in a series of patches to fix  coding style in IPv6Protocol.c
Continuation of fixing spacing arount ','
Signed-off-by: default avatarMax Tottenham <mtottenh@gmail.com>
Acked-by: default avatarKevin McKinney <klmckinney1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 07ed6b7f
...@@ -34,7 +34,7 @@ static UCHAR * GetNextIPV6ChainedHeader(UCHAR **ppucPayload, UCHAR *pucNextHeade ...@@ -34,7 +34,7 @@ static UCHAR * GetNextIPV6ChainedHeader(UCHAR **ppucPayload, UCHAR *pucNextHeade
{ {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 HopByHop Header"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 HopByHop Header");
usNextHeaderOffset+=sizeof(IPV6HopByHopOptionsHeader); usNextHeaderOffset += sizeof(IPV6HopByHopOptionsHeader);
} }
break; break;
...@@ -51,7 +51,7 @@ static UCHAR * GetNextIPV6ChainedHeader(UCHAR **ppucPayload, UCHAR *pucNextHeade ...@@ -51,7 +51,7 @@ static UCHAR * GetNextIPV6ChainedHeader(UCHAR **ppucPayload, UCHAR *pucNextHeade
case IPV6HDR_TYPE_FRAGMENTATION: case IPV6HDR_TYPE_FRAGMENTATION:
{ {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Fragmentation Header"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Fragmentation Header");
usNextHeaderOffset+= sizeof(IPV6FragmentHeader); usNextHeaderOffset += sizeof(IPV6FragmentHeader);
} }
break; break;
...@@ -60,8 +60,8 @@ static UCHAR * GetNextIPV6ChainedHeader(UCHAR **ppucPayload, UCHAR *pucNextHeade ...@@ -60,8 +60,8 @@ static UCHAR * GetNextIPV6ChainedHeader(UCHAR **ppucPayload, UCHAR *pucNextHeade
IPV6DestOptionsHeader *pstIpv6DestOptsHdr = (IPV6DestOptionsHeader *)pucPayloadPtr; IPV6DestOptionsHeader *pstIpv6DestOptsHdr = (IPV6DestOptionsHeader *)pucPayloadPtr;
int nTotalOptions = pstIpv6DestOptsHdr->ucHdrExtLen; int nTotalOptions = pstIpv6DestOptsHdr->ucHdrExtLen;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 DestOpts Header Header"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 DestOpts Header Header");
usNextHeaderOffset+= sizeof(IPV6DestOptionsHeader); usNextHeaderOffset += sizeof(IPV6DestOptionsHeader);
usNextHeaderOffset+= nTotalOptions * IPV6_DESTOPTS_HDR_OPTIONSIZE ; usNextHeaderOffset += nTotalOptions * IPV6_DESTOPTS_HDR_OPTIONSIZE ;
} }
break; break;
...@@ -70,7 +70,7 @@ static UCHAR * GetNextIPV6ChainedHeader(UCHAR **ppucPayload, UCHAR *pucNextHeade ...@@ -70,7 +70,7 @@ static UCHAR * GetNextIPV6ChainedHeader(UCHAR **ppucPayload, UCHAR *pucNextHeade
IPV6AuthenticationHeader *pstIpv6AuthHdr = (IPV6AuthenticationHeader *)pucPayloadPtr; IPV6AuthenticationHeader *pstIpv6AuthHdr = (IPV6AuthenticationHeader *)pucPayloadPtr;
int nHdrLen = pstIpv6AuthHdr->ucLength; int nHdrLen = pstIpv6AuthHdr->ucLength;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Authentication Header"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Authentication Header");
usNextHeaderOffset+= nHdrLen * 4; usNextHeaderOffset += nHdrLen * 4;
} }
break; break;
case IPV6HDR_TYPE_ENCRYPTEDSECURITYPAYLOAD: case IPV6HDR_TYPE_ENCRYPTEDSECURITYPAYLOAD:
...@@ -128,7 +128,7 @@ static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, USHORT *pusSrcPort, USHORT ...@@ -128,7 +128,7 @@ static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, USHORT *pusSrcPort, USHORT
{ {
UCHAR *pIpv6HdrScanContext = pucPayload; UCHAR *pIpv6HdrScanContext = pucPayload;
BOOLEAN bDone = FALSE; BOOLEAN bDone = FALSE;
UCHAR ucHeaderType =0; UCHAR ucHeaderType = 0;
UCHAR *pucNextHeader = NULL; UCHAR *pucNextHeader = NULL;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev);
...@@ -141,9 +141,9 @@ static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, USHORT *pusSrcPort, USHORT ...@@ -141,9 +141,9 @@ static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, USHORT *pusSrcPort, USHORT
while (!bDone) { while (!bDone) {
pucNextHeader = GetNextIPV6ChainedHeader(&pIpv6HdrScanContext, &ucHeaderType, &bDone, &usPayloadLength); pucNextHeader = GetNextIPV6ChainedHeader(&pIpv6HdrScanContext, &ucHeaderType, &bDone, &usPayloadLength);
if(bDone) { if(bDone) {
if((ucHeaderType==TCP_HEADER_TYPE) || (ucHeaderType == UDP_HEADER_TYPE)) { if((ucHeaderType == TCP_HEADER_TYPE) || (ucHeaderType == UDP_HEADER_TYPE)) {
*pusSrcPort=*((PUSHORT)(pucNextHeader)); *pusSrcPort = *((PUSHORT)(pucNextHeader));
*pusDestPort=*((PUSHORT)(pucNextHeader+2)); *pusDestPort = *((PUSHORT)(pucNextHeader+2));
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, " \nProtocol Ports - Src Port :0x%x Dest Port : 0x%x", ntohs(*pusSrcPort), ntohs(*pusDestPort)); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, " \nProtocol Ports - Src Port :0x%x Dest Port : 0x%x", ntohs(*pusSrcPort), ntohs(*pusDestPort));
} }
break; break;
...@@ -163,7 +163,7 @@ USHORT IpVersion6(PMINI_ADAPTER Adapter, PVOID pcIpHeader, ...@@ -163,7 +163,7 @@ USHORT IpVersion6(PMINI_ADAPTER Adapter, PVOID pcIpHeader,
{ {
USHORT ushDestPort = 0; USHORT ushDestPort = 0;
USHORT ushSrcPort = 0; USHORT ushSrcPort = 0;
UCHAR ucNextProtocolAboveIP =0; UCHAR ucNextProtocolAboveIP = 0;
IPV6Header *pstIpv6Header = NULL; IPV6Header *pstIpv6Header = NULL;
BOOLEAN bClassificationSucceed = FALSE; BOOLEAN bClassificationSucceed = FALSE;
...@@ -200,11 +200,11 @@ USHORT IpVersion6(PMINI_ADAPTER Adapter, PVOID pcIpHeader, ...@@ -200,11 +200,11 @@ USHORT IpVersion6(PMINI_ADAPTER Adapter, PVOID pcIpHeader,
break; break;
} }
bClassificationSucceed=MatchSrcIpv6Address(pstClassifierRule,pstIpv6Header); bClassificationSucceed = MatchSrcIpv6Address(pstClassifierRule, pstIpv6Header);
if (!bClassificationSucceed) if (!bClassificationSucceed)
break; break;
bClassificationSucceed=MatchDestIpv6Address(pstClassifierRule,pstIpv6Header); bClassificationSucceed = MatchDestIpv6Address(pstClassifierRule, pstIpv6Header);
if (!bClassificationSucceed) if (!bClassificationSucceed)
break; break;
...@@ -213,7 +213,7 @@ USHORT IpVersion6(PMINI_ADAPTER Adapter, PVOID pcIpHeader, ...@@ -213,7 +213,7 @@ USHORT IpVersion6(PMINI_ADAPTER Adapter, PVOID pcIpHeader,
* For IPv6 the next protocol at end of * For IPv6 the next protocol at end of
* Chain of IPv6 prot headers * Chain of IPv6 prot headers
*/ */
bClassificationSucceed=MatchProtocol(pstClassifierRule, ucNextProtocolAboveIP); bClassificationSucceed = MatchProtocol(pstClassifierRule, ucNextProtocolAboveIP);
if (!bClassificationSucceed) if (!bClassificationSucceed)
break; break;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Protocol Matched"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Protocol Matched");
...@@ -221,15 +221,15 @@ USHORT IpVersion6(PMINI_ADAPTER Adapter, PVOID pcIpHeader, ...@@ -221,15 +221,15 @@ USHORT IpVersion6(PMINI_ADAPTER Adapter, PVOID pcIpHeader,
if ((ucNextProtocolAboveIP == TCP_HEADER_TYPE) || (ucNextProtocolAboveIP == UDP_HEADER_TYPE)) { if ((ucNextProtocolAboveIP == TCP_HEADER_TYPE) || (ucNextProtocolAboveIP == UDP_HEADER_TYPE)) {
/* Match Src Port */ /* Match Src Port */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Source Port:%x\n", ntohs(ushSrcPort)); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Source Port:%x\n", ntohs(ushSrcPort));
bClassificationSucceed=MatchSrcPort(pstClassifierRule, ntohs(ushSrcPort)); bClassificationSucceed = MatchSrcPort(pstClassifierRule, ntohs(ushSrcPort));
if (!bClassificationSucceed) if (!bClassificationSucceed)
break; break;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Src Port Matched"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Src Port Matched");
/* Match Dest Port */ /* Match Dest Port */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Destination Port:%x\n",ntohs(ushDestPort)); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Destination Port:%x\n", ntohs(ushDestPort));
bClassificationSucceed=MatchDestPort(pstClassifierRule,ntohs(ushDestPort)); bClassificationSucceed = MatchDestPort(pstClassifierRule, ntohs(ushDestPort));
if (!bClassificationSucceed) if (!bClassificationSucceed)
break; break;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Dest Port Matched"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Dest Port Matched");
...@@ -238,7 +238,7 @@ USHORT IpVersion6(PMINI_ADAPTER Adapter, PVOID pcIpHeader, ...@@ -238,7 +238,7 @@ USHORT IpVersion6(PMINI_ADAPTER Adapter, PVOID pcIpHeader,
if (TRUE == bClassificationSucceed) { if (TRUE == bClassificationSucceed) {
INT iMatchedSFQueueIndex = 0; INT iMatchedSFQueueIndex = 0;
iMatchedSFQueueIndex = SearchSfid(Adapter,pstClassifierRule->ulSFID); iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID);
if(iMatchedSFQueueIndex >= NO_OF_QUEUES) { if(iMatchedSFQueueIndex >= NO_OF_QUEUES) {
bClassificationSucceed = FALSE; bClassificationSucceed = FALSE;
} else { } else {
...@@ -271,11 +271,11 @@ static BOOLEAN MatchSrcIpv6Address(S_CLASSIFIER_RULE *pstClassifierRule, IPV6Hea ...@@ -271,11 +271,11 @@ static BOOLEAN MatchSrcIpv6Address(S_CLASSIFIER_RULE *pstClassifierRule, IPV6Hea
/* First Convert the Ip Address in the packet to Host Endian order */ /* First Convert the Ip Address in the packet to Host Endian order */
for (uiIpv6AddIndex = 0; uiIpv6AddIndex<uiIpv6AddrNoLongWords; uiIpv6AddIndex++) { for (uiIpv6AddIndex = 0; uiIpv6AddIndex < uiIpv6AddrNoLongWords; uiIpv6AddIndex++) {
aulSrcIP[uiIpv6AddIndex]=ntohl(pstIpv6Header->ulSrcIpAddress[uiIpv6AddIndex]); aulSrcIP[uiIpv6AddIndex] = ntohl(pstIpv6Header->ulSrcIpAddress[uiIpv6AddIndex]);
} }
for (uiLoopIndex = 0; uiLoopIndex<uiCountIPSrcAddresses; uiLoopIndex += uiIpv6AddrNoLongWords) { for (uiLoopIndex = 0; uiLoopIndex < uiCountIPSrcAddresses; uiLoopIndex += uiIpv6AddrNoLongWords) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Src Ipv6 Address In Received Packet : \n "); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Src Ipv6 Address In Received Packet : \n ");
DumpIpv6Address(aulSrcIP); DumpIpv6Address(aulSrcIP);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Src Ipv6 Mask In Classifier Rule: \n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Src Ipv6 Mask In Classifier Rule: \n");
...@@ -323,11 +323,11 @@ static BOOLEAN MatchDestIpv6Address(S_CLASSIFIER_RULE *pstClassifierRule, IPV6He ...@@ -323,11 +323,11 @@ static BOOLEAN MatchDestIpv6Address(S_CLASSIFIER_RULE *pstClassifierRule, IPV6He
/* First Convert the Ip Address in the packet to Host Endian order */ /* First Convert the Ip Address in the packet to Host Endian order */
for (uiIpv6AddIndex = 0;uiIpv6AddIndex < uiIpv6AddrNoLongWords; uiIpv6AddIndex++) { for (uiIpv6AddIndex = 0; uiIpv6AddIndex < uiIpv6AddrNoLongWords; uiIpv6AddIndex++) {
aulDestIP[uiIpv6AddIndex]=ntohl(pstIpv6Header->ulDestIpAddress[uiIpv6AddIndex]); aulDestIP[uiIpv6AddIndex] = ntohl(pstIpv6Header->ulDestIpAddress[uiIpv6AddIndex]);
} }
for (uiLoopIndex = 0;uiLoopIndex < uiCountIPDestinationAddresses; uiLoopIndex += uiIpv6AddrNoLongWords) { for (uiLoopIndex = 0; uiLoopIndex < uiCountIPDestinationAddresses; uiLoopIndex += uiIpv6AddrNoLongWords) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Destination Ipv6 Address In Received Packet : \n "); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Destination Ipv6 Address In Received Packet : \n ");
DumpIpv6Address(aulDestIP); DumpIpv6Address(aulDestIP);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Destination Ipv6 Mask In Classifier Rule: \n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\n Destination Ipv6 Mask In Classifier Rule: \n");
......
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