Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 1 | /*********************************** |
| 2 | * Adapter.h |
| 3 | ************************************/ |
| 4 | #ifndef __ADAPTER_H__ |
| 5 | #define __ADAPTER_H__ |
| 6 | |
| 7 | #define MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES 256 |
| 8 | #include "Debug.h" |
| 9 | |
Kevin McKinney | ff35204 | 2012-05-26 12:05:11 -0400 | [diff] [blame] | 10 | struct bcm_leader { |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 11 | USHORT Vcid; |
| 12 | USHORT PLength; |
| 13 | UCHAR Status; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 14 | UCHAR Unused[3]; |
Kevin McKinney | e1325ad | 2012-05-18 08:50:57 -0400 | [diff] [blame] | 15 | } __packed; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 16 | |
Kevin McKinney | a869993 | 2012-05-26 12:05:10 -0400 | [diff] [blame] | 17 | struct bcm_packettosend { |
Kevin McKinney | ff35204 | 2012-05-26 12:05:11 -0400 | [diff] [blame] | 18 | struct bcm_leader Leader; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 19 | UCHAR ucPayload; |
Kevin McKinney | e1325ad | 2012-05-18 08:50:57 -0400 | [diff] [blame] | 20 | } __packed; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 21 | |
Kevin McKinney | c1975ed | 2012-05-26 12:05:09 -0400 | [diff] [blame] | 22 | struct bcm_control_packet { |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 23 | PVOID ControlBuff; |
| 24 | UINT ControlBuffLen; |
Kevin McKinney | c1975ed | 2012-05-26 12:05:09 -0400 | [diff] [blame] | 25 | struct bcm_control_packet *next; |
Kevin McKinney | e1325ad | 2012-05-18 08:50:57 -0400 | [diff] [blame] | 26 | } __packed; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 27 | |
Kevin McKinney | 2610c7a | 2012-05-26 12:05:08 -0400 | [diff] [blame] | 28 | struct bcm_link_request { |
Kevin McKinney | ff35204 | 2012-05-26 12:05:11 -0400 | [diff] [blame] | 29 | struct bcm_leader Leader; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 30 | UCHAR szData[4]; |
Kevin McKinney | e1325ad | 2012-05-18 08:50:57 -0400 | [diff] [blame] | 31 | } __packed; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 32 | |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 33 | #define MAX_IP_RANGE_LENGTH 4 |
| 34 | #define MAX_PORT_RANGE 4 |
| 35 | #define MAX_PROTOCOL_LENGTH 32 |
| 36 | #define IPV6_ADDRESS_SIZEINBYTES 0x10 |
| 37 | |
Himangi Saraogi | d5a4996 | 2013-10-29 06:28:03 +0530 | [diff] [blame^] | 38 | union u_ip_address { |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 39 | struct { |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 40 | ULONG ulIpv4Addr[MAX_IP_RANGE_LENGTH]; /* Source Ip Address Range */ |
| 41 | ULONG ulIpv4Mask[MAX_IP_RANGE_LENGTH]; /* Source Ip Mask Address Range */ |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 42 | }; |
Kevin McKinney | c71e0a6 | 2012-05-18 08:50:54 -0400 | [diff] [blame] | 43 | struct { |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 44 | ULONG ulIpv6Addr[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Address Range */ |
| 45 | ULONG ulIpv6Mask[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Mask Address Range */ |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 46 | }; |
Kevin McKinney | c71e0a6 | 2012-05-18 08:50:54 -0400 | [diff] [blame] | 47 | struct { |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 48 | UCHAR ucIpv4Address[MAX_IP_RANGE_LENGTH * IP_LENGTH_OF_ADDRESS]; |
| 49 | UCHAR ucIpv4Mask[MAX_IP_RANGE_LENGTH * IP_LENGTH_OF_ADDRESS]; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 50 | }; |
Kevin McKinney | c71e0a6 | 2012-05-18 08:50:54 -0400 | [diff] [blame] | 51 | struct { |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 52 | UCHAR ucIpv6Address[MAX_IP_RANGE_LENGTH * IPV6_ADDRESS_SIZEINBYTES]; |
| 53 | UCHAR ucIpv6Mask[MAX_IP_RANGE_LENGTH * IPV6_ADDRESS_SIZEINBYTES]; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 54 | }; |
Himangi Saraogi | d5a4996 | 2013-10-29 06:28:03 +0530 | [diff] [blame^] | 55 | }; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 56 | |
Peter Meerwald | b38e274 | 2012-06-13 20:44:35 +0200 | [diff] [blame] | 57 | struct bcm_hdr_suppression_contextinfo { |
| 58 | UCHAR ucaHdrSuppressionInBuf[MAX_PHS_LENGTHS]; /* Intermediate buffer to accumulate pkt Header for PHS */ |
| 59 | UCHAR ucaHdrSuppressionOutBuf[MAX_PHS_LENGTHS + PHSI_LEN]; /* Intermediate buffer containing pkt Header after PHS */ |
Kevin McKinney | f428450 | 2012-05-26 12:05:04 -0400 | [diff] [blame] | 60 | }; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 61 | |
Kevin McKinney | 92562ae | 2012-05-26 12:05:03 -0400 | [diff] [blame] | 62 | struct bcm_classifier_rule { |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 63 | ULONG ulSFID; |
| 64 | UCHAR ucReserved[2]; |
| 65 | B_UINT16 uiClassifierRuleIndex; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 66 | bool bUsed; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 67 | USHORT usVCID_Value; |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 68 | B_UINT8 u8ClassifierRulePriority; /* This field detemines the Classifier Priority */ |
Himangi Saraogi | d5a4996 | 2013-10-29 06:28:03 +0530 | [diff] [blame^] | 69 | union u_ip_address stSrcIpAddress; |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 70 | UCHAR ucIPSourceAddressLength; /* Ip Source Address Length */ |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 71 | |
Himangi Saraogi | d5a4996 | 2013-10-29 06:28:03 +0530 | [diff] [blame^] | 72 | union u_ip_address stDestIpAddress; |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 73 | UCHAR ucIPDestinationAddressLength; /* Ip Destination Address Length */ |
| 74 | UCHAR ucIPTypeOfServiceLength; /* Type of service Length */ |
| 75 | UCHAR ucTosLow; /* Tos Low */ |
| 76 | UCHAR ucTosHigh; /* Tos High */ |
| 77 | UCHAR ucTosMask; /* Tos Mask */ |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 78 | |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 79 | UCHAR ucProtocolLength; /* protocol Length */ |
| 80 | UCHAR ucProtocol[MAX_PROTOCOL_LENGTH]; /* protocol Length */ |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 81 | USHORT usSrcPortRangeLo[MAX_PORT_RANGE]; |
| 82 | USHORT usSrcPortRangeHi[MAX_PORT_RANGE]; |
| 83 | UCHAR ucSrcPortRangeLength; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 84 | |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 85 | USHORT usDestPortRangeLo[MAX_PORT_RANGE]; |
| 86 | USHORT usDestPortRangeHi[MAX_PORT_RANGE]; |
| 87 | UCHAR ucDestPortRangeLength; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 88 | |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 89 | bool bProtocolValid; |
| 90 | bool bTOSValid; |
| 91 | bool bDestIpValid; |
| 92 | bool bSrcIpValid; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 93 | |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 94 | /* For IPv6 Addressing */ |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 95 | UCHAR ucDirection; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 96 | bool bIpv6Protocol; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 97 | UINT32 u32PHSRuleID; |
Kevin McKinney | a903d65 | 2012-12-20 00:31:34 -0500 | [diff] [blame] | 98 | struct bcm_phs_rule sPhsRule; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 99 | UCHAR u8AssociatedPHSI; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 100 | |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 101 | /* Classification fields for ETH CS */ |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 102 | UCHAR ucEthCSSrcMACLen; |
| 103 | UCHAR au8EThCSSrcMAC[MAC_ADDRESS_SIZE]; |
| 104 | UCHAR au8EThCSSrcMACMask[MAC_ADDRESS_SIZE]; |
| 105 | UCHAR ucEthCSDestMACLen; |
| 106 | UCHAR au8EThCSDestMAC[MAC_ADDRESS_SIZE]; |
| 107 | UCHAR au8EThCSDestMACMask[MAC_ADDRESS_SIZE]; |
| 108 | UCHAR ucEtherTypeLen; |
| 109 | UCHAR au8EthCSEtherType[NUM_ETHERTYPE_BYTES]; |
| 110 | UCHAR usUserPriority[2]; |
| 111 | USHORT usVLANID; |
| 112 | USHORT usValidityBitMap; |
Kevin McKinney | 92562ae | 2012-05-26 12:05:03 -0400 | [diff] [blame] | 113 | }; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 114 | |
Kevin McKinney | 7f22485 | 2012-05-26 12:05:02 -0400 | [diff] [blame] | 115 | struct bcm_fragmented_packet_info { |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 116 | bool bUsed; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 117 | ULONG ulSrcIpAddress; |
| 118 | USHORT usIpIdentification; |
Kevin McKinney | 92562ae | 2012-05-26 12:05:03 -0400 | [diff] [blame] | 119 | struct bcm_classifier_rule *pstMatchedClassifierEntry; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 120 | bool bOutOfOrderFragment; |
Kevin McKinney | 7f22485 | 2012-05-26 12:05:02 -0400 | [diff] [blame] | 121 | }; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 122 | |
Kevin McKinney | 0b3edf7 | 2012-05-26 12:05:01 -0400 | [diff] [blame] | 123 | struct bcm_packet_info { |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 124 | /* classification extension Rule */ |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 125 | ULONG ulSFID; |
| 126 | USHORT usVCID_Value; |
| 127 | UINT uiThreshold; |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 128 | /* This field determines the priority of the SF Queues */ |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 129 | B_UINT8 u8TrafficPriority; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 130 | |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 131 | bool bValid; |
| 132 | bool bActive; |
| 133 | bool bActivateRequestSent; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 134 | |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 135 | B_UINT8 u8QueueType; /* BE or rtPS */ |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 136 | |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 137 | UINT uiMaxBucketSize; /* maximum size of the bucket for the queue */ |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 138 | UINT uiCurrentQueueDepthOnTarget; |
| 139 | UINT uiCurrentBytesOnHost; |
| 140 | UINT uiCurrentPacketsOnHost; |
| 141 | UINT uiDroppedCountBytes; |
| 142 | UINT uiDroppedCountPackets; |
| 143 | UINT uiSentBytes; |
| 144 | UINT uiSentPackets; |
| 145 | UINT uiCurrentDrainRate; |
| 146 | UINT uiThisPeriodSentBytes; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 147 | LARGE_INTEGER liDrainCalculated; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 148 | UINT uiCurrentTokenCount; |
| 149 | LARGE_INTEGER liLastUpdateTokenAt; |
| 150 | UINT uiMaxAllowedRate; |
| 151 | UINT NumOfPacketsSent; |
| 152 | UCHAR ucDirection; |
| 153 | USHORT usCID; |
Kevin McKinney | 8c7d51a | 2012-11-25 19:28:59 -0500 | [diff] [blame] | 154 | struct bcm_mibs_parameters stMibsExtServiceFlowTable; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 155 | UINT uiCurrentRxRate; |
| 156 | UINT uiThisPeriodRxBytes; |
| 157 | UINT uiTotalRxBytes; |
| 158 | UINT uiTotalTxBytes; |
| 159 | UINT uiPendedLast; |
| 160 | UCHAR ucIpVersion; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 161 | |
Kevin McKinney | c71e0a6 | 2012-05-18 08:50:54 -0400 | [diff] [blame] | 162 | union { |
| 163 | struct { |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 164 | struct sk_buff *FirstTxQueue; |
| 165 | struct sk_buff *LastTxQueue; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 166 | }; |
Kevin McKinney | c71e0a6 | 2012-05-18 08:50:54 -0400 | [diff] [blame] | 167 | struct { |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 168 | struct sk_buff *ControlHead; |
| 169 | struct sk_buff *ControlTail; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 170 | }; |
| 171 | }; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 172 | |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 173 | bool bProtocolValid; |
| 174 | bool bTOSValid; |
| 175 | bool bDestIpValid; |
| 176 | bool bSrcIpValid; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 177 | |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 178 | bool bActiveSet; |
| 179 | bool bAdmittedSet; |
| 180 | bool bAuthorizedSet; |
| 181 | bool bClassifierPriority; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 182 | UCHAR ucServiceClassName[MAX_CLASS_NAME_LENGTH]; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 183 | bool bHeaderSuppressionEnabled; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 184 | spinlock_t SFQueueLock; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 185 | void *pstSFIndication; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 186 | struct timeval stLastUpdateTokenAt; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 187 | atomic_t uiPerSFTxResourceCount; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 188 | UINT uiMaxLatency; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 189 | UCHAR bIPCSSupport; |
| 190 | UCHAR bEthCSSupport; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 191 | }; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 192 | |
Kevin McKinney | 774bea8 | 2012-05-26 12:05:00 -0400 | [diff] [blame] | 193 | struct bcm_tarang_data { |
| 194 | struct bcm_tarang_data *next; |
Kevin McKinney | 2979460 | 2012-05-26 12:05:12 -0400 | [diff] [blame] | 195 | struct bcm_mini_adapter *Adapter; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 196 | struct sk_buff *RxAppControlHead; |
| 197 | struct sk_buff *RxAppControlTail; |
Kevin McKinney | 26cd230 | 2012-05-18 08:50:59 -0400 | [diff] [blame] | 198 | int AppCtrlQueueLen; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 199 | bool MacTracingEnabled; |
| 200 | bool bApplicationToExit; |
Kevin McKinney | 2790a3c | 2012-11-25 19:28:57 -0500 | [diff] [blame] | 201 | struct bcm_mibs_dropped_cntrl_msg stDroppedAppCntrlMsgs; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 202 | ULONG RxCntrlMsgBitMask; |
Kevin McKinney | 774bea8 | 2012-05-26 12:05:00 -0400 | [diff] [blame] | 203 | }; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 204 | |
Kevin McKinney | 3753164 | 2012-05-26 12:04:58 -0400 | [diff] [blame] | 205 | struct bcm_targetdsx_buffer { |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 206 | ULONG ulTargetDsxBuffer; |
| 207 | B_UINT16 tid; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 208 | bool valid; |
Kevin McKinney | 3753164 | 2012-05-26 12:04:58 -0400 | [diff] [blame] | 209 | }; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 210 | |
Kevin McKinney | 2979460 | 2012-05-26 12:05:12 -0400 | [diff] [blame] | 211 | typedef int (*FP_FLASH_WRITE)(struct bcm_mini_adapter *, UINT, PVOID); |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 212 | |
Kevin McKinney | 2979460 | 2012-05-26 12:05:12 -0400 | [diff] [blame] | 213 | typedef int (*FP_FLASH_WRITE_STATUS)(struct bcm_mini_adapter *, UINT, PVOID); |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 214 | |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 215 | /* |
| 216 | * Driver adapter data structure |
| 217 | */ |
Kevin McKinney | 2979460 | 2012-05-26 12:05:12 -0400 | [diff] [blame] | 218 | struct bcm_mini_adapter { |
| 219 | struct bcm_mini_adapter *next; |
Stephen Hemminger | 4fd64dd | 2010-11-01 12:12:31 -0400 | [diff] [blame] | 220 | struct net_device *dev; |
| 221 | u32 msg_enable; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 222 | CHAR *caDsxReqResp; |
Stephen Hemminger | 3349d95 | 2010-11-01 11:12:56 -0400 | [diff] [blame] | 223 | atomic_t ApplicationRunning; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 224 | bool AppCtrlQueueOverFlow; |
Stephen Hemminger | 3349d95 | 2010-11-01 11:12:56 -0400 | [diff] [blame] | 225 | atomic_t CurrentApplicationCount; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 226 | atomic_t RegisteredApplicationCount; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 227 | bool LinkUpStatus; |
| 228 | bool TimerActive; |
Stephen Hemminger | 3349d95 | 2010-11-01 11:12:56 -0400 | [diff] [blame] | 229 | u32 StatisticsPointer; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 230 | struct sk_buff *RxControlHead; |
| 231 | struct sk_buff *RxControlTail; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 232 | struct semaphore RxAppControlQueuelock; |
| 233 | struct semaphore fw_download_sema; |
Kevin McKinney | 774bea8 | 2012-05-26 12:05:00 -0400 | [diff] [blame] | 234 | struct bcm_tarang_data *pTarangs; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 235 | spinlock_t control_queue_lock; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 236 | wait_queue_head_t process_read_wait_queue; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 237 | |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 238 | /* the pointer to the first packet we have queued in send |
| 239 | * deserialized miniport support variables |
| 240 | */ |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 241 | atomic_t TotalPacketCount; |
| 242 | atomic_t TxPktAvail; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 243 | |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 244 | /* this to keep track of the Tx and Rx MailBox Registers. */ |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 245 | atomic_t CurrNumFreeTxDesc; |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 246 | /* to keep track the no of byte received */ |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 247 | USHORT PrevNumRecvDescs; |
| 248 | USHORT CurrNumRecvDescs; |
| 249 | UINT u32TotalDSD; |
Kevin McKinney | 0b3edf7 | 2012-05-26 12:05:01 -0400 | [diff] [blame] | 250 | struct bcm_packet_info PackInfo[NO_OF_QUEUES]; |
Kevin McKinney | 92562ae | 2012-05-26 12:05:03 -0400 | [diff] [blame] | 251 | struct bcm_classifier_rule astClassifierTable[MAX_CLASSIFIERS]; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 252 | bool TransferMode; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 253 | |
| 254 | /*************** qos ******************/ |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 255 | bool bETHCSEnabled; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 256 | ULONG BEBucketSize; |
| 257 | ULONG rtPSBucketSize; |
| 258 | UCHAR LinkStatus; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 259 | bool AutoLinkUp; |
| 260 | bool AutoSyncup; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 261 | |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 262 | int major; |
| 263 | int minor; |
| 264 | wait_queue_head_t tx_packet_wait_queue; |
| 265 | wait_queue_head_t process_rx_cntrlpkt; |
| 266 | atomic_t process_waiting; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 267 | bool fw_download_done; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 268 | |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 269 | char *txctlpacket[MAX_CNTRL_PKTS]; |
| 270 | atomic_t cntrlpktCnt ; |
| 271 | atomic_t index_app_read_cntrlpkt; |
| 272 | atomic_t index_wr_txcntrlpkt; |
| 273 | atomic_t index_rd_txcntrlpkt; |
| 274 | UINT index_datpkt; |
| 275 | struct semaphore rdmwrmsync; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 276 | |
Kevin McKinney | 3753164 | 2012-05-26 12:04:58 -0400 | [diff] [blame] | 277 | struct bcm_targetdsx_buffer astTargetDsxBuffer[MAX_TARGET_DSX_BUFFERS]; |
Stephen Hemminger | 3349d95 | 2010-11-01 11:12:56 -0400 | [diff] [blame] | 278 | ULONG ulFreeTargetBufferCnt; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 279 | ULONG ulCurrentTargetBuffer; |
| 280 | ULONG ulTotalTargetBuffersAvailable; |
| 281 | unsigned long chip_id; |
| 282 | wait_queue_head_t lowpower_mode_wait_queue; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 283 | bool bFlashBoot; |
| 284 | bool bBinDownloaded; |
| 285 | bool bCfgDownloaded; |
| 286 | bool bSyncUpRequestSent; |
Stephen Hemminger | 3349d95 | 2010-11-01 11:12:56 -0400 | [diff] [blame] | 287 | USHORT usBestEffortQueueIndex; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 288 | wait_queue_head_t ioctl_fw_dnld_wait_queue; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 289 | bool waiting_to_fw_download_done; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 290 | pid_t fw_download_process_pid; |
Kevin McKinney | c818233 | 2012-12-17 17:35:20 -0500 | [diff] [blame] | 291 | struct bcm_target_params *pstargetparams; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 292 | bool device_removed; |
| 293 | bool DeviceAccess; |
| 294 | bool bIsAutoCorrectEnabled; |
| 295 | bool bDDRInitDone; |
Kevin McKinney | d426205 | 2012-05-18 08:50:58 -0400 | [diff] [blame] | 296 | int DDRSetting; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 297 | ULONG ulPowerSaveMode; |
| 298 | spinlock_t txtransmitlock; |
| 299 | B_UINT8 txtransmit_running; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 300 | /* Thread for control packet handling */ |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 301 | struct task_struct *control_packet_handler; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 302 | /* thread for transmitting packets. */ |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 303 | struct task_struct *transmit_packet_thread; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 304 | |
| 305 | /* LED Related Structures */ |
Kevin McKinney | 684fb7e | 2012-12-14 19:26:50 -0500 | [diff] [blame] | 306 | struct bcm_led_info LEDInfo; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 307 | |
| 308 | /* Driver State for LED Blinking */ |
Kevin McKinney | b3d9a8f | 2012-12-14 19:26:52 -0500 | [diff] [blame] | 309 | enum bcm_led_events DriverState; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 310 | /* Interface Specific */ |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 311 | PVOID pvInterfaceAdapter; |
| 312 | int (*bcm_file_download)(PVOID, |
| 313 | struct file *, |
| 314 | unsigned int); |
| 315 | int (*bcm_file_readback_from_chip)(PVOID, |
| 316 | struct file *, |
| 317 | unsigned int); |
Kevin McKinney | d426205 | 2012-05-18 08:50:58 -0400 | [diff] [blame] | 318 | int (*interface_rdm)(PVOID, |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 319 | UINT, |
| 320 | PVOID, |
Kevin McKinney | d426205 | 2012-05-18 08:50:58 -0400 | [diff] [blame] | 321 | int); |
| 322 | int (*interface_wrm)(PVOID, |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 323 | UINT, |
| 324 | PVOID, |
Kevin McKinney | d426205 | 2012-05-18 08:50:58 -0400 | [diff] [blame] | 325 | int); |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 326 | int (*interface_transmit)(PVOID, PVOID , UINT); |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 327 | bool IdleMode; |
| 328 | bool bDregRequestSentInIdleMode; |
| 329 | bool bTriedToWakeUpFromlowPowerMode; |
| 330 | bool bShutStatus; |
| 331 | bool bWakeUpDevice; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 332 | unsigned int usIdleModePattern; |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 333 | /* BOOLEAN bTriedToWakeUpFromShutdown; */ |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 334 | bool bLinkDownRequested; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 335 | int downloadDDR; |
Kevin McKinney | 60dadf9 | 2012-12-20 00:31:28 -0500 | [diff] [blame] | 336 | struct bcm_phs_extension stBCMPhsContext; |
Peter Meerwald | b38e274 | 2012-06-13 20:44:35 +0200 | [diff] [blame] | 337 | struct bcm_hdr_suppression_contextinfo stPhsTxContextInfo; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 338 | uint8_t ucaPHSPktRestoreBuf[2048]; |
| 339 | uint8_t bPHSEnabled; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 340 | bool AutoFirmDld; |
| 341 | bool bMipsConfig; |
| 342 | bool bDPLLConfig; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 343 | UINT32 aTxPktSizeHist[MIBS_MAX_HIST_ENTRIES]; |
| 344 | UINT32 aRxPktSizeHist[MIBS_MAX_HIST_ENTRIES]; |
Kevin McKinney | 7f22485 | 2012-05-26 12:05:02 -0400 | [diff] [blame] | 345 | struct bcm_fragmented_packet_info astFragmentedPktClassifierTable[MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES]; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 346 | atomic_t uiMBupdate; |
| 347 | UINT32 PmuMode; |
Kevin McKinney | af72c61 | 2012-12-21 15:10:36 -0500 | [diff] [blame] | 348 | enum bcm_nvm_type eNVMType; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 349 | UINT uiSectorSize; |
| 350 | UINT uiSectorSizeInCFG; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 351 | bool bSectorSizeOverride; |
| 352 | bool bStatusWrite; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 353 | UINT uiNVMDSDSize; |
| 354 | UINT uiVendorExtnFlag; |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 355 | /* it will always represent chosen DSD at any point of time. |
| 356 | * Generally it is Active DSD but in case of NVM RD/WR it might be different. |
| 357 | */ |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 358 | UINT ulFlashCalStart; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 359 | ULONG ulFlashControlSectionStart; |
| 360 | ULONG ulFlashWriteSize; |
| 361 | ULONG ulFlashID; |
| 362 | FP_FLASH_WRITE fpFlashWrite; |
| 363 | FP_FLASH_WRITE_STATUS fpFlashWriteWithStatusCheck; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 364 | |
| 365 | struct semaphore NVMRdmWrmLock; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 366 | struct device *pstCreatedClassDevice; |
Stephen Hemminger | 3705a84 | 2010-10-29 08:14:16 -0700 | [diff] [blame] | 367 | |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 368 | /* BOOLEAN InterfaceUpStatus; */ |
Kevin McKinney | 0839173 | 2012-12-01 01:15:55 -0500 | [diff] [blame] | 369 | struct bcm_flash2x_cs_info *psFlash2xCSInfo; |
Kevin McKinney | 168b140 | 2012-12-01 01:15:56 -0500 | [diff] [blame] | 370 | struct bcm_flash_cs_info *psFlashCSInfo; |
Kevin McKinney | 2fe119f | 2012-12-01 01:15:53 -0500 | [diff] [blame] | 371 | struct bcm_flash2x_vendor_info *psFlash2xVendorInfo; |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 372 | UINT uiFlashBaseAdd; /* Flash start address */ |
| 373 | UINT uiActiveISOOffset; /* Active ISO offset chosen before f/w download */ |
Kevin McKinney | ff4e065 | 2012-11-22 14:48:50 -0500 | [diff] [blame] | 374 | enum bcm_flash2x_section_val eActiveISO; /* Active ISO section val */ |
| 375 | enum bcm_flash2x_section_val eActiveDSD; /* Active DSD val chosen before f/w download */ |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 376 | UINT uiActiveDSDOffsetAtFwDld; /* For accessing Active DSD chosen before f/w download */ |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 377 | UINT uiFlashLayoutMajorVersion; |
| 378 | UINT uiFlashLayoutMinorVersion; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 379 | bool bAllDSDWriteAllow; |
| 380 | bool bSigCorrupted; |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 381 | /* this should be set who so ever want to change the Headers. after Wrtie it should be reset immediately. */ |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 382 | bool bHeaderChangeAllowed; |
Kevin McKinney | d426205 | 2012-05-18 08:50:58 -0400 | [diff] [blame] | 383 | int SelectedChip; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 384 | bool bEndPointHalted; |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 385 | /* while bFlashRawRead will be true, Driver ignore map lay out and consider flash as of without any map. */ |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 386 | bool bFlashRawRead; |
| 387 | bool bPreparingForLowPowerMode; |
| 388 | bool bDoSuspend; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 389 | UINT syscfgBefFwDld; |
Lisa Nguyen | 3abd6f1 | 2013-10-28 01:35:59 -0700 | [diff] [blame] | 390 | bool StopAllXaction; |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 391 | UINT32 liTimeSinceLastNetEntry; /* Used to Support extended CAPI requirements from */ |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 392 | struct semaphore LowPowerModeSync; |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 393 | ULONG liDrainCalculated; |
| 394 | UINT gpioBitMap; |
Kevin McKinney | 4b388a9 | 2013-01-04 23:35:08 -0500 | [diff] [blame] | 395 | struct bcm_debug_state stDebugState; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 396 | }; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 397 | |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 398 | #define GET_BCM_ADAPTER(net_dev) netdev_priv(net_dev) |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 399 | |
Kevin McKinney | 406a508 | 2012-05-26 12:04:57 -0400 | [diff] [blame] | 400 | struct bcm_eth_header { |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 401 | UCHAR au8DestinationAddress[6]; |
| 402 | UCHAR au8SourceAddress[6]; |
| 403 | USHORT u16Etype; |
Kevin McKinney | e1325ad | 2012-05-18 08:50:57 -0400 | [diff] [blame] | 404 | } __packed; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 405 | |
Kevin McKinney | 7a27a2c | 2012-05-26 12:04:56 -0400 | [diff] [blame] | 406 | struct bcm_firmware_info { |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 407 | void __user *pvMappedFirmwareAddress; |
| 408 | ULONG u32FirmwareLength; |
| 409 | ULONG u32StartingAddress; |
Kevin McKinney | 7a27a2c | 2012-05-26 12:04:56 -0400 | [diff] [blame] | 410 | } __packed; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 411 | |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 412 | /* holds the value of net_device structure.. */ |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 413 | extern struct net_device *gblpnetdev; |
Kevin McKinney | 7905c78 | 2012-05-26 12:04:55 -0400 | [diff] [blame] | 414 | |
Kevin McKinney | be30999 | 2012-05-26 12:04:54 -0400 | [diff] [blame] | 415 | struct bcm_ddr_setting { |
Alejandro R. SedeƱo | b706113 | 2010-11-10 01:42:01 -0500 | [diff] [blame] | 416 | UINT ulRegAddress; |
| 417 | UINT ulRegValue; |
Kevin McKinney | be30999 | 2012-05-26 12:04:54 -0400 | [diff] [blame] | 418 | }; |
Kevin McKinney | 2979460 | 2012-05-26 12:05:12 -0400 | [diff] [blame] | 419 | int InitAdapter(struct bcm_mini_adapter *psAdapter); |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 420 | |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 421 | /* ===================================================================== |
| 422 | * Beceem vendor request codes for EP0 |
| 423 | * ===================================================================== |
| 424 | */ |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 425 | |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 426 | #define BCM_REQUEST_READ 0x2 |
| 427 | #define BCM_REQUEST_WRITE 0x1 |
| 428 | #define EP2_MPS_REG 0x0F0110A0 |
| 429 | #define EP2_MPS 0x40 |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 430 | |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 431 | #define EP2_CFG_REG 0x0F0110A8 |
| 432 | #define EP2_CFG_INT 0x27 |
| 433 | #define EP2_CFG_BULK 0x25 |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 434 | |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 435 | #define EP4_MPS_REG 0x0F0110F0 |
| 436 | #define EP4_MPS 0x8C |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 437 | |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 438 | #define EP4_CFG_REG 0x0F0110F8 |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 439 | |
Kevin McKinney | 9094214 | 2012-05-18 08:50:55 -0400 | [diff] [blame] | 440 | #define ISO_MPS_REG 0x0F0110C8 |
| 441 | #define ISO_MPS 0x00000000 |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 442 | |
| 443 | #define EP1 0 |
| 444 | #define EP2 1 |
| 445 | #define EP3 2 |
| 446 | #define EP4 3 |
| 447 | #define EP5 4 |
| 448 | #define EP6 5 |
| 449 | |
Kevin McKinney | 76cc6f9 | 2012-05-26 12:04:53 -0400 | [diff] [blame] | 450 | enum bcm_einterface_setting { |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 451 | DEFAULT_SETTING_0 = 0, |
| 452 | ALTERNATE_SETTING_1 = 1, |
Kevin McKinney | 76cc6f9 | 2012-05-26 12:04:53 -0400 | [diff] [blame] | 453 | }; |
Stephen Hemminger | f8942e0 | 2010-09-08 14:46:36 -0700 | [diff] [blame] | 454 | |
Kevin McKinney | 5db647a | 2012-05-18 08:50:56 -0400 | [diff] [blame] | 455 | #endif /* __ADAPTER_H__ */ |