Many of these should probably use __be16 or __u16 but first things first. Remove USHORT typedef. Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> --- drivers/staging/bcm/Adapter.h | 48 ++++++++++++++-------------- drivers/staging/bcm/Bcmchar.c | 2 +- drivers/staging/bcm/CmHost.c | 8 ++-- drivers/staging/bcm/HandleControlPacket.c | 10 +++--- drivers/staging/bcm/HostMIBSInterface.h | 14 ++++---- drivers/staging/bcm/IPv6Protocol.c | 12 +++--- drivers/staging/bcm/IPv6ProtocolHdr.h | 16 +++++----- drivers/staging/bcm/InterfaceMisc.c | 4 +- drivers/staging/bcm/InterfaceRx.c | 6 ++-- drivers/staging/bcm/Misc.c | 4 +- drivers/staging/bcm/PHSModule.c | 6 ++-- drivers/staging/bcm/PHSModule.h | 4 +- drivers/staging/bcm/Protocol.h | 20 ++++++------ drivers/staging/bcm/Prototypes.h | 12 +++--- drivers/staging/bcm/Qos.c | 30 +++++++++--------- drivers/staging/bcm/Transmit.c | 2 +- drivers/staging/bcm/Typedefs.h | 1 - drivers/staging/bcm/led_control.c | 12 +++--- 18 files changed, 105 insertions(+), 106 deletions(-) diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h index f752b02..aed13fb 100644 --- a/drivers/staging/bcm/Adapter.h +++ b/drivers/staging/bcm/Adapter.h @@ -5,8 +5,8 @@ #include "Debug.h" struct _LEADER { - USHORT Vcid; - USHORT PLength; + unsigned short Vcid; + unsigned short PLength; UCHAR Status; UCHAR Unused[3]; }__attribute__((packed)); @@ -44,11 +44,11 @@ typedef struct _ADD_CONNECTION { ULONG DestIpAddress[MAX_CONNECTIONS]; ULONG DestIpMask[MAX_CONNECTIONS]; - USHORT SrcPortBegin; - USHORT SrcPortEnd; + unsigned short SrcPortBegin; + unsigned short SrcPortEnd; - USHORT DestPortBegin; - USHORT DestPortEnd; + unsigned short DestPortBegin; + unsigned short DestPortEnd; UCHAR SrcTOS; UCHAR SrcProtocol; @@ -64,15 +64,15 @@ typedef struct _CLASSIFICATION_RULE { UCHAR ucSrcPortRange[4]; UCHAR ucDestPortRangeLen; UCHAR ucDestPortRange[4]; - USHORT usVcid; + unsigned short usVcid; } CLASSIFICATION_RULE,*PCLASSIFICATION_RULE; typedef struct _CLASSIFICATION_ONLY { - USHORT usVcid; + unsigned short usVcid; ULONG DestIpAddress; ULONG DestIpMask; - USHORT usPortLo; - USHORT usPortHi; + unsigned short usPortLo; + unsigned short usPortHi; BOOLEAN bIpVersion; UCHAR ucDestinationAddress[16]; } CLASSIFICATION_ONLY, *PCLASSIFICATION_ONLY; @@ -117,7 +117,7 @@ typedef struct _S_CLASSIFIER_RULE { UCHAR ucReserved[2]; B_UINT16 uiClassifierRuleIndex; BOOLEAN bUsed; - USHORT usVCID_Value; + unsigned short usVCID_Value; B_UINT8 u8ClassifierRulePriority; //This field detemines the Classifier Priority U_IP_ADDRESS stSrcIpAddress; UCHAR ucIPSourceAddressLength;//Ip Source Address Length @@ -131,12 +131,12 @@ typedef struct _S_CLASSIFIER_RULE { UCHAR ucProtocolLength;//protocol Length UCHAR ucProtocol[MAX_PROTOCOL_LENGTH];//protocol Length - USHORT usSrcPortRangeLo[MAX_PORT_RANGE]; - USHORT usSrcPortRangeHi[MAX_PORT_RANGE]; + unsigned short usSrcPortRangeLo[MAX_PORT_RANGE]; + unsigned short usSrcPortRangeHi[MAX_PORT_RANGE]; UCHAR ucSrcPortRangeLength; - USHORT usDestPortRangeLo[MAX_PORT_RANGE]; - USHORT usDestPortRangeHi[MAX_PORT_RANGE]; + unsigned short usDestPortRangeLo[MAX_PORT_RANGE]; + unsigned short usDestPortRangeHi[MAX_PORT_RANGE]; UCHAR ucDestPortRangeLength; BOOLEAN bProtocolValid; @@ -161,15 +161,15 @@ typedef struct _S_CLASSIFIER_RULE { UCHAR ucEtherTypeLen; UCHAR au8EthCSEtherType[NUM_ETHERTYPE_BYTES]; UCHAR usUserPriority[2]; - USHORT usVLANID; - USHORT usValidityBitMap; + unsigned short usVLANID; + unsigned short usValidityBitMap; }S_CLASSIFIER_RULE; //typedef struct _S_CLASSIFIER_RULE S_CLASSIFIER_RULE; typedef struct _S_FRAGMENTED_PACKET_INFO { BOOLEAN bUsed; ULONG ulSrcIpAddress; - USHORT usIpIdentification; + unsigned short usIpIdentification; S_CLASSIFIER_RULE *pstMatchedClassifierEntry; BOOLEAN bOutOfOrderFragment; }S_FRAGMENTED_PACKET_INFO,*PS_FRAGMENTED_PACKET_INFO; @@ -177,7 +177,7 @@ typedef struct _S_FRAGMENTED_PACKET_INFO { struct _packet_info { //classification extension Rule ULONG ulSFID; - USHORT usVCID_Value; + unsigned short usVCID_Value; UINT uiThreshold; // This field determines the priority of the SF Queues B_UINT8 u8TrafficPriority; @@ -204,7 +204,7 @@ struct _packet_info { UINT uiMaxAllowedRate; UINT NumOfPacketsSent; UCHAR ucDirection; - USHORT usCID; + unsigned short usCID; S_MIBS_EXTSERVICEFLOW_PARAMETERS stMibsExtServiceFlowTable; UINT uiCurrentRxRate; UINT uiThisPeriodRxBytes; @@ -387,8 +387,8 @@ struct _MINI_ADAPTER { // this to keep track of the Tx and Rx MailBox Registers. atomic_t CurrNumFreeTxDesc; // to keep track the no of byte received - USHORT PrevNumRecvDescs; - USHORT CurrNumRecvDescs; + unsigned short PrevNumRecvDescs; + unsigned short CurrNumRecvDescs; UINT u32TotalDSD; PacketInfo PackInfo[NO_OF_QUEUES]; S_CLASSIFIER_RULE astClassifierTable[MAX_CLASSIFIERS]; @@ -431,7 +431,7 @@ struct _MINI_ADAPTER { BOOLEAN bBinDownloaded; BOOLEAN bCfgDownloaded; BOOLEAN bSyncUpRequestSent; - USHORT usBestEffortQueueIndex; + unsigned short usBestEffortQueueIndex; wait_queue_head_t ioctl_fw_dnld_wait_queue; BOOLEAN waiting_to_fw_download_done; @@ -553,7 +553,7 @@ typedef struct _MINI_ADAPTER MINI_ADAPTER, *PMINI_ADAPTER; struct _ETH_HEADER_STRUC { UCHAR au8DestinationAddress[6]; UCHAR au8SourceAddress[6]; - USHORT u16Etype; + unsigned short u16Etype; }__attribute__((packed)); typedef struct _ETH_HEADER_STRUC ETH_HEADER_STRUC, *PETH_HEADER_STRUC; diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index e9b5dc3..2892c86 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -968,7 +968,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) } case IOCTL_QOS_THRESHOLD: { - USHORT uiLoopIndex; + unsigned short uiLoopIndex; Status = 0; for (uiLoopIndex = 0; uiLoopIndex < NO_OF_QUEUES; uiLoopIndex++) { diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 22b125e..62fac98 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -424,7 +424,7 @@ static inline VOID DeleteClassifierRuleFromSF(PMINI_ADAPTER Adapter, UINT uiSear { S_CLASSIFIER_RULE *pstClassifierEntry = NULL; B_UINT16 u16PacketClassificationRuleIndex; - USHORT usVCID; + unsigned short usVCID; //VOID *pvPhsContext = NULL; //ULONG ulPhsStatus; @@ -461,7 +461,7 @@ VOID DeleteAllClassifiersForSF(PMINI_ADAPTER Adapter, UINT uiSearchRuleIndex) S_CLASSIFIER_RULE *pstClassifierEntry = NULL; UINT nClassifierIndex; //B_UINT16 u16PacketClassificationRuleIndex; - USHORT ulVCID; + unsigned short ulVCID; //VOID *pvPhsContext = NULL; //ULONG ulPhsStatus; @@ -508,7 +508,7 @@ static VOID CopyToAdapter( register PMINI_ADAPTER Adapter, /**<Pointer to the A UINT nIndex=0; stConvergenceSLTypes *psfCSType = NULL; S_PHS_RULE sPhsRule; - USHORT uVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value; + unsigned short uVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value; UINT UGIValue = 0; @@ -1088,7 +1088,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer) "sfAuthorizedSet.u8HARQChannelMapping %x %x %x\n", *(unsigned int*)pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping, *(unsigned int*)&pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping[4], - *(USHORT*) &pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping[8]); + *(unsigned short *)&pstAddIndication->sfAuthorizedSet.u8HARQChannelMapping[8]); bcm_dbg(Adapter, OTHERS, DUMP_CONTROL, ALL, "u8TrafficIndicationPreference : 0x%X\n", pstAddIndication->sfAuthorizedSet.u8TrafficIndicationPreference); diff --git a/drivers/staging/bcm/HandleControlPacket.c b/drivers/staging/bcm/HandleControlPacket.c index fe1c98e..5bb0093 100644 --- a/drivers/staging/bcm/HandleControlPacket.c +++ b/drivers/staging/bcm/HandleControlPacket.c @@ -18,7 +18,7 @@ static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb) struct sk_buff *newPacket = NULL; CHAR cntrl_msg_mask_bit = 0; BOOLEAN drop_pkt_flag = TRUE; - USHORT usStatus = *(PUSHORT)(skb->data); + unsigned short usStatus = *(PUSHORT)(skb->data); if (netif_msg_pktdata(Adapter)) print_hex_dump(KERN_DEBUG, PFX "rx control: ", DUMP_PREFIX_NONE, @@ -34,7 +34,7 @@ static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb) HighPriorityMessage = TRUE; if (Adapter->LinkStatus == LINKUP_DONE) CmControlResponseMessage(Adapter, - (skb->data + sizeof(USHORT))); + (skb->data + sizeof(unsigned short))); break; case LINK_CONTROL_RESP: /* 0xA2 */ case STATUS_RSP: /* 0xA1 */ @@ -42,17 +42,17 @@ static VOID handle_rx_control_packet(PMINI_ADAPTER Adapter, struct sk_buff *skb) "LINK_CONTROL_RESP\n"); HighPriorityMessage = TRUE; LinkControlResponseMessage(Adapter, - (skb->data + sizeof(USHORT))); + (skb->data + sizeof(unsigned short))); break; case STATS_POINTER_RESP: /* 0xA6 */ HighPriorityMessage = TRUE; - StatisticsResponse(Adapter, (skb->data + sizeof(USHORT))); + StatisticsResponse(Adapter, (skb->data + sizeof(unsigned short))); break; case IDLE_MODE_STATUS: /* 0xA3 */ bcm_dbg(Adapter, OTHERS, CP_CTRL_PKT, ALL, "IDLE_MODE_STATUS Type Message Got from F/W\n"); InterfaceIdleModeRespond(Adapter, (PUINT)(skb->data + - sizeof(USHORT))); + sizeof(unsigned short))); HighPriorityMessage = TRUE; break; diff --git a/drivers/staging/bcm/HostMIBSInterface.h b/drivers/staging/bcm/HostMIBSInterface.h index 8077edc..29be2ad 100644 --- a/drivers/staging/bcm/HostMIBSInterface.h +++ b/drivers/staging/bcm/HostMIBSInterface.h @@ -76,7 +76,7 @@ typedef struct _S_MIBS_CLASSIFIER_RULE { UCHAR ucReserved[2]; B_UINT16 uiClassifierRuleIndex; BOOLEAN bUsed; - USHORT usVCID_Value; + unsigned short usVCID_Value; // This field detemines the Classifier Priority B_UINT8 u8ClassifierRulePriority; U_MIBS_IP_ADDRESS stSrcIpAddress; @@ -92,11 +92,11 @@ typedef struct _S_MIBS_CLASSIFIER_RULE { UCHAR ucTosMask;//Tos Mask UCHAR ucProtocolLength;//protocol Length UCHAR ucProtocol[MIBS_MAX_PROTOCOL_LENGTH];//protocol Length - USHORT usSrcPortRangeLo[MIBS_MAX_PORT_RANGE]; - USHORT usSrcPortRangeHi[MIBS_MAX_PORT_RANGE]; + unsigned short usSrcPortRangeLo[MIBS_MAX_PORT_RANGE]; + unsigned short usSrcPortRangeHi[MIBS_MAX_PORT_RANGE]; UCHAR ucSrcPortRangeLength; - USHORT usDestPortRangeLo[MIBS_MAX_PORT_RANGE]; - USHORT usDestPortRangeHi[MIBS_MAX_PORT_RANGE]; + unsigned short usDestPortRangeLo[MIBS_MAX_PORT_RANGE]; + unsigned short usDestPortRangeHi[MIBS_MAX_PORT_RANGE]; UCHAR ucDestPortRangeLength; BOOLEAN bProtocolValid; BOOLEAN bTOSValid; @@ -159,7 +159,7 @@ typedef struct _S_MIBS_EXTSERVICEFLOW_PARAMETERS { typedef struct _S_MIBS_SERVICEFLOW_TABLE { //classification extension Rule ULONG ulSFID; - USHORT usVCID_Value; + unsigned short usVCID_Value; UINT uiThreshold; // This field determines the priority of the SF Queues B_UINT8 u8TrafficPriority; @@ -186,7 +186,7 @@ typedef struct _S_MIBS_SERVICEFLOW_TABLE { UINT uiMaxAllowedRate; UINT NumOfPacketsSent; UCHAR ucDirection; - USHORT usCID; + unsigned short usCID; S_MIBS_EXTSERVICEFLOW_PARAMETERS stMibsExtServiceFlowTable; UINT uiCurrentRxRate; UINT uiThisPeriodRxBytes; diff --git a/drivers/staging/bcm/IPv6Protocol.c b/drivers/staging/bcm/IPv6Protocol.c index 1642dff..459108e 100644 --- a/drivers/staging/bcm/IPv6Protocol.c +++ b/drivers/staging/bcm/IPv6Protocol.c @@ -4,11 +4,11 @@ static BOOLEAN MatchSrcIpv6Address(S_CLASSIFIER_RULE *pstClassifierRule, IPV6Hea static BOOLEAN MatchDestIpv6Address(S_CLASSIFIER_RULE *pstClassifierRule, IPV6Header *pstIpv6Header); static VOID DumpIpv6Header(IPV6Header *pstIpv6Header); -static UCHAR * GetNextIPV6ChainedHeader(UCHAR **ppucPayload, UCHAR *pucNextHeader, BOOLEAN *bParseDone, USHORT *pusPayloadLength) +static UCHAR * GetNextIPV6ChainedHeader(UCHAR **ppucPayload, UCHAR *pucNextHeader, BOOLEAN *bParseDone, unsigned short *pusPayloadLength) { UCHAR *pucRetHeaderPtr = NULL; UCHAR *pucPayloadPtr = NULL; - USHORT usNextHeaderOffset = 0 ; + unsigned short usNextHeaderOffset = 0; PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); if ((NULL == ppucPayload) || (*pusPayloadLength == 0) || (*bParseDone)) { @@ -124,7 +124,7 @@ static UCHAR * GetNextIPV6ChainedHeader(UCHAR **ppucPayload, UCHAR *pucNextHeade } -static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, USHORT *pusSrcPort, USHORT *pusDestPort, USHORT usPayloadLength, UCHAR ucNextHeader) +static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, unsigned short *pusSrcPort, unsigned short *pusDestPort, unsigned short usPayloadLength, UCHAR ucNextHeader) { UCHAR *pIpv6HdrScanContext = pucPayload; BOOLEAN bDone = FALSE; @@ -158,12 +158,12 @@ static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, USHORT *pusSrcPort, USHORT -USHORT IpVersion6(PMINI_ADAPTER Adapter, /**< Pointer to the driver control structure */ +unsigned short IpVersion6(PMINI_ADAPTER Adapter, /**< Pointer to the driver control structure */ PVOID pcIpHeader, /**<Pointer to the IP Hdr of the packet*/ S_CLASSIFIER_RULE *pstClassifierRule ) { - USHORT ushDestPort = 0; - USHORT ushSrcPort = 0; + unsigned short ushDestPort = 0; + unsigned short ushSrcPort = 0; UCHAR ucNextProtocolAboveIP =0; IPV6Header *pstIpv6Header = NULL; BOOLEAN bClassificationSucceed = FALSE; diff --git a/drivers/staging/bcm/IPv6ProtocolHdr.h b/drivers/staging/bcm/IPv6ProtocolHdr.h index bae8ea9..7841918 100644 --- a/drivers/staging/bcm/IPv6ProtocolHdr.h +++ b/drivers/staging/bcm/IPv6ProtocolHdr.h @@ -24,13 +24,13 @@ #define IPV6_DESTOPTS_HDR_OPTIONSIZE 0x8 //typedef unsigned char UCHAR; -//typedef unsigned short USHORT; +//typedef unsigned short unsigned short; //typedef unsigned long int ULONG; typedef struct IPV6HeaderFormatTag { UCHAR ucVersionPrio; UCHAR aucFlowLabel[3]; - USHORT usPayloadLength; + unsigned short usPayloadLength; UCHAR ucNextHeader; UCHAR ucHopLimit; ULONG ulSrcIpAddress[4]; @@ -50,7 +50,7 @@ typedef struct IPV6RoutingHeaderFormatTag { typedef struct IPV6FragmentHeaderFormatTag { UCHAR ucNextHeader; UCHAR ucReserved; - USHORT usFragmentOffset; + unsigned short usFragmentOffset; ULONG ulIdentification; }IPV6FragmentHeader; @@ -70,7 +70,7 @@ typedef struct IPV6HopByHopOptionsHeaderFormatTag { typedef struct IPV6AuthenticationHeaderFormatTag { UCHAR ucNextHeader; UCHAR ucLength; - USHORT usReserved; + unsigned short usReserved; ULONG ulSecurityParametersIndex; //UCHAR ucAuthenticationData[0]; @@ -79,7 +79,7 @@ typedef struct IPV6AuthenticationHeaderFormatTag { typedef struct IPV6IcmpHeaderFormatTag { UCHAR ucType; UCHAR ucCode; - USHORT usChecksum; + unsigned short usChecksum; //UCHAR ucIcmpMsg[0]; }IPV6IcmpHeader; @@ -95,14 +95,14 @@ typedef enum _E_IPADDR_CONTEXT //Function Prototypes -USHORT IpVersion6(PMINI_ADAPTER Adapter, /**< Pointer to the driver control structure */ +unsigned short IpVersion6(PMINI_ADAPTER Adapter, /**< Pointer to the driver control structure */ PVOID pcIpHeader, /**<Pointer to the IP Hdr of the packet*/ S_CLASSIFIER_RULE *pstClassifierRule ); VOID DumpIpv6Address(ULONG *puIpv6Address); -extern BOOLEAN MatchSrcPort(S_CLASSIFIER_RULE *pstClassifierRule, USHORT ushSrcPort); -extern BOOLEAN MatchDestPort(S_CLASSIFIER_RULE *pstClassifierRule, USHORT ushSrcPort); +extern BOOLEAN MatchSrcPort(S_CLASSIFIER_RULE *pstClassifierRule, unsigned short ushSrcPort); +extern BOOLEAN MatchDestPort(S_CLASSIFIER_RULE *pstClassifierRule, unsigned short ushSrcPort); extern BOOLEAN MatchProtocol(S_CLASSIFIER_RULE *pstClassifierRule, UCHAR ucProtocol); diff --git a/drivers/staging/bcm/InterfaceMisc.c b/drivers/staging/bcm/InterfaceMisc.c index 67b889c..5616bb1 100644 --- a/drivers/staging/bcm/InterfaceMisc.c +++ b/drivers/staging/bcm/InterfaceMisc.c @@ -6,7 +6,7 @@ INT InterfaceRDM(PS_INTERFACE_ADAPTER psIntfAdapter, INT len) { int bytes; - USHORT usRetries = 0; + unsigned short usRetries = 0; if (psIntfAdapter == NULL) { pr_info("Interface Adapter is NULL\n"); @@ -68,7 +68,7 @@ INT InterfaceWRM(PS_INTERFACE_ADAPTER psIntfAdapter, INT len) { int retval = 0; - USHORT usRetries = 0; + unsigned short usRetries = 0; if (psIntfAdapter == NULL) { pr_info("Interface Adapter is NULL\n"); diff --git a/drivers/staging/bcm/InterfaceRx.c b/drivers/staging/bcm/InterfaceRx.c index b743c91..670541f 100644 --- a/drivers/staging/bcm/InterfaceRx.c +++ b/drivers/staging/bcm/InterfaceRx.c @@ -121,9 +121,9 @@ static void read_bulk_callback(struct urb *urb) bcm_dbg(psIntfAdapter->psAdapter, RX, RX_CTRL, ALL, "Received control pkt...\n"); *(PUSHORT)skb->data = pLeader->Status; - memcpy(skb->data+sizeof(USHORT), urb->transfer_buffer + + memcpy(skb->data + sizeof(unsigned short), urb->transfer_buffer + (sizeof(LEADER)), pLeader->PLength); - skb->len = pLeader->PLength + sizeof(USHORT); + skb->len = pLeader->PLength + sizeof(unsigned short); spin_lock(&Adapter->control_queue_lock); ENQUEUEPACKET(Adapter->RxControlHead, Adapter->RxControlTail, skb); @@ -233,7 +233,7 @@ static int ReceiveRcb(PS_INTERFACE_ADAPTER psIntfAdapter, PUSB_RCB pRcb) BOOLEAN InterfaceRx (PS_INTERFACE_ADAPTER psIntfAdapter) { - USHORT RxDescCount = NUM_RX_DESC - atomic_read(&psIntfAdapter->uNumRcbUsed); + unsigned short RxDescCount = NUM_RX_DESC - atomic_read(&psIntfAdapter->uNumRcbUsed); PUSB_RCB pRcb = NULL; // RxDescCount = psIntfAdapter->psAdapter->CurrNumRecvDescs - diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c index 3c3b8e3..2fbcbff 100644 --- a/drivers/staging/bcm/Misc.c +++ b/drivers/staging/bcm/Misc.c @@ -1707,7 +1707,7 @@ VOID ResetCounters(PMINI_ADAPTER Adapter) Adapter->bShutStatus = FALSE; } -S_CLASSIFIER_RULE *GetFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIpIdentification, ULONG SrcIP) +S_CLASSIFIER_RULE *GetFragIPClsEntry(PMINI_ADAPTER Adapter, unsigned short usIpIdentification, ULONG SrcIP) { UINT uiIndex = 0; for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) { @@ -1732,7 +1732,7 @@ void AddFragIPClsEntry(PMINI_ADAPTER Adapter, PS_FRAGMENTED_PACKET_INFO psFragPk } } -void DelFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIpIdentification, ULONG SrcIp) +void DelFragIPClsEntry(PMINI_ADAPTER Adapter, unsigned short usIpIdentification, ULONG SrcIp) { UINT uiIndex = 0; for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) { diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c index 6deaeac..2960937 100644 --- a/drivers/staging/bcm/PHSModule.c +++ b/drivers/staging/bcm/PHSModule.c @@ -60,7 +60,7 @@ static ULONG PhsDeCompress(void* pvContext, Input parameters: IN PMINI_ADAPTER Adapter - Miniport Adapter Context IN Packet - NDIS packet containing data to be transmitted - IN USHORT Vcid - vcid pertaining to connection on which the packet is being sent.Used to + IN unsigned short Vcid - vcid pertaining to connection on which the packet is being sent.Used to identify PHS rule to be applied. B_UINT16 uiClassifierRuleID - Classifier Rule ID BOOLEAN bHeaderSuppressionEnabled - indicates if header suprression is enabled for SF. @@ -71,7 +71,7 @@ static ULONG PhsDeCompress(void* pvContext, int PHSTransmit(PMINI_ADAPTER Adapter, struct sk_buff **pPacket, - USHORT Vcid, + unsigned short Vcid, B_UINT16 uiClassifierRuleID, BOOLEAN bHeaderSuppressionEnabled, UINT *PacketLen, @@ -202,7 +202,7 @@ int PHSTransmit(PMINI_ADAPTER Adapter, } int PHSReceive(PMINI_ADAPTER Adapter, - USHORT usVcid, + unsigned short usVcid, struct sk_buff *packet, UINT *punPacketLen, UCHAR *pucEthernetHdr, diff --git a/drivers/staging/bcm/PHSModule.h b/drivers/staging/bcm/PHSModule.h index 7331d54..8eff7f2 100644 --- a/drivers/staging/bcm/PHSModule.h +++ b/drivers/staging/bcm/PHSModule.h @@ -3,14 +3,14 @@ int PHSTransmit(PMINI_ADAPTER Adapter, struct sk_buff **pPacket, - USHORT Vcid, + unsigned short Vcid, B_UINT16 uiClassifierRuleID, BOOLEAN bHeaderSuppressionEnabled, PUINT PacketLen, UCHAR bEthCSSupport); int PHSReceive(PMINI_ADAPTER Adapter, - USHORT usVcid, + unsigned short usVcid, struct sk_buff *packet, UINT *punPacketLen, UCHAR *pucEthernetHdr, diff --git a/drivers/staging/bcm/Protocol.h b/drivers/staging/bcm/Protocol.h index 82ab2cb..0592ca9 100644 --- a/drivers/staging/bcm/Protocol.h +++ b/drivers/staging/bcm/Protocol.h @@ -46,16 +46,16 @@ typedef enum _E_NWPKT_ETHFRAME_TYPE typedef struct _S_ETHCS_PKT_INFO { E_NWPKT_IPFRAME_TYPE eNwpktIPFrameType; E_NWPKT_ETHFRAME_TYPE eNwpktEthFrameType; - USHORT usEtherType; + unsigned short usEtherType; UCHAR ucDSAP; }S_ETHCS_PKT_INFO,*PS_ETHCS_PKT_INFO; typedef struct _ETH_CS_802_Q_FRAME { ETH_HEADER_STRUC EThHdr; - USHORT UserPriority:3; - USHORT CFI:1; - USHORT VLANID:12; - USHORT EthType; + unsigned short UserPriority:3; + unsigned short CFI:1; + unsigned short VLANID:12; + unsigned short EthType; } __attribute__((packed)) ETH_CS_802_Q_FRAME; typedef struct _ETH_CS_802_LLC_FRAME { @@ -125,15 +125,15 @@ typedef enum _E_SERVICEFLOW_CS_SPEC_ // This is the format for the TCP packet header typedef struct _TCP_HEADER { - USHORT usSrcPort; - USHORT usDestPort; + unsigned short usSrcPort; + unsigned short usDestPort; ULONG ulSeqNumber; ULONG ulAckNumber; UCHAR HeaderLength; UCHAR ucFlags; - USHORT usWindowsSize; - USHORT usChkSum; - USHORT usUrgetPtr; + unsigned short usWindowsSize; + unsigned short usChkSum; + unsigned short usUrgetPtr; } TCP_HEADER,*PTCP_HEADER; #define TCP_HEADER_LEN sizeof(TCP_HEADER) #define TCP_ACK 0x10 //Bit 4 in tcpflags field. diff --git a/drivers/staging/bcm/Prototypes.h b/drivers/staging/bcm/Prototypes.h index 4325664..b909759 100644 --- a/drivers/staging/bcm/Prototypes.h +++ b/drivers/staging/bcm/Prototypes.h @@ -31,16 +31,16 @@ VOID PruneQueueAllSF(PMINI_ADAPTER Adapter); INT SearchSfid(PMINI_ADAPTER Adapter, UINT uiSfid); -USHORT ClassifyPacket(PMINI_ADAPTER Adapter, struct sk_buff* skb); +unsigned short ClassifyPacket(PMINI_ADAPTER Adapter, struct sk_buff* skb); -BOOLEAN MatchSrcPort(S_CLASSIFIER_RULE *pstClassifierRule, USHORT ushSrcPort); -BOOLEAN MatchDestPort(S_CLASSIFIER_RULE *pstClassifierRule, USHORT ushSrcPort); +BOOLEAN MatchSrcPort(S_CLASSIFIER_RULE *pstClassifierRule, unsigned short ushSrcPort); +BOOLEAN MatchDestPort(S_CLASSIFIER_RULE *pstClassifierRule, unsigned short ushSrcPort); BOOLEAN MatchProtocol(S_CLASSIFIER_RULE *pstClassifierRule, UCHAR ucProtocol); INT SetupNextSend(PMINI_ADAPTER Adapter, /**<Logical Adapter*/ struct sk_buff *Packet, /**<data buffer*/ - USHORT Vcid) ; + unsigned short Vcid); VOID LinkMessage(PMINI_ADAPTER Adapter); @@ -101,11 +101,11 @@ VOID ResetCounters(PMINI_ADAPTER Adapter); int InitLedSettings(PMINI_ADAPTER Adapter); -S_CLASSIFIER_RULE *GetFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIpIdentification, ULONG SrcIP); +S_CLASSIFIER_RULE *GetFragIPClsEntry(PMINI_ADAPTER Adapter, unsigned short usIpIdentification, ULONG SrcIP); void AddFragIPClsEntry(PMINI_ADAPTER Adapter, PS_FRAGMENTED_PACKET_INFO psFragPktInfo); -void DelFragIPClsEntry(PMINI_ADAPTER Adapter, USHORT usIpIdentification, ULONG SrcIp); +void DelFragIPClsEntry(PMINI_ADAPTER Adapter, unsigned short usIpIdentification, ULONG SrcIp); void update_per_cid_rx (PMINI_ADAPTER Adapter); diff --git a/drivers/staging/bcm/Qos.c b/drivers/staging/bcm/Qos.c index afaabfd..92d27fc 100644 --- a/drivers/staging/bcm/Qos.c +++ b/drivers/staging/bcm/Qos.c @@ -7,8 +7,8 @@ static void EThCSGetPktInfo(PMINI_ADAPTER Adapter, PVOID pvEthPayload, PS_ETHCS_PKT_INFO pstEthCsPktInfo); static BOOLEAN EThCSClassifyPkt(PMINI_ADAPTER Adapter, struct sk_buff* skb, PS_ETHCS_PKT_INFO pstEthCsPktInfo, S_CLASSIFIER_RULE *pstClassifierRule, B_UINT8 EthCSCupport); -static USHORT IpVersion4(PMINI_ADAPTER Adapter, struct iphdr *iphd, - S_CLASSIFIER_RULE *pstClassifierRule ); +static unsigned short IpVersion4(PMINI_ADAPTER Adapter, struct iphdr *iphd, + S_CLASSIFIER_RULE *pstClassifierRule); static VOID PruneQueue(PMINI_ADAPTER Adapter, INT iIndex); @@ -150,7 +150,7 @@ BOOLEAN MatchProtocol(S_CLASSIFIER_RULE *pstClassifierRule, UCHAR ucProtocol) * * Returns - TRUE(If address matches) else FAIL. ***************************************************************************/ -BOOLEAN MatchSrcPort(S_CLASSIFIER_RULE *pstClassifierRule, USHORT ushSrcPort) +BOOLEAN MatchSrcPort(S_CLASSIFIER_RULE *pstClassifierRule, unsigned short ushSrcPort) { UCHAR ucLoopIndex=0; @@ -181,7 +181,7 @@ BOOLEAN MatchSrcPort(S_CLASSIFIER_RULE *pstClassifierRule, USHORT ushSrcPort) * * Returns - TRUE(If address matches) else FAIL. ***************************************************************************/ -BOOLEAN MatchDestPort(S_CLASSIFIER_RULE *pstClassifierRule, USHORT ushDestPort) +BOOLEAN MatchDestPort(S_CLASSIFIER_RULE *pstClassifierRule, unsigned short ushDestPort) { UCHAR ucLoopIndex=0; PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); @@ -210,9 +210,9 @@ BOOLEAN MatchDestPort(S_CLASSIFIER_RULE *pstClassifierRule, USHORT ushDestPort) Compares IPV4 Ip address and port number @return Queue Index. */ -static USHORT IpVersion4(PMINI_ADAPTER Adapter, - struct iphdr *iphd, - S_CLASSIFIER_RULE *pstClassifierRule ) +static unsigned short IpVersion4(PMINI_ADAPTER Adapter, + struct iphdr *iphd, + S_CLASSIFIER_RULE *pstClassifierRule) { xporthdr *xprt_hdr=NULL; BOOLEAN bClassificationSucceed=FALSE; @@ -442,7 +442,7 @@ VOID flush_all_queues(PMINI_ADAPTER Adapter) bcm_dbg(Adapter, OTHERS, DUMP_INFO, ALL, "<=====\n"); } -USHORT ClassifyPacket(PMINI_ADAPTER Adapter, struct sk_buff* skb) +unsigned short ClassifyPacket(PMINI_ADAPTER Adapter, struct sk_buff* skb) { INT uiLoopIndex=0; S_CLASSIFIER_RULE *pstClassifierRule = NULL; @@ -450,9 +450,9 @@ USHORT ClassifyPacket(PMINI_ADAPTER Adapter, struct sk_buff* skb) PVOID pvEThPayload = NULL; struct iphdr *pIpHeader = NULL; INT uiSfIndex=0; - USHORT usIndex=Adapter->usBestEffortQueueIndex; + unsigned short usIndex = Adapter->usBestEffortQueueIndex; BOOLEAN bFragmentedPkt=FALSE, bClassificationSucceed=FALSE; - USHORT usCurrFragment =0; + unsigned short usCurrFragment = 0; PTCP_HEADER pTcpHeader; UCHAR IpHeaderLength; @@ -735,14 +735,14 @@ static BOOLEAN EthCSMatchEThTypeSAP(S_CLASSIFIER_RULE *pstClassifierRule, struct static BOOLEAN EthCSMatchVLANRules(S_CLASSIFIER_RULE *pstClassifierRule, struct sk_buff* skb, PS_ETHCS_PKT_INFO pstEthCsPktInfo) { BOOLEAN bClassificationSucceed = FALSE; - USHORT usVLANID; + unsigned short usVLANID; B_UINT8 uPriority = 0; PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); bcm_dbg(Adapter, TX, IPV4_DBG, ALL, "%s CLS UserPrio:%x CLS VLANID:%x\n", __func__, - ntohs(*((USHORT *)pstClassifierRule->usUserPriority)), + ntohs(*((unsigned short *)pstClassifierRule->usUserPriority)), pstClassifierRule->usVLANID); /* In case FW didn't receive the TLV, the priority field should be ignored */ @@ -750,7 +750,7 @@ static BOOLEAN EthCSMatchVLANRules(S_CLASSIFIER_RULE *pstClassifierRule, struct if (pstEthCsPktInfo->eNwpktEthFrameType!=eEth802QVLANFrame) return FALSE; - uPriority = (ntohs(*(USHORT *)(skb->data + sizeof(ETH_HEADER_STRUC))) & 0xF000) >> 13; + uPriority = (ntohs(*(unsigned short *)(skb->data + sizeof(ETH_HEADER_STRUC))) & 0xF000) >> 13; if ((uPriority >= pstClassifierRule->usUserPriority[0]) && (uPriority <= pstClassifierRule->usUserPriority[1])) bClassificationSucceed = TRUE; @@ -768,7 +768,7 @@ static BOOLEAN EthCSMatchVLANRules(S_CLASSIFIER_RULE *pstClassifierRule, struct if (pstEthCsPktInfo->eNwpktEthFrameType!=eEth802QVLANFrame) return FALSE; - usVLANID = ntohs(*(USHORT *)(skb->data + sizeof(ETH_HEADER_STRUC))) & 0xFFF; + usVLANID = ntohs(*(unsigned short *)(skb->data + sizeof(ETH_HEADER_STRUC))) & 0xFFF; bcm_dbg(Adapter, TX, IPV4_DBG, ALL, "%s Pkt VLANID %x Priority: %d\n", @@ -826,7 +826,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); + unsigned short u16Etype = ntohs(((ETH_HEADER_STRUC*)pvEthPayload)->u16Etype); bcm_dbg(Adapter, TX, IPV4_DBG, ALL, "EthCSGetPktInfo : Eth Hdr Type : %X\n", u16Etype); diff --git a/drivers/staging/bcm/Transmit.c b/drivers/staging/bcm/Transmit.c index 274213b..36ce70f 100644 --- a/drivers/staging/bcm/Transmit.c +++ b/drivers/staging/bcm/Transmit.c @@ -87,7 +87,7 @@ INT SendControlPacket(PMINI_ADAPTER Adapter, char *pControlPacket) to the target via the host h/w interface. @return zero(success) or -ve value(failure) */ -INT SetupNextSend(PMINI_ADAPTER Adapter, struct sk_buff *Packet, USHORT Vcid) +INT SetupNextSend(PMINI_ADAPTER Adapter, struct sk_buff *Packet, unsigned short Vcid) { int status=0; BOOLEAN bHeaderSupressionEnabled = FALSE; diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h index 333fdd2..d92b9b2 100644 --- a/drivers/staging/bcm/Typedefs.h +++ b/drivers/staging/bcm/Typedefs.h @@ -18,7 +18,6 @@ typedef void VOID; typedef unsigned char UCHAR; typedef unsigned char B_UINT8; -typedef unsigned short USHORT; typedef unsigned short B_UINT16; typedef unsigned int UINT; typedef unsigned int B_UINT32; diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c index 31d3c76..1752aca 100644 --- a/drivers/staging/bcm/led_control.c +++ b/drivers/staging/bcm/led_control.c @@ -260,12 +260,12 @@ static INT LED_Proportional_Blink(PMINI_ADAPTER Adapter, UCHAR GPIO_Num_tx, * ----------------------------------------------------------------------------- */ static INT ValidateDSDParamsChecksum(PMINI_ADAPTER Adapter, ULONG ulParamOffset, - USHORT usParamLen) + unsigned short usParamLen) { INT Status = STATUS_SUCCESS; PUCHAR puBuffer = NULL; - USHORT usChksmOrg = 0; - USHORT usChecksumCalculated = 0; + unsigned short usChksmOrg = 0; + unsigned short usChecksumCalculated = 0; bcm_dbg(Adapter, OTHERS, LED_DUMP_INFO, ALL, "LED Thread:ValidateDSDParamsChecksum: 0x%lx 0x%X\n", @@ -345,7 +345,7 @@ static INT ValidateHWParmStructure(PMINI_ADAPTER Adapter, ULONG ulHwParamOffset) { INT Status = STATUS_SUCCESS; - USHORT HwParamLen = 0; + unsigned short HwParamLen = 0; /* * Add DSD start offset to the hwParamOffset to get * the actual address. @@ -371,8 +371,8 @@ static int ReadLEDInformationFromEEPROM(PMINI_ADAPTER Adapter, int Status = STATUS_SUCCESS; ULONG dwReadValue = 0; - USHORT usHwParamData = 0; - USHORT usEEPROMVersion = 0; + unsigned short usHwParamData = 0; + unsigned short usEEPROMVersion = 0; UCHAR ucIndex = 0; UCHAR ucGPIOInfo[32] = {0}; -- 1.7.8.111.gad25c.dirty _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel