net/bluetooth/bnep/netdev.c

Source file repositories/reference/linux-study-clean/net/bluetooth/bnep/netdev.c

File Facts

System
Linux kernel
Corpus path
net/bluetooth/bnep/netdev.c
Extension
.c
Size
5746 bytes
Lines
228
Domain
Networking Core
Bucket
Sockets, Protocols, Packet Path, And Network Policy
Inferred role
Networking Core: operation-table or driver-model contract
Status
pattern implementation candidate

Why This File Exists

Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.

Dependency Surface

Detected Declarations

Annotated Snippet

static const struct net_device_ops bnep_netdev_ops = {
	.ndo_open            = bnep_net_open,
	.ndo_stop            = bnep_net_close,
	.ndo_start_xmit	     = bnep_net_xmit,
	.ndo_validate_addr   = eth_validate_addr,
	.ndo_set_rx_mode     = bnep_net_set_mc_list,
	.ndo_set_mac_address = bnep_net_set_mac_addr,
	.ndo_tx_timeout      = bnep_net_timeout,

};

void bnep_net_setup(struct net_device *dev)
{

	eth_broadcast_addr(dev->broadcast);
	dev->addr_len = ETH_ALEN;

	ether_setup(dev);
	dev->min_mtu = 0;
	dev->max_mtu = ETH_MAX_MTU;
	dev->priv_flags &= ~IFF_TX_SKB_SHARING;
	dev->netdev_ops = &bnep_netdev_ops;

	dev->watchdog_timeo  = HZ * 2;
}

Annotation

Implementation Notes