summaryrefslogtreecommitdiffstats
path: root/sys/contrib
Commit message (Collapse)AuthorAgeFilesLines
* ARM: Use new ARMv6 naming conventions for cache and TLB functionsmmel2016-02-051-1/+4
| | | | | | in all but ARMv4 specific files. Expand ARMv6 compatibility stubs in cpu-v4.h. Use physical address in L2 cache functions if ARM_L2_PIPT is defined.
* These files were getting sys/malloc.h and vm/uma.h with header pollutionglebius2016-02-012-0/+2
| | | | via sys/mbuf.h
* Import Annapurna Labs Alpine HAL for networkingzbb2016-01-2626-0/+28017
| | | | | | | | | | | Files required for the NIC driver Import from vendor-sys/alpine-hal/2.7 SVN rev.: 294828 HAL version: 2.7 Obtained from: Semihalf Sponsored by: Annapurna Labs
* Fix order of last two arguments of mtx_initgonzo2016-01-141-1/+1
| | | | Spotted by: jmcneill@NetBSD.org
* Convert ipfilter to the new routing KPI.melifaro2016-01-101-41/+30
| | | | Differential Revision: D4764
* Have krping use IB_ACCESS_LOCAL_WRITE because it's required for remotenp2016-01-051-2/+5
| | | | | | write or remote atomic operations. Submitted by: Krishnamraju Eraparaju @ Chelsio
* [rtwn] add rtwn firmware.adrian2015-12-313-0/+738
| | | | Submitted by: kevlo
* Correct __FreeBSD__ check.cy2015-12-281-1/+1
| | | | MFC after: 3 days
* Don't assume checksums will be calculated later when fastfoward iscy2015-12-201-2/+2
| | | | | | | enabled (by default in r290383). PR: 72210 MFC after: 1 week
* Add initial ar9300 HAL support for the spectral scan mode.adrian2015-12-023-9/+29
|
* Adjust a comment; we now support these embedded boards!adrian2015-12-011-1/+1
|
* Fix the buildngie2015-11-301-0/+2
| | | | | | ichan is only used if AH_DEBUG_ALQ if defined Pointyhat to: adrian
* fix ht/40 configuration for ar9331 (hornet).adrian2015-11-301-2/+13
| | | | | | | | | | | | | | | | The synth programming here requires the real centre frequency, which for HT20 channels is the normal channel, but HT40 is /not/ the primary channel. Everything else was using 'freq', which is the correct centre frequency, but the hornet config was using 'ichan' to do the lookup which was also the primary channel. So, modify the HAL call that does the mapping to take a frequency in MHz and return the channel number. Tested: * Carambola 2, AR9331, tested both HT/20 and HT/40 operation.
* add missing initvals.adrian2015-11-291-0/+1420
| | | | Sorry y'all.
* Add initial support for the QCA953x SoC (honeybee) wifi.adrian2015-11-298-41/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a 2x2 2GHz 802.11n part. It works enough at the moment to bring up, scan and associate. I haven't started using this as a day to day AP. The specifics: * add honeybee initvals * add in changes; a mix from the QCA HAL and ath9k; * fix a bug in AR_SREV_AR9580_10_OR_LATER(), which is only used for one capability check and we don't even implement it - so it's a big no-op. Shady things: * ath9k has the "platform data" define the 25/40MHz clock. This HAL .. doesn't. Honeybee gets hard-coded to 25MHz which it likely shouldn't be. I'll have to go and identify/fix those. Tested: * Qualcomm Atheros AP143 reference design board. Obtained from: Qualcomm Atheros; Linux ath9k
* u32 -> uint32_t.adrian2015-11-291-3/+3
|
* [ath_hal] add AR9461 (jupiter) 2.1 support.adrian2015-11-294-9/+1583
| | | | Obtained from: Linux ath9k
* Fix inconsistent use of malloc type for cdev private data.skra2015-11-231-3/+1
| | | | | | | Remove M_VCHIQ malloc type, now not used anywhere. Reviewed by: gonzo Approved by: kib (mentor)
* Fix slots DMA memory handling. It's similar to r290553.skra2015-11-101-3/+3
| | | | | Discussed with: gonzo Approved by: kib (mentor)
* ath(4): begin fleshing out a "reset type" extension to force cold/warn resets.adrian2015-11-094-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Right now the only way to force a cold reset is: * The HAL itself detects it's needed, or * The sysctl, setting all resets to be cold. Trouble is, cold resets take quite a bit longer than warm resets. However, there are situations where a cold reset would be nice. Specifically, after a stuck beacon, BB/MAC hang, stuck calibration results, etc. The vendor HAL has a separate method to set the reset reason (which is how HAL_RESET_BBPANIC gets set) which informs the HAL during the reset path why it occured. This is almost but not quite the same; I may eventually unify both approaches in the future. This commit just extends HAL_RESET_TYPE to include both status (eg BBPANIC) and type (eg do COLD.) None of the HAL code uses it yet though; that'll come later. It also is a big no-op in each HAL - I need to go teach each of the HALs about cold/warm reset through this path.
* Fix pagelist bus_dmamap_t map handling. Memory for pagelist is allocatedskra2015-11-081-3/+1
| | | | | | | | | | | by bus_dmamem_alloc() which creates associated bus_dmamap_t map for us. When this memory is freed by bus_dmamem_free(), the map is freed as well. Thus there is no need to free it explicitly by bus_dmamap_destroy(), which leads to double freeing. Discussed with: gonzo Approved by: kib (mentor)
* vchiq interrupt is MP safe, add respective flag to bus_setup_intrgonzo2015-11-081-1/+1
|
* Fix locking for VCHI driver by matching sleepable/non-sleepable APIs:gonzo2015-11-081-24/+20
| | | | | | | - Emulate Linux mutex API using sx(9) locks with only exclusive operations instead of mutex(9), in Linux mutexes are sleepable. - Emulate Linux rwlock_t using rwlock(9) instead of sx(9). rwlock_t in Linux are spin locks
* Fix cache issues with bulk transfersgonzo2015-11-033-33/+38
| | | | | | | | | - Use pmap_quick_enter_page/pmap_quick_remove_page to bounce non-cacheline aligned head and tail fragments - Switch from static fragment size to configurable one, newer firmware passes cache line size as cache_line_size DTB parameter. With these changes both RPi and RPi2 pass functinal part of vchiq_test
* Synchronize with latest upstream VCHI code:gonzo2015-11-0121-313/+881
| | | | | | | | - Add LIB_VERSION ioctl - Add CLOSE_DELIVERED ioctl - Bump code version Upstream version: 3782f2ad42c08f4d32f64138f8be7341afc380f5
* Fix BULK read transfer if destination buffer is not cache line-aligned.gonzo2015-10-301-3/+23
| | | | | | We can't use copyout because destination memory is userland address in another process but we have reference to respective page so map the page into kernel address space and copy fragments there
* Rename linuxapi[.ko] into linuxkpi[.ko], to reflect that it is ahselasky2015-10-221-1/+1
| | | | | | | | | | kernel programming interface module, KPI, to avoid confusion with the existing Linux userspace binary compatibility shims. Bump the FreeBSD_version number. Reviewed by: np @ Suggested by: dumbbell @ Sponsored by: Mellanox Technologies
* Really fix ipfilter bug 3600459.cy2015-10-181-2/+1
| | | | | Obtained from: ipfilter cvs repo r1.48.2.25, r1.72 and NetBSD repo r1.4 MFC after: 3 days
* Flip on fast frames support for AR5416 and AR9300 series NICs.adrian2015-10-101-1/+1
| | | | | | | | | | | | | | | | | | | This was off because the net80211 aggregation code was using the same state pointers for both fast frames and ampdu tx support which led to some pretty unfortunate panic-y behaviour. Now that net80211 doesn't panic, let's flip this back on. It doesn't (yet) do the horrific sounding thing of A-MPDU aggregates of fast frames; that'll come next. It's a pre-requisite to supporting AMSDU + AMPDU anyway, which actually speeds things up quite considerably (think packing lots of little ACK frames into a single AMSDU.) Tested: * QCA955x SoC, AP mode * AR5416, STA mode * AR9170, STA mode (with local fast frame patches)
* On some interfaces, ipfilter drops UDP packets with zero checkum.cy2015-10-061-0/+16
| | | | | | | | | This commit fixes that. PR: 166372 Submitted by: mk@neon1.net Reviewed by: Darren Reed <darrenr@reed.wattle.id.au> MFC after: 1 week
* Add an initial driver for the AR9170 series draft-11n hardware fromadrian2015-09-263-0/+47
| | | | | | | | | | | | | | | | | | | | Atheros. Thanks to OpenBSD for providing a driver based on the original Atheros open source driver circa 2008. This uses the early, pre-carl9170 atheros provided firmware. It only supports 11bg at the moment. I've not tested it with 11a (and so the TX rate control logic may be slightly wrong!) so if you do have the dual-band version of this hardware please do let me know. Tested: * AR9170, TP-Link WN821N 2GHz. TODO: * Hook this up to a non-module build.
* Compare the newly allocated array elements to NULL in order to seebz2015-09-251-2/+2
| | | | | | | if the malloc succeeded. Spotted by: reading kernel compile time log MFC after: 2 weeks
* Revert ip_fil_freebsd.c -r287674. This should not have gone in yet.cy2015-09-111-12/+0
|
* Fix ipfilter bug 3600459 NAT bucket count wrong.cy2015-09-112-1/+14
| | | | | Obtained from: ipfilter cvs repo r1.48.2.25 MFC after: 2 weeks
* Revert $FreeBSD$.cy2015-09-111-1/+1
|
* Fix mutex errors.cy2015-09-111-1/+1
| | | | | Obtained from: NetBSD r1.4. MFC after: 1 week
* Fixup typos in comments.cy2015-09-111-5/+9
| | | | | Obtained from: NetBSD r1.4. MFC after: 1 week
* Fix compilation error on gcc-5.2.0 - it now warns on non-paranthen'edadrian2015-08-301-2/+2
| | | | | | | | logical negation when used in this fashion. Tested: * compile only
* Merge ACPICA 20150818.jkim2015-08-2669-658/+1038
|
* Add support for the arrays in nvlist library.oshogbo2015-08-155-83/+1591
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add nvlist_{add,get,take,move,exists,free}_{number,bool,string,nvlist, descriptor} functions. - Add support for (un)packing arrays. - Add the nvl_array_next field to the nvlist structure. If an array is added by the nvlist_{move,add}_nvlist_array function this field will contains next element in the array. - Add the nitems field to the nvpair and nvpair_header structure. This field contains number of elements in the array. - Add special flag (NV_FLAG_IN_ARRAY) which is set if nvlist is a part of an array. - Add special type (NV_TYPE_NVLIST_ARRAY_NEXT).This type is used only on packing/unpacking. - Add new API for traversing arrays (nvlist_get_array_next). - Add the nvlist_get_pararr function which combines the nvlist_get_array_next and nvlist_get_parent functions. If nvlist is in the array it will return next element from array. If nvlist is last element in array or it isn't in array it will return his container (parent). This function should simplify traveling over nvlist. - Add tests for new features. - Add documentation for new functions. - Add my copyright. - Regenerate the sys/cddl/compat/opensolaris/sys/nvpair.h file. PR: 191083 Reviewed by: allanjude (doc) Approved by: pjd (mentor)
* If any function fail (the ptr variable will be equal to NULL), we shouldn'toshogbo2015-08-111-10/+9
| | | | | | return buffer. Instead we should free it and return NULL. Approved by: pjd (mentor)
* The nvlist_move_nvpair() function can fail in two cases, if:oshogbo2015-08-112-14/+16
| | | | | | | | | | | | | | | | | - the nvlist error is set, or - the nvlist case ignore flag is not set and there is attend to add element with duplicated name. In both cases the nvlist_move_nvpair() function free nvpair structure. If library will try to unpack a binary blob which contains duplicated names it will end up with using memory after free. To prevent that, the nvlist_move_nvpair() function interface is changed to report about failure and checks are added to the nvpair_xunpack() function. Discovered thanks to the american fuzzy lop. Approved by: pjd (mentor)
* Don't set parent if the unpack operation fail. In someoshogbo2015-08-111-0/+2
| | | | | | | | case this could crash the library, because of the NULL pointer references. Discovered thanks to american fuzzy lop. Approved by: pjd (mentor)
* Make the nvlist_next(9) function handle NULL pointer variable.oshogbo2015-08-111-3/+3
| | | | | | | This simplifies removing the first element from nvlist. Reviewed by: AllanJude Approved by: pjd (mentor)
* Import OpenBSD's iwm WiFi driver for Intel 3160/7260/7265.rpaulo2015-08-084-0/+45566
| | | | | | | | | | | | | | | There are still several bugs, but I've been using it for a while now. Thanks to all the testers and to Adrian for his help with this driver. This driver isn't connected to the build yet, but it will be soon. There's no MFC planned because the driver isn't very stable yet. Reviewed by: adrian Obtained from: https://github.com/rpaulo/iwm Tested by: adrian, gjb, dumbbell (others that I forgot). Relnotes: yes
* Add a missing method - ath_hal_settsf64().adrian2015-08-051-0/+13
| | | | This is required for TDMA slave mode.
* Add TXOP enforce support to the AR9300 HAL.adrian2015-08-051-0/+19
| | | | | | | | | | | | | This is required for (more) correct TDMA support. Without it, the code tries to calculate the required guard interval based on the current rate, and since this is an 11n NIC and people try using 11n, it calls ath_hal_computetxtime() on an 11n rate which then panics. This doesn't fix TDMA slave mode on AR9300 - it just makes it have one less bug. Reported by: Berislav Purgar <bpurgar@gmail.com>
* Import the latest CloudABI system call definitions and table.ed2015-08-052-4/+11
| | | | | We're going to need these for next code I'm going to send out for review: support for poll() and kqueue() on CloudABI.
* Import Annapurna Labs Alpine HAL to sys/contrib/zbb2015-07-2816-0/+13941
| | | | | | | | | Import from vendor-sys/alpine-hal/2.7 SVN rev.: 285432 HAL version: 2.7 Obtained from: Semihalf Sponsored by: Annapurna Labs
* Sync in latest upstream system call definitions.ed2015-07-272-8/+3
| | | | | | Futex object scopes have been renamed from using their own constants to simply reusing the existing CLOUDABI_MAP_{PRIVATE,SHARED} flags, as they are more accurate in this context.
OpenPOWER on IntegriCloud