Robert Watson
d2925cccc1
Introduce a cap_ioctl_t used for the 'cmds' arguments to cap_ioctls_limit()
...
and cap_ioctls_get(). On FreeBSD, these are 'unsigned long', but on Linux,
ioctl(2) takes an 'int', making mild abstraction desirable.
MFC after: 3 days
Sponsored by: Google, Inc.
2015-03-16 17:42:53 +00:00
Nathan Whitehorn
ad7ea69dce
Convert PTE eviction lock from an RW lock to a RM lock. It is held for
...
writing approximately never (< 0.00000001% under heavy VM load, and it can
go for months without ever being acquired in normal operation). This
provides a 10% (2-minute) improvement in wall clock time for make -j32
buildworld on a 4-core 32-thread POWER8.
2015-03-16 16:29:33 +00:00
John Baldwin
b12c0a9eeb
Move special DDP handling for closing a connection into a new
...
handle_ddp_close() function in t4_ddp.c as the logic is similar
to handle_ddp_data(). This allows all knowledge of the special
DDP mbufs to be private to t4_ddp.c as well.
2015-03-16 15:56:06 +00:00
Gleb Smirnoff
41c895a888
Provide a comment explaining r279688.
...
Suggested by: alc
2015-03-16 14:24:47 +00:00
Alexander Motin
c077e6287f
Report ARAT (APIC-Timer-always-running) feature for virtual CPU.
...
This makes FreeBSD guest to not avoid using LAPIC timer, preferring HPET
due to worries about non-existing for virtual CPUs deep sleep states.
Benchmarks of usleep(1) on guest and host show such extra latencies:
- 51us for virtual HPET,
- 22us for virtual LAPIC timer,
- 22us for host HPET and
- 3us for host LAPIC timer.
MFC after: 2 weeks
2015-03-16 11:57:03 +00:00
Mark Johnston
97f2f66479
Remove unused upstream DTrace provider implementations that are duplicates
...
of providers under sys/cddl/dev/. Also remove sdt_subr.c, which isn't used
in FreeBSD's SDT implementation.
Suggested by: rwatson
2015-03-16 01:15:08 +00:00
Mateusz Guzik
fbe503d462
proc: get rid of proc lock + unlock pair in proc_reap
...
A comment in the code stated we PROC_LOCK and as a side effect guarantee
all writers released process lock. But at that point such lock was already
taken while we were removing the process from all lists, so it should be already
unreachable.
2015-03-16 01:09:49 +00:00
Mateusz Guzik
daf63fd2f9
cred: add proc_set_cred helper
...
The goal here is to provide one place altering process credentials.
This eases debugging and opens up posibilities to do additional work when such
an action is performed.
2015-03-16 00:10:03 +00:00
Konstantin Belousov
69a2ec4a19
Fix build with clang 3.6, silence -Wcast-qual warning.
...
Sponsored by: The FreeBSD Foundation
Acked by: adrian
2015-03-15 23:05:36 +00:00
Adrian Chadd
943571a7c3
Use ar71xx_mac_addr_random_init() instead of a hand-rolled random
...
MAC address.
2015-03-15 21:56:41 +00:00
Adrian Chadd
3bd3e39e1a
Start fleshing out some MAC address helper functions.
...
A lot of these embedded boards don't have a unique MAC address per
device stored somewhere unique - sometimes they'll have one MAC
for both arge NICs; someties they'll have one MAC for both arge NICs
/and/ the ath NICs. In these instances, we need to derive device
specific MAC addresses from the base MAC address.
These functions will be used by some follow-up code that'll slot
into if_arge and if_ath.
2015-03-15 21:56:12 +00:00
Mateusz Guzik
eb0b6ba016
audit: fix cred assignment when A_SETPMASK is used
...
The code used to modify curproc instead of the target process.
Discussed with: rwatson
MFC after: 3 days
2015-03-15 21:43:43 +00:00
Adrian Chadd
e2ad437112
Add a new taskqueue (device specific, not net80211 ic->tq); use it for
...
device restart.
(Committers note - once scan overhaul and a few other things have been
fixed in net80211 to not block things in the taskqueue, this can disappear
and the device specific taskqueues in other drivers can also go away.)
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:32:11 +00:00
Adrian Chadd
a5403e3157
Workaround delays caused by vmem_check().
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:30:20 +00:00
Adrian Chadd
2e79e29307
Fix scan timeouts with powersave enabled.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:29:36 +00:00
Adrian Chadd
fd06b53774
Don't unlock mutex in interrupt thread (except for wpi_rx_done() - for now) -
...
fixes various races between wpi_notif_intr() and wpi_stop_locked().
(attachment 154381)
Committers note: yes, unlock/if_input/lock has to go away, but that'll
have to be done later.
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:29:18 +00:00
Adrian Chadd
062c813943
Reformatting changes.
...
(attachment 154380)
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:27:50 +00:00
Adrian Chadd
b52207dbd2
Use correct types
...
(attachment 154379)
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:27:03 +00:00
Adrian Chadd
5effcbfd6c
Add another lock for the TX path.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:26:22 +00:00
Adrian Chadd
fc5870b418
Add an extra mutex for qfullmsk / ring->queued variables.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:25:06 +00:00
Adrian Chadd
a6b6ca52c6
Regroup ring state checks in wpi_tx_done().
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:24:11 +00:00
Adrian Chadd
84ad7b3667
Don't use sc->qfullmsk in wpi_start().
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:23:45 +00:00
Adrian Chadd
d74e544a1d
turn sc_tx_timeout into its own callout, rather than a global watchdog
...
timer.
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:22:03 +00:00
Adrian Chadd
446685e49c
Add mutex for RXON structure; convert some callouts/lock use to use
...
RXON rather than the global WPI lock.
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:20:58 +00:00
Adrian Chadd
9e7aab73cd
Use WPI_FILTER_BSS for checking current state.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:19:52 +00:00
Adrian Chadd
0bc39fc6f8
Split TX and scan timeouts; use a callout now for the scan timeout.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:19:15 +00:00
Adrian Chadd
726ddc2648
Add experimental HOSTAP support.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:18:18 +00:00
Adrian Chadd
8483c8c339
Merge wpi_start() and wpi_start_locked().
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:17:58 +00:00
Adrian Chadd
7d4ee533d4
Minor optimisation in wpi_limit_dwell()
...
PR: kenr/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:17:03 +00:00
Adrian Chadd
cfe9b1ceb2
Rearrange checks in wpi_send_rxon().
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:12:57 +00:00
Adrian Chadd
cec45f0495
Fix some printfs(); add some debugging.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:12:05 +00:00
Adrian Chadd
39060fa992
Add more KASSERTs.
...
(Committer note: these checks will have to be re-established in a future
commit as /well/ as having the KASSERTs.)
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:11:00 +00:00
Adrian Chadd
0b90e84501
Disable powersave in IBSS mode (packet loss > 90%.)
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:09:29 +00:00
Adrian Chadd
e49a7038fc
Do some cleanup before device startup.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:08:54 +00:00
Adrian Chadd
b9858d864a
Acquire ifq lock when checking / modifying IFF_DRV_OACTIVE flag.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:08:24 +00:00
Adrian Chadd
77cf0b82c2
Merge wpi_init() and wpi_init_locked().
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:07:43 +00:00
Adrian Chadd
5ca7739522
Refactor wpi_ioctl().
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:06:36 +00:00
Adrian Chadd
0528191a1a
Add WPI_DEBUG_NODE + some debugging.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:05:59 +00:00
Adrian Chadd
a6df6cfe65
* Add new debug category
...
* Refactor out / restructure / extend debugging information
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:04:55 +00:00
Adrian Chadd
32e4f2f7e9
Remove unrelated comment.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:03:48 +00:00
Adrian Chadd
419435b847
Remove unnecessary assignment.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:02:59 +00:00
Alexander Motin
61cefb9bcf
Hide virtio features negotiation messages under bootverbose.
...
Those messages are noisy, but useless for average user.
MFC after: 2 weeks
2015-03-15 21:00:10 +00:00
Adrian Chadd
7b52621191
Remove unnecessary debug output.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:55:23 +00:00
Adrian Chadd
d29fcfb7c3
Add support for AES-CCMP group keys.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:54:40 +00:00
Adrian Chadd
735c606726
Encrypt frame if IEEE80211_BPF_CRYPTO is set.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:54:10 +00:00
Adrian Chadd
b56fed3da0
Use separate mutex for wv_bcbuf and wv_boff structures.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:53:46 +00:00
Adrian Chadd
d036bb20e3
Add prefixes to field names.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:52:47 +00:00
Adrian Chadd
6f8421f8a5
Use ieee80211_beacon_update() for dynamic beacon contents.
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:51:56 +00:00
Adrian Chadd
21f6580ed8
Move beacon initialisation to wpi_init_beacon()
...
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:51:06 +00:00
Adrian Chadd
565248e2ad
Use a static buffer in wpi_cmd - rather than alloc/free'ing the
...
beacon buffer frequently.
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:50:23 +00:00