Add in the missing radiotap definitions from the sipsolutions.net
radiotap "upstream" source.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245156 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add support for IO_APPEND flag in fuse
This make open(..., O_APPEND) actually works on fuse filesystem.

Reviewed by:	attilio


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245164 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix -iface and -interface modifiers.

Spotted by:	Ian FREISLICH


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245168 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Following r226271, allow disabling lzma support with "WITHOUT_LZMA_SUPPORT".
Correct r226271 which should have used WITHOUT_BZIP2_SUPPORT per r166255.

Obtained from:	Juniper Networks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245171 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Shave off another register write to save some more
microseconds of PCI access time.

Tested by:	sos @
Submitted by:	sos @
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245175 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
ISO 9660 specification allows only "d-characters" and "a-characters" in the
Volume Descriptor (section 7.4).  In short, upper-case alphanumeric + some
symbols only.  While the makefs utility automatically converts the characters,
$LABEL should be consistent in the scripts.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245177 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
If spectral scan is enabled, ensure radar report PHY errors are also
enabled.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245183 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use calloc() to get zeroed memory.

MFC after:	1 month


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245184 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add support for triggering spectral scan upon a channel reset/change.

This is intended to support reporting FFT results during active channel
scans, for users who would like to fiddle around with writing applications
that do both FFT visualisation _and_ AP scanning.

* add a new ioctl to enable/trigger spectral scan at channel change/reset;
* set do_spectral consistently if it's enabled, so a channel set/reset
  will carry forth the correct PHY error configuration so frames
  are actually received;
* for NICs that don't do spectral scan, don't bother checking the
  spectral scan state on channel change/reset.

Tested:

* AR9280 - STA and scanning;
* AR5416 - STA, ensured that the SS code doesn't panic


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245185 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix format size.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245190 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove old declarations.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245192 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The in6_setscope() function determines the scope zone id of an address
and embeds it into address. Inside the kernel we keep addresses with
embedded zone id only for two scopes: link-local and interface-local.

For other scopes this function is nop in most cases. To reduce an
overhead of locking, first check that address is capable for embedding.
Also, handle the loopback address before acquire the lock.

Sponsored by:	Yandex LLC
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245199 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use get_pcpu() instead of using pcpup, as it's wrong for SMP.

Submitted by:	Lukasz Plachno <luk@semihalf.com>


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245202 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Define IPI_IRQ_START and IPI_IRQ_END.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245203 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a "pause" to busy wait loops in the cpu reset path.

This should not matter much when running on bare metal but it makes the guest
more friendly when running inside a virtual machine.

Discussed with:	jhb
Obtained from:	NetApp


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245204 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix compile warning when using GCC:
Comparison between signed and unsigned.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245222 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Change function argument type instead of casting.

Suggested by:	glebius @


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245223 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Disable destination address selection support of
getipnodebyname(1).  RFC 2553 mentions IPv6 addresses
are returned 1st.

Spotted by:	uqs
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245225 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix a bug in the device pager code that can trigger an assertion
in devfs if a particular race condition is hit in the device pager
code.

This was a side effect of change 227530 which changed the device
pager interface to call a new destructor routine for the cdev.
That destructor routine, old_dev_pager_dtor(), takes a VM object
handle.

The object handle is cast to a struct cdev *, and passed into
dev_rel().

That works in most cases, except the case in cdev_pager_allocate()
where there is a race condition between two threads allocating an
object backed by the same device.  The loser of the race
deallocates its object at the end of the function.

The problem is that before inserting the object into the
dev_pager_object_list, the object's handle is changed from the
struct cdev pointer to the object's own address.  This is to avoid
conflicts with the winner of the race, which already inserted an
object in the list with a handle that is a pointer to the same cdev
structure.

The object is then passed to vm_object_deallocate(), and eventually
makes its way down to old_dev_pager_dtor().  That function passes
the handle pointer (which is actually a VM object, not a struct
cdev as usual) into dev_rel().  dev_rel() decrements the reference
count in the assumed struct cdev (which happens to be 0), and
that triggers the assertion in dev_rel() that the reference count
is greater than or equal to 0.

The fix is to add a cdev pointer to the VM object, and use that
pointer when calling the cdev_pg_dtor() routine.

vm_object.h:	Add a struct cdev pointer to the VM object
		structure.

device_pager.c:	In cdev_pager_allocate(), populate the new cdev
		pointer.

		In dev_pager_dealloc(), use the new cdev pointer
		when calling the object's cdev_pg_dtor() routine.

Reviewed by:	kib
Sponsored by:	Spectra Logic Corporation
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245226 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make CTL work a little better with loading and unloading drivers.

Previously CTL would leave individual LUNs enabled in the target
driver, whether or not the port as a whole was enabled.  It would
also leave the wildcard LUN enabled indefinitely.

This change means that CTL will enable and disable any active LUNs,
as well as the wildcard LUN, when enabling and disabling a port.

Also, fix a bug that could crop up due to an uninitialized CCB
type.

ctl.c:		Before calling ctl_frontend_online(), run through
		the LUN list and enable all active LUNs.

		After calling ctl_frontend_offline(), run through
		the LUN list and disble all active LUNs.

scsi_ctl.c:	Before bringing a port online, allocate the
		wildcard peripheral for that bus.  And after taking
		a port offline, invalidate the wildcard peripheral
		for that bus.

		Make sure that we hold the SIM lock around all
		calls to xpt_action() and other transport layer
		interfaces that require it.

		Use CAM_SIM_{LOCK|UNLOCK} consistently to acquire
		and release the SIM lock.

		Update a number of outdated comments.  Some of
		these should have been fixed long ago.

		Actually do LUN disbables now.  The newer drivers
		in the tree work correctly for this as far as I
		know.

		Initialize the CCB type to CTLFE_CCB_DEFAULT to
		avoid a panic due to uninitialized memory.

Submitted by:	Chuck Tuffli (partially)
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@245228 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f