aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibmveth.h
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2007-08-17 10:16:56 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:50:46 -0400
commit79ef4a4dd44cd4f9942975b0f625bd01549a2aa9 (patch)
tree177d1e948721db288f2f13487e42d47cd9acef83 /drivers/net/ibmveth.h
parent3449a2ab31681420515e242920e755262b4f41e9 (diff)
ibmveth: Remove use of bitfields
Removes the use of bitfields from the ibmveth driver. This results in slightly smaller object code. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ibmveth.h')
-rw-r--r--drivers/net/ibmveth.h56
1 files changed, 23 insertions, 33 deletions
diff --git a/drivers/net/ibmveth.h b/drivers/net/ibmveth.h
index 30f9fc67b0c8..41f61cd18852 100644
--- a/drivers/net/ibmveth.h
+++ b/drivers/net/ibmveth.h
@@ -39,6 +39,12 @@
39#define IbmVethMcastRemoveFilter 0x2UL 39#define IbmVethMcastRemoveFilter 0x2UL
40#define IbmVethMcastClearFilterTable 0x3UL 40#define IbmVethMcastClearFilterTable 0x3UL
41 41
42#define IBMVETH_ILLAN_PADDED_PKT_CSUM 0x0000000000002000ULL
43#define IBMVETH_ILLAN_TRUNK_PRI_MASK 0x0000000000000F00ULL
44#define IBMVETH_ILLAN_IPV6_TCP_CSUM 0x0000000000000004ULL
45#define IBMVETH_ILLAN_IPV4_TCP_CSUM 0x0000000000000002ULL
46#define IBMVETH_ILLAN_ACTIVE_TRUNK 0x0000000000000001ULL
47
42/* hcall macros */ 48/* hcall macros */
43#define h_register_logical_lan(ua, buflst, rxq, fltlst, mac) \ 49#define h_register_logical_lan(ua, buflst, rxq, fltlst, mac) \
44 plpar_hcall_norets(H_REGISTER_LOGICAL_LAN, ua, buflst, rxq, fltlst, mac) 50 plpar_hcall_norets(H_REGISTER_LOGICAL_LAN, ua, buflst, rxq, fltlst, mac)
@@ -151,13 +157,13 @@ struct ibmveth_adapter {
151}; 157};
152 158
153struct ibmveth_buf_desc_fields { 159struct ibmveth_buf_desc_fields {
154 u32 valid : 1; 160 u32 flags_len;
155 u32 toggle : 1; 161#define IBMVETH_BUF_VALID 0x80000000
156 u32 reserved : 4; 162#define IBMVETH_BUF_TOGGLE 0x40000000
157 u32 no_csum : 1; 163#define IBMVETH_BUF_NO_CSUM 0x02000000
158 u32 csum_good : 1; 164#define IBMVETH_BUF_CSUM_GOOD 0x01000000
159 u32 length : 24; 165#define IBMVETH_BUF_LEN_MASK 0x00FFFFFF
160 u32 address; 166 u32 address;
161}; 167};
162 168
163union ibmveth_buf_desc { 169union ibmveth_buf_desc {
@@ -165,33 +171,17 @@ union ibmveth_buf_desc {
165 struct ibmveth_buf_desc_fields fields; 171 struct ibmveth_buf_desc_fields fields;
166}; 172};
167 173
168struct ibmveth_illan_attributes_fields {
169 u32 reserved;
170 u32 reserved2 : 18;
171 u32 csum_offload_padded_pkt_support : 1;
172 u32 reserved3 : 1;
173 u32 trunk_priority : 4;
174 u32 reserved4 : 5;
175 u32 tcp_csum_offload_ipv6 : 1;
176 u32 tcp_csum_offload_ipv4 : 1;
177 u32 active_trunk : 1;
178};
179
180union ibmveth_illan_attributes {
181 u64 desc;
182 struct ibmveth_illan_attributes_fields fields;
183};
184
185struct ibmveth_rx_q_entry { 174struct ibmveth_rx_q_entry {
186 u16 toggle : 1; 175 u32 flags_off;
187 u16 valid : 1; 176#define IBMVETH_RXQ_TOGGLE 0x80000000
188 u16 reserved : 4; 177#define IBMVETH_RXQ_TOGGLE_SHIFT 31
189 u16 no_csum : 1; 178#define IBMVETH_RXQ_VALID 0x40000000
190 u16 csum_good : 1; 179#define IBMVETH_RXQ_NO_CSUM 0x02000000
191 u16 reserved2 : 8; 180#define IBMVETH_RXQ_CSUM_GOOD 0x01000000
192 u16 offset; 181#define IBMVETH_RXQ_OFF_MASK 0x0000FFFF
193 u32 length; 182
194 u64 correlator; 183 u32 length;
184 u64 correlator;
195}; 185};
196 186
197#endif /* _IBMVETH_H */ 187#endif /* _IBMVETH_H */