blob: 2de245b319c23e40aa705eb58c44eb42ef4ba3d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#include "network.h"
#include "string.h"
#include "kernel.h"
#undef DEBUG
static network_vtable_t const network_vtable = {
{
network_activate,
network_deactivate,
network_deinit,
network_print_info
}
};
void network_init( network_t *network, interrupt_t *interrupt, void *context )
{
memset( network, 0, sizeof( network_t ) );
driver_init( (driver_t *)network, DRIVER_TYPE_NETWORK, interrupt, context );
((driver_t *)network)->vtable = (driver_vtable_t *)&network_vtable;
}
void network_activate( void *obj )
{
kernel_panic( "Activating generic network driver should not be called directly." );
}
void network_deactivate( void *obj )
{
kernel_panic( "Deactivating generic network driver should not be called directly." );
}
void network_deinit( void *obj )
{
// nothing to be done
}
void network_print_info( void *obj )
{
kernel_panic( "Printing info of generic network driver should not be called directly." );
}
|