Page MenuHomeFreeBSD

D5139.id12883.diff
No OneTemporary

D5139.id12883.diff

Index: sys/net80211/ieee80211_scan_sw.c
===================================================================
--- sys/net80211/ieee80211_scan_sw.c
+++ sys/net80211/ieee80211_scan_sw.c
@@ -594,6 +594,7 @@
{
#define ISCAN_REP (ISCAN_MINDWELL | ISCAN_DISCARD)
struct ieee80211_scan_state *ss = (struct ieee80211_scan_state *) arg;
+ struct scan_state *ss_priv = SCAN_PRIVATE(ss);
struct ieee80211vap *vap = ss->ss_vap;
struct ieee80211com *ic = ss->ss_ic;
struct ieee80211_channel *chan;
@@ -602,7 +603,7 @@
IEEE80211_LOCK(ic);
if (vap == NULL || (ic->ic_flags & IEEE80211_F_SCAN) == 0 ||
- (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT)) {
+ (ss_priv->ss_iflags & ISCAN_ABORT)) {
/* Cancelled before we started */
goto done;
}
@@ -624,14 +625,14 @@
* to go out.
* XXX Should use M_TXCB mechanism to eliminate this.
*/
- cv_timedwait(&SCAN_PRIVATE(ss)->ss_scan_cv,
+ cv_timedwait(&ss_priv->ss_scan_cv,
IEEE80211_LOCK_OBJ(ic), msecs_to_ticks(1));
- if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT)
+ if (ss_priv->ss_iflags & ISCAN_ABORT)
goto done;
}
}
- scanend = ticks + SCAN_PRIVATE(ss)->ss_duration;
+ scanend = ticks + ss_priv->ss_duration;
/* XXX scan state can change! Re-validate scan state! */
@@ -642,7 +643,7 @@
for (;;) {
scandone = (ss->ss_next >= ss->ss_last) ||
- (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) != 0;
+ (ss_priv->ss_iflags & ISCAN_CANCEL) != 0;
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
"%s: loop start; scandone=%d\n",
@@ -650,7 +651,7 @@
scandone);
if (scandone || (ss->ss_flags & IEEE80211_SCAN_GOTPICK) ||
- (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) ||
+ (ss_priv->ss_iflags & ISCAN_ABORT) ||
time_after(ticks + ss->ss_mindwell, scanend))
break;
@@ -707,21 +708,21 @@
/* XXX scan state can change! Re-validate scan state! */
- SCAN_PRIVATE(ss)->ss_chanmindwell = ticks + ss->ss_mindwell;
+ ss_priv->ss_chanmindwell = ticks + ss->ss_mindwell;
/* clear mindwell lock and initial channel change flush */
- SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_REP;
+ ss_priv->ss_iflags &= ~ISCAN_REP;
- if ((SCAN_PRIVATE(ss)->ss_iflags & (ISCAN_CANCEL|ISCAN_ABORT)))
+ if (ss_priv->ss_iflags & (ISCAN_CANCEL|ISCAN_ABORT))
continue;
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: waiting\n", __func__);
/* Wait to be signalled to scan the next channel */
- cv_wait(&SCAN_PRIVATE(ss)->ss_scan_cv, IEEE80211_LOCK_OBJ(ic));
+ cv_wait(&ss_priv->ss_scan_cv, IEEE80211_LOCK_OBJ(ic));
}
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: out\n", __func__);
- if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT)
+ if (ss_priv->ss_iflags & ISCAN_ABORT)
goto done;
IEEE80211_UNLOCK(ic);
@@ -733,8 +734,7 @@
* Since a cancellation may have occured during one of the
* driver calls (whilst unlocked), update scandone.
*/
- if (scandone == 0 &&
- ((SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) != 0)) {
+ if (scandone == 0 && (ss_priv->ss_iflags & ISCAN_CANCEL) != 0) {
/* XXX printf? */
if_printf(vap->iv_ifp,
"%s: OOPS! scan cancelled during driver call (1)!\n",
@@ -759,7 +759,7 @@
IEEE80211_LOCK(ic);
}
/* clear internal flags and any indication of a pick */
- SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_REP;
+ ss_priv->ss_iflags &= ~ISCAN_REP;
ss->ss_flags &= ~IEEE80211_SCAN_GOTPICK;
/*
@@ -769,7 +769,7 @@
* notify the driver to end the scan above to avoid having
* rx frames alter the scan candidate list.
*/
- if ((SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) == 0 &&
+ 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, scanend)) {
@@ -785,7 +785,7 @@
vap->iv_stats.is_scan_passive++;
ss->ss_ops->scan_restart(ss, vap); /* XXX? */
- ieee80211_runtask(ic, &SCAN_PRIVATE(ss)->ss_scan_task);
+ ieee80211_runtask(ic, &ss_priv->ss_scan_task);
IEEE80211_UNLOCK(ic);
return;
}
@@ -803,8 +803,7 @@
* Since a cancellation may have occured during one of the
* driver calls (whilst unlocked), update scandone.
*/
- if (scandone == 0 &&
- ((SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) != 0)) {
+ if (scandone == 0 && (ss_priv->ss_iflags & ISCAN_CANCEL) != 0) {
/* XXX printf? */
if_printf(vap->iv_ifp,
"%s: OOPS! scan cancelled during driver call (2)!\n",
@@ -836,7 +835,7 @@
ic->ic_flags_ext &= ~IEEE80211_FEXT_BGSCAN;
}
}
- SCAN_PRIVATE(ss)->ss_iflags &= ~(ISCAN_CANCEL|ISCAN_ABORT);
+ ss_priv->ss_iflags &= ~(ISCAN_CANCEL|ISCAN_ABORT);
ss->ss_flags &= ~(IEEE80211_SCAN_ONCE | IEEE80211_SCAN_PICK1ST);
IEEE80211_UNLOCK(ic);
#undef ISCAN_REP

File Metadata

Mime Type
text/plain
Expires
Thu, Sep 3, 4:35 PM (11 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38133723
Default Alt Text
D5139.id12883.diff (4 KB)

Event Timeline