Home
last modified time | relevance | path

Searched refs:netdev (Results 1 – 25 of 55) sorted by relevance

123

/net/core/
Ddev_addr_lists_test.c15 static int dev_addr_test_sync(struct net_device *netdev, const unsigned char *a) in dev_addr_test_sync() argument
17 struct dev_addr_test_priv *datp = netdev_priv(netdev); in dev_addr_test_sync()
24 static int dev_addr_test_unsync(struct net_device *netdev, in dev_addr_test_unsync() argument
27 struct dev_addr_test_priv *datp = netdev_priv(netdev); in dev_addr_test_unsync()
37 struct net_device *netdev; in dev_addr_test_init() local
40 netdev = alloc_etherdev(sizeof(*datp)); in dev_addr_test_init()
41 KUNIT_ASSERT_TRUE(test, !!netdev); in dev_addr_test_init()
43 test->priv = netdev; in dev_addr_test_init()
44 netdev->netdev_ops = &dummy_netdev_ops; in dev_addr_test_init()
46 err = register_netdev(netdev); in dev_addr_test_init()
[all …]
Dnetdev-genl.c12 netdev_nl_dev_fill(struct net_device *netdev, struct sk_buff *rsp, in netdev_nl_dev_fill() argument
21 if (nla_put_u32(rsp, NETDEV_A_DEV_IFINDEX, netdev->ifindex) || in netdev_nl_dev_fill()
23 netdev->xdp_features, NETDEV_A_DEV_PAD)) { in netdev_nl_dev_fill()
28 if (netdev->xdp_features & NETDEV_XDP_ACT_XSK_ZEROCOPY) { in netdev_nl_dev_fill()
30 netdev->xdp_zc_max_segs)) { in netdev_nl_dev_fill()
42 netdev_genl_dev_notify(struct net_device *netdev, int cmd) in netdev_genl_dev_notify() argument
47 if (!genl_has_listeners(&netdev_nl_family, dev_net(netdev), in netdev_genl_dev_notify()
57 if (netdev_nl_dev_fill(netdev, ntf, &info)) { in netdev_genl_dev_notify()
62 genlmsg_multicast_netns(&netdev_nl_family, dev_net(netdev), ntf, in netdev_genl_dev_notify()
68 struct net_device *netdev; in netdev_nl_dev_get_doit() local
[all …]
Dnet-sysfs.c84 struct net_device *netdev = to_net_dev(dev); in netdev_store() local
85 struct net *net = dev_net(netdev); in netdev_store()
99 if (dev_isalive(netdev)) { in netdev_store()
100 ret = (*set)(netdev, new); in netdev_store()
181 struct net_device *netdev = to_net_dev(dev); in carrier_store() local
186 if (!netdev->netdev_ops->ndo_change_carrier) in carrier_store()
195 struct net_device *netdev = to_net_dev(dev); in carrier_show() local
197 if (netif_running(netdev)) in carrier_show()
198 return sysfs_emit(buf, fmt_dec, !!netif_carrier_ok(netdev)); in carrier_show()
207 struct net_device *netdev = to_net_dev(dev); in speed_show() local
[all …]
/net/openvswitch/
Dvport-internal_dev.c27 static struct internal_dev *internal_dev_priv(struct net_device *netdev) in internal_dev_priv() argument
29 return netdev_priv(netdev); in internal_dev_priv()
34 internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) in internal_dev_xmit() argument
42 err = ovs_vport_receive(internal_dev_priv(netdev)->vport, skb, NULL); in internal_dev_xmit()
46 dev_sw_netstats_tx_add(netdev, 1, len); in internal_dev_xmit()
48 netdev->stats.tx_errors++; in internal_dev_xmit()
53 static int internal_dev_open(struct net_device *netdev) in internal_dev_open() argument
55 netif_start_queue(netdev); in internal_dev_open()
59 static int internal_dev_stop(struct net_device *netdev) in internal_dev_stop() argument
61 netif_stop_queue(netdev); in internal_dev_stop()
[all …]
/net/dcb/
Ddcbnl.c241 static int dcbnl_getstate(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getstate() argument
245 if (!netdev->dcbnl_ops->getstate) in dcbnl_getstate()
249 netdev->dcbnl_ops->getstate(netdev)); in dcbnl_getstate()
252 static int dcbnl_getpfccfg(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getpfccfg() argument
264 if (!netdev->dcbnl_ops->getpfccfg) in dcbnl_getpfccfg()
284 netdev->dcbnl_ops->getpfccfg(netdev, i - DCB_PFC_UP_ATTR_0, in dcbnl_getpfccfg()
297 static int dcbnl_getperm_hwaddr(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getperm_hwaddr() argument
302 if (!netdev->dcbnl_ops->getpermhwaddr) in dcbnl_getperm_hwaddr()
306 netdev->dcbnl_ops->getpermhwaddr(netdev, perm_addr); in dcbnl_getperm_hwaddr()
311 static int dcbnl_getcap(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getcap() argument
[all …]
/net/bluetooth/
D6lowpan.c69 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()
[all …]
/net/wireless/
Dtrace.h39 memcpy(__entry->name, netdev->name, IFNAMSIZ); \
40 (__entry->ifindex) = (netdev->ifindex); \
417 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
419 TP_ARGS(wiphy, netdev, type),
435 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int link_id,
437 TP_ARGS(wiphy, netdev, link_id, key_index, pairwise, mac_addr),
462 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int link_id,
464 TP_ARGS(wiphy, netdev, link_id, key_index, pairwise, mac_addr)
468 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int link_id,
470 TP_ARGS(wiphy, netdev, link_id, key_index, pairwise, mac_addr)
[all …]
Dnl80211.h59 struct net_device *netdev,
62 struct net_device *netdev,
65 struct net_device *netdev,
69 struct net_device *netdev,
73 struct net_device *netdev,
76 struct net_device *netdev,
79 struct net_device *netdev,
83 struct net_device *netdev,
86 struct net_device *netdev, const u8 *bssid,
89 struct net_device *netdev, u16 reason,
[all …]
Drdev-ops.h80 struct net_device *netdev, int link_id, in rdev_add_key() argument
85 trace_rdev_add_key(&rdev->wiphy, netdev, link_id, key_index, pairwise, in rdev_add_key()
87 ret = rdev->ops->add_key(&rdev->wiphy, netdev, link_id, key_index, in rdev_add_key()
94 rdev_get_key(struct cfg80211_registered_device *rdev, struct net_device *netdev, in rdev_get_key() argument
100 trace_rdev_get_key(&rdev->wiphy, netdev, link_id, key_index, pairwise, in rdev_get_key()
102 ret = rdev->ops->get_key(&rdev->wiphy, netdev, link_id, key_index, in rdev_get_key()
109 struct net_device *netdev, int link_id, in rdev_del_key() argument
113 trace_rdev_del_key(&rdev->wiphy, netdev, link_id, key_index, pairwise, in rdev_del_key()
115 ret = rdev->ops->del_key(&rdev->wiphy, netdev, link_id, key_index, in rdev_del_key()
123 struct net_device *netdev, int link_id, u8 key_index, in rdev_set_default_key() argument
[all …]
Dcore.c166 if (!wdev->netdev) in cfg80211_switch_netns()
168 wdev->netdev->features &= ~NETIF_F_NETNS_LOCAL; in cfg80211_switch_netns()
169 err = dev_change_net_namespace(wdev->netdev, net, "wlan%d"); in cfg80211_switch_netns()
172 wdev->netdev->features |= NETIF_F_NETNS_LOCAL; in cfg80211_switch_netns()
182 if (!wdev->netdev) in cfg80211_switch_netns()
184 wdev->netdev->features &= ~NETIF_F_NETNS_LOCAL; in cfg80211_switch_netns()
185 err = dev_change_net_namespace(wdev->netdev, net, in cfg80211_switch_netns()
188 wdev->netdev->features |= NETIF_F_NETNS_LOCAL; in cfg80211_switch_netns()
195 if (!wdev->netdev) in cfg80211_switch_netns()
212 if (!wdev->netdev) in cfg80211_switch_netns()
[all …]
Dmlme.c105 nl80211_send_rx_auth(rdev, wdev->netdev, buf, len, GFP_KERNEL); in cfg80211_process_auth()
117 bool from_ap = !ether_addr_equal(mgmt->sa, wdev->netdev->dev_addr); in cfg80211_process_deauth()
119 nl80211_send_deauth(rdev, wdev->netdev, buf, len, reconnect, GFP_KERNEL); in cfg80211_process_deauth()
124 __cfg80211_disconnected(wdev->netdev, NULL, 0, reason_code, from_ap); in cfg80211_process_deauth()
136 bool from_ap = !ether_addr_equal(mgmt->sa, wdev->netdev->dev_addr); in cfg80211_process_disassoc()
138 nl80211_send_disassoc(rdev, wdev->netdev, buf, len, reconnect, in cfg80211_process_disassoc()
145 __cfg80211_disconnected(wdev->netdev, NULL, 0, reason_code, from_ap); in cfg80211_process_disassoc()
1004 void cfg80211_cac_event(struct net_device *netdev, in cfg80211_cac_event() argument
1008 struct wireless_dev *wdev = netdev->ieee80211_ptr; in cfg80211_cac_event()
1017 trace_cfg80211_cac_event(netdev, event); in cfg80211_cac_event()
[all …]
Dsme.c137 dev_hold(wdev->netdev); in cfg80211_conn_scan()
181 err = cfg80211_mlme_auth(rdev, wdev->netdev, &auth_req); in cfg80211_conn_do_work()
212 err = cfg80211_mlme_assoc(rdev, wdev->netdev, &req); in cfg80211_conn_do_work()
217 cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid, in cfg80211_conn_do_work()
226 cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid, in cfg80211_conn_do_work()
231 cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid, in cfg80211_conn_do_work()
255 if (!wdev->netdev) in cfg80211_conn_work()
259 if (!netif_running(wdev->netdev)) { in cfg80211_conn_work()
280 __cfg80211_connect_result(wdev->netdev, &cr, false); in cfg80211_conn_work()
395 __cfg80211_connect_result(wdev->netdev, &cr, false); in cfg80211_sme_rx_auth()
[all …]
/net/tls/
Dtls_device.c76 struct net_device *netdev; in tls_device_tx_del_task() local
81 netdev = rcu_dereference_protected(ctx->netdev, in tls_device_tx_del_task()
84 netdev->tlsdev_ops->tls_dev_del(netdev, ctx, TLS_OFFLOAD_CTX_DIR_TX); in tls_device_tx_del_task()
85 dev_put(netdev); in tls_device_tx_del_task()
86 ctx->netdev = NULL; in tls_device_tx_del_task()
92 struct net_device *netdev; in tls_device_queue_ctx_destruction() local
107 netdev = rcu_dereference_protected(ctx->netdev, in tls_device_queue_ctx_destruction()
110 async_cleanup = netdev && ctx->tx_conf == TLS_HW; in tls_device_queue_ctx_destruction()
129 struct net_device *netdev = NULL; in get_netdev_for_sock() local
132 netdev = netdev_sk_get_lowest_dev(dst->dev, sk); in get_netdev_for_sock()
[all …]
/net/dsa/
Dtag_ocelot.c11 static void ocelot_xmit_common(struct sk_buff *skb, struct net_device *netdev, in ocelot_xmit_common() argument
14 struct dsa_port *dp = dsa_slave_to_port(netdev); in ocelot_xmit_common()
25 qos_class = netdev_get_num_tc(netdev) ? in ocelot_xmit_common()
26 netdev_get_prio_tc_map(netdev, skb->priority) : skb->priority; in ocelot_xmit_common()
47 struct net_device *netdev) in ocelot_xmit() argument
49 struct dsa_port *dp = dsa_slave_to_port(netdev); in ocelot_xmit()
52 ocelot_xmit_common(skb, netdev, cpu_to_be32(0x8880000a), &injection); in ocelot_xmit()
59 struct net_device *netdev) in seville_xmit() argument
61 struct dsa_port *dp = dsa_slave_to_port(netdev); in seville_xmit()
64 ocelot_xmit_common(skb, netdev, cpu_to_be32(0x88800005), &injection); in seville_xmit()
[all …]
Dtag_sja1105.c211 struct net_device *netdev) in sja1105_imprecise_xmit() argument
213 struct dsa_port *dp = dsa_slave_to_port(netdev); in sja1105_imprecise_xmit()
233 return dsa_8021q_xmit(skb, netdev, sja1105_xmit_tpid(dp), tx_vid); in sja1105_imprecise_xmit()
267 struct net_device *netdev) in sja1105_xmit() argument
269 struct dsa_port *dp = dsa_slave_to_port(netdev); in sja1105_xmit()
271 u8 pcp = netdev_txq_to_tc(netdev, queue_mapping); in sja1105_xmit()
275 return sja1105_imprecise_xmit(skb, netdev); in sja1105_xmit()
289 return dsa_8021q_xmit(skb, netdev, sja1105_xmit_tpid(dp), in sja1105_xmit()
294 struct net_device *netdev) in sja1110_xmit() argument
297 struct dsa_port *dp = dsa_slave_to_port(netdev); in sja1110_xmit()
[all …]
Dtag_ocelot_8021q.c64 struct net_device *netdev) in ocelot_xmit() argument
66 struct dsa_port *dp = dsa_slave_to_port(netdev); in ocelot_xmit()
68 u8 pcp = netdev_txq_to_tc(netdev, queue_mapping); in ocelot_xmit()
75 return dsa_8021q_xmit(skb, netdev, ETH_P_8021Q, in ocelot_xmit()
80 struct net_device *netdev) in ocelot_rcv() argument
86 skb->dev = dsa_master_find_slave(netdev, switch_id, src_port); in ocelot_rcv()
/net/xdp/
Dxsk_buff_pool.c138 err = pool->netdev->netdev_ops->ndo_bpf(pool->netdev, &bpf); in xp_disable_drv_zc()
150 struct net_device *netdev, u16 queue_id, u16 flags) in xp_assign_dev() argument
164 if (xsk_get_pool_from_qid(netdev, queue_id)) in xp_assign_dev()
167 pool->netdev = netdev; in xp_assign_dev()
169 err = xsk_reg_pool_at_qid(netdev, pool, queue_id); in xp_assign_dev()
184 dev_hold(netdev); in xp_assign_dev()
190 if ((netdev->xdp_features & NETDEV_XDP_ACT_ZC) != NETDEV_XDP_ACT_ZC) { in xp_assign_dev()
195 if (netdev->xdp_zc_max_segs == 1 && (flags & XDP_USE_SG)) { in xp_assign_dev()
204 err = netdev->netdev_ops->ndo_bpf(netdev, &bpf); in xp_assign_dev()
222 xsk_clear_pool_at_qid(netdev, queue_id); in xp_assign_dev()
[all …]
/net/atm/
Dbr2684.c633 static void br2684_setup(struct net_device *netdev) in br2684_setup() argument
635 struct br2684_dev *brdev = BRPRIV(netdev); in br2684_setup()
637 ether_setup(netdev); in br2684_setup()
638 netdev->hard_header_len += sizeof(llc_oui_pid_pad); /* worst case */ in br2684_setup()
639 brdev->net_dev = netdev; in br2684_setup()
641 netdev->netdev_ops = &br2684_netdev_ops; in br2684_setup()
646 static void br2684_setup_routed(struct net_device *netdev) in br2684_setup_routed() argument
648 struct br2684_dev *brdev = BRPRIV(netdev); in br2684_setup_routed()
650 brdev->net_dev = netdev; in br2684_setup_routed()
651 netdev->hard_header_len = sizeof(llc_oui_ipv4); /* worst case */ in br2684_setup_routed()
[all …]
/net/caif/
Dchnl_net.c48 struct net_device *netdev; member
74 skb->dev = priv->netdev; in chnl_recv_cb()
92 priv->netdev->stats.rx_errors++; in chnl_recv_cb()
105 priv->netdev->stats.rx_packets++; in chnl_recv_cb()
106 priv->netdev->stats.rx_bytes += pktlen; in chnl_recv_cb()
114 if (dev->netdev) in delete_device()
115 unregister_netdevice(dev->netdev); in delete_device()
129 dev_close(dev->netdev); in close_work()
138 dev_hold(priv->netdev); in chnl_hold()
144 dev_put(priv->netdev); in chnl_put()
[all …]
Dcaif_dev.c36 struct net_device *netdev; member
104 caifd->netdev = dev; in caif_device_alloc()
117 if (caifd->netdev == dev) in caif_get()
178 skb->dev = caifd->netdev; in transmit()
183 if (likely(caifd->netdev->priv_flags & IFF_NO_QUEUE)) in transmit()
189 if (likely(!netif_queue_stopped(caifd->netdev))) { in transmit()
201 high = (caifd->netdev->tx_queue_len * q_high) / 100; in transmit()
221 netif_queue_stopped(caifd->netdev), in transmit()
259 !netif_oper_up(caifd->netdev)) { in receive()
491 dev_put(caifd->netdev); in caif_device_notify()
[all …]
/net/mac802154/
Dcfg.c197 ret = mac802154_wpan_update_llsec(wpan_dev->netdev); in ieee802154_set_pan_id()
324 struct net_device *dev = wpan_dev->netdev; in ieee802154_get_llsec_table()
334 struct net_device *dev = wpan_dev->netdev; in ieee802154_lock_llsec_table()
344 struct net_device *dev = wpan_dev->netdev; in ieee802154_unlock_llsec_table()
356 struct net_device *dev = wpan_dev->netdev; in ieee802154_set_llsec_params()
372 struct net_device *dev = wpan_dev->netdev; in ieee802154_get_llsec_params()
388 struct net_device *dev = wpan_dev->netdev; in ieee802154_add_llsec_key()
403 struct net_device *dev = wpan_dev->netdev; in ieee802154_del_llsec_key()
418 struct net_device *dev = wpan_dev->netdev; in ieee802154_add_seclevel()
433 struct net_device *dev = wpan_dev->netdev; in ieee802154_del_seclevel()
[all …]
/net/ieee802154/
Dcore.c208 if (!wpan_dev->netdev) in cfg802154_switch_netns()
210 wpan_dev->netdev->features &= ~NETIF_F_NETNS_LOCAL; in cfg802154_switch_netns()
211 err = dev_change_net_namespace(wpan_dev->netdev, net, "wpan%d"); in cfg802154_switch_netns()
214 wpan_dev->netdev->features |= NETIF_F_NETNS_LOCAL; in cfg802154_switch_netns()
224 if (!wpan_dev->netdev) in cfg802154_switch_netns()
226 wpan_dev->netdev->features &= ~NETIF_F_NETNS_LOCAL; in cfg802154_switch_netns()
227 err = dev_change_net_namespace(wpan_dev->netdev, net, in cfg802154_switch_netns()
230 wpan_dev->netdev->features |= NETIF_F_NETNS_LOCAL; in cfg802154_switch_netns()
280 wpan_dev->netdev = dev; in cfg802154_netdev_notifier_call()
/net/batman-adv/
Dhard-interface.c91 static struct net *batadv_getlink_net(const struct net_device *netdev, in batadv_getlink_net() argument
94 if (!netdev->rtnl_link_ops) in batadv_getlink_net()
97 if (!netdev->rtnl_link_ops->get_link_net) in batadv_getlink_net()
100 return netdev->rtnl_link_ops->get_link_net(netdev); in batadv_getlink_net()
216 static struct net_device *batadv_get_real_netdevice(struct net_device *netdev) in batadv_get_real_netdevice() argument
226 if (!netdev) in batadv_get_real_netdevice()
229 iflink = dev_get_iflink(netdev); in batadv_get_real_netdevice()
231 dev_hold(netdev); in batadv_get_real_netdevice()
232 return netdev; in batadv_get_real_netdevice()
235 hard_iface = batadv_hardif_get_by_netdev(netdev); in batadv_get_real_netdevice()
[all …]
/net/devlink/
Dport.c464 if (devlink_port->type_eth.netdev && in devlink_nl_port_fill()
1099 struct net_device *netdev) in devlink_port_type_netdev_checks() argument
1101 const struct net_device_ops *ops = netdev->netdev_ops; in devlink_port_type_netdev_checks()
1117 err = ops->ndo_get_phys_port_name(netdev, name, sizeof(name)); in devlink_port_type_netdev_checks()
1130 err = ops->ndo_get_port_parent_id(netdev, &ppid); in devlink_port_type_netdev_checks()
1139 struct net_device *netdev = type_dev; in __devlink_port_type_set() local
1147 if (type == DEVLINK_PORT_TYPE_ETH && netdev) in __devlink_port_type_set()
1148 devlink_port_type_netdev_checks(devlink_port, netdev); in __devlink_port_type_set()
1155 devlink_port->type_eth.netdev = netdev; in __devlink_port_type_set()
1156 if (netdev) { in __devlink_port_type_set()
[all …]
/net/phonet/
Dpn_dev.c54 pnd->netdev = dev; in __phonet_device_alloc()
69 if (pnd->netdev == dev) in __phonet_get()
81 if (pnd->netdev == dev) in __phonet_get_rcu()
117 dev = pnd->netdev; in phonet_device_get()
121 ((pnd->netdev->flags & IFF_UP)) == IFF_UP) in phonet_device_get()
215 if ((pnd->netdev->reg_state != NETREG_REGISTERED) || in phonet_address_lookup()
216 ((pnd->netdev->flags & IFF_UP)) != IFF_UP) in phonet_address_lookup()

123