Removed the reference-count workaround as Axel fixed the driver loading.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13218 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -437,7 +437,7 @@ rtl8169_open(const char *name, uint32 flags, void** cookie)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (deviceName == NULL) {
|
if (deviceName == NULL) {
|
||||||
ERROR("invalid device name");
|
ERROR("invalid device name\n");
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,6 @@ device_hooks g_net_stack_driver_hooks =
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct core_module_info *g_core = NULL;
|
struct core_module_info *g_core = NULL;
|
||||||
uint32 g_core_reference_count = 0;
|
|
||||||
|
|
||||||
#if STAY_LOADED
|
#if STAY_LOADED
|
||||||
int g_stay_loaded_fd = -1;
|
int g_stay_loaded_fd = -1;
|
||||||
@@ -209,7 +208,6 @@ _EXPORT status_t init_driver(void)
|
|||||||
g_core->start();
|
g_core->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
g_core_reference_count++;
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,15 +219,14 @@ _EXPORT status_t init_driver(void)
|
|||||||
_EXPORT void uninit_driver(void)
|
_EXPORT void uninit_driver(void)
|
||||||
{
|
{
|
||||||
TRACE((LOGID "uninit_driver\n"));
|
TRACE((LOGID "uninit_driver\n"));
|
||||||
g_core_reference_count--;
|
|
||||||
|
|
||||||
if (g_core && g_core_reference_count == 0) {
|
if (g_core) {
|
||||||
// shutdown the network stack
|
// shutdown the network stack
|
||||||
g_core->stop();
|
g_core->stop();
|
||||||
|
|
||||||
put_module(NET_CORE_MODULE_NAME);
|
put_module(NET_CORE_MODULE_NAME);
|
||||||
g_core = NULL;
|
g_core = NULL;
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user