.\" .\" Copyright (c) 2004 Bruce M. Simpson .\" Copyright (c) 2004 Darron Broad .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" $DragonFly: src/share/man/man9/ieee80211_ioctl.9,v 1.6 2007/04/09 21:20:37 swildner Exp $ .\" $Id: ieee80211_ioctl.9,v 1.2 2004/07/07 12:59:39 ru Exp $ .\" .Dd June 28, 2006 .Dt IEEE80211_IOCTL 9 .Os .Sh NAME .Nm ieee80211_cfgget , .Nm ieee80211_cfgset , .Nm ieee80211_ioctl .Nd 802.11 interface ioctl commands .Sh SYNOPSIS .In netproto/802_11/ieee80211_var.h .In netproto/802_11/ieee80211_proto.h .In netproto/802_11/ieee80211_ioctl.h .Ft int .Fo ieee80211_cfgget .Fa "struct ieee80211com *ic" "u_long cmd" "caddr_t data" .Fa "struct ucred *cr" .Fc .Ft int .Fo ieee80211_cfgset .Fa "struct ieee80211com *ic" "u_long cmd" "caddr_t data" .Fa "struct ucred *cr" .Fc .Ft int .Fo ieee80211_ioctl .Fa "struct ifnet *ifp" "u_long cmd" "caddr_t data" .Fa "struct ucred *cr" .Fc .Sh DESCRIPTION These functions are typically invoked by drivers in response to requests for information or to change settings from the userland. .Pp .\" The .Fn ieee80211_cfgget and .Fn ieee80211_cfgset functions implement a legacy interface for getting and setting 802.11 interface attributes respectively. It is used by the .Xr wicontrol 8 utility but should not be used by any new drivers. .Pp .\" The .Fn ieee80211_ioctl function provides a default implementation of the .Dv SIOCS80211 and .Dv SIOCG80211 ifioctls commands for 802.11 drivers. The call signature is identical to that of the .Va if_ioctl member found in .Vt struct ifnet , however, many drivers store attributes such as .Dv IEEE80211_IOC_STATIONNAME in the driver's private soft state structure, so driver writers may prefer to use this as the catch-all in a switch statement to avoid code duplication. .\" .Sh RETURN VALUES The function .Fn ieee80211_ioctl returns 0 or .Er ENETRESET , if successful. Otherwise, a non-zero value other than .Er ENETRESET is returned. If .Er ENETRESET is returned and the interface is up and running, a driver will typically reinitialize the hardware by calling .Va if_init . .\" .Sh SEE ALSO .Xr ifconfig 8 , .Xr wicontrol 8 , .Xr ieee80211 9 , .Xr ifnet 9 .Sh HISTORY The .Nm ieee80211 series of functions first appeared in .Nx 1.5 , and were later ported to .Fx 4.6 . .Sh AUTHORS .An -nosplit This man page was written by .An Bruce M. Simpson Aq bms@FreeBSD.org and .An Darron Broad Aq darron@kewl.org .