Make two functions static and eliminate an unused #define.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271243 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Oops.  vm_map_simplify_entry() is used by mac_proc_vm_revoke_recurse(), so
it can't be static.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271244 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Silence a bmake(1) warning in the gif(4) module build
when built with WITHOUT_INET6.

LGTM: 		sbruno
Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271245 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Bring over some more status codes from the Linux iwlwifi driver.

The (eventual) intention is to create MIB counters for transmitted
frame completion to count how many packets with each status are
transmitted.

Note the difference between A-MPDU and non A-MPDU status.

Obtained from:	Linux iwlwifi/dvm driver


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271246 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
(more) correctly account TX completion status for A-MPDU session frames.

The rules turn out to be:

* for non-aggregation session TX queues - it's either sent or not sent.
* for aggregation session TX queues - if nframes=1, then the status reflects
  the completed transmission.
* however, for nframes > 1, then this is just a status reflecting what
  the initial transmission did.  The compressed BA (immediate or delayed)
  may not have yet been received, so the actual frame status is in the
  compressed BA updates.

Whilst here, I fiddled with debugging and formatting a bit.

There's also RTS attempts (what the atheros chips call "short retries")
which weren't being logged and they aren't yet being used in the rate
control statistics updates.  For now, at least log them.

TODO:

* This still isn't 100% correct! So I have to tinker with this some more.
  (The failures aren't always failures..)
* Extend the rate control API in net80211 so it can take both short and
  long retry counts.

Tested:

* Intel 5100, STA mode


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271247 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Temporarily remove the warning added r270781 - it prints the warning
regardless of whether the usage is correct or not and this generates a
LOT of noise, even when you have specified a mask.


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

This is separate to 11g protection - the default is to RTS protect
11n frames, including A-MPDU frames.

Tested:

* Intel 5100, STA mode


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271249 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
vt(4): Change the terminal and buffer sizes, even without a font

This fixes a bug where scroll lock would not work for tty #0 when using
vt_vga's textmode. The reason was that this window is created with a
static 256x100 buffer, larger than the real size of 80x25.

Now, in vt_change_font() and vt_compute_drawable_area(), we still
perform operations even of the window has no font loaded (this is the
case in textmode here vw->vw_font == NULL). One of these operation
resizes the buffer accordingly.

In vt_compute_drawable_area(), we take the terminal size as is (ie.
80x25) for the drawable area.

The font argument to vt_set_border() is removed (it was never used) and
the code now uses the computed drawable area instead of re-doing its own
calculation.

Reported by:	Harald Schmalzbauer <h.schmalzbauer_omnilan.de>
Tested by:	Harald Schmalzbauer <h.schmalzbauer_omnilan.de>
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271250 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use __DECONST to avoid compiler warnings (and thus build failures)
with gcc on sparc64, mips, and powerpc after r271173.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271251 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
pause_sbt(): Take the cold path (ie. use DELAY()) if KDB is active

This fixes a panic in the i915 driver when one uses debug.kdb.enter=1
under vt(4).

PR:		193269
Reported by:	emaste@
Submitted by:	avg@
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271253 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Make hhook_run_socket() vnet-aware instead of adding CURVNET_SET() around
  the function calls.
- Fix a memory leak and stats in the case that hhook_run_socket() fails
  in soalloc().

PR:	193265


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271254 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix support for IPv6 nameservers.

PR:		188931
Submitted by:	Takefu <takefu@airport.fm>
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271255 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fail rather than segfault if neither PAM_TTY nor PAM_RHOST is set.

PR:		83099
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271256 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use the correct idiom for default values, and ensure that the script
works correctly if the user overrides them.

PR:		193255
Submitted by:	hrs@
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271257 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make mount_smbfs(8) preserve the "automounted" mount flag.

The issue here is that we have to pass this flag as a string,
in iov, because it doesn't fit in mntflags, which is an int.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271258 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make it possible to use empty user name ("-U ''") for mount_smbfs(8).
It's just like "-U guest", except that it actually works, at least
with Samba 4, which seems to return authentication failure for "-U guest".

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271259 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Bunch of microoptimizations to reduce dereferences and cache collisions.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271261 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revert r271257 after several issues were pointed out.  An updated patch
will be committed at a later date.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271262 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Avoid rs(1) hitting LINE_MAX with custom trees that have large dependencies.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271278 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge Clang debug info crash fix rev 200797:

    Debug info: fix a crasher when when emitting debug info for
    not-yet-completed templated types. getTypeSize() needs a complete type.

    rdar://problem/15931354

PR:		193347
MFC after:	3 days
Sponsored by:	DARPA, AFRL


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