Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Mar 2008 02:59:54 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 137820 for review
Message-ID:  <200803160259.m2G2xsXh012591@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=137820

Change 137820 by sam@sam_ebb on 2008/03/16 02:59:46

	must check if cb hook is setup

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211_amrr.c#8 edit
.. //depot/projects/vap/sys/net80211/ieee80211_proto.c#25 edit

Differences ...

==== //depot/projects/vap/sys/net80211/ieee80211_amrr.c#8 (text+ko) ====

@@ -172,7 +172,7 @@
 	struct ieee80211_amrr *amrr = amn->amn_amrr;
 	int rix;
 
-	if (is_enough(amn) && ticks - amn->amn_ticks > amrr->amrr_interval) {
+	if (is_enough(amn) && (ticks - amn->amn_ticks) > amrr->amrr_interval) {
 		rix = amrr_update(amrr, amn, ni);
 		if (rix != amn->amn_rix) {
 			/* update public rate */
@@ -180,6 +180,7 @@
 			    ni->ni_rates.rs_rates[rix] & IEEE80211_RATE_VAL;
 			amn->amn_rix = rix;
 		}
+		amn->amn_ticks = ticks;
 	} else
 		rix = amn->amn_rix;
 	return rix;

==== //depot/projects/vap/sys/net80211/ieee80211_proto.c#25 (text+ko) ====

@@ -1681,7 +1681,7 @@
 		vap->iv_newstate_cb = ieee80211_newstate_cb;
 	}
 	rc = vap->iv_newstate(vap, nstate, arg);
-	if (rc == 0)
+	if (rc == 0 && vap->iv_newstate_cb != NULL)
 		vap->iv_newstate_cb(vap, nstate, arg);
 done:
 	return rc;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803160259.m2G2xsXh012591>