diff options
| author | 2026-09-07 23:10:15 +0800 | |
|---|---|---|
| committer | 2026-10-14 14:38:11 -0400 | |
| commit | 266e44d71b41b980ce00b7eda91c6f8c75b1fb15 (patch) | |
| tree | d84585f4406b33e288b961b347be6dae4dd3e510 /scripts/Makefile.thinlto | |
| parent | Bluetooth: btusb: Add device ID for Realtek RTL8761BUE (StarTech AV53C1) (diff) | |
Bluetooth: hci_bcsp: Use the shared CRC-CCITT byte helper
bcsp_crc_update() processes each byte as two nibbles, requiring two
dependent table lookups for every header and payload byte when CRC is
enabled.
The existing crc_ccitt_byte() helper implements the same reflected
polynomial with one lookup per byte. Use it instead of the private
nibble-based implementation and select CRC_CCITT for BCSP-only UART
configurations as well. The initial CRC value and final bit reversal
remain unchanged.
This replaces the private 16-entry table with the shared 256-entry table,
trading table size for fewer dependent lookups. An exhaustive comparison
of all 65536 CRC states and 256 input bytes matches both the old code and
a bitwise reference implementation.
Signed-off-by: Xuhua Zhang <zhangxuhua@kylinsec.com.cn>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
