svn commit: r282376 - head/sys/dev/wpi
Adrian Chadd
adrian at FreeBSD.org
Sun May 3 22:43:46 UTC 2015
Author: adrian
Date: Sun May 3 22:43:45 2015
New Revision: 282376
URL: https://svnweb.freebsd.org/changeset/base/282376
Log:
Use another workaround for scanning.
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios at gmail.com>
Modified:
head/sys/dev/wpi/if_wpi.c
head/sys/dev/wpi/if_wpivar.h
Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c Sun May 3 22:34:32 2015 (r282375)
+++ head/sys/dev/wpi/if_wpi.c Sun May 3 22:43:45 2015 (r282376)
@@ -516,7 +516,6 @@ wpi_attach(device_t dev)
ic->ic_scan_start = wpi_scan_start;
ic->ic_scan_end = wpi_scan_end;
ic->ic_set_channel = wpi_set_channel;
- sc->sc_scan_curchan = ic->ic_scan_curchan;
ic->ic_scan_curchan = wpi_scan_curchan;
ic->ic_scan_mindwell = wpi_scan_mindwell;
ic->ic_setregdomain = wpi_setregdomain;
@@ -4020,6 +4019,20 @@ wpi_scan(struct wpi_softc *sc, struct ie
chan->chan, IEEE80211_IS_CHAN_PASSIVE(c));
hdr->nchan++;
+
+ if (hdr->nchan == 1 && sc->rxon.chan == chan->chan) {
+ /* XXX Force probe request transmission. */
+ memcpy(chan + 1, chan, sizeof (struct wpi_scan_chan));
+
+ chan++;
+
+ /* Reduce unnecessary delay. */
+ chan->flags = 0;
+ chan->passive = chan->active = hdr->quiet_time;
+
+ hdr->nchan++;
+ }
+
chan++;
buflen = (uint8_t *)chan - buf;
@@ -5400,16 +5413,10 @@ wpi_scan_curchan(struct ieee80211_scan_s
int error;
WPI_RXON_LOCK(sc);
- if (sc->rxon.chan != ieee80211_chan2ieee(ic, ic->ic_curchan)) {
- error = wpi_scan(sc, ic->ic_curchan);
- WPI_RXON_UNLOCK(sc);
- if (error != 0)
- ieee80211_cancel_scan(vap);
- } else {
- WPI_RXON_UNLOCK(sc);
- /* Send probe request when associated. */
- sc->sc_scan_curchan(ss, maxdwell);
- }
+ error = wpi_scan(sc, ic->ic_curchan);
+ WPI_RXON_UNLOCK(sc);
+ if (error != 0)
+ ieee80211_cancel_scan(vap);
}
/**
Modified: head/sys/dev/wpi/if_wpivar.h
==============================================================================
--- head/sys/dev/wpi/if_wpivar.h Sun May 3 22:34:32 2015 (r282375)
+++ head/sys/dev/wpi/if_wpivar.h Sun May 3 22:43:45 2015 (r282376)
@@ -210,8 +210,6 @@ struct wpi_softc {
struct mtx nt_mtx;
void (*sc_node_free)(struct ieee80211_node *);
- void (*sc_scan_curchan)(struct ieee80211_scan_state *,
- unsigned long);
struct wpi_rx_radiotap_header sc_rxtap;
struct wpi_tx_radiotap_header sc_txtap;
More information about the svn-src-head
mailing list