Commit Graph

219058 Commits

Author SHA1 Message Date
Adrian Chadd
35bcfd1c70 [net80211] add VHT ioctl parameters and driver capabilities
* Add the VHT capability element to the driver capabilities so ifconfig
  can see if VHT is available
* Add ioctl plumbing for enabling/disabling VHT and each of the VHT
  widths.

Note: this DOES change the ABI (the driver caps ioctl struct size, sigh)
so this will require a recompile of at least ifconfig.
2017-01-07 01:59:39 +00:00
Adrian Chadd
36ea5759aa [lib80211] add VHT bands and channel flags.
This is preparation work for 11ac support.  The regulatory database
needs to know about VHT channel flags and 80MHz (and later 160MHz)
available channel bands.

Whilst here, add the 2GHz VHT band (which is a terrible, terrible vendor
extension that almost all vendors do) just in preparation, even though
I don't (yet) plan on supporting it.
2017-01-07 01:56:10 +00:00
Adrian Chadd
55c68c64a4 [net80211] add VHT IEs to scan elements.
In preparation for VHT station support, we need to store VHT IEs when
scanning so we can choose to upgrade to VHT.

This doesn't change the ABI - it just steals spare[] entries.
2017-01-07 01:54:32 +00:00
Adrian Chadd
6d0ef1b905 [net80211] add VHT node flag; parsed chanwidth.
The VHT operational element (VHTOPMODE) isn't a uint32_t - it's
the MCS sets, freq1/freq2 parameters and channel width.
So, store the channel width too in lieu of just storing the
IE struct.

This changes the VHT parameter layout in ieee80211_node but it
doesn't change ABI at all.
2017-01-07 01:53:27 +00:00
Adrian Chadd
02527029a5 [net80211] add FVHT flags for channel widths.
The 11n code uses these bits for both configuration /and/ controlling
the channel width on softmac chips - it uses it to find the widest
width for all VAPs (eg a HT20 vap and a HT40 vap) to know what to
configure the ic_curchan.

For fullmac devices it isn't /as/ important, as each virtual device
exposed by the firmware will likely have its own configuration and the
firmware figures out what to do to enable it.
2017-01-07 01:51:54 +00:00
Adrian Chadd
efda3f5684 [net80211] Remove duplicate VHTOPMODE configuration bits.
These came from Linux mac80211 headers and are configuration bits, not
VHTOPMODE field parameters.

Whilst here, add the field names for the VHTCAP bits.

Tested:

* ath10k, 11ac STA mode
2017-01-07 01:49:34 +00:00
Alan Somers
4e354796e9 Fix file descriptor leaks in cmp(1)
Also, add a few test cases

Reported by:	Coverity
CID:		271624 275338
Reviewed by:	ngie
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D9074
2017-01-07 00:59:06 +00:00
Dimitry Andric
05ea86b0c0 In tcpdump's print-tcp.c, avoid increasing alignment when taking the
addresses of members of struct ip, which is packed.  Since the pointers
are only used for memcmp'ing, they can be pointing to void instead.

Note that upstream has removed the src and dst variables, in the mean
time.

MFC after:	3 days
2017-01-07 00:17:01 +00:00
Navdeep Parhar
e4612db2cd Fix comment in t4_tom. No functional change.
MFC after:	3 days
2017-01-07 00:08:55 +00:00
John Baldwin
14da48cbe4 Set MORETOCOME for AIO write requests on a socket.
Add a MSG_MOREOTOCOME message flag. When this flag is set, sosend*
set PRUS_MOREOTOCOME when invoking the protocol send method. The aio
worker tasks for sending on a socket set this flag when there are
additional write jobs waiting on the socket buffer.

Reviewed by:	adrian
MFC after:	1 month
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D8955
2017-01-06 23:41:45 +00:00
John Baldwin
69b4d461be Enable /usr/lib32 for o32 binaries on mips64.
Build and install an o32 set of libraries on mips64 suitable for
running o32 binaries via COMPAT_FREEBSD32. Enable COMPAT_FREEBSD32 in
MALTA64.

Reviewed by:	jmallett, imp
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D9032
2017-01-06 23:30:54 +00:00
John Baldwin
452a310167 Set -m32 in MD LIB32CPUCFLAGS rather than MI LIB32CFLAGS.
Both amd64 and powerpc64 use -m32 to compile 32-bit binaries, but not
all platforms follow this convention.  Move the -m32 compile flag into
the per-architecture flags to accomodate other architectures.

Sponsored by:	DARPA / AFRL
2017-01-06 23:20:59 +00:00
Dimitry Andric
dc6e1047ce Link llvm-ar to llvm-ranlib, if WITH_CLANG_EXTRAS is enabled. When
invoked as llvm-ranlib, it can create an archive symbol table for
archives of objects compiled for LTO by an LLVM compiler.

Submitted by:	Dan McGregor <danismostlikely@gmail.com>
MFC after:	3 days
2017-01-06 23:05:29 +00:00
Dimitry Andric
dba092b109 After r311459, some ports can break, because a few of the newly added
prototypes in <tcpd.h> use FILE.  Pull in a minimal forward declaration
of FILE from <stdio.h> to minimize impact.  Sorry for the breakage.

Reported by:	Shawn Webb <shawn.webb@hardenedbsd.org>
X-MFC-With:	r311459
2017-01-06 21:40:30 +00:00
Enji Cooper
d60571b4a9 Regenerate src.conf(5) after r311548
MFC after:	1 week
2017-01-06 21:14:07 +00:00
Enji Cooper
62b042bedd Carry over r311520 to tools/build/options/WITHOUT_USB_GADGET_EXAMPLES
Discussed with:	wblock

r311520:

Fix src.conf(5) description of WITHOUT_USB_GADGET_EXAMPLES.

PR:		215831
Submitted by:	p5B2E9A8F@t-online.de
MFC after:	1 week
X-MFC with:	r311520
Sponsored by:	iXsystems
2017-01-06 21:08:19 +00:00
Mateusz Guzik
3b622fc857 tmpfs: perform a lockless check in tmpfs_itimes
Most of the time the status is 0 as the function is repeatedly
called from tmpfs_getattr.
2017-01-06 19:58:20 +00:00
Dimitry Andric
a94c074d6a Fix clang 4.0.0 warnings about taking the address of a packed member of
struct ip in ping(8):

sbin/ping/ping.c:1684:53: error: taking address of packed member
'ip_src' of class or structure 'ip' may result in an unaligned pointer
value [-Werror,-Waddress-of-packed-member]
        (void)printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_src.s_addr));
                                                           ^~~~~~~~~~~~~~~~~
sbin/ping/ping.c:1685:53: error: taking address of packed member
'ip_dst' of class or structure 'ip' may result in an unaligned pointer
value [-Werror,-Waddress-of-packed-member]
        (void)printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_dst.s_addr));
                                                           ^~~~~~~~~~~~~~~~~

MFC after:	3 days
2017-01-06 18:41:28 +00:00
Jung-uk Kim
172ae88fec Remove '-vd' option to make iasl(8) reproducible.
PR:		215421
2017-01-06 18:08:53 +00:00
Warren Block
5589c6def0 Show that the crunchgen configuration file name is not optional.
PR:		215087
Submitted by:	Iblis Lin <iblis@hs.ntnu.edu.tw>
MFC after:	1 week
Sponsored by:	iXsystems
2017-01-06 18:04:34 +00:00
Mateusz Guzik
31e73fd434 tmpfs: enabled MNTK_EXTENDED_SHARED
Discussed with:	kib
2017-01-06 18:01:46 +00:00
Konstantin Belousov
5dc1128656 Lock tmpfs node tn_status updates done under the shared vnode lock.
If tmpfs vnode is only shared locked, tn_status field still needs
updates to note the access time modification.  Use the same locking
scheme as for UFS, protect tn_status with the node interlock + shared
vnode lock.

Fix nearby style.

Noted and reviewed by:	mjg
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-06 17:43:36 +00:00
Konstantin Belousov
305b422966 Use vnode lock assertion expression, and upgrade it to assert the
required exclusive state of the vnode lock in tmpfs chflags, chmod,
chown, chsize, chtimes operations.

Fix nearby style.

Reviewed by:	mjg
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-06 17:32:44 +00:00
Konstantin Belousov
9a4d5dbbac Remove dead code.
Fifos overwrite file ops vector, and fifo VOP_KQFILTER is VOP_PANIC().

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-06 17:03:08 +00:00
Konstantin Belousov
1c32456953 Use type-independent formats for printing nlink_t and ino_t.
Extracted from:	ino64 work by gleb, mckusick
Discussed with:	mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-06 16:59:33 +00:00
Konstantin Belousov
6e89d383c7 Explicitely add "opt_compat.h" to kern_exec.c: fix powerpc LINT builds.
sys/ptrace.h includes sys/signal.h, which includes sys/_sigset.h.
Note that sys/_sigset.h only defines osigset_t if COMPAT_43 was defined.

Two lines later, sys/ptrace.h includes machine/reg.h, which in case of
powerpc, includes opt_compat.h.

After the include headers reordering in r311345, we have sys/ptrace.h
included before sys/sysproto.h.

If COMPAT_43 was requested in the kernel config, the result is that
sys/_sigset.h does not define osigset_t, but sys/sysproto.h sees
COMPAT_43 and uses osigset_t.

Fix this by explicitely including opt_compat.h to cover the whole
kern/kern_exec.c scope.

Sponsored by:	The FreeBSD Foundation
2017-01-06 16:56:24 +00:00
Warren Block
d1040cedef Fix src.conf(5) description of WITHOUT_USB_GADGET_EXAMPLES.
PR:		215831
Submitted by:	p5B2E9A8F@t-online.de
MFC after:	1 week
Sponsored by:	iXsystems
2017-01-06 16:43:45 +00:00
Kevin Lo
094fba962f Add new USB device ID. 2017-01-06 14:05:31 +00:00
Alexander Motin
1cfaa2aa41 Add some more mode page fields.
MFC after:	2 weeks
2017-01-06 13:12:56 +00:00
Enji Cooper
7a7c1b805c Add integration makefile for contrib/bsnmp/gensnmpdef
It's a whole lot less error prone than generating the file completely
by hand.

MFC after:	1 week
2017-01-06 10:15:17 +00:00
Enji Cooper
08235f2408 Remove unnecessary __unused attribute attached to ctx in op_begemot_mibII(..)
MFC after:	3 days
2017-01-06 07:57:45 +00:00
Xin LI
1456f0f968 MFV r311477: xz 5.2.3.
MFC after:	2 weeks
2017-01-06 07:54:53 +00:00
Xin LI
d069dc0688 Vendor import of xz-5.2.3 (trimmed). 2017-01-06 06:35:21 +00:00
Sepherosa Ziehau
cc5bb78be1 if: Defer the if_up until the ifnet.if_ioctl is called.
This ensures the interface is initialized by the interface driver
before it can be used by the rest of the system.

Reviewed by:	jhb, karels, gnn
MFC after:	3 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8905
2017-01-06 05:10:49 +00:00
Gleb Smirnoff
9565357905 Use getsock_cap() instead of fgetsock().
Reviewed by:	dchagin
2017-01-06 04:38:38 +00:00
Enji Cooper
4eb4663b0e Conditionalize all code that uses tcpd.h behind LIBWRAP guard
This will allow the code to stand by itself without libwrap

MFC after:	2 weeks
2017-01-06 04:27:07 +00:00
Enji Cooper
c02129e1cc Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into amd(8).

MFC after:	2 weeks
2017-01-06 04:22:25 +00:00
Enji Cooper
2486c641e7 Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into sendmail.

MFC after:	2 weeks
2017-01-06 04:16:03 +00:00
Enji Cooper
74410f9362 Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into rpcbind.

MFC after:	2 weeks
2017-01-06 04:13:08 +00:00
Enji Cooper
35c0323c64 Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into ypserv.

MFC after:	2 weeks
2017-01-06 04:10:33 +00:00
John Baldwin
9f0968c616 Add uintmax_t casts to silence printf format warnings.
The format strings weren't checked when stacksave_subr() used a function
pointer for printf instead of directly using db_printf().

Reported by:	kib
Sponsored by:	DARPA / AFRL
2017-01-06 00:41:30 +00:00
Alexander Kabaev
631f432b0d Remove redundant cache initialization in JZ4780 SMP startup code
This was done out of pure paranoia when hunting for bugs in cache
and is not really required.
2017-01-06 00:07:36 +00:00
Jung-uk Kim
284829482e Merge ACPICA 20161222. 2017-01-05 21:28:25 +00:00
Dimitry Andric
8da8161b26 Also remove unnecessary extern keywords from tcpd.h.
Noticed by:	kib
X-MFC-With:	r311459
2017-01-05 21:17:10 +00:00
Dimitry Andric
fd3e9b3896 Put proper prototypes in tcpd.h
Clang 4.0.0 complains about tcpd.h's not-really-prototypes, e.g.:

    /usr/include/tcpd.h:75:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
    extern int hosts_access();              /* access control */
                           ^

To fix this, turn these declarations into real prototypes.  While here,
garbage collect the incompatible rfc931() function from scaffold.c, as
it is never used.

Reviewed by:	emaste
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D9052
2017-01-05 20:44:45 +00:00
Alexander Kabaev
f20a27e327 Use compiler driver to link BERI boot loaders
Do not hardcode elf64-tradbigmips as output format in BERI linker scrips.
Unfortunately, in-tree toolchain and external newer versions of binutils
mean two different things under that. When creating elf binaries using
external toolchain, gcc uses elf64-tradbigmips-freebsd and so linker
script file has to match in order for ld to be able to create the final loader
binary.

Rather than trying to guess, remove hardcoded output format directive from
the linker directive files and use CC to invoke the linker instead.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D9050
2017-01-05 19:17:14 +00:00
Zbigniew Bodek
2833497cae Add DTS file for Armada 385 DB-AP board
Armada38x is already supported in the tree.
This commit adds support for DB-AP board.
File was taken from Linux v4.8 and accustomed to FreeBSD
in minimal possible way.

Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:	Semihalf
Sponsored by:	Stormshield
Differential revision: https://reviews.freebsd.org/D7327
2017-01-05 17:27:50 +00:00
Zbigniew Bodek
3471cb6e63 Add DTS file for Solidrun ClearFog board
ClearFog is equipped with Marvell Armada 388 SoC, which is already
supported in FreeBSD.

Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:	Semihalf
Sponsored by:	Stormshield
Differential revision: https://reviews.freebsd.org/D7326
2017-01-05 17:25:16 +00:00
Hiren Panchasara
b8a2fb91f6 sysctl net.inet.tcp.hostcache.list in a jail can see connections from other
jails and the host. This commit fixes it.

PR:		200361
Submitted by:	bz (original version), hiren (minor corrections)
Reported by:	Marcus Reid <marcus at blazingdot dot com>
Reviewed by:	bz, gnn
Tested by:	Lohith Bellad <lohithbsd at gmail dot com>
MFC after:	1 week
Sponsored by:	Limelight Networks (minor corrections)
2017-01-05 17:22:09 +00:00
Konstantin Belousov
2f304845e2 Do not allocate struct statfs on kernel stack.
Right now size of the structure is 472 bytes on amd64, which is
already large and stack allocations are indesirable.  With the ino64
work, MNAMELEN is increased to 1024, which will make it impossible to have
struct statfs on the stack.

Extracted from:	ino64 work by gleb
Discussed with:	mckusick
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-05 17:19:26 +00:00