diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mlx4/driver.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h index c257e1b211be..022055c8fb26 100644 --- a/include/linux/mlx4/driver.h +++ b/include/linux/mlx4/driver.h | |||
| @@ -64,4 +64,16 @@ void mlx4_unregister_interface(struct mlx4_interface *intf); | |||
| 64 | 64 | ||
| 65 | void *mlx4_get_protocol_dev(struct mlx4_dev *dev, enum mlx4_protocol proto, int port); | 65 | void *mlx4_get_protocol_dev(struct mlx4_dev *dev, enum mlx4_protocol proto, int port); |
| 66 | 66 | ||
| 67 | static inline u64 mlx4_mac_to_u64(u8 *addr) | ||
| 68 | { | ||
| 69 | u64 mac = 0; | ||
| 70 | int i; | ||
| 71 | |||
| 72 | for (i = 0; i < ETH_ALEN; i++) { | ||
| 73 | mac <<= 8; | ||
| 74 | mac |= addr[i]; | ||
| 75 | } | ||
| 76 | return mac; | ||
| 77 | } | ||
| 78 | |||
| 67 | #endif /* MLX4_DRIVER_H */ | 79 | #endif /* MLX4_DRIVER_H */ |
