freebsd kernel with SKQ
Go to file
adrian befcdd660f Fix the scan handling for 11b->11g upgrades in a world where, well,
it's not just 11b/11g.

The following was happening, and it's quite .. annoyingly grr-y.

* create vap, setup wpa_supplicant with no bgscanning, etc - there's
  no call to ieee80211_media_change, so vap->iv_des_mode is
  IEEE80211_MODE_AUTO;
* do ifconfig wlan0 scan - same thing, media_change doesn't get called,
  iv_des_mode stays as auto.
* But then, run wpa_cli and do 'scan' - it'll do a media change.
* if you're on 11ng, vap->iv_des_mode gets changed to IEEE80211_MODE_11NG
* Then makescanlist() is called.  There's a block of code that gets
  called if iv_des_mode != IEEE80211_MODE_AUTO, and it does this:

		if (vap->iv_des_mode != IEEE80211_MODE_11G ||
			    mode != IEEE80211_MODE_11B)
			continue;
		mode = IEEE80211_MODE_11G;	/* upgrade */

* .. now, iv_des_mode is not IEEE80211_MODE_11G, so it always runs
  'continue'
* .. and thus the scan list stays empty and no further channel
  scans occur. Ever.(1)

If you then disassociate and try associating to something, your
scan table has likely been purged / aged out and you'll never
see anything in the scan list.

(1) You need to do 'ifconfig wlan0 mode auto' or just destroy/re-create
    the VAP to get working wireless again.

Tested:

* iwn(4) - intel 5300 wifi; STA mode; using wpa_supplicant; bgscan
  enabled -and- wpa_supplicant scanning.

Thanks to:

* Everyone who kept poking me about this and wondering why the hell
  their wifi would eventually stop seeing scan lists.  Grr.
  I eventually snapped this evening and dug back into this code.
2014-12-18 05:17:18 +00:00
bin sh: Make sure output suitable as shell input is also printable. 2014-12-14 16:26:19 +00:00
cddl Initialize an argument to NULL instead of expecting dlinfo() to do it. 2014-12-17 00:22:41 +00:00
contrib Make gas parse '__tls_get_addr(foo@tlsgd)'. 2014-12-18 03:12:46 +00:00
crypto Merge OpenSSL 1.0.1j. 2014-10-15 19:12:05 +00:00
etc Regenerate usb.conf . 2014-12-15 09:35:46 +00:00
games Update factor for changes to types in primes, which is a dependency. 2014-09-27 10:57:34 +00:00
gnu Parallelize building gnu/usr.bin/groff 2014-12-17 19:46:12 +00:00
include Fix the build by installing acpi_hpet.h correctly. 2014-10-24 23:25:11 +00:00
kerberos5 Remove now useless USEPRIVATELIB 2014-11-25 22:43:17 +00:00
lib Initilize the msg_flags field consistently in all code paths. 2014-12-17 07:47:25 +00:00
libexec The runtime linker needs to include a path to itself in the link map 2014-12-02 16:22:08 +00:00
release Adjust the 'Relnotes:' search to look for any non-empty 2014-12-08 15:45:07 +00:00
rescue Add sleep(1) to /rescue. This adds 664 bytes to the binary on amd64 but 2014-12-03 01:34:24 +00:00
sbin Adjust printf format specifiers for dev_t and ino_t in user space. 2014-12-17 07:10:48 +00:00
secure Reduce overlinking 2014-11-25 22:25:13 +00:00
share Prefix all the vxlan ifconfig commands so they are unique 2014-12-17 05:36:34 +00:00
sys Fix the scan handling for 11b->11g upgrades in a world where, well, 2014-12-18 05:17:18 +00:00
tests Add some new modes to OpenCrypto. These modes are AES-ICM (can be used 2014-12-12 19:56:36 +00:00
tools Make NanoBSD source-able from other scripts. 2014-12-16 17:59:05 +00:00
usr.bin Adjust printf format specifiers for dev_t and ino_t in user space. 2014-12-17 07:10:48 +00:00
usr.sbin In bsdinstall's distextract, replace mixed_gauge() of dialog(3) with 2014-12-18 03:51:09 +00:00
.arcconfig Update the URL to the phabricator instance. 2014-08-14 16:25:43 +00:00
.arclint arc: add linting for python files 2014-06-02 00:21:42 +00:00
COPYRIGHT Bump copyright year. 2013-12-31 12:18:10 +00:00
LOCKS
MAINTAINERS Remove cokane@ from MAINTAINERS for 3dfx(4)/tdfx(4) because their email 2014-11-25 05:25:12 +00:00
Makefile Import OpenSSL 1.0.1j. 2014-10-15 17:32:57 +00:00
Makefile.inc1 Fix sporadic build failures due to race when running make installworld 2014-12-17 20:02:07 +00:00
ObsoleteFiles.inc Update to mandoc cvs version as of 20141201 2014-12-02 23:24:57 +00:00
README Import OpenSSL 1.0.1j. 2014-10-15 17:32:57 +00:00
UPDATING Add an UPDATING entry and warning about the change in r274807 to help users 2014-12-16 20:45:17 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html