• Home
  • Raw
  • Download

Lines Matching refs:netdev

69 	struct net_device *netdev;  member
78 lowpan_btle_dev(const struct net_device *netdev) in lowpan_btle_dev() argument
80 return (struct lowpan_btle_dev *)lowpan_dev(netdev)->priv; in lowpan_btle_dev()
181 neigh = __ipv6_neigh_lookup(dev->netdev, nexthop); in peer_lookup_dst()
246 static int iphc_decompress(struct sk_buff *skb, struct net_device *netdev, in iphc_decompress() argument
253 return lowpan_header_decompress(skb, netdev, netdev->dev_addr, saddr); in iphc_decompress()
355 if (!dev || !dev->netdev) in chan_recv_cb()
358 err = recv_pkt(skb, dev->netdev, peer); in chan_recv_cb()
367 static int setup_header(struct sk_buff *skb, struct net_device *netdev, in setup_header() argument
379 dev = lowpan_btle_dev(netdev); in setup_header()
408 lowpan_header_compress(skb, netdev, daddr, dev->netdev->dev_addr); in setup_header()
410 err = dev_hard_header(skb, netdev, ETH_P_IPV6, NULL, NULL, 0); in setup_header()
417 static int header_create(struct sk_buff *skb, struct net_device *netdev, in header_create() argument
429 struct net_device *netdev) in send_pkt() argument
448 netdev->stats.tx_bytes += err; in send_pkt()
449 netdev->stats.tx_packets++; in send_pkt()
454 netdev->stats.tx_errors++; in send_pkt()
459 static int send_mcast_pkt(struct sk_buff *skb, struct net_device *netdev) in send_mcast_pkt() argument
471 if (entry->netdev != netdev) in send_mcast_pkt()
474 dev = lowpan_btle_dev(entry->netdev); in send_mcast_pkt()
482 netdev->name, in send_mcast_pkt()
485 ret = send_pkt(pentry->chan, local_skb, netdev); in send_mcast_pkt()
498 static netdev_tx_t bt_xmit(struct sk_buff *skb, struct net_device *netdev) in bt_xmit() argument
516 err = setup_header(skb, netdev, &addr, &addr_type); in bt_xmit()
525 netdev->name, &addr, addr_type, in bt_xmit()
527 err = send_pkt(lowpan_cb(skb)->chan, skb, netdev); in bt_xmit()
535 err = send_mcast_pkt(skb, netdev); in bt_xmit()
579 static void ifup(struct net_device *netdev) in ifup() argument
584 err = dev_open(netdev, NULL); in ifup()
586 BT_INFO("iface %s cannot be opened (%d)", netdev->name, err); in ifup()
590 static void ifdown(struct net_device *netdev) in ifdown() argument
593 dev_close(netdev); in ifdown()
602 netdev_notify_peers(dev->netdev); /* send neighbour adv at startup */ in do_notify_peers()
665 struct net_device *netdev; in setup_netdev() local
668 netdev = alloc_netdev(LOWPAN_PRIV_SIZE(sizeof(struct lowpan_btle_dev)), in setup_netdev()
671 if (!netdev) in setup_netdev()
674 netdev->addr_assign_type = NET_ADDR_PERM; in setup_netdev()
675 baswap((void *)netdev->dev_addr, &chan->src); in setup_netdev()
677 netdev->netdev_ops = &netdev_ops; in setup_netdev()
678 SET_NETDEV_DEV(netdev, &chan->conn->hcon->hdev->dev); in setup_netdev()
679 SET_NETDEV_DEVTYPE(netdev, &bt_type); in setup_netdev()
681 *dev = lowpan_btle_dev(netdev); in setup_netdev()
682 (*dev)->netdev = netdev; in setup_netdev()
691 err = lowpan_register_netdev(netdev, LOWPAN_LLTYPE_BTLE); in setup_netdev()
697 free_netdev(netdev); in setup_netdev()
702 netdev->ifindex, &chan->dst, chan->dst_type, in setup_netdev()
704 set_bit(__LINK_STATE_PRESENT, &netdev->state); in setup_netdev()
733 ifup(dev->netdev); in chan_ready_cb()
757 lowpan_unregister_netdev(entry->netdev); in delete_netdev()
785 dev = lowpan_btle_dev(entry->netdev); in chan_close_cb()
806 ifdown(dev->netdev); in chan_close_cb()
841 if (!dev || !dev->netdev) in chan_suspend_cb()
844 netif_stop_queue(dev->netdev); in chan_suspend_cb()
854 if (!dev || !dev->netdev) in chan_resume_cb()
857 netif_wake_queue(dev->netdev); in chan_resume_cb()
1200 new_dev->netdev = entry->netdev; in disconnect_devices()
1209 ifdown(entry->netdev); in disconnect_devices()
1211 entry->netdev->name, entry->netdev); in disconnect_devices()
1212 lowpan_unregister_netdev(entry->netdev); in disconnect_devices()
1220 struct net_device *netdev = netdev_notifier_info_to_dev(ptr); in device_event() local
1223 if (netdev->type != ARPHRD_6LOWPAN) in device_event()
1230 if (entry->netdev == netdev) { in device_event()
1232 netdev->name, netdev); in device_event()