ieee80211_rssadapt.c revision 1.21.16.2 1 1.21.16.2 phil /* $NetBSD: ieee80211_rssadapt.c,v 1.21.16.2 2018/07/12 16:35:34 phil Exp $ */
2 1.21.16.2 phil
3 1.1 dyoung /*-
4 1.21.16.1 phil * SPDX-License-Identifier: BSD-3-Clause
5 1.21.16.1 phil *
6 1.21.16.1 phil * Copyright (c) 2010 Rui Paulo <rpaulo (at) FreeBSD.org>
7 1.1 dyoung * Copyright (c) 2003, 2004 David Young. All rights reserved.
8 1.1 dyoung *
9 1.1 dyoung * Redistribution and use in source and binary forms, with or
10 1.1 dyoung * without modification, are permitted provided that the following
11 1.1 dyoung * conditions are met:
12 1.1 dyoung * 1. Redistributions of source code must retain the above copyright
13 1.1 dyoung * notice, this list of conditions and the following disclaimer.
14 1.1 dyoung * 2. Redistributions in binary form must reproduce the above
15 1.1 dyoung * copyright notice, this list of conditions and the following
16 1.1 dyoung * disclaimer in the documentation and/or other materials provided
17 1.1 dyoung * with the distribution.
18 1.21.16.1 phil * 3. The name of David Young may not be used to endorse or promote
19 1.21.16.1 phil * products derived from this software without specific prior
20 1.21.16.1 phil * written permission.
21 1.1 dyoung *
22 1.1 dyoung * THIS SOFTWARE IS PROVIDED BY David Young ``AS IS'' AND ANY
23 1.1 dyoung * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24 1.1 dyoung * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
25 1.1 dyoung * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL David
26 1.1 dyoung * Young BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 1.1 dyoung * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
28 1.1 dyoung * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 1.1 dyoung * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 1.1 dyoung * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31 1.1 dyoung * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 1.1 dyoung * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
33 1.1 dyoung * OF SUCH DAMAGE.
34 1.1 dyoung */
35 1.21.16.1 phil #include "opt_wlan.h"
36 1.11 dyoung
37 1.1 dyoung #include <sys/param.h>
38 1.21.16.1 phil #include <sys/systm.h>
39 1.21.16.1 phil #include <sys/kernel.h>
40 1.21.16.1 phil #include <sys/malloc.h>
41 1.21.16.1 phil #include <sys/module.h>
42 1.21.16.2 phil #ifdef __NetBSD__
43 1.21.16.2 phil /* Why doesn't FreeBSD have this? */
44 1.21.16.2 phil #include <sys/sbuf.h>
45 1.21.16.2 phil #endif
46 1.21.16.1 phil #include <sys/socket.h>
47 1.5 dyoung #include <sys/sysctl.h>
48 1.1 dyoung
49 1.1 dyoung #include <net/if.h>
50 1.21.16.2 phil #ifdef __FreeBSD__
51 1.21.16.1 phil #include <net/if_var.h>
52 1.21.16.2 phil #endif
53 1.1 dyoung #include <net/if_media.h>
54 1.21.16.2 phil #ifdef __FreeBSD__
55 1.21.16.1 phil #include <net/ethernet.h>
56 1.21.16.2 phil #endif
57 1.21.16.2 phil #ifdef __NetBSD__
58 1.21.16.2 phil #include <net/route.h>
59 1.21.16.2 phil #endif
60 1.1 dyoung
61 1.1 dyoung #include <net80211/ieee80211_var.h>
62 1.1 dyoung #include <net80211/ieee80211_rssadapt.h>
63 1.21.16.1 phil #include <net80211/ieee80211_ratectl.h>
64 1.1 dyoung
65 1.21.16.2 phil #ifdef __NetBSD__
66 1.21.16.2 phil #undef KASSERT
67 1.21.16.2 phil #define KASSERT(__cond, __complaint) FBSDKASSERT(__cond, __complaint)
68 1.21.16.2 phil #endif
69 1.21.16.2 phil
70 1.21.16.1 phil struct rssadapt_expavgctl {
71 1.21.16.1 phil /* RSS threshold decay. */
72 1.21.16.1 phil u_int rc_decay_denom;
73 1.21.16.1 phil u_int rc_decay_old;
74 1.21.16.1 phil /* RSS threshold update. */
75 1.21.16.1 phil u_int rc_thresh_denom;
76 1.21.16.1 phil u_int rc_thresh_old;
77 1.21.16.1 phil /* RSS average update. */
78 1.21.16.1 phil u_int rc_avgrssi_denom;
79 1.21.16.1 phil u_int rc_avgrssi_old;
80 1.21.16.1 phil };
81 1.1 dyoung
82 1.21.16.1 phil static struct rssadapt_expavgctl master_expavgctl = {
83 1.15 gmcgarry .rc_decay_denom = 16,
84 1.15 gmcgarry .rc_decay_old = 15,
85 1.15 gmcgarry .rc_thresh_denom = 8,
86 1.15 gmcgarry .rc_thresh_old = 4,
87 1.15 gmcgarry .rc_avgrssi_denom = 8,
88 1.15 gmcgarry .rc_avgrssi_old = 4
89 1.3 dyoung };
90 1.3 dyoung
91 1.21.16.1 phil #ifdef interpolate
92 1.21.16.1 phil #undef interpolate
93 1.21.16.1 phil #endif
94 1.21.16.1 phil #define interpolate(parm, old, new) ((parm##_old * (old) + \
95 1.21.16.1 phil (parm##_denom - parm##_old) * (new)) / \
96 1.21.16.1 phil parm##_denom)
97 1.5 dyoung
98 1.21.16.1 phil static void rssadapt_setinterval(const struct ieee80211vap *, int);
99 1.21.16.1 phil static void rssadapt_init(struct ieee80211vap *);
100 1.21.16.1 phil static void rssadapt_deinit(struct ieee80211vap *);
101 1.21.16.1 phil static void rssadapt_updatestats(struct ieee80211_rssadapt_node *);
102 1.21.16.1 phil static void rssadapt_node_init(struct ieee80211_node *);
103 1.21.16.1 phil static void rssadapt_node_deinit(struct ieee80211_node *);
104 1.21.16.1 phil static int rssadapt_rate(struct ieee80211_node *, void *, uint32_t);
105 1.21.16.1 phil static void rssadapt_lower_rate(struct ieee80211_rssadapt_node *, int, int);
106 1.21.16.1 phil static void rssadapt_raise_rate(struct ieee80211_rssadapt_node *,
107 1.21.16.1 phil int, int);
108 1.21.16.1 phil static void rssadapt_tx_complete(const struct ieee80211_node *,
109 1.21.16.1 phil const struct ieee80211_ratectl_tx_status *);
110 1.21.16.1 phil static void rssadapt_sysctlattach(struct ieee80211vap *,
111 1.21.16.1 phil struct sysctl_ctx_list *, struct sysctl_oid *);
112 1.21.16.1 phil
113 1.21.16.1 phil /* number of references from net80211 layer */
114 1.21.16.1 phil static int nrefs = 0;
115 1.21.16.1 phil
116 1.21.16.2 phil static const struct ieee80211_ratectl rssadapt __unused = {
117 1.21.16.1 phil .ir_name = "rssadapt",
118 1.21.16.1 phil .ir_attach = NULL,
119 1.21.16.1 phil .ir_detach = NULL,
120 1.21.16.1 phil .ir_init = rssadapt_init,
121 1.21.16.1 phil .ir_deinit = rssadapt_deinit,
122 1.21.16.1 phil .ir_node_init = rssadapt_node_init,
123 1.21.16.1 phil .ir_node_deinit = rssadapt_node_deinit,
124 1.21.16.1 phil .ir_rate = rssadapt_rate,
125 1.21.16.1 phil .ir_tx_complete = rssadapt_tx_complete,
126 1.21.16.1 phil .ir_tx_update = NULL,
127 1.21.16.1 phil .ir_setinterval = rssadapt_setinterval,
128 1.21.16.1 phil };
129 1.21.16.1 phil IEEE80211_RATECTL_MODULE(rssadapt, 1);
130 1.21.16.1 phil IEEE80211_RATECTL_ALG(rssadapt, IEEE80211_RATECTL_RSSADAPT, rssadapt);
131 1.5 dyoung
132 1.21.16.1 phil static void
133 1.21.16.1 phil rssadapt_setinterval(const struct ieee80211vap *vap, int msecs)
134 1.21.16.1 phil {
135 1.21.16.1 phil struct ieee80211_rssadapt *rs = vap->iv_rs;
136 1.21.16.1 phil int t;
137 1.5 dyoung
138 1.21.16.1 phil if (msecs < 100)
139 1.21.16.1 phil msecs = 100;
140 1.21.16.1 phil t = msecs_to_ticks(msecs);
141 1.21.16.1 phil rs->interval = (t < 1) ? 1 : t;
142 1.5 dyoung }
143 1.5 dyoung
144 1.21.16.1 phil static void
145 1.21.16.1 phil rssadapt_init(struct ieee80211vap *vap)
146 1.5 dyoung {
147 1.21.16.1 phil struct ieee80211_rssadapt *rs;
148 1.5 dyoung
149 1.21.16.1 phil KASSERT(vap->iv_rs == NULL, ("%s: iv_rs already initialized",
150 1.21.16.1 phil __func__));
151 1.5 dyoung
152 1.21.16.1 phil nrefs++; /* XXX locking */
153 1.21.16.1 phil vap->iv_rs = rs = IEEE80211_MALLOC(sizeof(struct ieee80211_rssadapt),
154 1.21.16.1 phil M_80211_RATECTL, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
155 1.21.16.1 phil if (rs == NULL) {
156 1.21.16.1 phil if_printf(vap->iv_ifp, "couldn't alloc ratectl structure\n");
157 1.21.16.1 phil return;
158 1.21.16.1 phil }
159 1.21.16.1 phil rs->vap = vap;
160 1.21.16.1 phil rssadapt_setinterval(vap, 500 /* msecs */);
161 1.21.16.1 phil rssadapt_sysctlattach(vap, vap->iv_sysctl, vap->iv_oid);
162 1.5 dyoung }
163 1.5 dyoung
164 1.21.16.1 phil static void
165 1.21.16.1 phil rssadapt_deinit(struct ieee80211vap *vap)
166 1.5 dyoung {
167 1.21.16.1 phil IEEE80211_FREE(vap->iv_rs, M_80211_RATECTL);
168 1.21.16.1 phil KASSERT(nrefs > 0, ("imbalanced attach/detach"));
169 1.21.16.1 phil nrefs--; /* XXX locking */
170 1.21.16.1 phil }
171 1.5 dyoung
172 1.21.16.1 phil static void
173 1.21.16.1 phil rssadapt_updatestats(struct ieee80211_rssadapt_node *ra)
174 1.3 dyoung {
175 1.21.16.1 phil long interval;
176 1.3 dyoung
177 1.21.16.1 phil ra->ra_pktrate = (ra->ra_pktrate + 10*(ra->ra_nfail + ra->ra_nok))/2;
178 1.21.16.1 phil ra->ra_nfail = ra->ra_nok = 0;
179 1.3 dyoung
180 1.21.16.1 phil /*
181 1.21.16.1 phil * A node is eligible for its rate to be raised every 1/10 to 10
182 1.21.16.1 phil * seconds, more eligible in proportion to recent packet rates.
183 1.21.16.1 phil */
184 1.21.16.1 phil interval = MAX(10*1000, 10*1000 / MAX(1, 10 * ra->ra_pktrate));
185 1.21.16.1 phil ra->ra_raise_interval = msecs_to_ticks(interval);
186 1.21.16.1 phil }
187 1.3 dyoung
188 1.21.16.1 phil static void
189 1.21.16.1 phil rssadapt_node_init(struct ieee80211_node *ni)
190 1.21.16.1 phil {
191 1.21.16.1 phil struct ieee80211_rssadapt_node *ra;
192 1.21.16.1 phil struct ieee80211vap *vap = ni->ni_vap;
193 1.21.16.1 phil struct ieee80211_rssadapt *rsa = vap->iv_rs;
194 1.21.16.1 phil const struct ieee80211_rateset *rs = &ni->ni_rates;
195 1.21.16.1 phil
196 1.21.16.1 phil if (ni->ni_rctls == NULL) {
197 1.21.16.1 phil ni->ni_rctls = ra =
198 1.21.16.1 phil IEEE80211_MALLOC(sizeof(struct ieee80211_rssadapt_node),
199 1.21.16.1 phil M_80211_RATECTL, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO);
200 1.21.16.1 phil if (ra == NULL) {
201 1.21.16.1 phil if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl "
202 1.21.16.1 phil "structure\n");
203 1.21.16.1 phil return;
204 1.3 dyoung }
205 1.3 dyoung } else
206 1.21.16.1 phil ra = ni->ni_rctls;
207 1.21.16.1 phil ra->ra_rs = rsa;
208 1.21.16.1 phil ra->ra_rates = *rs;
209 1.21.16.1 phil rssadapt_updatestats(ra);
210 1.21.16.1 phil
211 1.21.16.1 phil /* pick initial rate */
212 1.21.16.1 phil for (ra->ra_rix = rs->rs_nrates - 1;
213 1.21.16.1 phil ra->ra_rix > 0 && (rs->rs_rates[ra->ra_rix] & IEEE80211_RATE_VAL) > 72;
214 1.21.16.1 phil ra->ra_rix--)
215 1.21.16.1 phil ;
216 1.21.16.1 phil ni->ni_txrate = rs->rs_rates[ra->ra_rix] & IEEE80211_RATE_VAL;
217 1.21.16.1 phil ra->ra_ticks = ticks;
218 1.3 dyoung
219 1.21.16.1 phil IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_RATECTL, ni,
220 1.21.16.1 phil "RSSADAPT initial rate %d", ni->ni_txrate);
221 1.3 dyoung }
222 1.1 dyoung
223 1.21.16.1 phil static void
224 1.21.16.1 phil rssadapt_node_deinit(struct ieee80211_node *ni)
225 1.1 dyoung {
226 1.1 dyoung
227 1.21.16.1 phil IEEE80211_FREE(ni->ni_rctls, M_80211_RATECTL);
228 1.21.16.1 phil }
229 1.1 dyoung
230 1.21.16.1 phil static __inline int
231 1.21.16.1 phil bucket(int pktlen)
232 1.21.16.1 phil {
233 1.21.16.1 phil int i, top, thridx;
234 1.21.16.1 phil
235 1.21.16.1 phil for (i = 0, top = IEEE80211_RSSADAPT_BKT0;
236 1.21.16.1 phil i < IEEE80211_RSSADAPT_BKTS;
237 1.21.16.1 phil i++, top <<= IEEE80211_RSSADAPT_BKTPOWER) {
238 1.21.16.1 phil thridx = i;
239 1.21.16.1 phil if (pktlen <= top)
240 1.21.16.1 phil break;
241 1.21.16.1 phil }
242 1.21.16.1 phil return thridx;
243 1.1 dyoung }
244 1.1 dyoung
245 1.21.16.1 phil static int
246 1.21.16.1 phil rssadapt_rate(struct ieee80211_node *ni, void *arg __unused, uint32_t iarg)
247 1.1 dyoung {
248 1.21.16.1 phil struct ieee80211_rssadapt_node *ra = ni->ni_rctls;
249 1.21.16.1 phil u_int pktlen = iarg;
250 1.21.16.1 phil const struct ieee80211_rateset *rs = &ra->ra_rates;
251 1.21.16.1 phil uint16_t (*thrs)[IEEE80211_RATE_SIZE];
252 1.21.16.1 phil int rix, rssi;
253 1.21.16.1 phil
254 1.21.16.1 phil if ((ticks - ra->ra_ticks) > ra->ra_rs->interval) {
255 1.21.16.1 phil rssadapt_updatestats(ra);
256 1.21.16.1 phil ra->ra_ticks = ticks;
257 1.21.16.1 phil }
258 1.1 dyoung
259 1.21.16.1 phil thrs = &ra->ra_rate_thresh[bucket(pktlen)];
260 1.1 dyoung
261 1.21.16.1 phil /* XXX this is average rssi, should be using last value */
262 1.21.16.1 phil rssi = ni->ni_ic->ic_node_getrssi(ni);
263 1.21.16.1 phil for (rix = rs->rs_nrates-1; rix >= 0; rix--)
264 1.21.16.1 phil if ((*thrs)[rix] < (rssi << 8))
265 1.21.16.1 phil break;
266 1.21.16.1 phil if (rix != ra->ra_rix) {
267 1.21.16.1 phil /* update public rate */
268 1.21.16.1 phil ni->ni_txrate = ni->ni_rates.rs_rates[rix] & IEEE80211_RATE_VAL;
269 1.21.16.1 phil ra->ra_rix = rix;
270 1.21.16.1 phil
271 1.21.16.1 phil IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_RATECTL, ni,
272 1.21.16.1 phil "RSSADAPT new rate %d (pktlen %d rssi %d)",
273 1.21.16.1 phil ni->ni_txrate, pktlen, rssi);
274 1.21.16.1 phil }
275 1.21.16.1 phil return rix;
276 1.1 dyoung }
277 1.1 dyoung
278 1.1 dyoung /*
279 1.1 dyoung * Adapt the data rate to suit the conditions. When a transmitted
280 1.21.16.1 phil * packet is dropped after RAL_RSSADAPT_RETRY_LIMIT retransmissions,
281 1.1 dyoung * raise the RSS threshold for transmitting packets of similar length at
282 1.1 dyoung * the same data rate.
283 1.1 dyoung */
284 1.21.16.1 phil static void
285 1.21.16.1 phil rssadapt_lower_rate(struct ieee80211_rssadapt_node *ra, int pktlen, int rssi)
286 1.21.16.1 phil {
287 1.21.16.1 phil uint16_t last_thr;
288 1.21.16.1 phil uint16_t (*thrs)[IEEE80211_RATE_SIZE];
289 1.21.16.1 phil u_int rix;
290 1.21.16.1 phil
291 1.21.16.1 phil thrs = &ra->ra_rate_thresh[bucket(pktlen)];
292 1.21.16.1 phil
293 1.21.16.1 phil rix = ra->ra_rix;
294 1.21.16.1 phil last_thr = (*thrs)[rix];
295 1.21.16.1 phil (*thrs)[rix] = interpolate(master_expavgctl.rc_thresh,
296 1.21.16.1 phil last_thr, (rssi << 8));
297 1.21.16.1 phil
298 1.21.16.1 phil IEEE80211_DPRINTF(ra->ra_rs->vap, IEEE80211_MSG_RATECTL,
299 1.21.16.1 phil "RSSADAPT lower threshold for rate %d (last_thr %d new thr %d rssi %d)\n",
300 1.21.16.1 phil ra->ra_rates.rs_rates[rix + 1] & IEEE80211_RATE_VAL,
301 1.21.16.1 phil last_thr, (*thrs)[rix], rssi);
302 1.21.16.1 phil }
303 1.1 dyoung
304 1.21.16.1 phil static void
305 1.21.16.1 phil rssadapt_raise_rate(struct ieee80211_rssadapt_node *ra, int pktlen, int rssi)
306 1.21.16.1 phil {
307 1.21.16.1 phil uint16_t (*thrs)[IEEE80211_RATE_SIZE];
308 1.21.16.1 phil uint16_t newthr, oldthr;
309 1.21.16.1 phil int rix;
310 1.21.16.1 phil
311 1.21.16.1 phil thrs = &ra->ra_rate_thresh[bucket(pktlen)];
312 1.21.16.1 phil
313 1.21.16.1 phil rix = ra->ra_rix;
314 1.21.16.1 phil if ((*thrs)[rix + 1] > (*thrs)[rix]) {
315 1.21.16.1 phil oldthr = (*thrs)[rix + 1];
316 1.21.16.1 phil if ((*thrs)[rix] == 0)
317 1.21.16.1 phil newthr = (rssi << 8);
318 1.21.16.1 phil else
319 1.21.16.1 phil newthr = (*thrs)[rix];
320 1.21.16.1 phil (*thrs)[rix + 1] = interpolate(master_expavgctl.rc_decay,
321 1.21.16.1 phil oldthr, newthr);
322 1.21.16.1 phil
323 1.21.16.1 phil IEEE80211_DPRINTF(ra->ra_rs->vap, IEEE80211_MSG_RATECTL,
324 1.21.16.1 phil "RSSADAPT raise threshold for rate %d (oldthr %d newthr %d rssi %d)\n",
325 1.21.16.1 phil ra->ra_rates.rs_rates[rix + 1] & IEEE80211_RATE_VAL,
326 1.21.16.1 phil oldthr, newthr, rssi);
327 1.1 dyoung
328 1.21.16.1 phil ra->ra_last_raise = ticks;
329 1.21.16.1 phil }
330 1.21.16.1 phil }
331 1.1 dyoung
332 1.21.16.1 phil static void
333 1.21.16.1 phil rssadapt_tx_complete(const struct ieee80211_node *ni,
334 1.21.16.1 phil const struct ieee80211_ratectl_tx_status *status)
335 1.21.16.1 phil {
336 1.21.16.1 phil struct ieee80211_rssadapt_node *ra = ni->ni_rctls;
337 1.21.16.1 phil int pktlen, rssi;
338 1.1 dyoung
339 1.21.16.1 phil if ((status->flags &
340 1.21.16.1 phil (IEEE80211_RATECTL_STATUS_PKTLEN|IEEE80211_RATECTL_STATUS_RSSI)) !=
341 1.21.16.1 phil (IEEE80211_RATECTL_STATUS_PKTLEN|IEEE80211_RATECTL_STATUS_RSSI))
342 1.1 dyoung return;
343 1.1 dyoung
344 1.21.16.1 phil pktlen = status->pktlen;
345 1.21.16.1 phil rssi = status->rssi;
346 1.21.16.1 phil
347 1.21.16.1 phil if (status->status == IEEE80211_RATECTL_TX_SUCCESS) {
348 1.21.16.1 phil ra->ra_nok++;
349 1.21.16.1 phil if ((ra->ra_rix + 1) < ra->ra_rates.rs_nrates &&
350 1.21.16.1 phil (ticks - ra->ra_last_raise) >= ra->ra_raise_interval)
351 1.21.16.1 phil rssadapt_raise_rate(ra, pktlen, rssi);
352 1.21.16.1 phil } else {
353 1.21.16.1 phil ra->ra_nfail++;
354 1.21.16.1 phil rssadapt_lower_rate(ra, pktlen, rssi);
355 1.1 dyoung }
356 1.21.16.1 phil }
357 1.1 dyoung
358 1.21.16.2 phil #ifdef notyet
359 1.21.16.1 phil static int
360 1.21.16.1 phil rssadapt_sysctl_interval(SYSCTL_HANDLER_ARGS)
361 1.21.16.1 phil {
362 1.21.16.1 phil struct ieee80211vap *vap = arg1;
363 1.21.16.1 phil struct ieee80211_rssadapt *rs = vap->iv_rs;
364 1.21.16.1 phil int msecs = ticks_to_msecs(rs->interval);
365 1.21.16.1 phil int error;
366 1.1 dyoung
367 1.21.16.1 phil error = sysctl_handle_int(oidp, &msecs, 0, req);
368 1.21.16.1 phil if (error || !req->newptr)
369 1.21.16.1 phil return error;
370 1.21.16.1 phil rssadapt_setinterval(vap, msecs);
371 1.21.16.1 phil return 0;
372 1.21.16.1 phil }
373 1.21.16.2 phil #endif
374 1.1 dyoung
375 1.21.16.1 phil static void
376 1.21.16.1 phil rssadapt_sysctlattach(struct ieee80211vap *vap,
377 1.21.16.1 phil struct sysctl_ctx_list *ctx, struct sysctl_oid *tree)
378 1.21.16.1 phil {
379 1.21.16.2 phil #ifdef notyet
380 1.21.16.1 phil SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
381 1.21.16.1 phil "rssadapt_rate_interval", CTLTYPE_INT | CTLFLAG_RW, vap,
382 1.21.16.1 phil 0, rssadapt_sysctl_interval, "I", "rssadapt operation interval (ms)");
383 1.21.16.2 phil #endif
384 1.1 dyoung }
385