Merge madwifi-dfs r3676

Fixed type of all variables storing jiffies
Converted add_timer() to mod_timer()


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3677 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
benoit 2008-05-22 20:25:48 +00:00
parent c62ff62eaf
commit 99ead2121d
11 changed files with 29 additions and 37 deletions

View File

@ -9873,8 +9873,7 @@ ath_led_off(unsigned long arg)
ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon); ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon);
sc->sc_ledtimer.function = ath_led_done; sc->sc_ledtimer.function = ath_led_done;
sc->sc_ledtimer.expires = jiffies + sc->sc_ledoff; mod_timer(&sc->sc_ledtimer, jiffies + sc->sc_ledoff);
add_timer(&sc->sc_ledtimer);
} }
/* /*
@ -9888,8 +9887,7 @@ ath_led_blink(struct ath_softc *sc, int on, int off)
sc->sc_blinking = 1; sc->sc_blinking = 1;
sc->sc_ledoff = off; sc->sc_ledoff = off;
sc->sc_ledtimer.function = ath_led_off; sc->sc_ledtimer.function = ath_led_off;
sc->sc_ledtimer.expires = jiffies + on; mod_timer(&sc->sc_ledtimer, jiffies + on);
add_timer(&sc->sc_ledtimer);
} }
static void static void

View File

@ -737,7 +737,7 @@ struct ath_softc {
u_int sc_ledpin; /* GPIO pin for driving LED */ u_int sc_ledpin; /* GPIO pin for driving LED */
u_int sc_ledon; /* pin setting for LED on */ u_int sc_ledon; /* pin setting for LED on */
u_int sc_ledidle; /* idle polling interval */ u_int sc_ledidle; /* idle polling interval */
long unsigned int sc_ledevent; /* time of last LED event */ unsigned long sc_ledevent; /* time of last LED event */
u_int8_t sc_rxrate; /* current rx rate for LED */ u_int8_t sc_rxrate; /* current rx rate for LED */
u_int8_t sc_txrate; /* current tx rate for LED */ u_int8_t sc_txrate; /* current tx rate for LED */
u_int16_t sc_ledoff; /* off time for current blink */ u_int16_t sc_ledoff; /* off time for current blink */
@ -796,7 +796,7 @@ struct ath_softc {
int sc_beacon_cal; /* use beacon timer for calibration */ int sc_beacon_cal; /* use beacon timer for calibration */
long unsigned int sc_calinterval_sec; /* current interval for calibration (in seconds) */ long unsigned int sc_calinterval_sec; /* current interval for calibration (in seconds) */
long unsigned int sc_lastcal; /* last time the calibration was performed */ unsigned long sc_lastcal; /* last time the calibration was performed */
struct timer_list sc_cal_ch; /* calibration timer */ struct timer_list sc_cal_ch; /* calibration timer */
HAL_NODE_STATS sc_halstats; /* station-mode rssi stats */ HAL_NODE_STATS sc_halstats; /* station-mode rssi stats */

View File

@ -447,8 +447,7 @@ ath_ratectl(unsigned long data)
interval = ath_rateinterval; interval = ath_rateinterval;
if (ic->ic_opmode == IEEE80211_M_STA) if (ic->ic_opmode == IEEE80211_M_STA)
interval /= 2; interval /= 2;
asc->timer.expires = jiffies + ((HZ * interval) / 1000); mod_timer(&asc->timer, jiffies + ((HZ * interval) / 1000));
add_timer(&asc->timer);
} }
static struct ath_ratectrl * static struct ath_ratectrl *

View File

@ -809,8 +809,7 @@ ath_timer_function(unsigned long data)
if (timer == NULL) if (timer == NULL)
DPRINTF(sc, "%s: timer is null - leave it\n", __func__); DPRINTF(sc, "%s: timer is null - leave it\n", __func__);
timer->expires = jiffies + ((HZ * interval) / 1000); mod_timer(timer, jiffies + ((HZ * interval) / 1000));
add_timer(timer);
} }
static void static void
@ -926,8 +925,7 @@ ath_rate_attach(struct ath_softc *sc)
osc->timer.function = ath_timer_function; osc->timer.function = ath_timer_function;
osc->timer.data = (unsigned long)osc; osc->timer.data = (unsigned long)osc;
osc->timer.expires = jiffies + HZ; mod_timer(&osc->timer, jiffies + HZ);
add_timer(&osc->timer);
return &osc->arc; return &osc->arc;
} }

View File

@ -53,17 +53,17 @@ struct onoe_node {
u_int on_tx_err; /* tx !ok pkt */ u_int on_tx_err; /* tx !ok pkt */
u_int on_tx_retr; /* tx retry count */ u_int on_tx_retr; /* tx retry count */
int on_tx_upper; /* tx upper rate req cnt */ int on_tx_upper; /* tx upper rate req cnt */
u_int8_t on_tx_rix0; /* series 0 rate index */ u_int8_t on_tx_rix0; /* series 0 rate index */
u_int8_t on_tx_try0; /* series 0 try count */ u_int8_t on_tx_try0; /* series 0 try count */
u_int8_t on_tx_rate0; /* series 0 h/w rate */ u_int8_t on_tx_rate0; /* series 0 h/w rate */
u_int8_t on_tx_rate1; /* series 1 h/w rate */ u_int8_t on_tx_rate1; /* series 1 h/w rate */
u_int8_t on_tx_rate2; /* series 2 h/w rate */ u_int8_t on_tx_rate2; /* series 2 h/w rate */
u_int8_t on_tx_rate3; /* series 3 h/w rate */ u_int8_t on_tx_rate3; /* series 3 h/w rate */
u_int8_t on_tx_rate0sp; /* series 0 short preamble h/w rate */ u_int8_t on_tx_rate0sp; /* series 0 short preamble h/w rate */
u_int8_t on_tx_rate1sp; /* series 1 short preamble h/w rate */ u_int8_t on_tx_rate1sp; /* series 1 short preamble h/w rate */
u_int8_t on_tx_rate2sp; /* series 2 short preamble h/w rate */ u_int8_t on_tx_rate2sp; /* series 2 short preamble h/w rate */
u_int8_t on_tx_rate3sp; /* series 3 short preamble h/w rate */ u_int8_t on_tx_rate3sp; /* series 3 short preamble h/w rate */
long unsigned int on_nextcheck; /* time of next check for rate drop */ unsigned long on_nextcheck; /* time of next check for rate drop */
}; };
#define ATH_NODE_ONOE(an) ((struct onoe_node *)&an[1]) #define ATH_NODE_ONOE(an) ((struct onoe_node *)&an[1])
#endif /* _DEV_ATH_RATE_ONOE_H */ #endif /* _DEV_ATH_RATE_ONOE_H */

View File

@ -1041,9 +1041,9 @@ proc_read_nodes(struct ieee80211vap *vap, const int size, char *buf, int space)
p += sprintf(p, "\t%u.%02u\t\t", t / a, (t * 100 / a) % 100); p += sprintf(p, "\t%u.%02u\t\t", t / a, (t * 100 / a) % 100);
if (sn->stats[size_bin][ndx].last_tx) { if (sn->stats[size_bin][ndx].last_tx) {
unsigned int d = jiffies - unsigned long d = jiffies -
sn->stats[size_bin][ndx].last_tx; sn->stats[size_bin][ndx].last_tx;
p += sprintf(p, "%u.%02u", d / HZ, d % HZ); p += sprintf(p, "%lu.%02lu", d / HZ, d % HZ);
} else { } else {
p += sprintf(p, "-"); p += sprintf(p, "-");
} }

View File

@ -65,7 +65,7 @@ struct rate_stats {
int total_packets; int total_packets;
int packets_acked; int packets_acked;
unsigned perfect_tx_time; /* transmit time for 0 retries */ unsigned perfect_tx_time; /* transmit time for 0 retries */
unsigned long int last_tx; unsigned long last_tx;
}; };
@ -91,7 +91,7 @@ struct sample_node {
int current_rate[NUM_PACKET_SIZE_BINS]; int current_rate[NUM_PACKET_SIZE_BINS];
int packets_since_switch[NUM_PACKET_SIZE_BINS]; int packets_since_switch[NUM_PACKET_SIZE_BINS];
unsigned long int jiffies_since_switch[NUM_PACKET_SIZE_BINS]; unsigned long jiffies_since_switch[NUM_PACKET_SIZE_BINS];
int packets_since_sample[NUM_PACKET_SIZE_BINS]; int packets_since_sample[NUM_PACKET_SIZE_BINS];
unsigned sample_tt[NUM_PACKET_SIZE_BINS]; unsigned sample_tt[NUM_PACKET_SIZE_BINS];

View File

@ -2902,9 +2902,8 @@ ieee80211_parse_csaie(struct ieee80211_node *ni, u_int8_t *frm,
vap->iv_csa_timer.function = ieee80211_doth_switch_channel_tmr; vap->iv_csa_timer.function = ieee80211_doth_switch_channel_tmr;
vap->iv_csa_timer.data = (unsigned long)vap; vap->iv_csa_timer.data = (unsigned long)vap;
vap->iv_csa_timer.expires = jiffies + IEEE80211_TU_TO_JIFFIES( mod_timer(&vap->iv_csa_timer, jiffies + IEEE80211_TU_TO_JIFFIES(
vap->iv_csa_count * ni->ni_intval + 10); vap->iv_csa_count * ni->ni_intval + 10));
add_timer(&vap->iv_csa_timer);
} }
vap->iv_csa_jiffies = jiffies; vap->iv_csa_jiffies = jiffies;

View File

@ -133,8 +133,7 @@ ieee80211_node_attach(struct ieee80211com *ic)
init_timer(&ic->ic_inact); init_timer(&ic->ic_inact);
ic->ic_inact.function = ieee80211_node_timeout; ic->ic_inact.function = ieee80211_node_timeout;
ic->ic_inact.data = (unsigned long) ic; ic->ic_inact.data = (unsigned long) ic;
ic->ic_inact.expires = jiffies + IEEE80211_INACT_WAIT * HZ; mod_timer(&ic->ic_inact, jiffies + IEEE80211_INACT_WAIT * HZ);
add_timer(&ic->ic_inact);
#ifdef IEEE80211_DEBUG_REFCNT #ifdef IEEE80211_DEBUG_REFCNT
ic->ic_node_alloc_debug = node_alloc_debug; ic->ic_node_alloc_debug = node_alloc_debug;
@ -1881,8 +1880,7 @@ ieee80211_node_timeout(unsigned long arg)
ieee80211_scan_timeout(ic); ieee80211_scan_timeout(ic);
ieee80211_timeout_stations(&ic->ic_sta); ieee80211_timeout_stations(&ic->ic_sta);
ic->ic_inact.expires = jiffies + IEEE80211_INACT_WAIT * HZ; mod_timer(&ic->ic_inact, jiffies + IEEE80211_INACT_WAIT * HZ);
add_timer(&ic->ic_inact);
} }
void void

View File

@ -135,7 +135,7 @@ struct ieee80211_node {
u_int8_t ni_n_needed_chans; /* size of ni_needed_chans list */ u_int8_t ni_n_needed_chans; /* size of ni_needed_chans list */
u_int16_t ni_txseqs[17]; /* tx seq per-tid */ u_int16_t ni_txseqs[17]; /* tx seq per-tid */
u_int16_t ni_rxseqs[17]; /* rx seq previous per-tid*/ u_int16_t ni_rxseqs[17]; /* rx seq previous per-tid*/
long unsigned int ni_rxfragstamp; /* time stamp of last rx frag */ unsigned long ni_rxfragstamp; /* time stamp of last rx frag */
struct sk_buff *ni_rxfrag; /* rx frag reassembly */ struct sk_buff *ni_rxfrag; /* rx frag reassembly */
struct ieee80211_rsnparms ni_rsn; /* RSN/WPA parameters */ struct ieee80211_rsnparms ni_rsn; /* RSN/WPA parameters */
struct ieee80211_key ni_ucastkey; /* unicast key */ struct ieee80211_key ni_ucastkey; /* unicast key */
@ -143,7 +143,7 @@ struct ieee80211_node {
/* hardware */ /* hardware */
u_int64_t ni_rtsf; /* recv timestamp */ u_int64_t ni_rtsf; /* recv timestamp */
u_int32_t ni_last_rx; /* recv jiffies */ unsigned long ni_last_rx; /* recv jiffies */
u_int8_t ni_rssi; /* recv ssi */ u_int8_t ni_rssi; /* recv ssi */
/* header */ /* header */

View File

@ -229,7 +229,7 @@ struct ieee80211vap {
u_int iv_scanvalid; /* scan cache valid threshold */ u_int iv_scanvalid; /* scan cache valid threshold */
struct ieee80211_roam iv_roam; /* sta-mode roaming state */ struct ieee80211_roam iv_roam; /* sta-mode roaming state */
u_int32_t iv_csa_jiffies; /* last csa recv jiffies */ unsigned long iv_csa_jiffies; /* last csa recv jiffies */
u_int8_t iv_csa_count; /* last csa count */ u_int8_t iv_csa_count; /* last csa count */
struct ieee80211_channel *iv_csa_chan; /* last csa channel */ struct ieee80211_channel *iv_csa_chan; /* last csa channel */
u_int8_t iv_csa_mode; /* last csa mode */ u_int8_t iv_csa_mode; /* last csa mode */