1c138f478Syz /*
2c138f478Syz  * CDDL HEADER START
3c138f478Syz  *
4c138f478Syz  * The contents of this file are subject to the terms of the
5*77e51571Sgongtian zhao - Sun Microsystems - Beijing China  * Common Development and Distribution License (the "License").
6*77e51571Sgongtian zhao - Sun Microsystems - Beijing China  * You may not use this file except in compliance with the License.
7c138f478Syz  *
8c138f478Syz  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c138f478Syz  * or http://www.opensolaris.org/os/licensing.
10c138f478Syz  * See the License for the specific language governing permissions
11c138f478Syz  * and limitations under the License.
12c138f478Syz  *
13c138f478Syz  * When distributing Covered Code, include this CDDL HEADER in each
14c138f478Syz  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15c138f478Syz  * If applicable, add the following below this CDDL HEADER, with the
16c138f478Syz  * fields enclosed by brackets "[]" replaced with your own identifying
17c138f478Syz  * information: Portions Copyright [yyyy] [name of copyright owner]
18c138f478Syz  *
19c138f478Syz  * CDDL HEADER END
20c138f478Syz  */
21c138f478Syz 
22c138f478Syz /*
23*77e51571Sgongtian zhao - Sun Microsystems - Beijing China  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24c138f478Syz  * Use is subject to license terms.
25c138f478Syz  */
26c138f478Syz 
27c138f478Syz 
28c138f478Syz #include <sys/types.h>
29c138f478Syz #include <sys/modctl.h>
30c138f478Syz #include <sys/ddi.h>
31c138f478Syz #include <sys/sunddi.h>
32c138f478Syz 
33c138f478Syz #include <sys/usb/clients/usbser/usbser_keyspan/keyspan_var.h>
34c138f478Syz 
35c138f478Syz #include <sys/usb/clients/usbser/usbser_keyspan/keyspan_49fw.h>
36c138f478Syz 
37c138f478Syz /* Get the address of firmware structure */
38c138f478Syz const usbser_keyspan_fw_record_t *
keyspan_usa49wlc_fw(void)39c138f478Syz keyspan_usa49wlc_fw(void)
40c138f478Syz {
41c138f478Syz #ifdef KEYSPAN_NO_FIRMWARE_SOURCE
42c138f478Syz 
43c138f478Syz 	return (NULL);
44c138f478Syz #else
45c138f478Syz 
46c138f478Syz 	return (keyspan_usa49wlc_firmware);
47c138f478Syz #endif
48c138f478Syz }
49c138f478Syz 
50c138f478Syz extern struct mod_ops mod_miscops;
51c138f478Syz 
52c138f478Syz static struct modlmisc modlmisc = {
53c138f478Syz #ifdef KEYSPAN_NO_FIRMWARE_SOURCE
54c138f478Syz 	&mod_miscops, "Placeholder module for the firmware of Keyspan"
55*77e51571Sgongtian zhao - Sun Microsystems - Beijing China 	    " usb2serial adapter (usa49wlc)"
56c138f478Syz #else
57*77e51571Sgongtian zhao - Sun Microsystems - Beijing China 	&mod_miscops, "Firmware for Keyspan usb2serial adapter (usa49wlc)"
58c138f478Syz #endif
59c138f478Syz };
60c138f478Syz 
61c138f478Syz static struct modlinkage modlinkage = {
62c138f478Syz 	MODREV_1, (void *)&modlmisc, NULL
63c138f478Syz };
64c138f478Syz 
65c138f478Syz int
_init(void)66c138f478Syz _init(void)
67c138f478Syz {
68c138f478Syz 	return (mod_install(&modlinkage));
69c138f478Syz }
70c138f478Syz 
71c138f478Syz 
72c138f478Syz int
_fini(void)73c138f478Syz _fini(void)
74c138f478Syz {
75c138f478Syz 	return (mod_remove(&modlinkage));
76c138f478Syz }
77c138f478Syz 
78c138f478Syz 
79c138f478Syz int
_info(struct modinfo * modinfop)80c138f478Syz _info(struct modinfo *modinfop)
81c138f478Syz {
82c138f478Syz 	return (mod_info(&modlinkage, modinfop));
83c138f478Syz }
84