/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2003, 2004 David Young. 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
* with the distribution.
* 3. The name of David Young may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY David Young ``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 David
* Young 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.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/byteorder.h>
#include <sys/net80211.h>
#include "ral_rate.h"
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#ifdef interpolate
#endif
void
ral_rate_init(void)
{
}
/* ARGSUSED */
int
const char *dvname, int do_not_adapt)
{
for (i = 0, top = RAL_RSSADAPT_BKT0;
i < RAL_RSSADAPT_BKTS;
i++, top <<= RAL_RSSADAPT_BKTPOWER) {
thridx = i;
break;
}
while (--i >= 0) {
rateidx = i;
continue;
if (do_not_adapt)
break;
break;
}
return (rateidx);
}
void
{
long interval;
ra->ra_pktrate =
/*
* a node is eligible for its rate to be raised every 1/10 to 10
* seconds, more eligible in proportion to recent packet rates.
*/
}
/* ARGSUSED */
void
{
}
/*
* Adapt the data rate to suit the conditions. When a transmitted
* packet is dropped after RAL_RSSADAPT_RETRY_LIMIT retransmissions,
* raise the RSS threshold for transmitting packets of similar length at
* the same data rate.
*/
/* ARGSUSED */
void
{
return;
for (i = 0, top = RAL_RSSADAPT_BKT0;
i < RAL_RSSADAPT_BKTS;
i++, top <<= RAL_RSSADAPT_BKTPOWER) {
thridx = i;
break;
}
}
/* ARGSUSED */
void
struct ral_rssdesc *id)
{
int i, top;
for (i = 0, top = RAL_RSSADAPT_BKT0;
i < RAL_RSSADAPT_BKTS;
i++, top <<= RAL_RSSADAPT_BKTPOWER) {
break;
}
else
}
}