Make pointer declarations and casting consistent. Some other formatting changes are...
[madwifi/.git] / ath_rate / amrr / amrr.c
index 9d12af871cdd3d7271cc3d0d141b595ab0ff5042..e9a7264d5a2d7d5f6326dc8cd9ee4ee514e05dd1 100644 (file)
@@ -195,8 +195,8 @@ ath_rate_update(struct ath_softc *sc, struct ieee80211_node *ni, int rate)
 
        KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
 
-       DPRINTF(sc, "%s: set xmit rate for %s to %dM\n",
-               __func__, ether_sprintf(ni->ni_macaddr),
+       DPRINTF(sc, "%s: set xmit rate for " MAC_FMT " to %dM\n",
+               __func__, MAC_ADDR(ni->ni_macaddr),
                ni->ni_rates.rs_nrates > 0 ?
                        (ni->ni_rates.rs_rates[rate] & IEEE80211_RATE_VAL) / 2 : 0);
 
@@ -317,7 +317,7 @@ ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state)
 {
        struct ieee80211com *ic = vap->iv_ic;
        struct ath_softc *sc = ic->ic_dev->priv;
-       struct amrr_softc *asc = (struct amrr_softc *) sc->sc_rc;
+       struct amrr_softc *asc = (struct amrr_softc *)sc->sc_rc;
        struct ieee80211_node *ni;
 
        if (state == IEEE80211_S_INIT) {
@@ -447,8 +447,7 @@ ath_ratectl(unsigned long data)
        interval = ath_rateinterval;
        if (ic->ic_opmode == IEEE80211_M_STA)
                interval /= 2;
-       asc->timer.expires = jiffies + ((HZ * interval) / 1000);
-       add_timer(&asc->timer);
+       mod_timer(&asc->timer, jiffies + ((HZ * interval) / 1000));
 }
 
 static struct ath_ratectrl *
@@ -474,7 +473,7 @@ ath_rate_attach(struct ath_softc *sc)
 static void
 ath_rate_detach(struct ath_ratectrl *arc)
 {
-       struct amrr_softc *asc = (struct amrr_softc *) arc;
+       struct amrr_softc *asc = (struct amrr_softc *)arc;
 
        del_timer(&asc->timer);
        kfree(asc);