aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bluetooth
Commit message (Collapse)AuthorAgeFilesLines
* rtlbtfw(8): Add support for Realtek 8852CEYing Xu13 days2-1/+2
| | | | | | | | | Add the USB Vendor/Product ID (0x13d3:0x3612) for the new Realtek 8852CE drive to make sure it works. Signed-off-by: Ying Xu <fakeshadow1337@gmail.com> Reviewed by: pouria, wulf Pull Request: https://github.com/freebsd/freebsd-src/pull/2071
* rtlbtfw(8): Fix a typo in an error messageGordon Bergling2025-10-261-1/+1
| | | | | | - s/Parseing/Parsing/ MFC after: 1 week
* bluetooth: ng_ubt_rtl/rtlbtfw: remove duplicate entry in device tableBjoern A. Zeeb2025-10-172-13/+0
| | | | | | | | | | Remove the single 8822CU entry in all three places. It seems the only entry referencing a USB device. The same device is listed with the 8822CE devices. MFC after: 3 days Reviewed by: wulf Differential Revision: https://reviews.freebsd.org/D52324
* rtlbtfw.8: Fix typoAlexander Ziaee2025-08-061-1/+0
| | | | Fixes: 0790d99e0b951cfee (Clarify descriptions)
* man bluetooth/fwdownloaders: Clarify descriptionsAlexander Ziaee2025-08-064-8/+8
| | | | | | | | | | | s/download/load/ to clarify the difference between these and fwget, our utility to install firmware packages, in apropos results. Also, include rtlbtfw, I missed that one last time. MFC after: 3 days Reviewed by: bz, pauamma Fixes: 2c901189bb65 (terse descriptions) Differential Revision: https://reviews.freebsd.org/D51333
* bluetooth: sdpd: switch to getpeereid() instead of LOCAL_PEERCREDKyle Evans2025-07-241-7/+5
| | | | | | | | | sdpd's usage was mostly fine, though it debatably should have been checking the xucred version to avoid mishaps. Switch it to getpeereid() anyways to avoid embedding xucred layout details in more program. Reviewed by: emax Differential Revision: https://reviews.freebsd.org/D51152
* bluetooth-config: Fix command line parsingDirk Engling2025-07-131-1/+7
| | | | | | | | | | | | | This addresses the problems encountered when parsing options in bluetooth-config. - the optional parameters were not properly shifted after consumption - the command line parameter count was checked before getopts and not after Reported by: sjg Approved by: kp MFC after: 7 days Event: Berlin Hackathon 202507 Differential Revision: <https://reviews.freebsd.org/D51281>
* rtlbtfw(8): Sync device VID/PID list with Linux 6.15-rc4Vladimir Kondratyev2025-05-144-2/+99
| | | | | Sponsored by: Future Crew, LLC MFC after: 1 month
* rtlbtfw(8): Add support for firmware file format V2Vladimir Kondratyev2025-05-145-13/+302
| | | | | | | | As Realtek changed format of the firmware files for recent adaptors. Sponsored by: Future Crew, LLC MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D50082
* rtlbtfw(8): Fix incorrect chunk index overwrap in rtlbt_load_fwfile()Vladimir Kondratyev2025-04-291-6/+5
| | | | | | | | | It prevented large (>256 chunks) firmwares from loading. Fixes: 5036d9652a57 ("rtlbtfw: Firmware loader for Realtek 87XX/88XX") Sponsored by: Future Crew, LLC MFC after: 1 week
* rtlbtfw(8): Add Mercusys MA530 VID/PID for Realtek 8761BUVVladimir Kondratyev2025-04-292-0/+9
| | | | | | Tested by: Yusuf Yaman <nxjoseph@protonmail.com> PR: 286369 MFC after: 1 week
* iwmbtfw(8): fix getopt flags, unify usage()/manual page contentsEygene Ryabinkin2025-01-292-6/+7
| | | | | | | | | | | | | | | | | | | | | Seems like there was an intention to use command line switches -m, -p and -v (each with argument), but there is no handling for them. Also, some enhancements to the usage()/manpage: - use FreeBSD manpage style -- square brackets -- for denoting optional arguments in usage(); - show default directory path in usage(); - update manual: -f is the optional flag; - show descriptions for -I/-D together: they are logically related. Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org> Reviewed by: wulf MFC after: 1 month
* iwmbtfw(8): don't program hardware without existing firmware imageEygene Ryabinkin2025-01-291-27/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | One should not start firmware update sequence just to understand that there is no firmware image to program: update sequence for 7260 requires leaving manufacturing mode and in the case of missing firmware file it will trigger complete re-initialization of BT adapter. Which, in turn, will make the USB device to go away and reappear. Since devd(8) has hooks for USB device attachment, in the case of missing firmware it used to - trigger the (failing) firmware download, - which triggers device reset, - which creates USB notification and devd(8) kicks back in. Nice infinite cycle with many notifications via syslog: {{{ Jan 3 09:00:01 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0 Jan 3 09:00:01 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0 (disconnected) Jan 3 09:00:02 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0 Jan 3 09:00:02 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0 (disconnected) }}} Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org> Reviewed by: wulf MFC after: 1 month
* Refactor iwmbtfw: modularize and de-constifyEygene Ryabinkin2025-01-295-266/+298
| | | | | | | | | | | | | | - Move logic for firmware download into different adapter types to the own functions to allow main() to be simpler - Use enums/typedefs for exit modes, image types, etc - Purge most obvious comments: functions are named properly, so most of their invocations self-document the code. Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org> Reviewed by: wulf MFC after: 1 month
* Refactor iwmbtfw: set default firmware_dir after argument parsingEygene Ryabinkin2025-01-291-12/+4
| | | | | | | | Don't repeat firmware_dir stanza at all "if" branches: be more DRY. Signed-off-by: Eygene Ryabinkin <rea@FreeBSD.org> Reviewed by: wulf MFC after: 1 month
* iwmbtfw: Check firmware exists before trying to upload itGavin Atkinson2025-01-171-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case of an Intel 7260 device, the device needs to be put into something called "manufacturer mode" before the firmware is uploaded. The firmware is then upladed, and the card is taken out of this mode, at which point it disconnects and reconnects to the USB bus, and is at that point usable. However, iwmbtfw(8) puts the device into manufacturer mode before verifying that there exists a copy of the firmware to upload. As a result, in the case where there is no firmware available on disk, the device is put into manufacturer mode, the firmware can't be found so isn't uploaded, and the card is brought out of manufacturer mode, so it disconnects and reconnects to the USB bus. Enter devd(8). There are rules in /etc/devd/iwmbtfw.conf to call iwmbtfw(8) when the device appears. When there's no firmware on disk, devd will call iwmbtfw, iwmbtfw will try to do its thing and fail, the device will dis/reconnect, and devd will notice the device reappear and start the whole loop again. Fix is to verify that the firmware exists before putting the device into its special mode. The fix only changes things for the 7260 and not the other chips supported, I don't believe the issue exists with other chips as those do not need to be switched into manufacturer mode before uploading. PR: 283896 Reviewed by: emaste
* rtlbtfw: Firmware loader for Realtek 87XX/88XX bluetooth USB adaptorsVladimir Kondratyev2024-11-0610-0/+1871
| | | | | | | | Firmware files are available in the comms/rtlbt-firmware port. Sponsored by: Future Crew LLC MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D46739
* iwmbtfw(8): Ignore unexpected HCI eventsVladimir Kondratyev2024-11-062-12/+52
| | | | | | | | | | If Intel firmware is already in operational mode at boot that takes place at warm boot, BT adaptor can generate extra HCI events which interferes with firmware mode detection logic. Ignore them. Sponsored by: Future Crew LLC MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D46737
* iwmbtfw(4): Add support for 9260/9560 bluetooth adaptorsVladimir Kondratyev2024-11-068-90/+531
| | | | | | | | | Required firmware files are already included in to comms/iwmbt-firmware port Sponsored by: Future Crew LLC MFC after: 1 month Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D46735
* Update Makefile.depend filesSimon J. Gerraty2024-10-141-0/+10
| | | | | | | After building packages we have a number of new and updated Makefile.depend files Reviewed by: stevek
* Remove residual blank line at start of MakefileWarner Losh2024-07-154-4/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* bthidd: declare appropriate size bitstringRyan Libby2024-07-091-1/+1
| | | | | | | | | The bitstring declared on the stack was much too large, and gcc noticed that we weren't memset()ing all of it. This one was harmless. Reported by: GCC -Wmemset-elt-size Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45900
* Fix off-by-one bug in btpandDapeng Gao2024-06-031-3/+6
| | | | | | | | | `ul` reaches `__arraycount(services)` before the bound-check happens, causing undefined behaviour. Reviewed by: imp, jrtc27 Fixes: 7718ced0ea98 ("Add btpand(8) daemon from NetBSD.") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45463
* man bluetooth/fwdownloaders: alignment nits, SPDXAlexander Ziaee2024-05-313-10/+21
| | | | | | | MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1267
* man bluetooth/fwdownloaders: terse descriptionsAlexander Ziaee2024-05-313-9/+6
| | | | | | | | | + 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
* bluetooth: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])Elyes Haouas2024-04-299-17/+25
| | | | | Pull Request: https://github.com/freebsd/freebsd-src/pull/888 Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
* bluetooth: fix comment in bluetooth.device.conflherschi2023-12-261-2/+2
| | | | | | | | | 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
* Remove copyright strings ifdef'd outWarner Losh2023-11-271-4/+0
| | | | | | | | | | | 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
* dirdeps: Update Makefile.depend* files with empty contentsStephen J. Kiernan2023-10-291-0/+16
| | | | | Some Makefile.depend* files were committed with no contents or empty DIRDEPS list, but they should have DIRDEPS with some contents.
* Remove $FreeBSD$: one-line bare tagWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-1612-12/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-163-6/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-1633-33/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-1613-13/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-1669-69/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-1616-32/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* Mark usage function as __dead2 in programs where it does not returnAlfonso Gregory2023-07-072-3/+3
| | | | | | | | 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
* bluetooth: Remove set but unused variable.John Baldwin2023-06-202-4/+0
| | | | Reported by: GCC
* bluetooth/ath3kfw: Propagate return value from ath3k_load_fwfile.John Baldwin2023-06-201-2/+2
| | | | | | | | | | 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)
* bluetooth: Fix typosElyes Haouas2023-06-024-5/+5
| | | | | | Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/653
* spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSDWarner Losh2023-05-1210-10/+10
| | | | | | | | | 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
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-1281-81/+81
| | | | | | | | | 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
* bluetooth/hccontrol: Fix unterminated command listBrian Campbell2023-05-041-0/+3
| | | | | | Signed-off-by: Brian Campbell <Brian.Campbell@ed.ac.uk> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/730
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-1913-13/+0
|
* bluetooth/hccontrol: Remove useless return at the end of void functionElyes Haouas2023-03-021-3/+0
| | | | | | Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/656
* iwmbtfw(8): Fix a typo in a kernel messageGordon Bergling2023-01-111-1/+1
| | | | | | - s/succesful/successful/ MFC after: 5 days
* hccontrol.8: missed underscore fixed.Maxim Konovalov2022-10-251-1/+1
| | | | PR: 267343
* Indicate that X(7) cross refs are satisfied by ports/x11/xorg-docs.Jens Schweikhardt2022-08-141-1/+1
|
* bluetooth(3): Fix a typo in a source code commentGordon Bergling2022-07-311-1/+1
| | | | | | - s/intrrupt/interrupt/ MFC after: 3 days
* bluetooth: remove hcserialdWarner Losh2021-09-307-389/+2
| | | | | | Without ng_h4 gone, there's no need for hcseriald. Sponsored by: Netflix