]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/infiniband/hw/nes/nes_nic.c
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
[mirror_ubuntu-artful-kernel.git] / drivers / infiniband / hw / nes / nes_nic.c
index 4dcfe669ebad932d16d174bc3b153a7888318740..5921ea3d50ae436996913e3ac38ca0a2d6d60a31 100644 (file)
@@ -985,20 +985,16 @@ static int nes_netdev_change_mtu(struct net_device *netdev, int new_mtu)
 {
        struct nes_vnic *nesvnic = netdev_priv(netdev);
        struct nes_device *nesdev = nesvnic->nesdev;
-       int ret = 0;
        u8 jumbomode = 0;
        u32 nic_active;
        u32 nic_active_bit;
        u32 uc_all_active;
        u32 mc_all_active;
 
-       if ((new_mtu < ETH_ZLEN) || (new_mtu > max_mtu))
-               return -EINVAL;
-
        netdev->mtu = new_mtu;
        nesvnic->max_frame_size = new_mtu + VLAN_ETH_HLEN;
 
-       if (netdev->mtu > 1500) {
+       if (netdev->mtu > ETH_DATA_LEN) {
                jumbomode=1;
        }
        nes_nic_init_timer_defaults(nesdev, jumbomode);
@@ -1024,7 +1020,7 @@ static int nes_netdev_change_mtu(struct net_device *netdev, int new_mtu)
                nes_write_indexed(nesdev, NES_IDX_NIC_UNICAST_ALL, nic_active);
        }
 
-       return ret;
+       return 0;
 }
 
 
@@ -1670,7 +1666,7 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev,
 
        netdev->watchdog_timeo = NES_TX_TIMEOUT;
        netdev->irq = nesdev->pcidev->irq;
-       netdev->mtu = ETH_DATA_LEN;
+       netdev->max_mtu = NES_MAX_MTU;
        netdev->hard_header_len = ETH_HLEN;
        netdev->addr_len = ETH_ALEN;
        netdev->type = ARPHRD_ETHER;