Commit graph

249 commits

Author SHA1 Message Date
Dapeng Gao fbfdf57d65 Fix off-by-one bug in btpand
`ul` reaches `__arraycount(services)` before the bound-check happens, causing undefined behaviour.

Reviewed by:	imp, jrtc27
Fixes:		7718ced0ea ("Add btpand(8) daemon from NetBSD.")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45463
2024-06-03 20:30:36 +01:00
Alexander Ziaee 9c0d6df100 man bluetooth/fwdownloaders: alignment nits, SPDX
MFC after: 3 days

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1267
2024-05-31 14:26:09 -06:00
Alexander Ziaee 2c901189bb man bluetooth/fwdownloaders: terse descriptions
+ descriptions no longer wrap on a standard console, no keywords removed
+ more consistent language with other firmware tooling manuals

MFC after: 3 days
Reviewed by: imp (bumped date for Nd changes)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1266
2024-05-31 11:40:44 -06:00
Elyes Haouas fdbf7cab91 bluetooth: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])
Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2024-04-28 21:24:46 -06:00
lherschi c327288e8e bluetooth: fix comment in bluetooth.device.conf
The default for discoverable is 'NO' not 'YES'. This now matches the man
page.

Event: Advanced UNIX Programming Course (Fall'23) at NTHU.
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/939
2023-12-26 10:24:19 -07:00
Warner Losh 0b8224d1cc Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by:		Netflix
2023-11-26 22:23:58 -07:00
Stephen J. Kiernan 5e3190f700 dirdeps: Update Makefile.depend* files with empty contents
Some Makefile.depend* files were committed with no contents or empty
DIRDEPS list, but they should have DIRDEPS with some contents.
2023-10-29 17:01:04 -04:00
Warner Losh 05248206f7 Remove $FreeBSD$: one-line bare tag
Remove /^\s*\$FreeBSD\$$\n/
2023-08-16 11:55:20 -06:00
Warner Losh b2c76c41be Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:15 -06:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 2a63c3be15 Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
2023-08-16 11:54:29 -06:00
Warner Losh 42b388439b Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:23 -06:00
Warner Losh b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Alfonso Gregory 72e1ea2f13 Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
2023-07-07 10:45:18 -06:00
John Baldwin 9d7c4486e2 bluetooth: Remove set but unused variable.
Reported by:	GCC
2023-06-20 09:28:59 -07:00
John Baldwin 5f0bd29180 bluetooth/ath3kfw: Propagate return value from ath3k_load_fwfile.
The caller ignores the return value so this is a no-op, but
ath3k_init_ar3012 returns the return values of its internal functions,
so this is more consistent.

Fix some misleading indentation while here.

Reported by:	GCC -Wunused-but-set-variable (1)
2023-06-20 09:28:59 -07:00
Elyes Haouas 66ebda7a04 bluetooth: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:38 -06:00
Warner Losh b61a573019 spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD
The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:04 -06:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Brian Campbell 9affcf438b bluetooth/hccontrol: Fix unterminated command list
Signed-off-by: Brian Campbell <Brian.Campbell@ed.ac.uk>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/730
2023-05-04 16:01:36 -06:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Elyes Haouas beb2af45bd bluetooth/hccontrol: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 07:59:10 -07:00
Gordon Bergling 40bb52c89b iwmbtfw(8): Fix a typo in a kernel message
- s/succesful/successful/

MFC after:	5 days
2023-01-11 12:22:18 +01:00
Maxim Konovalov b620928d54 hccontrol.8: missed underscore fixed.
PR:	267343
2022-10-25 16:29:44 +00:00
Jens Schweikhardt 9356efa8c8 Indicate that X(7) cross refs are satisfied by ports/x11/xorg-docs. 2022-08-14 12:01:30 +02:00
Gordon Bergling e24fd6d664 bluetooth(3): Fix a typo in a source code comment
- s/intrrupt/interrupt/

MFC after:	3 days
2022-07-31 12:13:13 +02:00
Warner Losh 66d6299848 bluetooth: remove hcseriald
Without ng_h4 gone, there's no need for hcseriald.

Sponsored by:		Netflix
2021-09-29 21:18:17 -06:00
Jung-uk Kim 4fa690be2c bluetooth: Fix build after ng_h4 removal
It was caused by 79a100e28e.
2021-09-29 23:10:56 -04:00
Vladimir Kondratyev da93a73f83 iwmbtfw(8): Improve Intel 7260/7265 adaptors handling
- Allow firmware downloading for hw_variant #8;
- Enter manufacturer mode for setting of event mask;
- Handle multi-event response on HCI commands for 7260;
  This allows to remove kludge with skipping of 0xfc2f opcode.
- Disable patch and exit manufacturer mode on downloading failure;
- Use default firmware if correct firmware file is not found;

Reviewed by:	Philippe Michaud-Boudreault <pitwuu_AT_gmail_DOT_com>
MFC after:	1 week
Tested by:	arrowd
Differential revision:	https://reviews.freebsd.org/D30543
2021-05-31 22:32:08 +03:00
Philippe Michaud-Boudreault fe70d7b26d iwmbtfw(8): Add support for Intel 7260/7265 bluetooth adapter firmwares
To use it comms/iwmbt-firmware port should be updated to 20210315 version.

Submitted by:	Philippe Michaud-Boudreault <pitwuu@gmail.com>
Tested by:	Helge Oldach <freebsd@oldach.net>
Reviewed by:	wulf
PR:		228787
MFC after:	2 weeks
2021-05-05 02:50:32 +03:00
Warner Losh 23e124c78b pccard: Remove bt3c(4) driver
pccard is being removed, so remove bt3c driver since it only has PC
Card attachment. Also remove bt3cfw(8) since it's the firmware for this
driver.

Relnotes: Yes
2021-01-07 20:40:41 -07:00
Gordon Bergling 60ee05db4b bluetooth: Fix a mandoc related issues
- new sentence, new line
- sections out of conventional order: Sh FILES
- unusual Xr order: bthost(1) after bthidd(8)
- no blank before trailing delimiter
- whitespace at end of input line
- sections out of conventional order: Sh EXIT STATUS

MFC after:	1 week
2020-12-19 13:36:59 +00:00
Takanori Watanabe 2105611236 Add le_rand command.
PR: 247808
Submitted by: Marc Veldman
2020-07-08 03:57:47 +00:00
Takanori Watanabe 2b2c6d6919 Add le_read_channel_map and le_read_remote_features command
PR: 247051
Submitted by:	  Marc Veldman marc at bumblingdork.com
2020-06-10 05:01:00 +00:00
Takanori Watanabe f8143ed773 Fix connection event message string (n->\n)
PR: 246664
Submitted by: Marc Veldman (marc@bumblngdork.com)
Reported by:	Jose Luis Duran (jlduran@gmail.com)
2020-05-28 13:48:33 +00:00
Takanori Watanabe 3ac41cce63 Add le_connect command to connect to an LE device.
PR:246664
Submitted by:MarcVeldman
2020-05-26 15:46:18 +00:00
Takanori Watanabe 11fb4bdb4d Add LE Whitelist commands to hccontrol
PR: 214555
Submitted by Marc Veldman
2020-05-19 13:44:32 +00:00
Takanori Watanabe 9287f06d08 Add le_scan subcommand to hccontrol.
PR: 246141
Submitted by:	Marc Veldman
2020-05-11 15:32:32 +00:00
Takanori Watanabe e961db83e5 Document le_enable subcommand 2020-05-08 01:19:29 +00:00
Takanori Watanabe 1f5d883dd7 Add le_read_buffer_size command and manpage.
It supports both v1 and v2 command.

PR:245964
Submitted by:	Marc Veldman <marc@bumblingdork.com>
2020-04-28 16:00:34 +00:00
Takanori Watanabe eb2aebeafd Improve error handling
Check return values from hci_request()
Check rp.status
Print error messages with hci_status2str()

PR:	245769
Submitted by:	Marc Veldman
2020-04-28 13:28:58 +00:00
Takanori Watanabe 6ececd21a6 Resolve vendor id to string. 2020-04-27 09:13:22 +00:00
Takanori Watanabe 84662d68e5 Fix advertise packet parsing.
Differential Revision:	https://reviews.freebsd.org/D21779
2020-04-27 02:48:49 +00:00
Hans Petter Selasky 32f32669c3 Properly update AD field length in hccontrol(8).
While at it use strtol() instead of atoi() to support hexadecimal
numbers aswell as 10-base numbers.

Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245899
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-26 08:31:08 +00:00
Hans Petter Selasky 7b2f84db82 Put advertising data in correct place.
Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245848
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-25 00:57:48 +00:00
Hans Petter Selasky f75d5ee735 Rename two commands to match the Bluetooth specification in hccontrol(8).
Fix some bad spelling while at it.

Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245868
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-24 14:53:55 +00:00
Hans Petter Selasky c3f60abc30 Add support for LE advertising to hccontrol(8).
Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245848
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-24 08:07:59 +00:00
Hans Petter Selasky 1719371ae5 Add support for Read_Local_Supported_Commands command to hccontrol(8).
Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245811
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-22 14:38:39 +00:00
Hans Petter Selasky 872d83be7b Update string tables in hccontrol(8).
Submitted by:	Marc Veldman <marc@bumblingdork.com>
PR:		245796
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2020-04-21 17:51:54 +00:00