2 * Copyright (c) 2006 The DragonFly Project. All rights reserved.
4 * This code is derived from software contributed to The DragonFly Project
5 * by Sepherosa Ziehau <sepherosa@gmail.com>
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
17 * 3. Neither the name of The DragonFly Project nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific, prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
31 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_ratectl_none.c,v 1.3 2008/01/15 09:01:13 sephe Exp $
37 #include <sys/param.h>
38 #include <sys/kernel.h>
41 #include <net/if_media.h>
42 #include <net/if_arp.h>
44 #include <netproto/802_11/ieee80211_var.h>
46 static void *none_ratectl_attach(struct ieee80211vap *);
47 static void none_ratectl_detach(void *);
48 static void none_ratectl_init(struct ieee80211vap *);
49 static void none_ratectl_deinit(struct ieee80211vap *);
50 static void none_ratectl_node_init(struct ieee80211_node *);
51 static void none_ratectl_node_deinit(struct ieee80211_node *);
52 static void none_ratectl_rate(struct ieee80211vap *, void *, uint32_t);
53 static void none_ratectl_tx_complete(const struct ieee80211vap *,
54 struct ieee80211_node *, int, void *, void *);
55 static void none_ratectl_tx_update(const struct ieee80211vap *,
56 const struct ieee80211_node *, void *, void *, void *);
57 static void none_ratectl_setinterval(const struct ieee80211vap *, int);
59 const struct ieee80211_ratectl ieee80211_ratectl_none = {
61 .rc_attach = none_ratectl_attach,
62 .rc_detach = none_ratectl_detach,
63 .rc_init = none_ratectl_init,
64 .rc_deinit = none_ratectl_deinit,
65 .rc_node_init = none_ratectl_node_init,
66 .rc_node_deinit = none_ratectl_node_deinit,
67 .rc_rate = none_ratectl_rate,
68 .rc_tx_complete = none_ratectl_tx_complete,
69 .rc_tx_update = none_ratectl_tx_update,
70 .rc_setinterval = none_ratectl_setinterval,
73 IEEE80211_RATECTL_MODULE(ieee80211_ratectl_none, 1);
74 IEEE80211_RATECTL_ALG(ieee80211_ratectl_none, IEEE80211_RATECTL_NONE,
75 ieee80211_ratectl_none);
78 none_ratectl_setinterval(const struct ieee80211vap *vap __unused,
84 none_ratectl_attach(struct ieee80211vap *vap)
86 struct ieee80211_ratectl_state *rc_st = &vap->iv_ratectl;
88 rc_st->rc_st_attach(vap, IEEE80211_RATECTL_NONE);
93 none_ratectl_detach(void *arg __unused)
98 none_ratectl_init(struct ieee80211vap *vap __unused)
103 none_ratectl_deinit(struct ieee80211vap *vap __unused)
108 none_ratectl_node_init(struct ieee80211_node *ni __unused)
113 none_ratectl_node_deinit(struct ieee80211_node *ni __unused)
118 none_ratectl_tx_complete(const struct ieee80211vap *vap __unused,
119 struct ieee80211_node *ni __unused, int ok __unused,
120 void *arg1 __unused, void *arg2 __unused)
125 none_ratectl_tx_update(const struct ieee80211vap *vap __unused,
126 const struct ieee80211_node *ni __unused,
127 void *arg1 __unused, void *arg2 __unused, void *arg3 __unused)