From: Joe Talbott Date: Tue, 27 Jul 2010 01:33:43 +0000 (-0400) Subject: ral - Move NULL test to correct location and remove useless cast. X-Git-Tag: v2.9.0~644 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/051377a2d0408823251df26755928a2078575550 ral - Move NULL test to correct location and remove useless cast. Reported-By: Max Herrgard --- diff --git a/sys/dev/netif/ral/rt2661.c b/sys/dev/netif/ral/rt2661.c index b8bd68bca5..d6051c8489 100644 --- a/sys/dev/netif/ral/rt2661.c +++ b/sys/dev/netif/ral/rt2661.c @@ -898,14 +898,16 @@ rt2661_tx_intr(struct rt2661_softc *sc) data = &txq->data[txq->stat]; m = data->m; data->m = NULL; + ni = data->ni; data->ni = NULL; - vap = ni->ni_vap; /* if no frame has been sent, ignore */ if (ni == NULL) continue; + vap = ni->ni_vap; + switch (RT2661_TX_RESULT(val)) { case RT2661_TX_SUCCESS: retrycnt = RT2661_TX_RETRYCNT(val); @@ -1491,7 +1493,7 @@ rt2661_tx_data(struct rt2661_softc *sc, struct mbuf *m0, } else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { rate = tp->ucastrate; } else { - (void) ieee80211_ratectl_rate(ni, NULL, 0); + ieee80211_ratectl_rate(ni, NULL, 0); rate = ni->ni_txrate; } rate &= IEEE80211_RATE_VAL;