Add basic HT channel setup to ieee80211_init_channels(), this will be
used by at least ral(4).

Reviewed by:	ray


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233845 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Since pf 4.5 import pf(4) has a mechanism to defer
forwarding a packet, that creates state, until
pfsync(4) peer acks state addition (or 10 msec
timeout passes).

This is needed for active-active CARP configurations,
which are poorly supported in FreeBSD and arguably
a good idea at all.

Unfortunately by the time of import this feature in
OpenBSD was turned on, and did not have a switch to
turn it off. This leaked to FreeBSD.

This change make it possible to turn this feature
off via ioctl() and turns it off by default.

Obtained from:	OpenBSD


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233846 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make it possible to switch pfsync(4) deferral mechanism on/off.

Obtained from:	OpenBSD


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233847 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Document syncdev, syncpeer and defer keywords for
pfsync(4) interfaces.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233848 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Remove redundant call to pr_ctloutput from code that handles SO_SETFIB.
- Add a check for errors during copyin while here.

Reviewed by:	julian, bz
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233850 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
With pf 4.5 import the name of pfsync stats sysctl has changed, thus
'netstat -sp pfsync' got broken. Fix this.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233863 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix build on i386.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233870 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add descriptions after the 'device' line for several NICs to match the
existing style.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233872 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge from OpenBSD:
  revision 1.173
  date: 2011/11/09 12:36:03;  author: camield;  state: Exp;  lines: +11 -12
  State expire time is a baseline time ("last active") for expiry
  calculations, and does _not_ denote the time when to expire.  So
  it should never be added to (set into the future).

  Try to reconstruct it with an educated guess on state import and
  just set it to the current time on state updates.

  This fixes a problem on pfsync listeners where the expiry time
  could be double the expected value and cause a lot more states
  to linger.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233874 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a check for unsupported file flags to ufs_setattr().

Discussed with:	bde
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233875 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Do not include machine/atomic.h.  It is no longer necessary since r233768.
- Remove bogus "atomic" macros and a read-only variable from softc.

Reviewed by:	ambrisko


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233877 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Disable a specific Merlin hardware workaround which may cause hangs on some
PCIe controllers.

Obtained from:	Atheros / Linux


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233885 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Refine r233827; as it turns out, controllers with a device ID of 0x0059
can be upgraded to MegaRAID mode, in which case mfi(4) should attach to
these based on the sub-vendor and -device ID instead (not currently done).
Therefore, let mpt_pci_probe() return BUS_PROBE_LOW_PRIORITY.
While it, let mpt_pci_probe() return BUS_PROBE_DEFAULT instead of 0 in
the default case.

MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233886 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a threadid to the ah_decode API.

This adds the current thread ID to each logged register and mark entry,
allowing for easier debugging of concurrent/overlapping NIC operations.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233887 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Const'ify the device lookup-table.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Enable support for flow control.
  Tested by: yongari

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233888 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove a useless warning.  The mode information is unused for very long time
and this function may be used with VESA mode since r232069.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233892 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Disable INET6 support in modules when building the LINT-NOINET6 kernel.

Reviewed by:	bz
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233893 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Do not copy VESA state buffer if the VBE call has failed for any reason.
Do not unnecessarily clear the state buffer before calling the function.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233894 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Correctly handle AR_MoreAggr when assembling multi-descriptor final frames.

Linux ath9k doesn't have this issue as it doesn't try queuing multi-
descriptor frames to the hardware.

Before, I was only setting the first and last descriptor in the final
frame correctly - and that was done by accident. The first descriptor in
the last sub-frame was being correctly updated by ath_tx_setds_11n();
the last descriptor in the last sub-frame was being correctly updated
by ath_buf_set_rate(). But both of those are "incorrect".

The correct behaviour is:

* AR_IsAggr is set for all descriptors for all subframes in an aggregate.
* AR_MoreAggr is set for all descriptors for all non-final sub-frames
  in an aggregate.

Ie, all descriptors in the last sub-frame of an aggregate must have this
field set to 0.

I still need to do a couple of extra passes to ensure the pad delimiter
field is being correctly handled in all descriptors in the last sub-frame.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@233895 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Save and restore VGA display memory between suspend and resume.


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