35 /* module description */
36 #define AGGR_LINKINFO "Link Aggregation MAC"
37
38 /* device info ptr, only one for instance 0 */
39 dev_info_t *aggr_dip = NULL;
40
41 static int aggr_getinfo(dev_info_t *, ddi_info_cmd_t, void *, void **);
42 static int aggr_attach(dev_info_t *, ddi_attach_cmd_t);
43 static int aggr_detach(dev_info_t *, ddi_detach_cmd_t);
44
45 DDI_DEFINE_STREAM_OPS(aggr_dev_ops, nulldev, nulldev, aggr_attach, aggr_detach,
46 nodev, aggr_getinfo, D_MP, NULL, ddi_quiesce_not_supported);
47
48 static struct modldrv aggr_modldrv = {
49 &mod_driverops, /* Type of module. This one is a driver */
50 AGGR_LINKINFO, /* short description */
51 &aggr_dev_ops /* driver specific ops */
52 };
53
54 static struct modlinkage modlinkage = {
55 MODREV_1, &aggr_modldrv, NULL
56 };
57
58 int
59 _init(void)
60 {
61 int err;
62
63 mac_init_ops(&aggr_dev_ops, "aggr");
64 if ((err = mod_install(&modlinkage)) != 0)
65 mac_fini_ops(&aggr_dev_ops);
66 return (err);
67 }
68
69 int
70 _fini(void)
71 {
72 int err;
73
74 if ((err = mod_remove(&modlinkage)) == 0)
75 mac_fini_ops(&aggr_dev_ops);
|
35 /* module description */
36 #define AGGR_LINKINFO "Link Aggregation MAC"
37
38 /* device info ptr, only one for instance 0 */
39 dev_info_t *aggr_dip = NULL;
40
41 static int aggr_getinfo(dev_info_t *, ddi_info_cmd_t, void *, void **);
42 static int aggr_attach(dev_info_t *, ddi_attach_cmd_t);
43 static int aggr_detach(dev_info_t *, ddi_detach_cmd_t);
44
45 DDI_DEFINE_STREAM_OPS(aggr_dev_ops, nulldev, nulldev, aggr_attach, aggr_detach,
46 nodev, aggr_getinfo, D_MP, NULL, ddi_quiesce_not_supported);
47
48 static struct modldrv aggr_modldrv = {
49 &mod_driverops, /* Type of module. This one is a driver */
50 AGGR_LINKINFO, /* short description */
51 &aggr_dev_ops /* driver specific ops */
52 };
53
54 static struct modlinkage modlinkage = {
55 MODREV_1, { &aggr_modldrv, NULL }
56 };
57
58 int
59 _init(void)
60 {
61 int err;
62
63 mac_init_ops(&aggr_dev_ops, "aggr");
64 if ((err = mod_install(&modlinkage)) != 0)
65 mac_fini_ops(&aggr_dev_ops);
66 return (err);
67 }
68
69 int
70 _fini(void)
71 {
72 int err;
73
74 if ((err = mod_remove(&modlinkage)) == 0)
75 mac_fini_ops(&aggr_dev_ops);
|