Exemple #1
0
static int rose_close(struct net_device *dev)
{
	netif_stop_queue(dev);
	rose_del_loopback_node((rose_address *)dev->dev_addr);
	MOD_DEC_USE_COUNT;
	return 0;
}
Exemple #2
0
static int rose_set_mac_address(struct net_device *dev, void *addr)
{
	struct sockaddr *sa = addr;

	rose_del_loopback_node((rose_address *)dev->dev_addr);

	memcpy(dev->dev_addr, sa->sa_data, dev->addr_len);

	rose_add_loopback_node((rose_address *)dev->dev_addr);

	return 0;
}
Exemple #3
0
static int rose_set_mac_address(struct net_device *dev, void *addr)
{
	struct sockaddr *sa = addr;
	int err;

	if (!memcpy(dev->dev_addr, sa->sa_data, dev->addr_len))
		return 0;

	if (dev->flags & IFF_UP) {
		err = rose_add_loopback_node((rose_address *)dev->dev_addr);
		if (err)
			return err;

		rose_del_loopback_node((rose_address *)dev->dev_addr);
	}

	memcpy(dev->dev_addr, sa->sa_data, dev->addr_len);

	return 0;
}