aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-02-23 10:57:58 -0500
committerDavid S. Miller <davem@davemloft.net>2017-02-23 10:57:58 -0500
commite65ade77e87fd206bb78fae32ab7b604b01fade0 (patch)
treee6c093d33d61dd9c2eeb7c7f77c9f4c26aea3655 /include
parentc12f4d761dd2313ae4f457041df3ec0c603aa76a (diff)
parent7f0137e2ef9f32143df623001a96f7aab61a9595 (diff)
Merge branch 'mlx4-misc-fixes'
Tariq Toukan says: ==================== mlx4 misc fixes This patchset contains misc bug fixes from Eric Dumazet and our team to the mlx4 Core and Eth drivers. Series generated against net commit: eee2faabc63d tcp: account for ts offset only if tsecr not zero v3: * Rebased, conflict solved. v2: * Added Eric's fix (patch 5/5). ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx4/cmd.h2
-rw-r--r--include/linux/mlx4/driver.h10
2 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h
index 1f3568694a57..7b74afcbbab2 100644
--- a/include/linux/mlx4/cmd.h
+++ b/include/linux/mlx4/cmd.h
@@ -308,7 +308,7 @@ int mlx4_get_counter_stats(struct mlx4_dev *dev, int counter_index,
308int mlx4_get_vf_stats(struct mlx4_dev *dev, int port, int vf_idx, 308int mlx4_get_vf_stats(struct mlx4_dev *dev, int port, int vf_idx,
309 struct ifla_vf_stats *vf_stats); 309 struct ifla_vf_stats *vf_stats);
310u32 mlx4_comm_get_version(void); 310u32 mlx4_comm_get_version(void);
311int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u64 mac); 311int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u8 *mac);
312int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, 312int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan,
313 u8 qos, __be16 proto); 313 u8 qos, __be16 proto);
314int mlx4_set_vf_rate(struct mlx4_dev *dev, int port, int vf, int min_tx_rate, 314int mlx4_set_vf_rate(struct mlx4_dev *dev, int port, int vf, int min_tx_rate,
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h
index bd0e7075ea6d..e965e5090d96 100644
--- a/include/linux/mlx4/driver.h
+++ b/include/linux/mlx4/driver.h
@@ -104,4 +104,14 @@ static inline u64 mlx4_mac_to_u64(u8 *addr)
104 return mac; 104 return mac;
105} 105}
106 106
107static inline void mlx4_u64_to_mac(u8 *addr, u64 mac)
108{
109 int i;
110
111 for (i = ETH_ALEN; i > 0; i--) {
112 addr[i - 1] = mac && 0xFF;
113 mac >>= 8;
114 }
115}
116
107#endif /* MLX4_DRIVER_H */ 117#endif /* MLX4_DRIVER_H */