]> www.infradead.org Git - users/hch/dma-mapping.git/commit
Bluetooth: Add quirk to ignore reserved PHY bits in LE Extended Adv Report
authorSven Peter <sven@svenpeter.dev>
Wed, 15 May 2024 18:02:58 +0000 (18:02 +0000)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 28 Jun 2024 18:30:20 +0000 (14:30 -0400)
commited2a2ef16a6b9197a0e452308bf6acee6e01f709
treee63d50348aa569d4e7a967908f52b1d35e58b922
parentdc6be0b73f4f55ab6d49fa55dbce299cf9fa2788
Bluetooth: Add quirk to ignore reserved PHY bits in LE Extended Adv Report

Some Broadcom controllers found on Apple Silicon machines abuse the
reserved bits inside the PHY fields of LE Extended Advertising Report
events for additional flags. Add a quirk to drop these and correctly
extract the Primary/Secondary_PHY field.

The following excerpt from a btmon trace shows a report received with
"Reserved" for "Primary PHY" on a 4388 controller:

> HCI Event: LE Meta Event (0x3e) plen 26
      LE Extended Advertising Report (0x0d)
        Num reports: 1
        Entry 0
          Event type: 0x2515
            Props: 0x0015
              Connectable
              Directed
              Use legacy advertising PDUs
            Data status: Complete
            Reserved (0x2500)
         Legacy PDU Type: Reserved (0x2515)
          Address type: Random (0x01)
          Address: 00:00:00:00:00:00 (Static)
          Primary PHY: Reserved
          Secondary PHY: No packets
          SID: no ADI field (0xff)
          TX power: 127 dBm
          RSSI: -60 dBm (0xc4)
          Periodic advertising interval: 0.00 msec (0x0000)
          Direct address type: Public (0x00)
          Direct address: 00:00:00:00:00:00 (Apple, Inc.)
          Data length: 0x00

Cc: stable@vger.kernel.org
Fixes: 2e7ed5f5e69b ("Bluetooth: hci_sync: Use advertised PHYs on hci_le_ext_create_conn_sync")
Reported-by: Janne Grunau <j@jannau.net>
Closes: https://lore.kernel.org/all/Zjz0atzRhFykROM9@robin
Tested-by: Janne Grunau <j@jannau.net>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/hci_bcm4377.c
include/net/bluetooth/hci.h
net/bluetooth/hci_event.c