freebsd.git
8 years agocp: Remove fts sorting.
jilles [Tue, 5 May 2015 13:23:03 +0000 (13:23 +0000)]
cp: Remove fts sorting.

In an attempt to improve performance, cp reordered directories first
(although the comment says directories last). This is not effective with new
UFS layout policies.

The sorting reorders multiple arguments passed to cp, which may be
undesirable.

Additionally, the comparison function does not induce a total order. Per
POSIX, this causes undefined behaviour in qsort().

NetBSD removed the sorting in 2009.

On filesystems that return directory entries in hash/btree order, sorting by
d_fileno before statting improves performance on large directories. However,
this can only be implemented in fts(3).

PR: 53475
Reviewed by: bde (in 2004)
MFC after: 1 week

8 years agoAdd "The Design and Implementation of the FreeBSD OS, 2nd Ed.".
osa [Tue, 5 May 2015 11:39:54 +0000 (11:39 +0000)]
Add "The Design and Implementation of the FreeBSD OS, 2nd Ed.".

8 years agoMove the point we attach the ofw driver on arm64 to nexus.c. This will
andrew [Tue, 5 May 2015 11:13:16 +0000 (11:13 +0000)]
Move the point we attach the ofw driver on arm64 to nexus.c. This will
allow us to have a single place to decide to use ofw or acpi.

8 years agoDocument DragonFly releases 4.0.2 - 4.0.5 and OpenBSD 5.7.
osa [Tue, 5 May 2015 11:12:20 +0000 (11:12 +0000)]
Document DragonFly releases 4.0.2 - 4.0.5 and OpenBSD 5.7.
Fix typo for NetBSD 6.1.5.

8 years agoAdd FDT to the list of known GUIDs.
andrew [Tue, 5 May 2015 11:07:43 +0000 (11:07 +0000)]
Add FDT to the list of known GUIDs.

8 years agozfs: do not hold an extra reference on a root vnode while a filesystem is mounted
avg [Tue, 5 May 2015 11:01:06 +0000 (11:01 +0000)]
zfs: do not hold an extra reference on a root vnode while a filesystem is mounted

At present zfs_domount() acquires a reference on the filesystem's root vnode
and that reference is kept until zfs_umount.
The latter calls vflush(rootrefs = 1) to dispose of the extra reference.

There is no explanation of why that reference is kept - what problem it
solves or what behavior it improves.
Also, that logic is FreeBSD specific.

There is one real problem with that reference, though.
zfs recv -F may receive a full, non-incremental stream to a mounted filesystem.
In that case the received root object is likely to have a different z_gen
attribute value. Because of that, zfs_rezget will leave the previous root znode
and vnode disassociated from the actual object (z_sa_hdl == NULL).
Thus, future calls to VFS_ROOT() -> zfs_root() will produce a new vnode-znode
pair, while the old one will be kept alive by the outstanding reference.
So, the outstanding reference will not actually be for the new root vnode
(or, more precisely, vnodes - because a root vnode may be recycled and a newer
one can be created).
As a result, when vflush(rootrefs = 1) s called there will be two problems:

- a leaked reference on the old root vnode preventing a graceful unmount
- insufficient references on the actual root vnode leading to a crash upon
  access to the vnode after it is destroyed by vgone() + vdrop()

The second issue will actually override the first one.

Differential Revision: https://reviews.freebsd.org/D2353
Reviewed by: delphij, kib, smh
MFC after: 17 days

8 years agoDisable the use of floating-point and vector registers in the loader. They
andrew [Tue, 5 May 2015 11:00:50 +0000 (11:00 +0000)]
Disable the use of floating-point and vector registers in the loader. They
need the vfp unit to be enabled which may not be the case.

8 years agodmu_recv_end_check: don't leak hold if dsl_destroy_snapshot_check_impl fails
avg [Tue, 5 May 2015 10:56:16 +0000 (10:56 +0000)]
dmu_recv_end_check: don't leak hold if dsl_destroy_snapshot_check_impl fails

The leak may happen if !drc_newfs && drc_force and there is an error
iterating through snapshots or any of snapshot checks fails.

See https://www.illumos.org/issues/5870
See https://reviews.csiden.org/r/206/

Reviewed by: mahrens (as mahrens@delphix.com)
MFC after: 15 days
Sponsored by: ClusterHQ

8 years agoFix major copy/paste and other style errors.
pluknet [Tue, 5 May 2015 10:44:17 +0000 (10:44 +0000)]
Fix major copy/paste and other style errors.

8 years agoCopy new attribute types when linking. bfd will copy attributes as needed,
andrew [Tue, 5 May 2015 10:35:29 +0000 (10:35 +0000)]
Copy new attribute types when linking. bfd will copy attributes as needed,
however it will fail to output them if the type is not set correctly. This
can happen when it finds an attribute it hasn't seen before, for example
when building shared objects it will use the attributes from crti.o, hwever
this file has no attributes set.

Differential Revision: https://reviews.freebsd.org/D2413
Reviewed by: imp

8 years agoWhen cross-building ${LIBSTAND} may be set to the host copy. Point to the
andrew [Tue, 5 May 2015 10:32:59 +0000 (10:32 +0000)]
When cross-building ${LIBSTAND} may be set to the host copy. Point to the
version built with the toolchain.

Differential Revision: https://reviews.freebsd.org/D2312
Submitted by: jhb

8 years agoAdd support for Sierra MC7354 card
garga [Tue, 5 May 2015 10:19:43 +0000 (10:19 +0000)]
Add support for Sierra MC7354 card

Author: Jeremy Porter <jporter@netgate.com>
Differential Revision: https://reviews.freebsd.org/D2444
Reviewed by: gnn, hselasky
MFC after: 1 week
Sponsored by: Netgate

8 years agoEnlarge the buffer for storing macros as some macros can be longer than 5
bapt [Tue, 5 May 2015 09:54:47 +0000 (09:54 +0000)]
Enlarge the buffer for storing macros as some macros can be longer than 5

8 years agoUpdate the list of known roff commands (adding the mdoc package)
bapt [Tue, 5 May 2015 09:50:21 +0000 (09:50 +0000)]
Update the list of known roff commands (adding the mdoc package)

Obtained from: NetBSD

8 years agoProperly assign open and close brackets and checks memory
bapt [Tue, 5 May 2015 09:33:32 +0000 (09:33 +0000)]
Properly assign open and close brackets and checks memory

Obtained from: NetBSD

8 years agoAdd apple-boot, apple-hfs and apple-ufs aliases to MBR scheme.
ae [Tue, 5 May 2015 09:33:02 +0000 (09:33 +0000)]
Add apple-boot, apple-hfs and apple-ufs aliases to MBR scheme.
Sort DOSPTYP_* entries in diskmbr.h by value.
Document these scheme-specific types in gpart(8).

MFC after: 1 week

8 years agoEnsure we read existing values of the stk table
bapt [Tue, 5 May 2015 09:29:32 +0000 (09:29 +0000)]
Ensure we read existing values of the stk table

Obtained from: NetBSD

8 years agoUse stdup(3) and check its return instead from homebrew version using strcpy(3)
bapt [Tue, 5 May 2015 09:26:32 +0000 (09:26 +0000)]
Use stdup(3) and check its return instead from homebrew version using strcpy(3)
and malloc(3)

Obtained from: NetBSD

8 years agocosmetic fixes
bapt [Tue, 5 May 2015 09:24:29 +0000 (09:24 +0000)]
cosmetic fixes

Obtained from: NetBSD

8 years agoApply seom style(9) fixes from NetBSD
bapt [Tue, 5 May 2015 09:01:42 +0000 (09:01 +0000)]
Apply seom style(9) fixes from NetBSD

Obtained from: NetBSD

8 years agoPrevent useless use of strdup(3)
bapt [Tue, 5 May 2015 08:25:25 +0000 (08:25 +0000)]
Prevent useless use of strdup(3)

Obtained from: NetBSD

8 years agoReplace homebrewed NIL by NULL
bapt [Tue, 5 May 2015 08:17:40 +0000 (08:17 +0000)]
Replace homebrewed NIL by NULL

8 years agoUse stdbool instead of homebrewed boolean
bapt [Tue, 5 May 2015 08:15:10 +0000 (08:15 +0000)]
Use stdbool instead of homebrewed boolean

8 years agoAnother function to ansify
bapt [Tue, 5 May 2015 07:52:41 +0000 (07:52 +0000)]
Another function to ansify

8 years agoRemove unused variables
bapt [Tue, 5 May 2015 07:51:57 +0000 (07:51 +0000)]
Remove unused variables

8 years agoExplicitly use O_RDONLY instead of 0
bapt [Tue, 5 May 2015 07:49:46 +0000 (07:49 +0000)]
Explicitly use O_RDONLY instead of 0

8 years agoUse strlcpy(3) instead of strcpy(3)
bapt [Tue, 5 May 2015 07:47:36 +0000 (07:47 +0000)]
Use strlcpy(3) instead of strcpy(3)

8 years agoupper the warning level to 3
bapt [Tue, 5 May 2015 07:42:40 +0000 (07:42 +0000)]
upper the warning level to 3

8 years agoAnother bit of ansification
bapt [Tue, 5 May 2015 07:42:10 +0000 (07:42 +0000)]
Another bit of ansification

8 years agoAnsify to allow to work on it later
bapt [Tue, 5 May 2015 07:33:38 +0000 (07:33 +0000)]
Ansify to allow to work on it later

8 years agoFix an error in r281551, part of the getfsstat() / kern_getfsstat()
peter [Tue, 5 May 2015 05:14:12 +0000 (05:14 +0000)]
Fix an error in r281551, part of the getfsstat() / kern_getfsstat()
rework.  The number of entries was supposed to be returned to the user,
not used as a scratch variable.

This broke RELENG_4 jails starting up on current systems.

8 years agoAdd some data found in TI's application note "SCPA035: PCI1510
imp [Tue, 5 May 2015 04:23:55 +0000 (04:23 +0000)]
Add some data found in TI's application note "SCPA035: PCI1510
Implementation Guide" about default values.

8 years agoWhen dealing with the TI12XX family of parts, we sometimes need to
imp [Tue, 5 May 2015 04:13:48 +0000 (04:13 +0000)]
When dealing with the TI12XX family of parts, we sometimes need to
initialize the MFUNC registers. Our old test of assuming that if this
register is set at all is not quite right. Many scenarios (including
the power-on defaults for chips w/o EEPROMs) land us in trouble. The
MFUNC0 pin should be set to signal #INTA and the MFUNC1 pin should be
set to signal #INTB of multi-socketed devices. Since my memory recalls
issues with blindly clearing the upper bytes of this register, perform
the heuristic only when both MFUNC0 and 1 are clear. We won't work
well using these pins for GPIO, and the serial interrupts won't save
us because we go out of our way to generally disable them. They are
needed to support legacy drivers for 16-bit PC Cards that are
hard-wired to specific IRQ values. Since FreeBSD never had any of
these, we configure the more reliable direct signaling. This was just
one small piece of that which had been left out back in the day.

8 years agoAdd a sanity check to the swap size in zfsboot of bsdinstall
allanjude [Tue, 5 May 2015 03:08:49 +0000 (03:08 +0000)]
Add a sanity check to the swap size in zfsboot of bsdinstall
Loop until the user enters a valid size (>100mb or 0)

Differential Revision: https://reviews.freebsd.org/D2299
Reported By: Shawn Webb
Reviewed by: roberto
Approved by: brd
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.

8 years agoNow that DMA works, enable the audio driver on RPi 2.
loos [Tue, 5 May 2015 01:45:38 +0000 (01:45 +0000)]
Now that DMA works, enable the audio driver on RPi 2.

8 years agoEnable DMA for sdhci on RPi 2 (BCM2836).
loos [Tue, 5 May 2015 00:27:55 +0000 (00:27 +0000)]
Enable DMA for sdhci on RPi 2 (BCM2836).

8 years agoFix DMA on RPi 2.
loos [Tue, 5 May 2015 00:19:04 +0000 (00:19 +0000)]
Fix DMA on RPi 2.

BCM2836 has a different base address for peripherals.

Obtained from: netbsd

8 years agoRemove limitation on input lines by using getline(3)
bapt [Mon, 4 May 2015 22:27:55 +0000 (22:27 +0000)]
Remove limitation on input lines by using getline(3)

8 years agoExtend the list of known nroff/troff commands
bapt [Mon, 4 May 2015 22:18:58 +0000 (22:18 +0000)]
Extend the list of known nroff/troff commands

Obtained from: heirloom doctools

8 years agoTake from heirloom's doctools version of checknr(1) some cosmetic fixes
bapt [Mon, 4 May 2015 22:05:12 +0000 (22:05 +0000)]
Take from heirloom's doctools version of checknr(1) some cosmetic fixes
This helps working on synchronising both tools

8 years agoRemove "capability mode sandbox enabled" messages.
brooks [Mon, 4 May 2015 21:44:51 +0000 (21:44 +0000)]
Remove "capability mode sandbox enabled" messages.

These messages serve little purpose and break some consumers.

PR: 199855
Differential Revision: https://reviews.freebsd.org/D2440
Reviewed by: rwatson
Approved by: pjd
MFC after: 1 week
Sponsored by: DARPA, AFRL

8 years agoRemove a debugging line that snuck in with r282419.
gjb [Mon, 4 May 2015 21:34:19 +0000 (21:34 +0000)]
Remove a debugging line that snuck in with r282419.

Pointyhat: gjb
MFC after: 3 days
X-MFC-With: r282419
Sponsored by: The FreeBSD Foundation

8 years agoMFV r225523, r282431:
gjb [Mon, 4 May 2015 21:07:20 +0000 (21:07 +0000)]
MFV r225523, r282431:
 r225523 (hrs):
  Import openresolv-3.4.4.

 r282431:
  Import openresolv-3.7.0.

PR: 199854
Submitted by: yuri@rawbw.com
MFC after: 1 week
Relnotes: yes
Sponsored by: The FreeBSD Foundation

8 years agoIn preparation for the next cycle of official ARM images, add ARM_NEW_PMAP
loos [Mon, 4 May 2015 20:59:23 +0000 (20:59 +0000)]
In preparation for the next cycle of official ARM images, add ARM_NEW_PMAP
to supported kernels.

This is a temporary solution and should be reverted when ARM_NEW_PMAP is
enabled by default.

8 years agoImport openresolv 3.7.0.
gjb [Mon, 4 May 2015 20:51:27 +0000 (20:51 +0000)]
Import openresolv 3.7.0.

PR: 199854
Obtained from: http://roy.marples.name/projects/openresolv
Sponsored by: The FreeBSD Foundation

8 years agoImplement a driver for the PowerPC-base RouterBoard (RB333/600/800/1100)
jhibbits [Mon, 4 May 2015 20:36:00 +0000 (20:36 +0000)]
Implement a driver for the PowerPC-base RouterBoard (RB333/600/800/1100)

Summary:
This has been tested on the RB800, but should work on the RB333, RB600, and
RB1100 as well.

It's currently missing ECC support, but read and write are complete.

Reviewers: imp

Reviewed By: imp

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D2223

8 years agoImplement in-order execution of non-NCQ commands.
mav [Mon, 4 May 2015 19:55:01 +0000 (19:55 +0000)]
Implement in-order execution of non-NCQ commands.

Using status updates in r282364, block queue on BSY, DRQ or ERR bits set.
This can be a performance penalization for non-NCQ commands, but it is
required for proper error recovery and standard compliance.

MFC after: 2 weeks

8 years agoFix arithmetical bug in vnode_pager_haspage(). The check against object size
glebius [Mon, 4 May 2015 18:49:25 +0000 (18:49 +0000)]
Fix arithmetical bug in vnode_pager_haspage().  The check against object size
should be done not with the number of pages in the first block, but with the
overall number of pages.  While here, add KASSERT that makes sure that BMAP
doesn't return completely irrelevant blocks.

Reviewed by: kib
Tested by: pho
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

8 years agoParse filename until first space then print the rest of the line after file
bapt [Mon, 4 May 2015 18:20:31 +0000 (18:20 +0000)]
Parse filename until first space then print the rest of the line after file
inclusion

This is the same behaviour of heirloom's soelim

8 years agoImplement a mechanism for making changes in the kernel<->driver PPS
ian [Mon, 4 May 2015 17:59:39 +0000 (17:59 +0000)]
Implement a mechanism for making changes in the kernel<->driver PPS
interface without breaking ABI or API compatibility with existing drivers.

The existing data structures used to communicate between the kernel and
driver portions of PPS processing contain no spare/padding fields and no
flags field or other straightforward mechanism for communicating changes
in the structures or behaviors of the code.  This makes it difficult to
MFC new features added to the PPS facility.  ABI compatibility is
important; out-of-tree drivers in module form are known to exist.  (Note
that the existing api_version field in the pps_params structure must
contain the value mandated by RFC 2783 and any RFCs that come along after.)

These changes introduce a pair of abi-version fields which are filled in
by the driver and the kernel respectively to indicate the interface
version.  The driver sets its version field before calling the new
pps_init_abi() function.  That lets the kernel know how much of the
pps_state structure is understood by the driver and it can avoid using
newer fields at the end of the structure that it knows about if the driver
is a lower version.  The kernel fills in its version field during the init
call, letting the driver know what features and data the kernel supports.

To implement the new version information in a way that is backwards
compatible with code from before these changes, the high bit of the
lightly-used 'kcmode' field is repurposed as a flag bit that indicates the
driver is aware of the abi versioning scheme.  Basically if this bit is
clear that indicates a "version 0" driver and if it is set the driver_abi
field indicates the version.

These changes also move the recently-added 'mtx' field of pps_state from
the middle to the end of the structure, and make the kernel code that uses
this field conditional on the driver being abi version 1 or higher.  It
changes the only driver currently supplying the mtx field, usb_serial, to
use pps_init_abi().

Reviewed by: hselasky@

8 years agoDo not remove libmap32.conf in make delete-old as it may remove user modified
bapt [Mon, 4 May 2015 17:01:51 +0000 (17:01 +0000)]
Do not remove libmap32.conf in make delete-old as it may remove user modified
version by mistake

8 years agoStyle fix
bapt [Mon, 4 May 2015 16:59:09 +0000 (16:59 +0000)]
Style fix

Reported by: bdrewery

8 years agoRemove now unneeded libmap32.conf
bapt [Mon, 4 May 2015 16:34:08 +0000 (16:34 +0000)]
Remove now unneeded libmap32.conf

8 years agoRework PRIVATELIB
bapt [Mon, 4 May 2015 16:28:54 +0000 (16:28 +0000)]
Rework PRIVATELIB

Now when a lib is marked as PRIVATELIB it is renamed into libprivate$foo instead
of being installed in /usr/lib/private and playing with rpath.

Also allow to install headers for PRIVATELIBS in that case the headers will be
installed in /usr/include/private/$foo

Keep the headers under a private namespace to prevent third party build system
to easily find them to ensure they are only used on purpose.

This allows for non base applications to statically link against a library in
base which is linked to a privatelib

Treating PRIVATELIBS as regular libraries allows to push them into our current
compatX packages if needed.

While here finish promotion of libevent as PRIVATELIB
Install header for bsdstat and libucl

Differential Revision: https://reviews.freebsd.org/D2365
Reviewed by: brooks, des
Discussed with: imp

8 years agoAdd logic to detect if the net/bsdec2-image-upload port needs
gjb [Mon, 4 May 2015 15:04:39 +0000 (15:04 +0000)]
Add logic to detect if the net/bsdec2-image-upload port needs
to be installed. [1]

For the cw-ec2-portinstall and ec2ami targets, touch the
.TARGET file after completion to prevent duplicate invocations.

Add cw-ec2-portinstall and ec2ami to CLEANFILES.

Submitted by: cperciva[1]
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

8 years agoOn an icache sync by address/len, round the length up if the operation spans
ian [Mon, 4 May 2015 14:55:21 +0000 (14:55 +0000)]
On an icache sync by address/len, round the length up if the operation spans
a cacheline boundary.

PR: 199740
Submitted by: Juergen Weiss <weiss@uni-mainz.de>

8 years agoVarious updates to the ftruncate(2) documentation:
jhb [Mon, 4 May 2015 14:47:00 +0000 (14:47 +0000)]
Various updates to the ftruncate(2) documentation:
- Note that ftruncate(2) can operate on shared memory objects and cross
  reference shm_open(2).
- Note that ftruncate(2) does not change the file position pointer (aka
  seek pointer) of the file descriptor.
- ftruncate(2) will fail with EINVAL for all sorts of other fd types than
  just sockets, so instead note that it fails for all but regular files and
  shared memory objects.
- Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2).
  (Or at least the manpage for both appeared in 4.2, I did not check the
  kernel code itself to see if either predated 4.2.)

PR: 199472 (2)
Submitted by: andrew@ugh.net.au (2)
MFC after: 1 week

8 years agoPartially revert r255486, the first argument to socketpair() is a socket
jhb [Mon, 4 May 2015 14:23:31 +0000 (14:23 +0000)]
Partially revert r255486, the first argument to socketpair() is a socket
domain, not a file descriptor.  Use 'domain' instead of the original 'd'
for this argument to match socket(2).

PR: 199491
Reported by: sp55aa@qq.com
MFC after: 1 week

8 years agoRestore CPU dependent compile time conditionals.
cy [Mon, 4 May 2015 12:42:52 +0000 (12:42 +0000)]
Restore CPU dependent compile time conditionals.

MFC after: 1 month (with r281143 and r282408)

9 years agoMFV ntp 4.2.8p2 (r281348)
cy [Mon, 4 May 2015 04:45:59 +0000 (04:45 +0000)]
MFV ntp 4.2.8p2 (r281348)

Reviewed by:    delphij (suggested MFC)
Approved by: roberto
Security:       CVE-2015-1798, CVE-2015-1799
Security:       VuXML ebd84c96-dd7e-11e4-854e-3c970e169bc2
MFC after: 1 month

9 years agoEmulate the 'CMP r/m8, imm8' instruction encountered when booting a Windows
neel [Mon, 4 May 2015 04:27:23 +0000 (04:27 +0000)]
Emulate the 'CMP r/m8, imm8' instruction encountered when booting a Windows
Vista guest.

Reported by: Leon Dang (ldang@nahannisys.com)
MFC after: 1 week

9 years agoFix string concatenation - "wlan_##name" -> "wlan_" #name
adrian [Mon, 4 May 2015 00:47:22 +0000 (00:47 +0000)]
Fix string concatenation - "wlan_##name" -> "wlan_" #name

PR: kern/197623
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoUse bssid validation for data frames only + add RUN -> RUN state transition
adrian [Mon, 4 May 2015 00:32:10 +0000 (00:32 +0000)]
Use bssid validation for data frames only + add RUN -> RUN state transition

However, IBSS merge will be performed only if a driver calls
ieee80211_ibss_merge(); so, this applicable to the ath(4) only.
Also, this should fix bug 167870.

PR: kern/199632
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoAdd node_clear_keyixmap() and use it in the ieee80211_free_node() / node_reclaim().
adrian [Mon, 4 May 2015 00:29:19 +0000 (00:29 +0000)]
Add node_clear_keyixmap() and use it in the ieee80211_free_node() / node_reclaim().

PR: kern/199672
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoFix the voltage and clock levels for cpufreq on RPi 2.
loos [Mon, 4 May 2015 00:01:35 +0000 (00:01 +0000)]
Fix the voltage and clock levels for cpufreq on RPi 2.

Submitted by: Daisuke Aoyama <aoyama@peach.ne.jp>

9 years ago[iwn] Do not filter control frames in monitor mode.
adrian [Sun, 3 May 2015 23:40:12 +0000 (23:40 +0000)]
[iwn] Do not filter control frames in monitor mode.

PR: kern/197143
Submitted by:  Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoHandle properly IBSS merges (works with patch from bug 199632).
adrian [Sun, 3 May 2015 23:39:44 +0000 (23:39 +0000)]
Handle properly IBSS merges (works with patch from bug 199632).

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoFix various powersave races + optimize tx/rx pointer update when powersave is off.
adrian [Sun, 3 May 2015 23:39:02 +0000 (23:39 +0000)]
Fix various powersave races + optimize tx/rx pointer update when powersave is off.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years ago[iwn?] Use correct sequence numbers with non-QoS STAs.
adrian [Sun, 3 May 2015 23:38:32 +0000 (23:38 +0000)]
[iwn?] Use correct sequence numbers with non-QoS STAs.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoFix warning about comparison of integers of different signs.
adrian [Sun, 3 May 2015 23:37:13 +0000 (23:37 +0000)]
Fix warning about comparison of integers of different signs.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years ago[iwn?] Fix memory leak in wpi_reset_tx_ring().
adrian [Sun, 3 May 2015 23:36:25 +0000 (23:36 +0000)]
[iwn?] Fix memory leak in wpi_reset_tx_ring().

PR: kern/197143
Differential Revision: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoUse nitems() for counting elements in arrays.
adrian [Sun, 3 May 2015 23:35:44 +0000 (23:35 +0000)]
Use nitems() for counting elements in arrays.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoDo not include WPI_START_SCAN event processing into non-debug builds.
adrian [Sun, 3 May 2015 23:35:11 +0000 (23:35 +0000)]
Do not include WPI_START_SCAN event processing into non-debug builds.

PR: kern/197143
Submitted by:  Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoFix sequence number generation for beacon frames.
adrian [Sun, 3 May 2015 23:34:24 +0000 (23:34 +0000)]
Fix sequence number generation for beacon frames.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoAdd debug output for WPI_BEACON_SENT event.
adrian [Sun, 3 May 2015 23:30:04 +0000 (23:30 +0000)]
Add debug output for WPI_BEACON_SENT event.

PR: kern/197143
Submitted by:  Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoTry to fix passive scanning hang on beacon miss.
adrian [Sun, 3 May 2015 23:28:54 +0000 (23:28 +0000)]
Try to fix passive scanning hang on beacon miss.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoAdd comment about AUTH -> AUTH state transition + fix some style issues.
adrian [Sun, 3 May 2015 23:27:36 +0000 (23:27 +0000)]
Add comment about AUTH -> AUTH state transition + fix some style issues.

PR: kern/197143
Submitted by:  Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoDisplay more information for beacon miss debugging.
adrian [Sun, 3 May 2015 23:25:33 +0000 (23:25 +0000)]
Display more information for beacon miss debugging.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoLimit minimum threshold of missed beacons.
adrian [Sun, 3 May 2015 23:24:20 +0000 (23:24 +0000)]
Limit minimum threshold of missed beacons.

PR: kern/197143
Submitted by:  Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoImprove beacon miss detection.
adrian [Sun, 3 May 2015 23:21:16 +0000 (23:21 +0000)]
Improve beacon miss detection.

PR: kern/197143
Submitted by:  Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoCreate another debug category for WPI_BEACON_MISSED notification.
adrian [Sun, 3 May 2015 23:18:28 +0000 (23:18 +0000)]
Create another debug category for WPI_BEACON_MISSED notification.

Differential Revision: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoUnbreak scanning after RUN -> SCAN state transition.
adrian [Sun, 3 May 2015 23:09:47 +0000 (23:09 +0000)]
Unbreak scanning after RUN -> SCAN state transition.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoCheck channels which are passed in IBSS mode.
adrian [Sun, 3 May 2015 23:08:25 +0000 (23:08 +0000)]
Check channels which are passed in IBSS mode.

PR: kern/197143
Submitted by:  Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoDo not disable beacon notifications (unbreaks scanning on passive channels).
adrian [Sun, 3 May 2015 23:06:19 +0000 (23:06 +0000)]
Do not disable beacon notifications (unbreaks scanning on passive channels).

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoFix pause scan time calculation (the remainder must be less than beacon interval).
adrian [Sun, 3 May 2015 23:03:06 +0000 (23:03 +0000)]
Fix pause scan time calculation (the remainder must be less than beacon interval).

PR: kern/197143
Submitted by:  Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoFix active/passive dwell calculation.
adrian [Sun, 3 May 2015 22:56:36 +0000 (22:56 +0000)]
Fix active/passive dwell calculation.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoTurn off led when leaving RUN state.
adrian [Sun, 3 May 2015 22:55:06 +0000 (22:55 +0000)]
Turn off led when leaving RUN state.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoFor eabi 5 (what FreeBSD uses), be sure to tag all executables and
imp [Sun, 3 May 2015 22:51:42 +0000 (22:51 +0000)]
For eabi 5 (what FreeBSD uses), be sure to tag all executables and
shared libraries as either SOFT or HARD float to comply with the EABI
standard.

Differential Revision: https://reviews.freebsd.org/D2401

9 years agoWhen merging the floating point type attribute, and reporting an error
imp [Sun, 3 May 2015 22:51:29 +0000 (22:51 +0000)]
When merging the floating point type attribute, and reporting an error
when things don't match, report which file has them and which one
doesn't correctly.

Differential Revision: https://reviews.freebsd.org/D2400

9 years agoAdd TX status codes (obtained from iwlegacy)
adrian [Sun, 3 May 2015 22:49:47 +0000 (22:49 +0000)]
Add TX status codes (obtained from iwlegacy)

PR: kern/197143
Differential Revision: Andriy Voskoboinyk <s3erios@gmail.com>
Obtained from: Linux drivers/net/wireless/iwlegacy

9 years agoMove radiooff_task to the internal taskqueue.
adrian [Sun, 3 May 2015 22:47:06 +0000 (22:47 +0000)]
Move radiooff_task to the internal taskqueue.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoUse another workaround for scanning.
adrian [Sun, 3 May 2015 22:43:45 +0000 (22:43 +0000)]
Use another workaround for scanning.

PR: kern/197143
Submitted by:  Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoAdd wpi_check_bss_filter()
adrian [Sun, 3 May 2015 22:34:32 +0000 (22:34 +0000)]
Add wpi_check_bss_filter()

PR: kern/197143
Submitted by:  Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoFix KASSERT statements in if_wpi_debug.h
adrian [Sun, 3 May 2015 22:32:45 +0000 (22:32 +0000)]
Fix KASSERT statements in if_wpi_debug.h

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoRemove workaround for bug 199676.
adrian [Sun, 3 May 2015 22:30:11 +0000 (22:30 +0000)]
Remove workaround for bug 199676.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoRemove old iv_bss entry from the node table
adrian [Sun, 3 May 2015 22:28:42 +0000 (22:28 +0000)]
Remove old iv_bss entry from the node table

This may happen on RUN -> SCAN -> RUN -> SCAN state transition:

1. RUN -> SCAN: in ieee80211_sta_join1(): iv_bss will be moved to obss,
   refcnt will be reduced by 2 (default minimum).

Now, if old iv_bss have some extra references (for example, from
unacknowledged probe responses), it will not be freed and will stay
in the node table.

2. SCAN -> RUN.

3. If old iv_bss will not be deleted by the time when the next RUN -> SCAN
   state transition occurs, then sta_leave() will reduce it's reference
   counter once more. As a result, two last users will free it -> this will
   lead to kernel panic.

In this patch old iv_bss entry is explicitly removed from the node table in
ieee80211_sta_join1() (as a result, it will not be processed by sta_leave()).

PR: kern/199676
Differential Revision: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoAdd a few local variables to improve readability.
adrian [Sun, 3 May 2015 22:13:55 +0000 (22:13 +0000)]
Add a few local variables to improve readability.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoRemove this; it's currently a no-op.
adrian [Sun, 3 May 2015 22:10:28 +0000 (22:10 +0000)]
Remove this; it's currently a no-op.

History note: it's good to document what the driver expects like this even
if it's currently a no-op.

Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoRetry twice at the same rate.
adrian [Sun, 3 May 2015 20:56:33 +0000 (20:56 +0000)]
Retry twice at the same rate.

Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoImplement basic PxTFD.STS.BSY reporting.
mav [Sun, 3 May 2015 07:43:58 +0000 (07:43 +0000)]
Implement basic PxTFD.STS.BSY reporting.

MFC after: 2 weeks