From 527eef962e3440e0484314868471050b85af5543 Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 5 Sep 2007 23:00:27 +0000 Subject: 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) --- sys/dev/iwi/if_iwi.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys/dev/iwi/if_iwi.c') diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index 205d66c..aaf7d1b 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -1917,6 +1917,11 @@ iwi_start(struct ifnet *ifp) IFQ_DRV_DEQUEUE(&ifp->if_snd, m0); if (m0 == NULL) break; + /* + * Cancel any background scan. + */ + if (ic->ic_flags & IEEE80211_F_SCAN) + ieee80211_cancel_scan(ic); if (m0->m_len < sizeof (struct ether_header) && (m0 = m_pullup(m0, sizeof (struct ether_header))) == NULL) { @@ -1978,6 +1983,7 @@ iwi_start(struct ifnet *ifp) } sc->sc_tx_timer = 5; + ic->ic_lastdata = ticks; } IWI_UNLOCK(sc); -- cgit v1.1