diff options
author | Doug Ledford <dledford@redhat.com> | 2017-02-19 17:18:21 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-02-19 17:18:21 +0300 |
commit | 6dd7abae7110da6fa01f048baf5b679b5a4a56dd (patch) | |
tree | 17ca298bbae17f05bdadae7f88e3be0f113a713f /drivers/infiniband/hw/i40iw | |
parent | 6df6b4a9ce43deb57d3e23b0e79a529464b5cf37 (diff) | |
parent | 646ebd4166ca00bdf682a36bd2e1c9a74d848ac6 (diff) | |
download | linux-6dd7abae7110da6fa01f048baf5b679b5a4a56dd.tar.xz |
Merge branch 'k.o/for-4.10-rc' into HEAD
Diffstat (limited to 'drivers/infiniband/hw/i40iw')
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw_verbs.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c index 29e97df9e1a7..4c000d60d5c6 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c @@ -100,16 +100,7 @@ static int i40iw_query_port(struct ib_device *ibdev, memset(props, 0, sizeof(*props)); props->max_mtu = IB_MTU_4096; - if (netdev->mtu >= 4096) - props->active_mtu = IB_MTU_4096; - else if (netdev->mtu >= 2048) - props->active_mtu = IB_MTU_2048; - else if (netdev->mtu >= 1024) - props->active_mtu = IB_MTU_1024; - else if (netdev->mtu >= 512) - props->active_mtu = IB_MTU_512; - else - props->active_mtu = IB_MTU_256; + props->active_mtu = ib_mtu_int_to_enum(netdev->mtu); props->lid = 1; if (netif_carrier_ok(iwdev->netdev)) |