moved IFF_LINK handling to the device module (ethernet in this case). Now domain interfaces only keep specific flags such as IFF_UP and the configuration flags. IFF_LINK, IFF_BROADCAST etc are maintained exclusively by the device.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20612 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Hugo Santos
2007-04-08 05:50:36 +00:00
parent fb300cfd25
commit ae074c5d15
6 changed files with 32 additions and 60 deletions
@@ -141,7 +141,7 @@ create_interface(net_domain *domain, const char *name, const char *baseName,
interface->mask = NULL;
interface->index = ++sInterfaceIndex;
interface->flags = deviceInterface->device->flags & ~IFF_UP;
interface->flags = 0;
interface->type = 0;
interface->mtu = deviceInterface->device->mtu;
interface->metric = 0;
@@ -169,8 +169,7 @@ interface_set_down(net_interface *interface)
if ((interface->flags & IFF_UP) == 0)
return;
// TODO: IFF_LINK should belong in device only
interface->flags &= ~(IFF_UP | IFF_LINK);
interface->flags &= ~IFF_UP;
interface->first_info->interface_down(interface->first_protocol);
}
@@ -658,7 +657,6 @@ unregister_device_monitor(struct net_device *device,
status_t
device_link_changed(net_device *device)
{
domain_interfaces_link_changed(device);
return B_OK;
}