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_ratectl_none.c

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 2010 Bernhard Schmidt <bschmidt@FreeBSD.org>
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer.
   10  * 2. Redistributions in binary form must reproduce the above copyright
   11  *    notice, this list of conditions and the following disclaimer in the
   12  *    documentation and/or other materials provided with the distribution.
   13  *
   14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   15  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   16  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   17  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   18  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   19  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   20  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   21  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   23  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   24  */
   25 
   26 #include <sys/cdefs.h>
   27 __FBSDID("$FreeBSD: releng/10.1/sys/net80211/ieee80211_ratectl_none.c 215244 2010-11-13 14:59:54Z bschmidt $");
   28 
   29 #include "opt_wlan.h"
   30 
   31 #include <sys/param.h>
   32 #include <sys/kernel.h>
   33 #include <sys/module.h>
   34 #include <sys/socket.h>
   35 #include <sys/sysctl.h>
   36 
   37 #include <net/if.h>
   38 #include <net/if_media.h>
   39 
   40 #ifdef INET
   41 #include <netinet/in.h>
   42 #include <netinet/if_ether.h>
   43 #endif
   44 
   45 #include <net80211/ieee80211_var.h>
   46 #include <net80211/ieee80211_ratectl.h>
   47 
   48 static void
   49 none_init(struct ieee80211vap *vap)
   50 {
   51 }
   52 
   53 static void
   54 none_deinit(struct ieee80211vap *vap)
   55 {
   56         free(vap->iv_rs, M_80211_RATECTL);
   57 }
   58 
   59 static void
   60 none_node_init(struct ieee80211_node *ni)
   61 {
   62         ni->ni_txrate = ni->ni_rates.rs_rates[0] & IEEE80211_RATE_VAL;
   63 }
   64 
   65 static void
   66 none_node_deinit(struct ieee80211_node *ni)
   67 {
   68 }
   69 
   70 static int
   71 none_rate(struct ieee80211_node *ni, void *arg __unused, uint32_t iarg __unused)
   72 {
   73         int rix = 0;
   74 
   75         ni->ni_txrate = ni->ni_rates.rs_rates[rix] & IEEE80211_RATE_VAL;
   76         return rix;
   77 }
   78 
   79 static void
   80 none_tx_complete(const struct ieee80211vap *vap,
   81     const struct ieee80211_node *ni, int ok,
   82     void *arg1, void *arg2 __unused)
   83 {
   84 }
   85 
   86 static void
   87 none_tx_update(const struct ieee80211vap *vap, const struct ieee80211_node *ni,
   88     void *arg1, void *arg2, void *arg3)
   89 {
   90 }
   91 
   92 static void
   93 none_setinterval(const struct ieee80211vap *vap, int msecs)
   94 {
   95 }
   96 
   97 /* number of references from net80211 layer */
   98 static  int nrefs = 0;
   99 
  100 static const struct ieee80211_ratectl none = {
  101         .ir_name        = "none",
  102         .ir_attach      = NULL,
  103         .ir_detach      = NULL,
  104         .ir_init        = none_init,
  105         .ir_deinit      = none_deinit,
  106         .ir_node_init   = none_node_init,
  107         .ir_node_deinit = none_node_deinit,
  108         .ir_rate        = none_rate,
  109         .ir_tx_complete = none_tx_complete,
  110         .ir_tx_update   = none_tx_update,
  111         .ir_setinterval = none_setinterval,
  112 };
  113 IEEE80211_RATECTL_MODULE(ratectl_none, 1);
  114 IEEE80211_RATECTL_ALG(none, IEEE80211_RATECTL_NONE, none);

Cache object: 453405f5c65da956d1dd7693a36ea7a3


[ 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.