Home
last modified time | relevance | path

Searched refs:dev (Results 1 – 25 of 493) sorted by relevance

12345678910>>...20

/net/nfc/
Dcore.c45 int nfc_fw_download(struct nfc_dev *dev, const char *firmware_name) in nfc_fw_download() argument
49 pr_debug("%s do firmware %s\n", dev_name(&dev->dev), firmware_name); in nfc_fw_download()
51 device_lock(&dev->dev); in nfc_fw_download()
53 if (!device_is_registered(&dev->dev)) { in nfc_fw_download()
58 if (dev->dev_up) { in nfc_fw_download()
63 if (!dev->ops->fw_download) { in nfc_fw_download()
68 dev->fw_download_in_progress = true; in nfc_fw_download()
69 rc = dev->ops->fw_download(dev, firmware_name); in nfc_fw_download()
71 dev->fw_download_in_progress = false; in nfc_fw_download()
74 device_unlock(&dev->dev); in nfc_fw_download()
[all …]
Dnetlink.c127 struct nfc_dev *dev; in __get_device_from_cb() local
143 dev = nfc_get_device(idx); in __get_device_from_cb()
144 if (!dev) in __get_device_from_cb()
147 return dev; in __get_device_from_cb()
154 struct nfc_dev *dev = (struct nfc_dev *) cb->args[1]; in nfc_genl_dump_targets() local
157 if (!dev) { in nfc_genl_dump_targets()
158 dev = __get_device_from_cb(cb); in nfc_genl_dump_targets()
159 if (IS_ERR(dev)) in nfc_genl_dump_targets()
160 return PTR_ERR(dev); in nfc_genl_dump_targets()
162 cb->args[1] = (long) dev; in nfc_genl_dump_targets()
[all …]
Dnfc.h41 struct nfc_dev *dev; member
58 void nfc_llcp_mac_is_down(struct nfc_dev *dev);
59 void nfc_llcp_mac_is_up(struct nfc_dev *dev, u32 target_idx,
61 int nfc_llcp_register_device(struct nfc_dev *dev);
62 void nfc_llcp_unregister_device(struct nfc_dev *dev);
63 int nfc_llcp_set_remote_gb(struct nfc_dev *dev, u8 *gb, u8 gb_len);
64 u8 *nfc_llcp_general_bytes(struct nfc_dev *dev, size_t *general_bytes_len);
65 int nfc_llcp_data_received(struct nfc_dev *dev, struct sk_buff *skb);
66 struct nfc_llcp_local *nfc_llcp_find_local(struct nfc_dev *dev);
89 int nfc_genl_targets_found(struct nfc_dev *dev);
[all …]
/net/core/
Ddev.c158 struct net_device *dev,
223 static void list_netdevice(struct net_device *dev) in list_netdevice() argument
225 struct net *net = dev_net(dev); in list_netdevice()
230 list_add_tail_rcu(&dev->dev_list, &net->dev_base_head); in list_netdevice()
231 hlist_add_head_rcu(&dev->name_hlist, dev_name_hash(net, dev->name)); in list_netdevice()
232 hlist_add_head_rcu(&dev->index_hlist, in list_netdevice()
233 dev_index_hash(net, dev->ifindex)); in list_netdevice()
242 static void unlist_netdevice(struct net_device *dev) in unlist_netdevice() argument
248 list_del_rcu(&dev->dev_list); in unlist_netdevice()
249 hlist_del_rcu(&dev->name_hlist); in unlist_netdevice()
[all …]
Dethtool.c36 u32 ethtool_op_get_link(struct net_device *dev) in ethtool_op_get_link() argument
38 return netif_carrier_ok(dev) ? 1 : 0; in ethtool_op_get_link()
42 int ethtool_op_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info) in ethtool_op_get_ts_info() argument
116 static int ethtool_get_features(struct net_device *dev, void __user *useraddr) in ethtool_get_features() argument
131 features[i].available = (u32)(dev->hw_features >> (32 * i)); in ethtool_get_features()
132 features[i].requested = (u32)(dev->wanted_features >> (32 * i)); in ethtool_get_features()
133 features[i].active = (u32)(dev->features >> (32 * i)); in ethtool_get_features()
154 static int ethtool_set_features(struct net_device *dev, void __user *useraddr) in ethtool_set_features() argument
179 if (valid & ~dev->hw_features) { in ethtool_set_features()
180 valid &= dev->hw_features; in ethtool_set_features()
[all …]
Dlink_watch.c40 static unsigned char default_operstate(const struct net_device *dev) in default_operstate() argument
42 if (!netif_carrier_ok(dev)) in default_operstate()
43 return (dev->ifindex != dev_get_iflink(dev) ? in default_operstate()
46 if (netif_dormant(dev)) in default_operstate()
53 static void rfc2863_policy(struct net_device *dev) in rfc2863_policy() argument
55 unsigned char operstate = default_operstate(dev); in rfc2863_policy()
57 if (operstate == dev->operstate) in rfc2863_policy()
62 switch(dev->link_mode) { in rfc2863_policy()
73 dev->operstate = operstate; in rfc2863_policy()
79 void linkwatch_init_dev(struct net_device *dev) in linkwatch_init_dev() argument
[all …]
Drtnetlink.c338 struct net_device *dev; in __rtnl_kill_links() local
341 for_each_netdev(net, dev) { in __rtnl_kill_links()
342 if (dev->rtnl_link_ops == ops) in __rtnl_kill_links()
343 ops->dellink(dev, &list_kill); in __rtnl_kill_links()
408 static size_t rtnl_link_get_slave_info_data_size(const struct net_device *dev) in rtnl_link_get_slave_info_data_size() argument
413 master_dev = netdev_master_upper_dev_get((struct net_device *) dev); in rtnl_link_get_slave_info_data_size()
421 ops->get_slave_size(master_dev, dev); in rtnl_link_get_slave_info_data_size()
424 static size_t rtnl_link_get_size(const struct net_device *dev) in rtnl_link_get_size() argument
426 const struct rtnl_link_ops *ops = dev->rtnl_link_ops; in rtnl_link_get_size()
438 ops->get_size(dev); in rtnl_link_get_size()
[all …]
Ddev_addr_lists.c242 struct net_device *dev, in __hw_addr_sync_dev() argument
256 if (unsync && unsync(dev, ha->addr)) in __hw_addr_sync_dev()
268 err = sync(dev, ha->addr); in __hw_addr_sync_dev()
293 struct net_device *dev, in __hw_addr_unsync_dev() argument
304 if (unsync && unsync(dev, ha->addr)) in __hw_addr_unsync_dev()
343 void dev_addr_flush(struct net_device *dev) in dev_addr_flush() argument
347 __hw_addr_flush(&dev->dev_addrs); in dev_addr_flush()
348 dev->dev_addr = NULL; in dev_addr_flush()
361 int dev_addr_init(struct net_device *dev) in dev_addr_init() argument
369 __hw_addr_init(&dev->dev_addrs); in dev_addr_init()
[all …]
Dnet-sysfs.c37 static inline int dev_isalive(const struct net_device *dev) in dev_isalive() argument
39 return dev->reg_state <= NETREG_REGISTERED; in dev_isalive()
43 static ssize_t netdev_show(const struct device *dev, in netdev_show() argument
47 struct net_device *ndev = to_net_dev(dev); in netdev_show()
60 static ssize_t format_##field(const struct net_device *dev, char *buf) \
62 return sprintf(buf, format_string, dev->field); \
64 static ssize_t field##_show(struct device *dev, \
67 return netdev_show(dev, attr, buf, format_##field); \
79 static ssize_t netdev_store(struct device *dev, struct device_attribute *attr, in netdev_store() argument
83 struct net_device *netdev = to_net_dev(dev); in netdev_store()
[all …]
/net/bluetooth/rfcomm/
Dtty.c83 struct rfcomm_dev *dev = container_of(port, struct rfcomm_dev, port); in rfcomm_dev_destruct() local
84 struct rfcomm_dlc *dlc = dev->dlc; in rfcomm_dev_destruct()
86 BT_DBG("dev %p dlc %p", dev, dlc); in rfcomm_dev_destruct()
90 if (dlc->owner == dev) in rfcomm_dev_destruct()
96 if (dev->tty_dev) in rfcomm_dev_destruct()
97 tty_unregister_device(rfcomm_tty_driver, dev->id); in rfcomm_dev_destruct()
100 list_del(&dev->list); in rfcomm_dev_destruct()
103 kfree(dev); in rfcomm_dev_destruct()
113 struct rfcomm_dev *dev = container_of(port, struct rfcomm_dev, port); in rfcomm_dev_activate() local
116 err = rfcomm_dlc_open(dev->dlc, &dev->src, &dev->dst, dev->channel); in rfcomm_dev_activate()
[all …]
/net/bridge/
Dbr_if.c37 static int port_cost(struct net_device *dev) in port_cost() argument
41 if (!__ethtool_get_settings(dev, &ecmd)) { in port_cost()
55 if (!strncmp(dev->name, "lec", 3)) in port_cost()
58 if (!strncmp(dev->name, "plip", 4)) in port_cost()
68 struct net_device *dev = p->dev; in br_port_carrier_check() local
72 netif_running(dev) && netif_oper_up(dev)) in br_port_carrier_check()
73 p->path_cost = port_cost(dev); in br_port_carrier_check()
75 if (!netif_running(br->dev)) in br_port_carrier_check()
79 if (netif_running(dev) && netif_oper_up(dev)) { in br_port_carrier_check()
96 err = dev_set_promiscuity(p->dev, 1); in br_port_set_promisc()
[all …]
Dbr_device.c34 netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev) in br_dev_xmit() argument
36 struct net_bridge *br = netdev_priv(dev); in br_dev_xmit()
51 BR_INPUT_SKB_CB(skb)->brdev = dev; in br_dev_xmit()
68 if (unlikely(netpoll_tx_running(dev))) { in br_dev_xmit()
93 static void br_set_lockdep_class(struct net_device *dev) in br_set_lockdep_class() argument
95 lockdep_set_class(&dev->addr_list_lock, &bridge_netdev_addr_lock_key); in br_set_lockdep_class()
98 static int br_dev_init(struct net_device *dev) in br_dev_init() argument
100 struct net_bridge *br = netdev_priv(dev); in br_dev_init()
110 br_set_lockdep_class(dev); in br_dev_init()
115 static int br_dev_open(struct net_device *dev) in br_dev_open() argument
[all …]
/net/8021q/
Dvlan_dev.c49 static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev, in vlan_dev_hard_header() argument
54 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_hard_header()
64 vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb->priority); in vlan_dev_hard_header()
83 saddr = dev->dev_addr; in vlan_dev_hard_header()
86 dev = vlan->real_dev; in vlan_dev_hard_header()
87 rc = dev_hard_header(skb, dev, type, daddr, saddr, len + vhdrlen); in vlan_dev_hard_header()
105 struct net_device *dev) in vlan_dev_hard_start_xmit() argument
107 struct vlan_dev_priv *vlan = vlan_dev_priv(dev); in vlan_dev_hard_start_xmit()
121 vlan_tci |= vlan_dev_get_egress_qos_mask(dev, skb->priority); in vlan_dev_hard_start_xmit()
125 skb->dev = vlan->real_dev; in vlan_dev_hard_start_xmit()
[all …]
/net/atm/
Dresources.c36 struct atm_dev *dev; in __alloc_atm_dev() local
38 dev = kzalloc(sizeof(*dev), GFP_KERNEL); in __alloc_atm_dev()
39 if (!dev) in __alloc_atm_dev()
41 dev->type = type; in __alloc_atm_dev()
42 dev->signal = ATM_PHY_SIG_UNKNOWN; in __alloc_atm_dev()
43 dev->link_rate = ATM_OC3_PCR; in __alloc_atm_dev()
44 spin_lock_init(&dev->lock); in __alloc_atm_dev()
45 INIT_LIST_HEAD(&dev->local); in __alloc_atm_dev()
46 INIT_LIST_HEAD(&dev->lecs); in __alloc_atm_dev()
48 return dev; in __alloc_atm_dev()
[all …]
/net/phonet/
Dpep-gprs.c43 struct net_device *dev; member
66 struct net_device *dev = gp->dev; in gprs_writeable() local
69 netif_wake_queue(dev); in gprs_writeable()
81 struct net_device *dev = gp->dev; in gprs_state_change() local
83 netif_stop_queue(dev); in gprs_state_change()
84 netif_carrier_off(dev); in gprs_state_change()
90 struct net_device *dev = gp->dev; in gprs_recv() local
107 rskb = netdev_alloc_skb(dev, 0); in gprs_recv()
131 skb->dev = dev; in gprs_recv()
133 if (likely(dev->flags & IFF_UP)) { in gprs_recv()
[all …]
Dpn_dev.c63 static struct phonet_device *__phonet_device_alloc(struct net_device *dev) in __phonet_device_alloc() argument
65 struct phonet_device_list *pndevs = phonet_device_list(dev_net(dev)); in __phonet_device_alloc()
69 pnd->netdev = dev; in __phonet_device_alloc()
77 static struct phonet_device *__phonet_get(struct net_device *dev) in __phonet_get() argument
79 struct phonet_device_list *pndevs = phonet_device_list(dev_net(dev)); in __phonet_get()
84 if (pnd->netdev == dev) in __phonet_get()
90 static struct phonet_device *__phonet_get_rcu(struct net_device *dev) in __phonet_get_rcu() argument
92 struct phonet_device_list *pndevs = phonet_device_list(dev_net(dev)); in __phonet_get_rcu()
96 if (pnd->netdev == dev) in __phonet_get_rcu()
102 static void phonet_device_destroy(struct net_device *dev) in phonet_device_destroy() argument
[all …]
/net/sched/
Dsch_generic.c93 txq = skb_get_tx_queue(txq->dev, skb); in dequeue_skb()
128 dev_queue->dev->name); in handle_dev_cpu_collision()
152 struct net_device *dev, struct netdev_queue *txq, in sch_direct_xmit() argument
162 skb = validate_xmit_skb_list(skb, dev); in sch_direct_xmit()
165 HARD_TX_LOCK(dev, txq, smp_processor_id()); in sch_direct_xmit()
167 skb = dev_hard_start_xmit(skb, dev, txq, &ret); in sch_direct_xmit()
169 HARD_TX_UNLOCK(dev, txq); in sch_direct_xmit()
186 dev->name, ret, q->q.qlen); in sch_direct_xmit()
219 struct net_device *dev; in qdisc_restart() local
230 dev = qdisc_dev(q); in qdisc_restart()
[all …]
Dsch_teql.c58 struct net_device *dev; member
82 struct net_device *dev = qdisc_dev(sch); in teql_enqueue() local
85 if (q->q.qlen < dev->tx_queue_len) { in teql_enqueue()
102 dat_queue = netdev_get_tx_queue(dat->m->dev, 0); in teql_dequeue()
156 txq = netdev_get_tx_queue(master->dev, 0); in teql_destroy()
175 struct net_device *dev = qdisc_dev(sch); in teql_qdisc_init() local
179 if (dev->hard_header_len > m->dev->hard_header_len) in teql_qdisc_init()
182 if (m->dev == dev) in teql_qdisc_init()
190 if (m->dev->flags & IFF_UP) { in teql_qdisc_init()
191 if ((m->dev->flags & IFF_POINTOPOINT && in teql_qdisc_init()
[all …]
/net/l2tp/
Dl2tp_eth.c44 struct net_device *dev; member
57 struct net_device __rcu *dev; member
62 static int l2tp_eth_dev_init(struct net_device *dev) in l2tp_eth_dev_init() argument
64 struct l2tp_eth *priv = netdev_priv(dev); in l2tp_eth_dev_init()
66 priv->dev = dev; in l2tp_eth_dev_init()
67 eth_hw_addr_random(dev); in l2tp_eth_dev_init()
68 eth_broadcast_addr(dev->broadcast); in l2tp_eth_dev_init()
69 dev->qdisc_tx_busylock = &l2tp_eth_tx_busylock; in l2tp_eth_dev_init()
73 static void l2tp_eth_dev_uninit(struct net_device *dev) in l2tp_eth_dev_uninit() argument
75 struct l2tp_eth *priv = netdev_priv(dev); in l2tp_eth_dev_uninit()
[all …]
/net/ipv4/
Darp.c126 static u32 arp_hash(const void *pkey, const struct net_device *dev, __u32 *hash_rnd);
188 int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir) in arp_mc_map() argument
190 switch (dev->type) { in arp_mc_map()
197 ip_ib_mc_map(addr, dev->broadcast, haddr); in arp_mc_map()
200 ip_ipgre_mc_map(addr, dev->broadcast, haddr); in arp_mc_map()
204 memcpy(haddr, dev->broadcast, dev->addr_len); in arp_mc_map()
213 const struct net_device *dev, in arp_hash() argument
216 return arp_hashfn(pkey, dev, hash_rnd); in arp_hash()
227 struct net_device *dev = neigh->dev; in arp_constructor() local
232 if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) in arp_constructor()
[all …]
/net/decnet/
Ddn_dev.c76 static struct dn_dev *dn_dev_create(struct net_device *dev, int *err);
77 static void dn_dev_delete(struct net_device *dev);
82 static void dn_send_brd_hello(struct net_device *dev, struct dn_ifaddr *ifa);
83 static void dn_send_ptp_hello(struct net_device *dev, struct dn_ifaddr *ifa);
208 static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms *parms) in dn_dev_sysctl_register() argument
225 dev? dev->name : parms->name); in dn_dev_sysctl_register()
227 t->dn_dev_vars[0].extra1 = (void *)dev; in dn_dev_sysctl_register()
251 struct net_device *dev = table->extra1; in dn_forwarding_proc() local
259 dn_db = rcu_dereference_raw(dev->dn_ptr); in dn_forwarding_proc()
278 dn_db->parms.down(dev); in dn_forwarding_proc()
[all …]
/net/irda/irlan/
Dirlan_eth.c43 static int irlan_eth_open(struct net_device *dev);
44 static int irlan_eth_close(struct net_device *dev);
46 struct net_device *dev);
47 static void irlan_eth_set_multicast_list(struct net_device *dev);
64 static void irlan_eth_setup(struct net_device *dev) in irlan_eth_setup() argument
66 ether_setup(dev); in irlan_eth_setup()
68 dev->netdev_ops = &irlan_eth_netdev_ops; in irlan_eth_setup()
69 dev->destructor = free_netdev; in irlan_eth_setup()
88 dev->tx_queue_len = 4; in irlan_eth_setup()
109 static int irlan_eth_open(struct net_device *dev) in irlan_eth_open() argument
[all …]
/net/hsr/
Dhsr_slave.c32 port = hsr_port_get_rcu(skb->dev); in hsr_handle_frame()
58 bool hsr_port_exists(const struct net_device *dev) in hsr_port_exists() argument
60 return rcu_access_pointer(dev->rx_handler) == hsr_handle_frame; in hsr_port_exists()
64 static int hsr_check_dev_ok(struct net_device *dev) in hsr_check_dev_ok() argument
67 if ((dev->flags & IFF_LOOPBACK) || (dev->type != ARPHRD_ETHER) || in hsr_check_dev_ok()
68 (dev->addr_len != ETH_ALEN)) { in hsr_check_dev_ok()
69 netdev_info(dev, "Cannot use loopback or non-ethernet device as HSR slave.\n"); in hsr_check_dev_ok()
74 if (is_hsr_master(dev)) { in hsr_check_dev_ok()
75 netdev_info(dev, "Cannot create trees of HSR devices.\n"); in hsr_check_dev_ok()
79 if (hsr_port_exists(dev)) { in hsr_check_dev_ok()
[all …]
Dhsr_device.c27 static bool is_admin_up(struct net_device *dev) in is_admin_up() argument
29 return dev && (dev->flags & IFF_UP); in is_admin_up()
32 static bool is_slave_up(struct net_device *dev) in is_slave_up() argument
34 return dev && is_admin_up(dev) && netif_oper_up(dev); in is_slave_up()
37 static void __hsr_set_operstate(struct net_device *dev, int transition) in __hsr_set_operstate() argument
40 if (dev->operstate != transition) { in __hsr_set_operstate()
41 dev->operstate = transition; in __hsr_set_operstate()
43 netdev_state_change(dev); in __hsr_set_operstate()
51 if (!is_admin_up(master->dev)) { in hsr_set_operstate()
52 __hsr_set_operstate(master->dev, IF_OPER_DOWN); in hsr_set_operstate()
[all …]
/net/mac802154/
Dmib.c29 void mac802154_dev_set_page_channel(struct net_device *dev, u8 page, u8 chan) in mac802154_dev_set_page_channel() argument
31 struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); in mac802154_dev_set_page_channel()
37 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_dev_set_page_channel()
48 int mac802154_get_params(struct net_device *dev, in mac802154_get_params() argument
51 struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); in mac802154_get_params()
54 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_get_params()
63 int mac802154_set_params(struct net_device *dev, in mac802154_set_params() argument
67 struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); in mac802154_set_params()
70 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_set_params()
79 int mac802154_add_key(struct net_device *dev, in mac802154_add_key() argument
[all …]

12345678910>>...20