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);
{
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) {
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 *
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);