Lines Matching refs:ndev
627 struct net_device *ndev = NULL; in ieee802154_if_add() local
633 ndev = alloc_netdev(sizeof(*sdata), name, in ieee802154_if_add()
635 if (!ndev) in ieee802154_if_add()
638 ndev->needed_headroom = local->hw.extra_tx_headroom + in ieee802154_if_add()
641 ret = dev_alloc_name(ndev, ndev->name); in ieee802154_if_add()
645 ieee802154_le64_to_be64(ndev->perm_addr, in ieee802154_if_add()
649 ndev->type = ARPHRD_IEEE802154; in ieee802154_if_add()
651 ieee802154_le64_to_be64(ndev->dev_addr, &extended_addr); in ieee802154_if_add()
653 memcpy(ndev->dev_addr, ndev->perm_addr, in ieee802154_if_add()
657 ndev->type = ARPHRD_IEEE802154_MONITOR; in ieee802154_if_add()
665 SET_NETDEV_DEV(ndev, &local->phy->dev); in ieee802154_if_add()
666 dev_net_set(ndev, wpan_phy_net(local->hw.phy)); in ieee802154_if_add()
667 sdata = netdev_priv(ndev); in ieee802154_if_add()
668 ndev->ieee802154_ptr = &sdata->wpan_dev; in ieee802154_if_add()
669 memcpy(sdata->name, ndev->name, IFNAMSIZ); in ieee802154_if_add()
670 sdata->dev = ndev; in ieee802154_if_add()
679 ret = register_netdevice(ndev); in ieee802154_if_add()
687 return ndev; in ieee802154_if_add()
690 free_netdev(ndev); in ieee802154_if_add()