Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

This patch removes typedef IPV6HeaderFormatTag,
and changes the name of the struct to bcm_ipv6_hdr.
In addition, any calls to typedef IPV6Header
are changed to call the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Kevin McKinney and committed by
Greg Kroah-Hartman
9d4cf71f 8f0652c2

+11 -11
+9 -9
drivers/staging/bcm/IPv6Protocol.c
··· 1 1 #include "headers.h" 2 2 3 3 static BOOLEAN MatchSrcIpv6Address(struct bcm_classifier_rule *pstClassifierRule, 4 - IPV6Header *pstIpv6Header); 4 + struct bcm_ipv6_hdr *pstIpv6Header); 5 5 static BOOLEAN MatchDestIpv6Address(struct bcm_classifier_rule *pstClassifierRule, 6 - IPV6Header *pstIpv6Header); 7 - static VOID DumpIpv6Header(IPV6Header *pstIpv6Header); 6 + struct bcm_ipv6_hdr *pstIpv6Header); 7 + static VOID DumpIpv6Header(struct bcm_ipv6_hdr *pstIpv6Header); 8 8 9 9 static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload, 10 10 UCHAR *pucNextHeader, BOOLEAN *bParseDone, USHORT *pusPayloadLength) ··· 186 186 USHORT ushDestPort = 0; 187 187 USHORT ushSrcPort = 0; 188 188 UCHAR ucNextProtocolAboveIP = 0; 189 - IPV6Header *pstIpv6Header = NULL; 189 + struct bcm_ipv6_hdr *pstIpv6Header = NULL; 190 190 BOOLEAN bClassificationSucceed = FALSE; 191 191 192 192 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, 193 193 DBG_LVL_ALL, "IpVersion6 ==========>\n"); 194 194 195 - pstIpv6Header = (IPV6Header *)pcIpHeader; 195 + pstIpv6Header = (struct bcm_ipv6_hdr *)pcIpHeader; 196 196 197 197 DumpIpv6Header(pstIpv6Header); 198 198 ··· 200 200 * Try to get the next higher layer protocol 201 201 * and the Ports Nos if TCP or UDP 202 202 */ 203 - ucNextProtocolAboveIP = GetIpv6ProtocolPorts((UCHAR *)(pcIpHeader + sizeof(IPV6Header)), 203 + ucNextProtocolAboveIP = GetIpv6ProtocolPorts((UCHAR *)(pcIpHeader + sizeof(struct bcm_ipv6_hdr)), 204 204 &ushSrcPort, 205 205 &ushDestPort, 206 206 pstIpv6Header->usPayloadLength, ··· 289 289 290 290 291 291 static BOOLEAN MatchSrcIpv6Address(struct bcm_classifier_rule *pstClassifierRule, 292 - IPV6Header *pstIpv6Header) 292 + struct bcm_ipv6_hdr *pstIpv6Header) 293 293 { 294 294 UINT uiLoopIndex = 0; 295 295 UINT uiIpv6AddIndex = 0; ··· 345 345 } 346 346 347 347 static BOOLEAN MatchDestIpv6Address(struct bcm_classifier_rule *pstClassifierRule, 348 - IPV6Header *pstIpv6Header) 348 + struct bcm_ipv6_hdr *pstIpv6Header) 349 349 { 350 350 UINT uiLoopIndex = 0; 351 351 UINT uiIpv6AddIndex = 0; ··· 414 414 415 415 } 416 416 417 - static VOID DumpIpv6Header(IPV6Header *pstIpv6Header) 417 + static VOID DumpIpv6Header(struct bcm_ipv6_hdr *pstIpv6Header) 418 418 { 419 419 UCHAR ucVersion; 420 420 UCHAR ucPrio;
+2 -2
drivers/staging/bcm/IPv6ProtocolHdr.h
··· 21 21 */ 22 22 #define IPV6_DESTOPTS_HDR_OPTIONSIZE 0x8 23 23 24 - typedef struct IPV6HeaderFormatTag { 24 + struct bcm_ipv6_hdr { 25 25 unsigned char ucVersionPrio; 26 26 unsigned char aucFlowLabel[3]; 27 27 unsigned short usPayloadLength; ··· 29 29 unsigned char ucHopLimit; 30 30 unsigned long ulSrcIpAddress[4]; 31 31 unsigned long ulDestIpAddress[4]; 32 - } IPV6Header; 32 + }; 33 33 34 34 struct bcm_ipv6_routing_hdr { 35 35 unsigned char ucNextHeader;