Commit Graph

106166 Commits

Author SHA1 Message Date
Warner Losh
d635a37ffa Mark swap_pager_putpages static at its definition. It was already
static at its declaration. Remove needless swapdev_strategy forward
declaration.

MFC After: 3 days
2015-10-05 21:29:17 +00:00
Ruslan Bukin
31239b7219 Attach interrupt controller device before other devices.
Sponsored by:	University of Cambridge
2015-10-05 13:15:21 +00:00
Mark Murray
dcabe03158 Fix printf-like formats for KASSERT.
Submitted by:	jenkins
Approved by:	so (/dev/random blanket)
2015-10-05 10:45:52 +00:00
Mark Murray
0a9565c86e It appears that under some circumstances, like virtualisiation, the
'rdrand' instruction may occasionally not return random numbers, in
spite of looping attempts to do so. The reusult is a KASSERT/panic.

Reluctantly accept this state-of-affairs, but make a noise about it.
if this 'noise' spams the console, it may be time to discontinue
using that source.

This is written in a general way to account for /any/ source that
might not supply random numbers when required.

Submitted by:	jkh (report and slightly different fix)
Approved by:	so (/dev/random blanket)
2015-10-05 07:41:12 +00:00
Kevin Lo
8aabf601d1 Remove the unnecessary cast. 2015-10-05 05:24:16 +00:00
Sean Bruno
2bfaedae36 Set correct argemdio addr, comment out arge1 as its not physically
connected to anything.  Move a couple of devices out of the kernel
and into modules.
2015-10-04 22:50:37 +00:00
Andrew Turner
8bdcc09641 When trying to execute from a misaligned address raise a SIGBUS with the
invalid address alignment code.

Obtained from:	EuroBSDCon
Sponsored by:	ABT Systems Ltd
2015-10-04 21:16:45 +00:00
Alexander V. Chernikov
ab415c8307 Invoke lle_event for new entry iff it has lladdr set. 2015-10-04 19:10:27 +00:00
Kevin Lo
78f32e980c Replace M_NOWAIT with M_WAITOK for consistency with other wireless drivers. 2015-10-04 13:40:22 +00:00
Kevin Lo
24c838f059 Fix max TX power settings for RT5390/RT5392.
While here remove wrong definition of RT2860_USB_PHY_MAN_RST.
2015-10-04 13:39:00 +00:00
Konstantin Belousov
b86860001b When asserting IL bit in exception syndrome register, print the raw
register value.

Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
2015-10-04 12:52:30 +00:00
Alexander V. Chernikov
7503e0c783 Simplify if (lladdr) condition in nd6_cache_lladdr():
For case (7) (new entry) nothing has to be done except lle_event.
  Invoke this event directly from "create new lle" code block.
  For case (4) (existing entry, same mac) useless mac update was performed,
  along with LLENTRY_RESOLVED lle_event. There was no sense in doing that,
  since nothing really had changed. Simply avoid this condition instead.
  Given that, condition was simplified to (3),(5) states which can be merged
  with previous block.
2015-10-04 12:42:07 +00:00
Robert Watson
ba2f5f5ed3 Add missing stack unwind information to several assembly functions on
ARMv6/7:

- Define _SAVE() macro to allow unwind data to be conditionally defined for
  ARM assembly code in the kernel.

- Use _SAVE() to provide unwind information for bcopy_page(), and two (of
  many) instances of copyin() and copyout().

Reviewed by:	andrew, imp
MFC after:	3 days
Sponsored by:	University of Cambridge
2015-10-04 09:39:40 +00:00
Alexander V. Chernikov
9b420b3da4 Eliminate nd6_llinfo_settimer(). All consumers were converted to
use nd6_llinfo_settimer_locked() in r216022.
Make nd6_llinfo_settimer_locked() static: last external consumer was
converted in r288124.
2015-10-04 08:33:16 +00:00
Alexander V. Chernikov
c0b8aeae2d Add __noinline attribute to several functions to ease dtrace instrumentation 2015-10-04 08:21:15 +00:00
Marcelo Araujo
973532fc7d Remove per complete the fec aggregation protocol.
The remove began with revision r271733.

NOTE: This patch must never be merge to 10-Stable

Reviewed by:	glebius
Approved by:	bapt (mentor)
Relnotes:	Yes
Sponsored by:	EuroBSDCon Sweden.
Differential Revision:	D3786
2015-10-04 08:00:29 +00:00
Adrian Chadd
280bcab3d0 drm2: a few minor fixes after r280183
* Remove obsolete drm_agp_*_memory() prototypes.
* Fix comment in drm_fops.c (outisde -> outside).
* Fix some formatting issues in drm_stub.c (spaces -> tabs).
* Add missing case statement (gen == 3) in intel_gpu_reset().
* Restore pci_enable_busmaster() call in the init path (fixes gpu hang on i945GM).
* Replace M_WAITOK with M_NOWAIT when the return value of malloc is checked (may be incorrect).

Submitted by:	<s3erios@gmail.com>
Reviewed by:	dumbbell
Approved by:	dumbbell
Differential Revision:	https://reviews.freebsd.org/D3413
2015-10-04 07:45:36 +00:00
Alexander V. Chernikov
06a60e4bb0 Fix condition for nd6_llinfo_getholdsrc() introduced in r287484.
Effectively it always returned NULL so SAS was always performed and
  sometimes the result might have been different.

Fix state machine change accidentally introduced in r287985:
  state (4) inside nd6_cache_lladdr() (existing entry got nd message
  with the same lladdress) started to cause lle state transition to STALE
  instead of no-action.
2015-10-04 07:02:17 +00:00
Adrian Chadd
2e83cb98f6 Fix run(4) mbuf queue flushing / freeing.
Ensure things are freed during interface stop, or start may end up never
being able to transmit a full queue.
2015-10-04 05:22:17 +00:00
Adrian Chadd
327459808e Random zyd(4) fixes to bring TX handling in line with rsu, etc
* don't free buffers in the TX routine, only in transmit/raw_xmit
* free nodes + references
* .. and free those nodes/references /before/ net80211 detach

Tested:

* STA mode: zyd0: HMAC ZD1211B, FW 47.25, RF AL2230 S0, PA0 LED 0 BE0 NP1 Gain1 F0
2015-10-04 04:44:06 +00:00
Adrian Chadd
7682e59709 Fix to make compile on gcc-4.2.1 (eg mips, sparc64.) 2015-10-04 04:29:44 +00:00
Adrian Chadd
5f28dd731d Fix to compile using gcc-4.2 (eg mips, sparc64.) 2015-10-04 04:25:56 +00:00
Adrian Chadd
fa46d9db82 net80211: reduce code duplication in the ieee80211_ioctl_setwmeparam() + fix comments.
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3701
2015-10-03 22:38:08 +00:00
Adrian Chadd
1354b52cfc rum(4): add WME support.
Tested:

* WUSB54GC, HOSTAP and STA modes.
* Me: rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3700
2015-10-03 22:35:37 +00:00
Adrian Chadd
13072f8d84 run(4): fix WME support (untested).
Now run(4) fetches parameters from ic->ic_wme.wme_params array, which is never initialized
(and can be safely removed). This patch replaces &ic->ic_wme.wme_params with
&ic->ic_wme.wme_chanParams.cap_wmeParams (contains parameters for local station;
used by other drivers with WME support).

Tested:

* me: STA: run0: MAC/BBP RT5390 (rev 0x0502), RF RT5370 (MIMO 1T1R), address 38:83:45:11:78:ae
2015-10-03 22:33:45 +00:00
Mark Johnston
403ec61cbb Revert r288628 and instead fix a discrepancy between the posix_fadvise(2)
man page and POSIX: posix_fadvise(2) returns an error number on failure.

Reported by:	jilles
MFC after:	1 week
2015-10-03 22:27:14 +00:00
Adrian Chadd
f4ac78a284 rum(4): fix stats interpretation in rum_ratectl_task()
Testing:

* WUSB54GC, STA mode

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3690
2015-10-03 22:26:59 +00:00
Adrian Chadd
342ced03e2 rum(4): set short/long retry limits
Now device will use retry limit, which is set via 'ifconfig <interface>
maxretry <number>'.

Tested:

* Tested on WUSB54GC, STA mode.

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3689
2015-10-03 22:22:26 +00:00
Adrian Chadd
c42e124eca rum(4): fix sequence number generation.
* drop erroneous RT2573_TX_MORE_FRAG flag;
* provide RT2573_TX_HWSEQ where needed.

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3672
2015-10-03 22:15:59 +00:00
Adrian Chadd
210ab3c258 net80211: drop ieee80211_beacon_offsets parameter from ieee80211_beacon_alloc() and ieee80211_beacon_update()
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3659
2015-10-03 22:12:25 +00:00
Adrian Chadd
bc813c40bf net80211: drop redundant 3rd parameter from iv_key_set().
The MAC can be fetched from the key struct.

I added the ndis updates to make it compile.

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3657
2015-10-03 21:48:27 +00:00
Adrian Chadd
ed5711a11b rum(4): drop unused 'node id' parameter.
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3655
2015-10-03 20:53:10 +00:00
Adrian Chadd
2cb9ef8d38 rum(4): add support for hardware encryption (WEP, TKIP and CCMP).
This diff includes:

* Transmitter Addresses, Keys and TKIP MIC addition to the Security Key Table.
* Proper SEC Control Registers initialization and maintenance.
* Additional flags and values in TX descriptor, which are required for encryption support.
* Error checking in RX path.

Tested:

* Tested on WUSB54GC, STA (WEP, TKIP, CCMP), HOSTAP (CCMP) and IBSS (CCMP, WPA-None) modes.
* rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, STA mode (CCMP+TKIP)

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3640
2015-10-03 20:49:08 +00:00
Adrian Chadd
0e3b4c60e4 rum(4): implement iv_update_beacon call (fixes client power save support).
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3632
2015-10-03 20:45:43 +00:00
Adrian Chadd
a19dbd8d6f rum(4): attach rum_update_slot to ic_updateslot.
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3631
2015-10-03 20:44:16 +00:00
Mark Johnston
a7713f7631 The return value of posix_fadvise(2) is just an error status, so
sys_posix_fadvise() should simply return the errno (or 0) to syscallenter()
rather than setting a return value.

MFC after:	1 week
2015-10-03 19:37:41 +00:00
Alan Cox
bc7275964c Reduce the scope of a variable to the only file where it is used. 2015-10-03 19:27:52 +00:00
Adrian Chadd
b780f86455 rum(4): split rum_prepare_beacon() into 'alloc' and 'set' stages
Note: I manually had to merge this; I merged in the "put beacon_offsets
into vap" commit before this.

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3628
2015-10-03 17:49:11 +00:00
Adrian Chadd
50a31b4887 rum(4): add support for AHDEMO mode.
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3627
2015-10-03 17:34:11 +00:00
Adrian Chadd
42769826d3 rum(4): simplify rum_set_bssid(), rum_set_macaddr() and rum_update_promisc()
Tested:

* rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, STA mode

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3626
2015-10-03 17:30:57 +00:00
Adrian Chadd
1ba67b1130 rum(4): do not corrupt MAC address
Don't override the NIC MAC address with an overridden MAC address for
a VAP.

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3625
2015-10-03 17:18:35 +00:00
Adrian Chadd
aa81f85365 rum(4): add error handling for rum_enable_tsf_sync() and rum_prepare_beacon()
Tested:

* rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, STA mode
  Note: haven't tested AP mode yet; will do once the rest of the
  AP mode / power save commits are in.

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3624
2015-10-03 17:11:21 +00:00
Alan Cox
acada7aef0 Perform a single batched update to the object's paging-in-progress count
rather than updating it for each page.
2015-10-03 17:04:52 +00:00
Adrian Chadd
6095f7cad3 rum(4): move some code from rum_init() into separate function.
Tested:

* rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, STA mode

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3623
2015-10-03 16:37:38 +00:00
Adrian Chadd
0698c0b3d1 rum(4): add error handling in initialization path
Tested:

* Tested on WUSB54GC, STA mode.
* rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, STA mode

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3622
2015-10-03 16:21:06 +00:00
Adrian Chadd
b2a76342fd rum(4): simplify error handling rum_raw_xmit()
Move the mbuf free responsibility to the caller of the hardware xmit
function, not the hardware xmit function itself.

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3621
2015-10-03 15:58:00 +00:00
Adrian Chadd
aca2cf3032 rum(4): check mbuf size before accessing its contents
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3610
2015-10-03 15:52:58 +00:00
Adrian Chadd
a6ccd477ac rum(4): add TSF field into radiotap headers
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3607
2015-10-03 15:49:55 +00:00
Adrian Chadd
99feb20233 run(4): Add initial support for IBSS merge.
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3592
2015-10-03 15:48:21 +00:00
Hiroki Sato
6401c828ce - Schedule DAD for IN6_IFF_TENTATIVE addresses in nd6_timer(). This
catches cases that DAD probes cannot be sent because of
  IFF_UP && !IFF_DRV_RUNNING.

- nd6_dad_starttimer() now calls nd6_dad_ns_output(), instead of
  calling it before nd6_dad_starttimer().

- Do not release an entry in dadq when a duplicate entry is being
  added.
2015-10-03 12:09:12 +00:00