Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149946
b: refs/heads/master
c: 415f738
h: refs/heads/master
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Apr 22, 2009
1 parent 89bec61 commit 3d960f6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a451aa66dcb14efcb7addf1d8edcac8df76a97b6
refs/heads/master: 415f738ecf41b427921b503ecfd427e26f89dc23
24 changes: 15 additions & 9 deletions trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,18 @@ static void ath_ani_calibrate(unsigned long data)
mod_timer(&sc->ani.timer, jiffies + msecs_to_jiffies(cal_interval));
}

static void ath_start_ani(struct ath_softc *sc)
{
unsigned long timestamp = jiffies_to_msecs(jiffies);

sc->ani.longcal_timer = timestamp;
sc->ani.shortcal_timer = timestamp;
sc->ani.checkani_timer = timestamp;

mod_timer(&sc->ani.timer,
jiffies + msecs_to_jiffies(ATH_ANI_POLLINTERVAL));
}

/*
* Update tx/rx chainmask. For legacy association,
* hard code chainmask to 1x1, for 11n association, use
Expand Down Expand Up @@ -911,9 +923,7 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc,
sc->nodestats.ns_avgtxrssi = ATH_RSSI_DUMMY_MARKER;
sc->nodestats.ns_avgtxrate = ATH_RATE_DUMMY_MARKER;

/* Start ANI */
mod_timer(&sc->ani.timer,
jiffies + msecs_to_jiffies(ATH_ANI_POLLINTERVAL));
ath_start_ani(sc);
} else {
DPRINTF(sc, ATH_DBG_CONFIG, "Bss Info DISASSOC\n");
sc->curaid = 0;
Expand Down Expand Up @@ -2239,12 +2249,8 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,

ath9k_hw_set_interrupts(sc->sc_ah, sc->imask);

if (conf->type == NL80211_IFTYPE_AP) {
/* TODO: is this a suitable place to start ANI for AP mode? */
/* Start ANI */
mod_timer(&sc->ani.timer,
jiffies + msecs_to_jiffies(ATH_ANI_POLLINTERVAL));
}
if (conf->type == NL80211_IFTYPE_AP)
ath_start_ani(sc);

out:
mutex_unlock(&sc->mutex);
Expand Down

0 comments on commit 3d960f6

Please sign in to comment.