diff options
author | Joe Perches <joe@perches.com> | 2013-08-01 19:17:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-02 15:33:54 -0400 |
commit | 574e2af7c0af3273836def5e66f236521bb433c9 (patch) | |
tree | 5cfa1b92c82a86426a906ee9203a1548f0e3d993 /include/linux/mlx4 | |
parent | e216975ad97cfcfc436789aa66d59a0e93f337f7 (diff) |
include: Convert ethernet mac address declarations to use ETH_ALEN
It's convenient to have ethernet mac addresses use
ETH_ALEN to be able to grep for them a bit easier and
also to ensure that the addresses are __aligned(2).
Add #include <linux/if_ether.h> as necessary.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r-- | include/linux/mlx4/device.h | 11 | ||||
-rw-r--r-- | include/linux/mlx4/qp.h | 5 |
2 files changed, 9 insertions, 7 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 6aebdfe0ed8b..09ef2f448a00 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #ifndef MLX4_DEVICE_H | 33 | #ifndef MLX4_DEVICE_H |
34 | #define MLX4_DEVICE_H | 34 | #define MLX4_DEVICE_H |
35 | 35 | ||
36 | #include <linux/if_ether.h> | ||
36 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
37 | #include <linux/completion.h> | 38 | #include <linux/completion.h> |
38 | #include <linux/radix-tree.h> | 39 | #include <linux/radix-tree.h> |
@@ -620,7 +621,7 @@ struct mlx4_eth_av { | |||
620 | u8 dgid[16]; | 621 | u8 dgid[16]; |
621 | u32 reserved4[2]; | 622 | u32 reserved4[2]; |
622 | __be16 vlan; | 623 | __be16 vlan; |
623 | u8 mac[6]; | 624 | u8 mac[ETH_ALEN]; |
624 | }; | 625 | }; |
625 | 626 | ||
626 | union mlx4_ext_av { | 627 | union mlx4_ext_av { |
@@ -914,10 +915,10 @@ enum mlx4_net_trans_promisc_mode { | |||
914 | }; | 915 | }; |
915 | 916 | ||
916 | struct mlx4_spec_eth { | 917 | struct mlx4_spec_eth { |
917 | u8 dst_mac[6]; | 918 | u8 dst_mac[ETH_ALEN]; |
918 | u8 dst_mac_msk[6]; | 919 | u8 dst_mac_msk[ETH_ALEN]; |
919 | u8 src_mac[6]; | 920 | u8 src_mac[ETH_ALEN]; |
920 | u8 src_mac_msk[6]; | 921 | u8 src_mac_msk[ETH_ALEN]; |
921 | u8 ether_type_enable; | 922 | u8 ether_type_enable; |
922 | __be16 ether_type; | 923 | __be16 ether_type; |
923 | __be16 vlan_id_msk; | 924 | __be16 vlan_id_msk; |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 262deac02c9e..6d351473c292 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #define MLX4_QP_H | 34 | #define MLX4_QP_H |
35 | 35 | ||
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/if_ether.h> | ||
37 | 38 | ||
38 | #include <linux/mlx4/device.h> | 39 | #include <linux/mlx4/device.h> |
39 | 40 | ||
@@ -143,7 +144,7 @@ struct mlx4_qp_path { | |||
143 | u8 feup; | 144 | u8 feup; |
144 | u8 fvl_rx; | 145 | u8 fvl_rx; |
145 | u8 reserved4[2]; | 146 | u8 reserved4[2]; |
146 | u8 dmac[6]; | 147 | u8 dmac[ETH_ALEN]; |
147 | }; | 148 | }; |
148 | 149 | ||
149 | enum { /* fl */ | 150 | enum { /* fl */ |
@@ -318,7 +319,7 @@ struct mlx4_wqe_datagram_seg { | |||
318 | __be32 dqpn; | 319 | __be32 dqpn; |
319 | __be32 qkey; | 320 | __be32 qkey; |
320 | __be16 vlan; | 321 | __be16 vlan; |
321 | u8 mac[6]; | 322 | u8 mac[ETH_ALEN]; |
322 | }; | 323 | }; |
323 | 324 | ||
324 | struct mlx4_wqe_lso_seg { | 325 | struct mlx4_wqe_lso_seg { |