summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bluetooth
Commit message (Collapse)AuthorAgeFilesLines
* MFC r314659,r314676:ngie2017-05-293-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | r314659: usr.sbin: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output r314676: Fix build after r314656 Some of the changes I introduced to use .ALLSRC were correct in spirit, but incorrect in reality -- in particular, ../Makefile.inc hadn't been pulled in via bsd.init.mk (via bsd.lib.mk, bsd.prog.mk), so the value of .ALLSRC (evaluated immediately) was empty. .include bsd.init.mk explicitly so we can be certain that the values used as dependencies in the targets are defined when the target recipe has been evaluated. Reminder: thou shalt separate out separate functional changes before committing them. (YUGE) Pointyhat to: ngie In collaboration with: bdrewery
* MFC r305023:dim2016-09-022-3/+3
| | | | | Avoid undefined behavior when calling va_start() in bnep_send_control(), by making the 'type' parameter a plain unsigned.
* [ath3k] add a replacement ath3k firmware loading tool.adrian2016-06-079-307/+1052
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is influenced by the ath3k driver from linux (circa 2013, this is how long I've been sitting on this.) It handles loading in firmware using the newer model, where it assembles the right set of firmware blobs and board configuration based on the device list and querying the device. The older utility could only load in a single image - which sometimes was ath3k-1.fw and sometimes was ath3k-2.fw. However, the ath3k maintainers didn't want to keep adding in binaries that were just derivatives with a separate board config, so they deleted ath3k-2.fw from the Linux firmware repository and instead, well, did this. Now, this has been tested against AR3011 and AR3012 NICs from the AR9285+BT combo up through to the QCA9565+BT combo. It doesn't yet work with the QCAFN222 NIC as that is some newer chip. The firmware can be grabbed from https://github.com/erikarn/ath3kfw/ in the share/firmware/ath3k directory. I'll update this utility over time to support the newer firmware drops (newer than mid-2013) which should pull in the QCNFA222 and subsequent chips. Tested: * AR9285 + BT * AR9287 + BT * AR9485 + BT * AR9462 + BT * QCA9565 + BT
* For pointers use NULL instead of 0.araujo2016-06-061-1/+1
|
* Improve performance and functionality of the bitstring(3) apiasomers2016-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two new functions are provided, bit_ffs_at() and bit_ffc_at(), which allow for efficient searching of set or cleared bits starting from any bit offset within the bit string. Performance is improved by operating on longs instead of bytes and using ffsl() for searches within a long. ffsl() is a compiler builtin in both clang and gcc for most architectures, converting what was a brute force while loop search into a couple of instructions. All of the bitstring(3) API continues to be contained in the header file. Some of the functions are large enough that perhaps they should be uninlined and moved to a library, but that is beyond the scope of this commit. sys/sys/bitstring.h: Convert the majority of the existing bit string implementation from macros to inline functions. Properly protect the implementation from inadvertant macro expansion when included in a user's program by prefixing all private macros/functions and local variables with '_'. Add bit_ffs_at() and bit_ffc_at(). Implement bit_ffs() and bit_ffc() in terms of their "at" counterparts. Provide a kernel implementation of bit_alloc(), making the full API usable in the kernel. Improve code documenation. share/man/man3/bitstring.3: Add pre-exisiting API bit_ffc() to the synopsis. Document new APIs. Document the initialization state of the bit strings allocated/declared by bit_alloc() and bit_decl(). Correct documentation for bitstr_size(). The original code comments indicate the size is in bytes, not "elements of bitstr_t". The new implementation follows this lead. Only hastd assumed "elements" rather than bytes and it has been corrected. etc/mtree/BSD.tests.dist: tests/sys/Makefile: tests/sys/sys/Makefile: tests/sys/sys/bitstring.c: Add tests for all existing and new functionality. include/bitstring.h Include all headers needed by sys/bitstring.h lib/libbluetooth/bluetooth.h: usr.sbin/bluetooth/hccontrol/le.c: Include bitstring.h instead of sys/bitstring.h. sbin/hastd/activemap.c: Correct usage of bitstr_size(). sys/dev/xen/blkback/blkback.c Use new bit_alloc. sys/kern/subr_unit.c: Remove hard-coded assumption that sizeof(bitstr_t) is 1. Get rid of unrb.busy, which caches the number of bits set in unrb.map. When INVARIANTS are disabled, nothing needs to know that information. callapse_unr can be adapted to use bit_ffs and bit_ffc instead. Eliminating unrb.busy saves memory, simplifies the code, and provides a slight speedup when INVARIANTS are disabled. sys/net/flowtable.c: Use the new kernel implementation of bit-alloc, instead of hacking the old libc-dependent macro. sys/sys/param.h Update __FreeBSD_version to indicate availability of new API Submitted by: gibbs, asomers Reviewed by: gibbs, ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6004
* bluetooth: minor spelling fixes.pfg2016-05-012-2/+2
| | | | | | User-visible strings. MFC after: 2 weeks
* fix incorrect usage of hid_set_data() which causes crashemax2016-03-231-17/+13
| | | | | | | | | in bthidd(8) on amd64 WITH_SSP builds Submitted by: rakuco Reviewed by: rakuco Tested by: rakuco MFC after: 1 week
* DIRDEPS_BUILD: Regenerate without local dependencies.bdrewery2016-02-243-18/+0
| | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division
* Fix scancodes for Kana and Eisu keys.hselasky2015-11-211-2/+2
| | | | | | PR: 204709 Submitted by: naito.yuichiro@gmail.com MFC after: 3 days
* check boundaries while parsing SDP responsesemax2015-10-201-9/+43
| | | | | | Reported by: hps Reviewed by: hps MFC after: 1 week
* fix compare argument for address type.takawata2015-09-091-1/+1
| | | | Submitted by: issei10193 (via Twitter)
* Add META_MODE support.sjg2015-06-1314-0/+298
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-0814-28/+0
| |
| * Merge sync of headsjg2015-05-2779-54/+575
| |\ | |/ |/|
| * Merge head from 7/28sjg2014-08-1914-14/+14
| |\
| * | Updated dependenciessjg2014-05-1614-14/+0
| | |
| * | Updated dependenciessjg2014-05-1014-0/+28
| | |
| * | Merge headsjg2014-04-282-2/+1
| |\ \
| * | | Updated dependenciessjg2013-10-131-0/+1
| | | |
| * | | Merge from headsjg2013-09-053-1/+5
| |\ \ \
| * \ \ \ sync from headsjg2013-04-122-5/+15
| |\ \ \ \
| * | | | | Updated dependenciessjg2013-03-1114-0/+14
| | | | | |
| * | | | | Updated dependenciessjg2013-02-1614-28/+0
| | | | | |
| * | | | | Sync with HEAD.obrien2013-02-082-2/+2
| |\ \ \ \ \
| | \ \ \ \ \
| | \ \ \ \ \
| *-. \ \ \ \ \ Sync from headsjg2012-11-047-9/+53
| |\ \ \ \ \ \ \
| * | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-2214-0/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | | Remove stray DEBUG_FLAGS=-g that snuck in with r137868imp2015-05-211-1/+0
| | | | | | | | |
* | | | | | | | | ath3kfw, bcmfw, bthidcontrol, bthidd all require usb(4); build themngie2015-04-271-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conditionally if MK_USB != no MFC after: 1 week
* | | | | | | | | To ensure j formatting string valid, cast uint64_t values to uintmax_t.takawata2015-04-181-2/+3
| | | | | | | | |
* | | | | | | | | Change printf formatting to unbroke i386 arch.takawata2015-04-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by:david@catwhisker.org
* | | | | | | | | Fix Typo.takawata2015-04-181-1/+1
| | | | | | | | |
* | | | | | | | | Fix misspelling.araujo2015-04-181-1/+1
| | | | | | | | |
* | | | | | | | | Improve code style(9), no functional changes.araujo2015-04-182-92/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Differential Revision: D2320 Reviewed by: takawata
* | | | | | | | | Add LE related HCI control command to hccontrol(1).takawata2015-04-185-1/+443
| | | | | | | | |
* | | | | | | | | Accept LE event on hccontrol socket.takawata2015-04-121-0/+1
| | | | | | | | |
* | | | | | | | | Add HCI/LMP revision information.takawata2015-04-121-2/+12
| | | | | | | | |
* | | | | | | | | Check l2cap socket initialisation and define L2CAP_SOCKET_CHECKEDtakawata2015-04-0758-7/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will fix build.
* | | | | | | | | bthidd: Remove unused macros from hid.c.rakuco2015-04-061-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASIZE() was never used, and min() stopped being used in r207812. Differential Revision: https://reviews.freebsd.org/D2230 Reviewed by: emax Approved by: emax MFC after: 1 week
* | | | | | | | | bthidd: Consider usage ranges when dealing with array inputs.rakuco2015-04-051-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, we were always using HID_USAGE() to determine the Usage ID of a certain HID report input item. This does not work as intended if a field is an array and the allowed usages are specified with a usage range, as HID_USAGE() will return 0. We need to use the field value as an index in the usage range list in this case instead. This makes the volume keys in a Microsoft Bluetooth Mobile Keyboard 5000 be properly recognized. The relevant part of the HID report looks like this: 0xA1, 0x01, // Collection (Application) 0x85, 0x07, // Report ID (7) 0x05, 0x0C, // Usage Page (Consumer) 0x19, 0x00, // Usage Minimum (Unassigned) 0x2A, 0xFF, 0x03, // Usage Maximum (0x03FF) 0x95, 0x01, // Report Count (1) 0x75, 0x10, // Report Size (16) 0x15, 0x00, // Logical Minimum (0) 0x27, 0xFF, 0x03, 0x00, 0x00, // Logical Maximum (1023) 0x81, 0x00, // Input (Data,Array,Abs,No Wrap,Linear,Preferred // State,No Null Position) When a key such as "volume down" is pressed, the following data is transferred through Interrupt In: 0x07 0xEA 0x00 Differential Revision: https://reviews.freebsd.org/D2229 Reviewed by: emax Approved by: emax MFC after: 1 week
* | | | | | | | | Make hccontrol(8) and sdpcontrol(8) appear in "man -k bluetooth" output.trasz2015-02-072-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* | | | | | | | | mdoc: sort SEE ALSO.joel2014-12-261-2/+2
| | | | | | | | |
* | | | | | | | | handle "Kana" and "Eisu" keys on Apple Wireless Keyboard (JIS)emax2014-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 187470 Submitted by: naito.yuichiro MFC after: 1 week
* | | | | | | | | Convert usr.sbin to LIBADDbapt2014-11-2512-24/+12
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking
* | | | | | | | use .Mt to mark up email addresses consistently (part2)bapt2014-06-2014-14/+14
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de>
* | | | | | | mdoc: minor paragraph fixes.joel2014-02-081-1/+0
| | | | | | |
* | | | | | | Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thiseadler2013-11-301-1/+1
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shifts into the sign bit. Instead use (1U << 31) which gets the expected result. This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD. Discussed with: -arch, rdivacky Reviewed by: cperciva
* | | | | | Work around build breakages with GCC 4.2.jkim2013-05-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Reported by: tinderbox
* | | | | | Fxi a bunch of typos.eadler2013-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: misc/174625 Submitted by: Jeremy Chadwick <jdc@koitsu.org>
* | | | | | Add the Clang specific -Wmissing-variable-declarations to WARNS=6.ed2013-04-191-0/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This compiler flag enforces that that people either mark variables static or use an external declarations for the variable, similar to how -Wmissing-prototypes works for functions. Due to the fact that Yacc/Lex generate code that cannot trivially be changed to not warn because of this (lots of yy* variables), add a NO_WMISSING_VARIABLE_DECLARATIONS that can be used to turn off this specific compiler warning. Announced on: toolchain@
* | | | | Remove contractions.joel2013-04-111-1/+1
| | | | |
OpenPOWER on IntegriCloud