summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bluetooth/hccontrol
Commit message (Collapse)AuthorAgeFilesLines
* 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-011-1/+1
| | | | | | User-visible strings. MFC after: 2 weeks
* fix compare argument for address type.takawata2015-09-091-1/+1
| | | | Submitted by: issei10193 (via Twitter)
* Add META_MODE support.sjg2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | 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-081-2/+0
| |
| * Merge sync of headsjg2015-05-2711-7/+470
| |\ | |/ |/|
| * Merge head from 7/28sjg2014-08-191-1/+1
| |\
| * | Updated dependenciessjg2014-05-161-1/+0
| | |
| * | Updated dependenciessjg2014-05-101-0/+2
| | |
| * | Merge from headsjg2013-09-051-1/+1
| |\ \
| * | | Updated dependenciessjg2013-03-111-0/+1
| | | |
| * | | Updated dependenciessjg2013-02-161-2/+0
| | | |
| * | | Sync from headsjg2012-11-041-2/+2
| |\ \ \
| * | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | 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-077-0/+7
| | | | | | | | | | | | | | | | | | | | This will fix build.
* | | | | Make hccontrol(8) and sdpcontrol(8) appear in "man -k bluetooth" output.trasz2015-02-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* | | | | Convert usr.sbin to LIBADDbapt2014-11-251-2/+1
| |_|_|/ |/| | | | | | | | | | | Reduce overlinking
* | | | use .Mt to mark up email addresses consistently (part2)bapt2014-06-201-1/+1
| |_|/ |/| | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de>
* | | Fxi a bunch of typos.eadler2013-05-101-1/+1
| |/ |/| | | | | | | PR: misc/174625 Submitted by: Jeremy Chadwick <jdc@koitsu.org>
* | mdoc: add missing width argument to Bl -tag.joel2012-06-031-2/+2
|/
* Fix typos in command descriptions.stefanf2011-12-311-2/+2
|
* Reencode files to UTF-8. Drop CP1252 em-dash.uqs2011-12-301-4/+4
|
* Pacify new GCC4 warnings.emax2006-09-211-1/+1
| | | | | Submitted by: kan MFC after: 1 week
* Get rid of extra const to pacify new GCC4 warnings.emax2006-09-212-30/+30
| | | | | Submitted by: kan MFC after: 1 week
* - Only print a clarifying message about which HCI node has been used if theremarkus2006-06-021-4/+6
| | | | | | | | is more than one HCI node present - Use errx(3) instead of err(3) if there is no HCI node present as errno is 0 in this case and the resulting error message wouldn't make much sense Approved by: emax (mentor)
* - Document the new Read_Node_List command, autodetection of HCI nodes andmarkus2006-05-221-8/+9
| | | | | | | | | that the '-n' parameter is now optional - Grammar fixes Reviewed by: emax Approved by: emax MFC after: 1 week
* - Add HCI node autodetection. As a consequence of this, make the '-n'markus2006-05-223-7/+89
| | | | | | | | | | parameter optional. - Add Read_Node_List command which prints a list of available HCI nodes, their Netgraph IDs and connected hooks Reviewed by: emax Approved by: emax MFC after: 1 week
* - Use official version strings for LMP and HCI version reporting and addmarkus2006-02-234-7/+42
| | | | | | | | version strings up to Bluetooth 2.0 - Update manufacturer list Approved by: emax MFC after: 3 days
* Sort sections.ru2005-01-181-3/+3
|
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* Rename 'class' field to 'uclass' in the ng_hci_inquiry_response structure.emax2005-01-041-1/+1
| | | | | | | class is a reserved word in C++ Submitted by: Markus Brueffer < markus AT brueffer DOT de > MFC after: 3 days
* Introduce ng_hci_inquiry_response structure and use it in the hccontrol(8)emax2004-08-101-8/+1
|
* - One can use both BD_ADDR or name to specify address of the Bluetooth device.emax2004-08-054-13/+20
| | | | | | | | Update man pages to document this fact. - Update usage messages - Change u_intXXX to uintXXX
* Fix cut-n-paste bugs in hccontrol(8). Its very strange that no one noticedemax2004-06-282-17/+17
| | | | | them earlier. Thanks to Mike Crosland (mcrosland at xs4all.nl) for pointing them out.
* Use uint instead of u_intemax2004-04-097-49/+49
|
* Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)markm2004-03-051-1/+1
| | | | | | | | | | | | | | | that this provokes. "Wherever possible" means "In the kernel OR NOT C++" (implying C). There are places where (void *) pointers are not valid, such as for function pointers, but in the special case of (void *)0, agreement settles on it being OK. Most of the fixes were NULL where an integer zero was needed; many of the fixes were NULL where ascii <nul> ('\0') was needed, and a few were just "other". Tested on: i386 sparc64
* Fix few typosemax2003-11-113-7/+7
| | | | | Reviewed by: imp, julian, ru Approved by: imp (mentor)
* Update Bluetooth code.emax2003-10-1212-145/+310
| | | | | Reviewed by: M. Warner Losh <imp@bsdimp.com>; John Hay <jhay@freebsd.org> Approved by: M. Warner Losh <imp@bsdimp.com> (mentor)
* Reapply mdoc(7) fixes that got accidentally lost in the lastru2003-05-201-99/+100
| | | | | | | Bluetooth update, and fix a few more issues. Submitted by: Maksim Yevmenkin <m_evmenkin@yahoo.com>, ru Approved by: re (blanket)
* Part 2 of the commit if new bluetooth code.julian2003-05-1012-193/+270
| | | | | Submitted by: Maksim Yevmenkin <m_evmenkin@yahoo.com> Approved by: re@
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* mdoc(7) police: markup fixes.ru2002-12-121-98/+100
| | | | Approved by: re
OpenPOWER on IntegriCloud