summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/if_ath.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2007-09-05 23:00:27 +0000
committersam <sam@FreeBSD.org>2007-09-05 23:00:27 +0000
commit527eef962e3440e0484314868471050b85af5543 (patch)
tree30f88a14d8a73fd80df1d360d6a2f9a4e091e164 /sys/dev/ath/if_ath.c
parent82a73bb56563ac476ef079169cb642990e0a1cc7 (diff)
downloadFreeBSD-src-527eef962e3440e0484314868471050b85af5543.zip
FreeBSD-src-527eef962e3440e0484314868471050b85af5543.tar.gz
Add missing bits that made bg scanning lame:
o update ic_lastdata to reflect time of last outbound frame o outbound traffic must preempt/cancel bg scanning to avoid delays This stuff was somehow missed in the initial import. Reviewed by: thompsa, avatar, sephe (earlier version) Approved by: re (blanket wireless)
Diffstat (limited to 'sys/dev/ath/if_ath.c')
-rw-r--r--sys/dev/ath/if_ath.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 1bc9eeb..5c46505 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -1579,6 +1579,12 @@ ath_start(struct ifnet *ifp)
ATH_TXBUF_UNLOCK(sc);
break;
}
+ /*
+ * Cancel any background scan.
+ */
+ if (ic->ic_flags & IEEE80211_F_SCAN)
+ ieee80211_cancel_scan(ic);
+
STAILQ_INIT(&frags);
/*
* Find the node for the destination so we can do
@@ -1605,15 +1611,6 @@ ath_start(struct ifnet *ifp)
* the frame back when the time is right.
*/
ieee80211_pwrsave(ni, m);
- /*
- * If we're in power save mode 'cuz of a bg
- * scan cancel it so the traffic can flow.
- * The packet we just queued will automatically
- * get sent when we drop out of power save.
- * XXX locking
- */
- if (ic->ic_flags & IEEE80211_F_SCAN)
- ieee80211_cancel_scan(ic);
goto reclaim;
}
/* calculate priority so we can find the tx queue */
@@ -1752,6 +1749,7 @@ ath_start(struct ifnet *ifp)
}
ifp->if_timer = 5;
+ ic->ic_lastdata = ticks;
#if 0
/*
* Flush stale frames from the fast-frame staging queue.
OpenPOWER on IntegriCloud