aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/port.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mlx4/port.c')
-rw-r--r--drivers/net/mlx4/port.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/mlx4/port.c b/drivers/net/mlx4/port.c
index 8856659fb43c..1f95afda6841 100644
--- a/drivers/net/mlx4/port.c
+++ b/drivers/net/mlx4/port.c
@@ -146,7 +146,7 @@ int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn, u8 wrap)
146 int i, err = 0; 146 int i, err = 0;
147 int free = -1; 147 int free = -1;
148 148
149 if (dev->caps.vep_uc_steering) { 149 if (dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER) {
150 err = mlx4_uc_steer_add(dev, port, mac, qpn, 1); 150 err = mlx4_uc_steer_add(dev, port, mac, qpn, 1);
151 if (!err) { 151 if (!err) {
152 entry = kmalloc(sizeof *entry, GFP_KERNEL); 152 entry = kmalloc(sizeof *entry, GFP_KERNEL);
@@ -203,7 +203,7 @@ int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn, u8 wrap)
203 goto out; 203 goto out;
204 } 204 }
205 205
206 if (!dev->caps.vep_uc_steering) 206 if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER))
207 *qpn = info->base_qpn + free; 207 *qpn = info->base_qpn + free;
208 ++table->total; 208 ++table->total;
209out: 209out:
@@ -243,7 +243,7 @@ void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int qpn)
243 int index = qpn - info->base_qpn; 243 int index = qpn - info->base_qpn;
244 struct mlx4_mac_entry *entry; 244 struct mlx4_mac_entry *entry;
245 245
246 if (dev->caps.vep_uc_steering) { 246 if (dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER) {
247 entry = radix_tree_lookup(&info->mac_tree, qpn); 247 entry = radix_tree_lookup(&info->mac_tree, qpn);
248 if (entry) { 248 if (entry) {
249 mlx4_uc_steer_release(dev, port, entry->mac, qpn, 1); 249 mlx4_uc_steer_release(dev, port, entry->mac, qpn, 1);
@@ -274,7 +274,7 @@ int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac, u8 wra
274 struct mlx4_mac_entry *entry; 274 struct mlx4_mac_entry *entry;
275 int err; 275 int err;
276 276
277 if (dev->caps.vep_uc_steering) { 277 if (dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER) {
278 entry = radix_tree_lookup(&info->mac_tree, qpn); 278 entry = radix_tree_lookup(&info->mac_tree, qpn);
279 if (!entry) 279 if (!entry)
280 return -EINVAL; 280 return -EINVAL;