Lines Matching refs:rmnet_dev

79 static int rmnet_vnd_change_mtu(struct net_device *rmnet_dev, int new_mtu)  in rmnet_vnd_change_mtu()  argument
81 struct rmnet_priv *priv = netdev_priv(rmnet_dev); in rmnet_vnd_change_mtu()
93 rmnet_dev->mtu = new_mtu; in rmnet_vnd_change_mtu()
272 void rmnet_vnd_setup(struct net_device *rmnet_dev) in rmnet_vnd_setup() argument
274 rmnet_dev->netdev_ops = &rmnet_vnd_ops; in rmnet_vnd_setup()
275 rmnet_dev->mtu = RMNET_DFLT_PACKET_SIZE; in rmnet_vnd_setup()
276 rmnet_dev->needed_headroom = RMNET_NEEDED_HEADROOM; in rmnet_vnd_setup()
277 eth_hw_addr_random(rmnet_dev); in rmnet_vnd_setup()
278 rmnet_dev->tx_queue_len = RMNET_TX_QUEUE_LEN; in rmnet_vnd_setup()
281 rmnet_dev->header_ops = NULL; /* No header */ in rmnet_vnd_setup()
282 rmnet_dev->type = ARPHRD_RAWIP; in rmnet_vnd_setup()
283 rmnet_dev->hard_header_len = 0; in rmnet_vnd_setup()
284 rmnet_dev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST); in rmnet_vnd_setup()
286 rmnet_dev->needs_free_netdev = true; in rmnet_vnd_setup()
287 rmnet_dev->ethtool_ops = &rmnet_ethtool_ops; in rmnet_vnd_setup()
289 rmnet_dev->features |= NETIF_F_LLTX; in rmnet_vnd_setup()
292 rmnet_dev->addr_assign_type = NET_ADDR_RANDOM; in rmnet_vnd_setup()
293 eth_random_addr(rmnet_dev->perm_addr); in rmnet_vnd_setup()
298 int rmnet_vnd_newlink(u8 id, struct net_device *rmnet_dev, in rmnet_vnd_newlink() argument
305 struct rmnet_priv *priv = netdev_priv(rmnet_dev); in rmnet_vnd_newlink()
314 rmnet_dev->hw_features = NETIF_F_RXCSUM; in rmnet_vnd_newlink()
315 rmnet_dev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; in rmnet_vnd_newlink()
316 rmnet_dev->hw_features |= NETIF_F_SG; in rmnet_vnd_newlink()
322 if (rmnet_vnd_change_mtu(rmnet_dev, real_dev->mtu - headroom)) { in rmnet_vnd_newlink()
327 rc = register_netdevice(rmnet_dev); in rmnet_vnd_newlink()
329 ep->egress_dev = rmnet_dev; in rmnet_vnd_newlink()
333 rmnet_dev->rtnl_link_ops = &rmnet_link_ops; in rmnet_vnd_newlink()
337 netdev_dbg(rmnet_dev, "rmnet dev created\n"); in rmnet_vnd_newlink()
354 int rmnet_vnd_do_flow_control(struct net_device *rmnet_dev, int enable) in rmnet_vnd_do_flow_control() argument
356 netdev_dbg(rmnet_dev, "Setting VND TX queue state to %d\n", enable); in rmnet_vnd_do_flow_control()
362 netif_wake_queue(rmnet_dev); in rmnet_vnd_do_flow_control()
364 netif_stop_queue(rmnet_dev); in rmnet_vnd_do_flow_control()