Lines Matching refs:dev

93 	skb->dev = priv->netdev;
133 static int delete_device(struct chnl_net *dev)
136 if (dev->netdev)
137 unregister_netdevice(dev->netdev);
143 struct chnl_net *dev = NULL;
149 dev = list_entry(list_node, struct chnl_net, list_field);
150 if (dev->state == CAIF_SHUTDOWN)
151 dev_close(dev->netdev);
217 static int chnl_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
224 priv = netdev_priv(dev);
229 dev->stats.tx_errors++;
236 dev->stats.tx_dropped++;
251 dev->stats.tx_dropped++;
256 dev->stats.tx_packets++;
257 dev->stats.tx_bytes += len;
262 static int chnl_net_open(struct net_device *dev)
269 priv = netdev_priv(dev);
277 result = caif_connect_client(dev_net(dev), &priv->conn_req,
288 lldev = __dev_get_by_index(dev_net(dev), llifindex);
296 dev->needed_tailroom = tailroom + lldev->needed_tailroom;
297 dev->hard_header_len = headroom + lldev->hard_header_len +
307 mtu = min_t(int, dev->mtu, lldev->mtu - (headroom + tailroom));
309 dev_set_mtu(dev, mtu);
334 caif_disconnect_client(dev_net(dev), &priv->chnl);
350 caif_disconnect_client(dev_net(dev), &priv->chnl);
357 static int chnl_net_stop(struct net_device *dev)
362 priv = netdev_priv(dev);
364 caif_disconnect_client(dev_net(dev), &priv->chnl);
368 static int chnl_net_init(struct net_device *dev)
372 priv = netdev_priv(dev);
373 strncpy(priv->name, dev->name, sizeof(priv->name));
377 static void chnl_net_uninit(struct net_device *dev)
381 priv = netdev_priv(dev);
393 static void chnl_net_destructor(struct net_device *dev)
395 struct chnl_net *priv = netdev_priv(dev);
397 free_netdev(dev);
400 static void ipcaif_net_setup(struct net_device *dev)
403 dev->netdev_ops = &netdev_ops;
404 dev->destructor = chnl_net_destructor;
405 dev->flags |= IFF_NOARP;
406 dev->flags |= IFF_POINTOPOINT;
407 dev->mtu = GPRS_PDP_MTU;
408 dev->tx_queue_len = CAIF_NET_DEFAULT_QUEUE_LEN;
410 priv = netdev_priv(dev);
413 priv->netdev = dev;
425 static int ipcaif_fill_info(struct sk_buff *skb, const struct net_device *dev)
429 priv = netdev_priv(dev);
465 static int ipcaif_newlink(struct net *src_net, struct net_device *dev,
471 caifdev = netdev_priv(dev);
475 ret = register_netdevice(dev);
483 caifdev->conn_req.sockaddr.u.dgm.connection_id = dev->ifindex;
489 static int ipcaif_changelink(struct net_device *dev, struct nlattr *tb[],
494 caifdev = netdev_priv(dev);
496 netdev_state_change(dev);
500 static size_t ipcaif_get_size(const struct net_device *dev)
539 struct chnl_net *dev = NULL;
545 dev = list_entry(list_node, struct chnl_net, list_field);
547 delete_device(dev);