Home
last modified time | relevance | path

Searched refs:new_mtu (Results 1 – 25 of 134) sorted by relevance

123456

/drivers/net/wireless/ath/wil6210/
Dnetdev.c40 static int wil_change_mtu(struct net_device *ndev, int new_mtu) in wil_change_mtu() argument
44 if (new_mtu < 68 || new_mtu > (TX_BUF_LEN - ETH_HLEN)) { in wil_change_mtu()
45 wil_err(wil, "invalid MTU %d\n", new_mtu); in wil_change_mtu()
49 wil_dbg_misc(wil, "change MTU %d -> %d\n", ndev->mtu, new_mtu); in wil_change_mtu()
50 ndev->mtu = new_mtu; in wil_change_mtu()
/drivers/net/
Dnlmon.c30 static int nlmon_is_valid_mtu(int new_mtu) in nlmon_is_valid_mtu() argument
36 return new_mtu >= (int) sizeof(struct nlmsghdr); in nlmon_is_valid_mtu()
39 static int nlmon_change_mtu(struct net_device *dev, int new_mtu) in nlmon_change_mtu() argument
41 if (!nlmon_is_valid_mtu(new_mtu)) in nlmon_change_mtu()
44 dev->mtu = new_mtu; in nlmon_change_mtu()
Dntb_netdev.c224 static int ntb_netdev_change_mtu(struct net_device *ndev, int new_mtu) in ntb_netdev_change_mtu() argument
230 if (new_mtu > ntb_transport_max_size(dev->qp) - ETH_HLEN) in ntb_netdev_change_mtu()
234 ndev->mtu = new_mtu; in ntb_netdev_change_mtu()
241 if (ndev->mtu < new_mtu) { in ntb_netdev_change_mtu()
248 skb = netdev_alloc_skb(ndev, new_mtu + ETH_HLEN); in ntb_netdev_change_mtu()
255 new_mtu + ETH_HLEN); in ntb_netdev_change_mtu()
263 ndev->mtu = new_mtu; in ntb_netdev_change_mtu()
Dveth.c218 static int is_valid_veth_mtu(int new_mtu) in is_valid_veth_mtu() argument
220 return new_mtu >= MIN_MTU && new_mtu <= MAX_MTU; in is_valid_veth_mtu()
223 static int veth_change_mtu(struct net_device *dev, int new_mtu) in veth_change_mtu() argument
225 if (!is_valid_veth_mtu(new_mtu)) in veth_change_mtu()
227 dev->mtu = new_mtu; in veth_change_mtu()
/drivers/net/can/
Dvcan.c134 static int vcan_change_mtu(struct net_device *dev, int new_mtu) in vcan_change_mtu() argument
140 if (new_mtu != CAN_MTU && new_mtu != CANFD_MTU) in vcan_change_mtu()
143 dev->mtu = new_mtu; in vcan_change_mtu()
/drivers/misc/sgi-xp/
Dxpnet.c334 xpnet_dev_change_mtu(struct net_device *dev, int new_mtu) in xpnet_dev_change_mtu() argument
337 if ((new_mtu < 68) || (new_mtu > XPNET_MAX_MTU)) { in xpnet_dev_change_mtu()
339 "between 68 and %ld\n", dev->name, new_mtu, in xpnet_dev_change_mtu()
344 dev->mtu = new_mtu; in xpnet_dev_change_mtu()
345 dev_dbg(xpnet, "ifconfig %s mtu set to %d\n", dev->name, new_mtu); in xpnet_dev_change_mtu()
/drivers/net/wireless/ipw2x00/
Dlibipw_module.c134 int libipw_change_mtu(struct net_device *dev, int new_mtu) in libipw_change_mtu() argument
136 if ((new_mtu < 68) || (new_mtu > LIBIPW_DATA_LEN)) in libipw_change_mtu()
138 dev->mtu = new_mtu; in libipw_change_mtu()
/drivers/net/wan/
Dhdlc.c49 int hdlc_change_mtu(struct net_device *dev, int new_mtu) in hdlc_change_mtu() argument
51 if ((new_mtu < 68) || (new_mtu > HDLC_MAX_MTU)) in hdlc_change_mtu()
53 dev->mtu = new_mtu; in hdlc_change_mtu()
Ddlci.c267 static int dlci_change_mtu(struct net_device *dev, int new_mtu) in dlci_change_mtu() argument
271 return dev_set_mtu(dlp->slave, new_mtu); in dlci_change_mtu()
/drivers/net/usb/
Dcdc-phonet.c279 static int usbpn_set_mtu(struct net_device *dev, int new_mtu) in usbpn_set_mtu() argument
281 if ((new_mtu < PHONET_MIN_MTU) || (new_mtu > PHONET_MAX_MTU)) in usbpn_set_mtu()
284 dev->mtu = new_mtu; in usbpn_set_mtu()
Dasix_devices.c751 static int ax88178_change_mtu(struct net_device *net, int new_mtu) in ax88178_change_mtu() argument
754 int ll_mtu = new_mtu + net->hard_header_len + 4; in ax88178_change_mtu()
756 netdev_dbg(dev->net, "ax88178_change_mtu() new_mtu=%d\n", new_mtu); in ax88178_change_mtu()
758 if (new_mtu <= 0 || ll_mtu > 16384) in ax88178_change_mtu()
764 net->mtu = new_mtu; in ax88178_change_mtu()
Dsierra_net.c168 static int sierra_net_change_mtu(struct net_device *net, int new_mtu);
626 static int sierra_net_change_mtu(struct net_device *net, int new_mtu) in sierra_net_change_mtu() argument
628 if (new_mtu > SIERRA_NET_MAX_SUPPORTED_MTU) in sierra_net_change_mtu()
631 return usbnet_change_mtu(net, new_mtu); in sierra_net_change_mtu()
/drivers/net/wimax/i2400m/
Dnetdev.c398 int i2400m_change_mtu(struct net_device *net_dev, int new_mtu) in i2400m_change_mtu() argument
404 if (new_mtu >= I2400M_MAX_MTU) { in i2400m_change_mtu()
406 new_mtu, I2400M_MAX_MTU); in i2400m_change_mtu()
409 net_dev->mtu = new_mtu; in i2400m_change_mtu()
/drivers/staging/octeon/
Dethernet.c268 static int cvm_oct_common_change_mtu(struct net_device *dev, int new_mtu) in cvm_oct_common_change_mtu() argument
283 if ((new_mtu + 14 + 4 + vlan_bytes < 64) in cvm_oct_common_change_mtu()
284 || (new_mtu + 14 + 4 + vlan_bytes > 65392)) { in cvm_oct_common_change_mtu()
289 dev->mtu = new_mtu; in cvm_oct_common_change_mtu()
295 int max_packet = new_mtu + 14 + 4 + vlan_bytes; in cvm_oct_common_change_mtu()
/drivers/staging/wlan-ng/
Dp80211netdev.c672 static int wlan_change_mtu(netdevice_t *dev, int new_mtu) in wlan_change_mtu() argument
676 if ((new_mtu < 68) || (new_mtu > (2312 - 20 - 8))) in wlan_change_mtu()
679 dev->mtu = new_mtu; in wlan_change_mtu()
/drivers/net/ethernet/ibm/emac/
Dcore.c990 static int emac_resize_rx_ring(struct emac_instance *dev, int new_mtu) in emac_resize_rx_ring() argument
992 int rx_sync_size = emac_rx_sync_size(new_mtu); in emac_resize_rx_ring()
993 int rx_skb_size = emac_rx_skb_size(new_mtu); in emac_resize_rx_ring()
1045 mr1_jumbo_bit_change = (new_mtu > ETH_DATA_LEN) || in emac_resize_rx_ring()
1048 mr1_jumbo_bit_change = (new_mtu > ETH_DATA_LEN) ^ in emac_resize_rx_ring()
1056 dev->ndev->mtu = new_mtu; in emac_resize_rx_ring()
1060 mal_set_rcbs(dev->mal, dev->mal_rx_chan, emac_rx_size(new_mtu)); in emac_resize_rx_ring()
1074 static int emac_change_mtu(struct net_device *ndev, int new_mtu) in emac_change_mtu() argument
1079 if (new_mtu < EMAC_MIN_MTU || new_mtu > dev->max_mtu) in emac_change_mtu()
1082 DBG(dev, "change_mtu(%d)" NL, new_mtu); in emac_change_mtu()
[all …]
/drivers/usb/gadget/function/
Df_phonet.c264 static int pn_net_mtu(struct net_device *dev, int new_mtu) in pn_net_mtu() argument
266 if ((new_mtu < PHONET_MIN_MTU) || (new_mtu > PHONET_MAX_MTU)) in pn_net_mtu()
268 dev->mtu = new_mtu; in pn_net_mtu()
/drivers/net/ethernet/xilinx/
Dxilinx_axienet_main.c1014 static int axienet_change_mtu(struct net_device *ndev, int new_mtu) in axienet_change_mtu() argument
1021 if ((new_mtu > XAE_JUMBO_MTU) || (new_mtu < 64)) in axienet_change_mtu()
1023 ndev->mtu = new_mtu; in axienet_change_mtu()
1025 if ((new_mtu > XAE_MTU) || (new_mtu < 64)) in axienet_change_mtu()
1027 ndev->mtu = new_mtu; in axienet_change_mtu()
/drivers/infiniband/hw/amso1100/
Dc2_provider.c697 static int c2_pseudo_change_mtu(struct net_device *netdev, int new_mtu) in c2_pseudo_change_mtu() argument
699 if (new_mtu < ETH_ZLEN || new_mtu > ETH_JUMBO_MTU) in c2_pseudo_change_mtu()
702 netdev->mtu = new_mtu; in c2_pseudo_change_mtu()
Dc2.c80 static int c2_change_mtu(struct net_device *netdev, int new_mtu);
850 static int c2_change_mtu(struct net_device *netdev, int new_mtu) in c2_change_mtu() argument
854 if (new_mtu < ETH_ZLEN || new_mtu > ETH_JUMBO_MTU) in c2_change_mtu()
857 netdev->mtu = new_mtu; in c2_change_mtu()
/drivers/net/slip/
Dslip.c560 static int sl_change_mtu(struct net_device *dev, int new_mtu) argument
564 if (new_mtu < 68 || new_mtu > 65534)
567 if (new_mtu != dev->mtu)
568 return sl_realloc_bufs(sl, new_mtu);
/drivers/net/ethernet/qualcomm/
Dqca_spi.c785 qcaspi_netdev_change_mtu(struct net_device *dev, int new_mtu) in qcaspi_netdev_change_mtu() argument
787 if ((new_mtu < QCAFRM_ETHMINMTU) || (new_mtu > QCAFRM_ETHMAXMTU)) in qcaspi_netdev_change_mtu()
790 dev->mtu = new_mtu; in qcaspi_netdev_change_mtu()
/drivers/net/ethernet/icplus/
Dipg.c2087 static int ipg_nic_change_mtu(struct net_device *dev, int new_mtu) in ipg_nic_change_mtu() argument
2103 if (new_mtu < 68 || new_mtu > 10240) in ipg_nic_change_mtu()
2110 dev->mtu = new_mtu; in ipg_nic_change_mtu()
2112 sp->max_rxframe_size = new_mtu; in ipg_nic_change_mtu()
2114 sp->rxfrag_size = new_mtu; in ipg_nic_change_mtu()
2120 if (new_mtu > 0x0600) in ipg_nic_change_mtu()
/drivers/net/ethernet/pasemi/
Dpasemi_mac.c1648 static int pasemi_mac_change_mtu(struct net_device *dev, int new_mtu) in pasemi_mac_change_mtu() argument
1656 if (new_mtu < PE_MIN_MTU || new_mtu > PE_MAX_MTU) in pasemi_mac_change_mtu()
1680 if (new_mtu > 1500 && !mac->num_cs) { in pasemi_mac_change_mtu()
1693 reg |= PAS_MAC_CFG_MACCFG_MAXF(new_mtu + ETH_HLEN + 4); in pasemi_mac_change_mtu()
1696 dev->mtu = new_mtu; in pasemi_mac_change_mtu()
1698 mac->bufsz = new_mtu + ETH_HLEN + ETH_FCS_LEN + LOCAL_SKB_ALIGN + 128; in pasemi_mac_change_mtu()
/drivers/s390/net/
Dctcm_main.c1030 static int ctcm_change_mtu(struct net_device *dev, int new_mtu) in ctcm_change_mtu() argument
1035 if (new_mtu < 576 || new_mtu > 65527) in ctcm_change_mtu()
1042 if (new_mtu > max_bufsize - TH_HEADER_LENGTH) in ctcm_change_mtu()
1046 if (new_mtu > max_bufsize - LL_HEADER_LENGTH - 2) in ctcm_change_mtu()
1050 dev->mtu = new_mtu; in ctcm_change_mtu()

123456