1*10741SFei.Feng@Sun.COM /* 2*10741SFei.Feng@Sun.COM * CDDL HEADER START 3*10741SFei.Feng@Sun.COM * 4*10741SFei.Feng@Sun.COM * The contents of this file are subject to the terms of the 5*10741SFei.Feng@Sun.COM * Common Development and Distribution License (the "License"). 6*10741SFei.Feng@Sun.COM * You may not use this file except in compliance with the License. 7*10741SFei.Feng@Sun.COM * 8*10741SFei.Feng@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*10741SFei.Feng@Sun.COM * or http://www.opensolaris.org/os/licensing. 10*10741SFei.Feng@Sun.COM * See the License for the specific language governing permissions 11*10741SFei.Feng@Sun.COM * and limitations under the License. 12*10741SFei.Feng@Sun.COM * 13*10741SFei.Feng@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 14*10741SFei.Feng@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*10741SFei.Feng@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 16*10741SFei.Feng@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 17*10741SFei.Feng@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 18*10741SFei.Feng@Sun.COM * 19*10741SFei.Feng@Sun.COM * CDDL HEADER END 20*10741SFei.Feng@Sun.COM */ 21*10741SFei.Feng@Sun.COM 22*10741SFei.Feng@Sun.COM /* 23*10741SFei.Feng@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24*10741SFei.Feng@Sun.COM * Use is subject to license terms. 25*10741SFei.Feng@Sun.COM */ 26*10741SFei.Feng@Sun.COM 27*10741SFei.Feng@Sun.COM /* 28*10741SFei.Feng@Sun.COM * misc module wrapper for a firmware module for mwl driver 29*10741SFei.Feng@Sun.COM * User must use elfwrap(1) to convert raw firmware data file to 30*10741SFei.Feng@Sun.COM * ELF object file. Then use ld(1) to link the ELF object file and 31*10741SFei.Feng@Sun.COM * this module to produce a kernel loadable module. 32*10741SFei.Feng@Sun.COM */ 33*10741SFei.Feng@Sun.COM 34*10741SFei.Feng@Sun.COM #include <sys/types.h> 35*10741SFei.Feng@Sun.COM #include <sys/param.h> 36*10741SFei.Feng@Sun.COM #include <sys/errno.h> 37*10741SFei.Feng@Sun.COM #include <sys/modctl.h> 38*10741SFei.Feng@Sun.COM 39*10741SFei.Feng@Sun.COM 40*10741SFei.Feng@Sun.COM extern struct mod_ops mod_miscops; 41*10741SFei.Feng@Sun.COM static struct modlmisc modlmisc = { 42*10741SFei.Feng@Sun.COM &mod_miscops, 43*10741SFei.Feng@Sun.COM "mwl firmware wrapper module 1.1" 44*10741SFei.Feng@Sun.COM }; 45*10741SFei.Feng@Sun.COM static struct modlinkage modlinkage = { 46*10741SFei.Feng@Sun.COM MODREV_1, 47*10741SFei.Feng@Sun.COM &modlmisc, 48*10741SFei.Feng@Sun.COM 0 49*10741SFei.Feng@Sun.COM }; 50*10741SFei.Feng@Sun.COM 51*10741SFei.Feng@Sun.COM int _init(void)52*10741SFei.Feng@Sun.COM_init(void) 53*10741SFei.Feng@Sun.COM { 54*10741SFei.Feng@Sun.COM return (mod_install(&modlinkage)); 55*10741SFei.Feng@Sun.COM } 56*10741SFei.Feng@Sun.COM 57*10741SFei.Feng@Sun.COM int _fini(void)58*10741SFei.Feng@Sun.COM_fini(void) 59*10741SFei.Feng@Sun.COM { 60*10741SFei.Feng@Sun.COM return (mod_remove(&modlinkage)); 61*10741SFei.Feng@Sun.COM } 62*10741SFei.Feng@Sun.COM 63*10741SFei.Feng@Sun.COM int _info(struct modinfo * modinfop)64*10741SFei.Feng@Sun.COM_info(struct modinfo *modinfop) 65*10741SFei.Feng@Sun.COM { 66*10741SFei.Feng@Sun.COM return (mod_info(&modlinkage, modinfop)); 67*10741SFei.Feng@Sun.COM } 68