Exemplo n.º 1
0
void
ieee80211_amrr_init(struct ieee80211_amrr *amrr,
    struct ieee80211vap *vap, int amin, int amax, int interval)
{
	/* XXX bounds check? */
	amrr->amrr_min_success_threshold = amin;
	amrr->amrr_max_success_threshold = amax;
	ieee80211_amrr_setinterval(amrr, interval);

	amrr_sysctlattach(amrr, vap->iv_sysctl, vap->iv_oid);
}
Exemplo n.º 2
0
static void
amrr_init(struct ieee80211vap *vap)
{
	struct ieee80211_amrr *amrr;

	KASSERT(vap->iv_rs == NULL, ("%s called multiple times", __func__));

	amrr = vap->iv_rs = malloc(sizeof(struct ieee80211_amrr),
	    M_80211_RATECTL, M_NOWAIT|M_ZERO);
	if (amrr == NULL) {
		if_printf(vap->iv_ifp, "couldn't alloc ratectl structure\n");
		return;
	}
	amrr->amrr_min_success_threshold = IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD;
	amrr->amrr_max_success_threshold = IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD;
	amrr_setinterval(vap, 500 /* ms */);
	amrr_sysctlattach(vap, vap->iv_sysctl, vap->iv_oid);
}