The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/net80211/ieee80211_channel.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: ieee80211_channel.h,v 1.1 2004/07/16 02:56:50 dyoung Exp $     */
    2 /*-
    3  * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
    4  * All rights reserved.
    5  *
    6  * Redistribution and use in source and binary forms, with or without
    7  * modification, are permitted provided that the following conditions
    8  * are met:
    9  * 1. Redistributions of source code must retain the above copyright
   10  *    notice, this list of conditions and the following disclaimer.
   11  * 2. Redistributions in binary form must reproduce the above copyright
   12  *    notice, this list of conditions and the following disclaimer in the
   13  *    documentation and/or other materials provided with the distribution.
   14  * 3. The name of the author may not be used to endorse or promote products
   15  *    derived from this software without specific prior written permission.
   16  *
   17  * Alternatively, this software may be distributed under the terms of the
   18  * GNU General Public License ("GPL") version 2 as published by the Free
   19  * Software Foundation.
   20  *
   21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   22  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   23  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   24  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   25  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   26  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   30  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   31  */
   32 #ifndef _NET80211_IEEE80211_CHANNEL_H_
   33 #define _NET80211_IEEE80211_CHANNEL_H_
   34 
   35 /*
   36  * net80211 channel definitions.
   37  */
   38 
   39 /*
   40  * Channels are specified by frequency and attributes.
   41  */
   42 struct ieee80211_channel {
   43         u_int16_t       ic_freq;        /* setting in Mhz */
   44         u_int16_t       ic_flags;       /* see below */
   45 };
   46 
   47 /* bits 0-3 are for private use by drivers */
   48 /* channel attributes */
   49 #define IEEE80211_CHAN_TURBO    0x0010  /* Turbo channel */
   50 #define IEEE80211_CHAN_CCK      0x0020  /* CCK channel */
   51 #define IEEE80211_CHAN_OFDM     0x0040  /* OFDM channel */
   52 #define IEEE80211_CHAN_2GHZ     0x0080  /* 2 GHz spectrum channel. */
   53 #define IEEE80211_CHAN_5GHZ     0x0100  /* 5 GHz spectrum channel */
   54 #define IEEE80211_CHAN_PASSIVE  0x0200  /* Only passive scan allowed */
   55 #define IEEE80211_CHAN_DYN      0x0400  /* Dynamic CCK-OFDM channel */
   56 #define IEEE80211_CHAN_GFSK     0x0800  /* GFSK channel (FHSS PHY) */
   57 
   58 /*
   59  * Useful combinations of channel characteristics.
   60  */
   61 #define IEEE80211_CHAN_FHSS \
   62         (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_GFSK)
   63 #define IEEE80211_CHAN_A \
   64         (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM)
   65 #define IEEE80211_CHAN_B \
   66         (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_CCK)
   67 #define IEEE80211_CHAN_PUREG \
   68         (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM)
   69 #define IEEE80211_CHAN_G \
   70         (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN)
   71 #define IEEE80211_CHAN_T \
   72         (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO)
   73 
   74 #define IEEE80211_IS_CHAN_FHSS(_c) \
   75         (((_c)->ic_flags & IEEE80211_CHAN_FHSS) == IEEE80211_CHAN_FHSS)
   76 #define IEEE80211_IS_CHAN_A(_c) \
   77         (((_c)->ic_flags & IEEE80211_CHAN_A) == IEEE80211_CHAN_A)
   78 #define IEEE80211_IS_CHAN_B(_c) \
   79         (((_c)->ic_flags & IEEE80211_CHAN_B) == IEEE80211_CHAN_B)
   80 #define IEEE80211_IS_CHAN_PUREG(_c) \
   81         (((_c)->ic_flags & IEEE80211_CHAN_PUREG) == IEEE80211_CHAN_PUREG)
   82 #define IEEE80211_IS_CHAN_G(_c) \
   83         (((_c)->ic_flags & IEEE80211_CHAN_G) == IEEE80211_CHAN_G)
   84 #define IEEE80211_IS_CHAN_T(_c) \
   85         (((_c)->ic_flags & IEEE80211_CHAN_T) == IEEE80211_CHAN_T)
   86 
   87 #define IEEE80211_IS_CHAN_2GHZ(_c) \
   88         (((_c)->ic_flags & IEEE80211_CHAN_2GHZ) != 0)
   89 #define IEEE80211_IS_CHAN_5GHZ(_c) \
   90         (((_c)->ic_flags & IEEE80211_CHAN_5GHZ) != 0)
   91 #define IEEE80211_IS_CHAN_OFDM(_c) \
   92         (((_c)->ic_flags & IEEE80211_CHAN_OFDM) != 0)
   93 #define IEEE80211_IS_CHAN_CCK(_c) \
   94         (((_c)->ic_flags & IEEE80211_CHAN_CCK) != 0)
   95 #define IEEE80211_IS_CHAN_GFSK(_c) \
   96         (((_c)->ic_flags & IEEE80211_CHAN_GFSK) != 0)
   97 
   98 #endif /* _NET80211_IEEE80211_CHANNEL_H_ */

Cache object: fc8aa6773c246438b78fb50ef2bd15fb


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.