[net80211] migrate the time_* macros to ieee80211_* namespace.
It turns out that these will clash very annoyingly with the linux macros in the linuxkpi layer, so let the wookie^Wlinux win. The only user that I can find is ath(4), so fix it there too.
This commit is contained in:
parent
275b79bd9b
commit
b8e29e065d
@ -766,7 +766,7 @@ ath_lna_rx_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs,
|
||||
|
||||
/* Short scan check */
|
||||
if (antcomb->scan && antcomb->alt_good) {
|
||||
if (time_after(ticks, antcomb->scan_start_time +
|
||||
if (ieee80211_time_after(ticks, antcomb->scan_start_time +
|
||||
msecs_to_jiffies(ATH_ANT_DIV_COMB_SHORT_SCAN_INTR)))
|
||||
short_scan = AH_TRUE;
|
||||
else
|
||||
|
@ -245,7 +245,7 @@ dfs_timeout(void *arg)
|
||||
for (i = 0; i < ic->ic_nchans; i++) {
|
||||
c = &ic->ic_channels[i];
|
||||
if (IEEE80211_IS_CHAN_RADAR(c)) {
|
||||
if (time_after_eq(now, dfs->nol_event[i]+NOL_TIMEOUT)) {
|
||||
if (ieee80211_time_after_eq(now, dfs->nol_event[i]+NOL_TIMEOUT)) {
|
||||
c->ic_state &= ~IEEE80211_CHANSTATE_RADAR;
|
||||
if (c->ic_state & IEEE80211_CHANSTATE_NORADAR) {
|
||||
/*
|
||||
|
@ -251,10 +251,10 @@ void ieee80211_vap_destroy(struct ieee80211vap *);
|
||||
#define ticks_to_msecs(t) (1000*(t) / hz)
|
||||
#define ticks_to_secs(t) ((t) / hz)
|
||||
|
||||
#define time_after(a,b) ((long)(b) - (long)(a) < 0)
|
||||
#define time_before(a,b) time_after(b,a)
|
||||
#define time_after_eq(a,b) ((long)(a) - (long)(b) >= 0)
|
||||
#define time_before_eq(a,b) time_after_eq(b,a)
|
||||
#define ieee80211_time_after(a,b) ((long)(b) - (long)(a) < 0)
|
||||
#define ieee80211_time_before(a,b) ieee80211_time_after(b,a)
|
||||
#define ieee80211_time_after_eq(a,b) ((long)(a) - (long)(b) >= 0)
|
||||
#define ieee80211_time_before_eq(a,b) ieee80211_time_after_eq(b,a)
|
||||
|
||||
struct mbuf *ieee80211_getmgtframe(uint8_t **frm, int headroom, int pktlen);
|
||||
|
||||
|
@ -1406,7 +1406,7 @@ ieee80211_ht_timeout(struct ieee80211com *ic)
|
||||
IEEE80211_LOCK_ASSERT(ic);
|
||||
|
||||
if ((ic->ic_flags_ht & IEEE80211_FHT_NONHT_PR) &&
|
||||
time_after(ticks, ic->ic_lastnonht + IEEE80211_NONHT_PRESENT_AGE)) {
|
||||
ieee80211_time_after(ticks, ic->ic_lastnonht + IEEE80211_NONHT_PRESENT_AGE)) {
|
||||
#if 0
|
||||
IEEE80211_NOTE(vap, IEEE80211_MSG_11N, ni,
|
||||
"%s", "time out non-HT STA present on channel");
|
||||
|
@ -2638,7 +2638,7 @@ ieee80211_erp_timeout(struct ieee80211com *ic)
|
||||
IEEE80211_LOCK_ASSERT(ic);
|
||||
|
||||
if ((ic->ic_flags_ext & IEEE80211_FEXT_NONERP_PR) &&
|
||||
time_after(ticks, ic->ic_lastnonerp + IEEE80211_NONERP_PRESENT_AGE)) {
|
||||
ieee80211_time_after(ticks, ic->ic_lastnonerp + IEEE80211_NONERP_PRESENT_AGE)) {
|
||||
#if 0
|
||||
IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC, ni,
|
||||
"%s", "age out non-ERP sta present on channel");
|
||||
|
@ -623,7 +623,7 @@ ieee80211_sta_ps_timer_check(struct ieee80211vap *vap)
|
||||
|
||||
/* If we've done any data within our idle interval, bail */
|
||||
/* XXX hard-coded to one second for now, ew! */
|
||||
if (time_after(ic->ic_lastdata + 500, ticks))
|
||||
if (ieee80211_time_after(ic->ic_lastdata + 500, ticks))
|
||||
goto out;
|
||||
|
||||
/*
|
||||
|
@ -1323,7 +1323,7 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct ieee80211vap *vap)
|
||||
* XXX deauth current ap
|
||||
*/
|
||||
if (curRate < roamRate || curRssi < roamRssi) {
|
||||
if (time_after(ticks, ic->ic_lastscan + vap->iv_scanvalid)) {
|
||||
if (ieee80211_time_after(ticks, ic->ic_lastscan + vap->iv_scanvalid)) {
|
||||
/*
|
||||
* Scan cache contents are too old; force a scan now
|
||||
* if possible so we have current state to make a
|
||||
@ -1333,7 +1333,7 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct ieee80211vap *vap)
|
||||
* XXX force immediate switch on scan complete
|
||||
*/
|
||||
if (!IEEE80211_IS_CHAN_DTURBO(ic->ic_curchan) &&
|
||||
time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle))
|
||||
ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle))
|
||||
ieee80211_bg_scan(vap, 0);
|
||||
return;
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ ieee80211_swscan_check_scan(const struct ieee80211_scanner *scan,
|
||||
}
|
||||
if ((ic->ic_flags & IEEE80211_F_SCAN) == 0 &&
|
||||
(flags & IEEE80211_SCAN_FLUSH) == 0 &&
|
||||
time_before(ticks, ic->ic_lastscan + vap->iv_scanvalid)) {
|
||||
ieee80211_time_before(ticks, ic->ic_lastscan + vap->iv_scanvalid)) {
|
||||
/*
|
||||
* We're not currently scanning and the cache is
|
||||
* deemed hot enough to consult. Lock out others
|
||||
@ -674,7 +674,7 @@ scan_curchan_task(void *arg, int pending)
|
||||
|
||||
if (scandone || (ss->ss_flags & IEEE80211_SCAN_GOTPICK) ||
|
||||
(ss_priv->ss_iflags & ISCAN_ABORT) ||
|
||||
time_after(ticks + ss->ss_mindwell, ss_priv->ss_scanend)) {
|
||||
ieee80211_time_after(ticks + ss->ss_mindwell, ss_priv->ss_scanend)) {
|
||||
ss_priv->ss_iflags &= ~ISCAN_RUNNING;
|
||||
scan_end(ss, scandone);
|
||||
return;
|
||||
@ -686,7 +686,7 @@ scan_curchan_task(void *arg, int pending)
|
||||
/*
|
||||
* Watch for truncation due to the scan end time.
|
||||
*/
|
||||
if (time_after(ticks + ss->ss_maxdwell, ss_priv->ss_scanend))
|
||||
if (ieee80211_time_after(ticks + ss->ss_maxdwell, ss_priv->ss_scanend))
|
||||
maxdwell = ss_priv->ss_scanend - ticks;
|
||||
else
|
||||
maxdwell = ss->ss_maxdwell;
|
||||
@ -807,7 +807,7 @@ scan_end(struct ieee80211_scan_state *ss, int scandone)
|
||||
if ((ss_priv->ss_iflags & ISCAN_CANCEL) == 0 &&
|
||||
!ss->ss_ops->scan_end(ss, vap) &&
|
||||
(ss->ss_flags & IEEE80211_SCAN_ONCE) == 0 &&
|
||||
time_before(ticks + ss->ss_mindwell, ss_priv->ss_scanend)) {
|
||||
ieee80211_time_before(ticks + ss->ss_mindwell, ss_priv->ss_scanend)) {
|
||||
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
|
||||
"%s: done, restart "
|
||||
"[ticks %u, dwell min %lu scanend %lu]\n",
|
||||
@ -923,7 +923,7 @@ ieee80211_swscan_add_scan(struct ieee80211vap *vap,
|
||||
* the timer so we'll switch to the next channel.
|
||||
*/
|
||||
if ((SCAN_PRIVATE(ss)->ss_iflags & ISCAN_MINDWELL) == 0 &&
|
||||
time_after_eq(ticks, SCAN_PRIVATE(ss)->ss_chanmindwell)) {
|
||||
ieee80211_time_after_eq(ticks, SCAN_PRIVATE(ss)->ss_chanmindwell)) {
|
||||
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
|
||||
"%s: chan %3d%c min dwell met (%u > %lu)\n",
|
||||
__func__,
|
||||
|
@ -1253,7 +1253,7 @@ contbgscan(struct ieee80211vap *vap)
|
||||
return ((ic->ic_flags_ext & IEEE80211_FEXT_BGSCAN) &&
|
||||
(ic->ic_flags & IEEE80211_F_CSAPENDING) == 0 &&
|
||||
vap->iv_state == IEEE80211_S_RUN && /* XXX? */
|
||||
time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle));
|
||||
ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1274,8 +1274,8 @@ startbgscan(struct ieee80211vap *vap)
|
||||
#ifdef IEEE80211_SUPPORT_SUPERG
|
||||
!IEEE80211_IS_CHAN_DTURBO(ic->ic_curchan) &&
|
||||
#endif
|
||||
time_after(ticks, ic->ic_lastscan + vap->iv_bgscanintvl) &&
|
||||
time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle));
|
||||
ieee80211_time_after(ticks, ic->ic_lastscan + vap->iv_bgscanintvl) &&
|
||||
ieee80211_time_after(ticks, ic->ic_lastdata + vap->iv_bgscanidle));
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user