summaryrefslogtreecommitdiffstats
path: root/sys
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
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')
-rw-r--r--sys/dev/ath/if_ath.c16
-rw-r--r--sys/dev/iwi/if_iwi.c6
-rw-r--r--sys/dev/ral/rt2560.c6
-rw-r--r--sys/dev/ral/rt2661.c6
-rw-r--r--sys/dev/usb/if_rum.c6
-rw-r--r--sys/dev/usb/if_ural.c6
6 files changed, 37 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.
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);
diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c
index d799be4..b3bb76a 100644
--- a/sys/dev/ral/rt2560.c
+++ b/sys/dev/ral/rt2560.c
@@ -2005,6 +2005,11 @@ rt2560_start(struct ifnet *ifp)
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
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))))
@@ -2057,6 +2062,7 @@ rt2560_start(struct ifnet *ifp)
}
sc->sc_tx_timer = 5;
+ ic->ic_lastdata = ticks;
callout_reset(&sc->watchdog_ch, hz, rt2560_watchdog, sc);
}
diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c
index fde5738..b7086f5 100644
--- a/sys/dev/ral/rt2661.c
+++ b/sys/dev/ral/rt2661.c
@@ -1766,6 +1766,11 @@ rt2661_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))))
@@ -1819,6 +1824,7 @@ rt2661_start(struct ifnet *ifp)
}
sc->sc_tx_timer = 5;
+ ic->ic_lastdata = ticks;
callout_reset(&sc->watchdog_ch, hz, rt2661_watchdog, sc);
}
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index ca80573..e2c5a18 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1406,6 +1406,11 @@ rum_start(struct ifnet *ifp)
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
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))))
@@ -1436,6 +1441,7 @@ rum_start(struct ifnet *ifp)
}
sc->sc_tx_timer = 5;
+ ic->ic_lastdata = ticks;
callout_reset(&sc->watchdog_ch, hz, rum_watchdog, sc);
}
}
diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c
index 9dc052b..47de4d7 100644
--- a/sys/dev/usb/if_ural.c
+++ b/sys/dev/usb/if_ural.c
@@ -1472,6 +1472,11 @@ ural_start(struct ifnet *ifp)
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
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))))
@@ -1502,6 +1507,7 @@ ural_start(struct ifnet *ifp)
}
sc->sc_tx_timer = 5;
+ ic->ic_lastdata = ticks;
callout_reset(&sc->watchdog_ch, hz, ural_watchdog, sc);
}
}
OpenPOWER on IntegriCloud