driver.h (272027) | driver.h (273135) |
---|---|
1/* 2 * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 107 unchanged lines hidden (view full) --- 116void mlx4_unregister_interface(struct mlx4_interface *intf); 117 118void *mlx4_get_protocol_dev(struct mlx4_dev *dev, enum mlx4_protocol proto, 119 int port); 120 121#ifndef ETH_ALEN 122#define ETH_ALEN 6 123#endif | 1/* 2 * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 107 unchanged lines hidden (view full) --- 116void mlx4_unregister_interface(struct mlx4_interface *intf); 117 118void *mlx4_get_protocol_dev(struct mlx4_dev *dev, enum mlx4_protocol proto, 119 int port); 120 121#ifndef ETH_ALEN 122#define ETH_ALEN 6 123#endif |
124static inline u64 mlx4_mac_to_u64(u8 *addr) | 124static inline u64 mlx4_mac_to_u64(const u8 *addr) |
125{ 126 u64 mac = 0; 127 int i; 128 129 for (i = 0; i < ETH_ALEN; i++) { 130 mac <<= 8; 131 mac |= addr[i]; 132 } 133 return mac; 134} 135 136#endif /* MLX4_DRIVER_H */ | 125{ 126 u64 mac = 0; 127 int i; 128 129 for (i = 0; i < ETH_ALEN; i++) { 130 mac <<= 8; 131 mac |= addr[i]; 132 } 133 return mac; 134} 135 136#endif /* MLX4_DRIVER_H */ |