Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4746e2c
Bluetooth: hci_qca: Fix SSR (SubSystem Restart) fail when BT_EN is pu…
shuaz-shuai Dec 3, 2025
3d55304
Bluetooth: MGMT: report BIS capability flags in supported settings
pv Dec 4, 2025
9b10de4
Bluetooth: hci_conn: Fix using conn->le_{tx,rx}_phy as supported PHYs
Vudentz Dec 10, 2025
3a7cf69
Bluetooth: btusb: revert use of devm_kzalloc in btusb
rpthibeault Dec 10, 2025
b96a6fd
Bluetooth: btusb: Add support for MediaTek7920 0489:e158
Blu3cr0ss Dec 10, 2025
0ad59c8
Bluetooth: hci_bcm4377: Use generic power management
VARoDeK Dec 10, 2025
fd52b1d
Bluetooth: btmtksdio: Use pm_ptr instead of #ifdef CONFIG_PM
ukleinek Dec 17, 2025
ad2804c
Bluetooth: hci_conn: use mod_delayed_work for active mode timeout
ssorensenroku Dec 16, 2025
f7f2402
Bluetooth: hci_conn: Set link_policy on incoming ACL connections
ssorensenroku Dec 16, 2025
fa10d5a
Bluetooth: mgmt: Add idle_timeout to configurable system parameters
ssorensenroku Dec 16, 2025
d02dfc9
Bluetooth: hci_sync: Add LE Channel Sounding HCI Command/event struct…
bhavani-oss-source Dec 17, 2025
1d7a8fd
Bluetooth: L2CAP: Add support for setting BT_PHY
Vudentz Dec 17, 2025
d6af4af
Bluetooth: btqca: move WCN7850 workaround to the caller
shuaz-shuai Jan 6, 2026
030d2c0
Bluetooth: btqca: Add WCN6855 firmware priority selection feature
shuaz-shuai Jan 6, 2026
6538549
Bluetooth: btusb: Add USB ID 0489:e112 for Realtek 8851BE
Techie-Ernie Dec 24, 2025
d4f7cb6
Bluetooth: hci_sync: enable PA Sync Lost event
Dec 19, 2025
bdb9aba
Bluetooth: Fix using PHYs bitfields as PHY value
Vudentz Dec 22, 2025
de288ca
workflow: Add workflow files for ci
tedd-an Nov 5, 2020
2d8627a
Bluetooth: hci_sync: use HCI_CMD_TIMEOUT for PA sync commands
Jan 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

on: [pull_request]

jobs:
ci:
runs-on: ubuntu-latest
name: CI for Pull Request
steps:
- name: Checkout the source code
uses: actions/checkout@v3
with:
path: src/src

- name: CI
uses: tedd-an/bzcafe@main
with:
task: ci
base_folder: src
space: kernel
github_token: ${{ secrets.GITHUB_TOKEN }}
email_token: ${{ secrets.EMAIL_TOKEN }}
patchwork_token: ${{ secrets.PATCHWORK_TOKEN }}
patchwork_user: ${{ secrets.PATCHWORK_USER }}

43 changes: 43 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Sync

on:
schedule:
- cron: "*/30 * * * *"

jobs:
sync_repo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: master

- name: Sync Repo
uses: tedd-an/bzcafe@main
with:
task: sync
upstream_repo: 'https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git'
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Cleanup PR
uses: tedd-an/bzcafe@main
with:
task: cleanup
github_token: ${{ secrets.ACTION_TOKEN }}

sync_patchwork:
needs: sync_repo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Sync Patchwork
uses: tedd-an/bzcafe@main
with:
task: patchwork
space: kernel
github_token: ${{ secrets.ACTION_TOKEN }}
email_token: ${{ secrets.EMAIL_TOKEN }}
patchwork_token: ${{ secrets.PATCHWORK_TOKEN }}
patchwork_user: ${{ secrets.PATCHWORK_USER }}

8 changes: 1 addition & 7 deletions drivers/bluetooth/btmtksdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,6 @@ static void btmtksdio_remove(struct sdio_func *func)
hci_free_dev(hdev);
}

#ifdef CONFIG_PM
static int btmtksdio_runtime_suspend(struct device *dev)
{
struct sdio_func *func = dev_to_sdio_func(dev);
Expand Down Expand Up @@ -1542,18 +1541,13 @@ static const struct dev_pm_ops btmtksdio_pm_ops = {
RUNTIME_PM_OPS(btmtksdio_runtime_suspend, btmtksdio_runtime_resume, NULL)
};

#define BTMTKSDIO_PM_OPS (&btmtksdio_pm_ops)
#else /* CONFIG_PM */
#define BTMTKSDIO_PM_OPS NULL
#endif /* CONFIG_PM */

static struct sdio_driver btmtksdio_driver = {
.name = "btmtksdio",
.probe = btmtksdio_probe,
.remove = btmtksdio_remove,
.id_table = btmtksdio_table,
.drv = {
.pm = BTMTKSDIO_PM_OPS,
.pm = pm_ptr(&btmtksdio_pm_ops),
}
};

Expand Down
58 changes: 35 additions & 23 deletions drivers/bluetooth/btqca.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,28 +581,11 @@ static int qca_download_firmware(struct hci_dev *hdev,

ret = request_firmware(&fw, config->fwname, &hdev->dev);
if (ret) {
/* For WCN6750, if mbn file is not present then check for
* tlv file.
*/
if (soc_type == QCA_WCN6750 && config->type == ELF_TYPE_PATCH) {
bt_dev_dbg(hdev, "QCA Failed to request file: %s (%d)",
config->fwname, ret);
config->type = TLV_TYPE_PATCH;
snprintf(config->fwname, sizeof(config->fwname),
"qca/msbtfw%02x.tlv", rom_ver);
bt_dev_info(hdev, "QCA Downloading %s", config->fwname);
ret = request_firmware(&fw, config->fwname, &hdev->dev);
if (ret) {
bt_dev_err(hdev, "QCA Failed to request file: %s (%d)",
config->fwname, ret);
return ret;
}
}
/* If the board-specific file is missing, try loading the default
* one, unless that was attempted already.
*/
else if (config->type == TLV_TYPE_NVM &&
qca_get_alt_nvm_file(config->fwname, sizeof(config->fwname))) {
if (config->type == TLV_TYPE_NVM &&
qca_get_alt_nvm_file(config->fwname, sizeof(config->fwname))) {
bt_dev_info(hdev, "QCA Downloading %s", config->fwname);
ret = request_firmware(&fw, config->fwname, &hdev->dev);
if (ret) {
Expand Down Expand Up @@ -847,8 +830,12 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
"qca/msbtfw%02x.mbn", rom_ver);
break;
case QCA_WCN6855:
/* Due to historical reasons, WCN685x chip has been using firmware
* without the "wcn" prefix. The mapping between the chip and its
* corresponding firmware has now been corrected.
*/
snprintf(config.fwname, sizeof(config.fwname),
"qca/hpbtfw%02x.tlv", rom_ver);
"qca/wcnhpbtfw%02x.tlv", rom_ver);
break;
case QCA_WCN7850:
snprintf(config.fwname, sizeof(config.fwname),
Expand All @@ -861,8 +848,26 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
}

err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
/* For WCN6750, if mbn file is not present then check for
* tlv file.
*/
if (err < 0 && soc_type == QCA_WCN6750) {
bt_dev_dbg(hdev, "QCA Failed to request file: %s (%d)",
config.fwname, err);
config.type = TLV_TYPE_PATCH;
snprintf(config.fwname, sizeof(config.fwname),
"qca/msbtfw%02x.tlv", rom_ver);
bt_dev_info(hdev, "QCA Downloading %s", config.fwname);
err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
} else if (err < 0 && !rampatch_name && soc_type == QCA_WCN6855) {
snprintf(config.fwname, sizeof(config.fwname),
"qca/hpbtfw%02x.tlv", rom_ver);
err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
}

if (err < 0) {
bt_dev_err(hdev, "QCA Failed to download patch (%d)", err);
bt_dev_err(hdev, "QCA Failed to request file: %s (%d)",
config.fwname, err);
return err;
}

Expand Down Expand Up @@ -923,7 +928,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
case QCA_WCN6855:
qca_read_fw_board_id(hdev, &boardid);
qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
"hpnv", soc_type, ver, rom_ver, boardid);
"wcnhpnv", soc_type, ver, rom_ver, boardid);
break;
case QCA_WCN7850:
qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
Expand All @@ -936,8 +941,15 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
}

err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
if (err < 0 && !firmware_name && soc_type == QCA_WCN6855) {
qca_get_nvm_name_by_board(config.fwname, sizeof(config.fwname),
"hpnv", soc_type, ver, rom_ver, boardid);
err = qca_download_firmware(hdev, &config, soc_type, rom_ver);
}

if (err < 0) {
bt_dev_err(hdev, "QCA Failed to download NVM (%d)", err);
bt_dev_err(hdev, "QCA Failed to request file: %s (%d)",
config.fwname, err);
return err;
}

Expand Down
16 changes: 13 additions & 3 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,8 @@ static const struct usb_device_id quirks_table[] = {
{ USB_DEVICE(0x0bda, 0xb850), .driver_info = BTUSB_REALTEK },
{ USB_DEVICE(0x13d3, 0x3600), .driver_info = BTUSB_REALTEK },
{ USB_DEVICE(0x13d3, 0x3601), .driver_info = BTUSB_REALTEK },
{ USB_DEVICE(0x0489, 0xe112), .driver_info = BTUSB_REALTEK |
BTUSB_WIDEBAND_SPEECH },

/* Realtek 8851BU Bluetooth devices */
{ USB_DEVICE(0x3625, 0x010b), .driver_info = BTUSB_REALTEK |
Expand Down Expand Up @@ -637,6 +639,8 @@ static const struct usb_device_id quirks_table[] = {
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x13d3, 0x3622), .driver_info = BTUSB_MEDIATEK |
BTUSB_WIDEBAND_SPEECH },
{ USB_DEVICE(0x0489, 0xe158), .driver_info = BTUSB_MEDIATEK |
BTUSB_WIDEBAND_SPEECH },

/* Additional MediaTek MT7921 Bluetooth devices */
{ USB_DEVICE(0x0489, 0xe0c8), .driver_info = BTUSB_MEDIATEK |
Expand Down Expand Up @@ -4052,7 +4056,7 @@ static int btusb_probe(struct usb_interface *intf,
return -ENODEV;
}

data = devm_kzalloc(&intf->dev, sizeof(*data), GFP_KERNEL);
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data)
return -ENOMEM;

Expand All @@ -4075,8 +4079,10 @@ static int btusb_probe(struct usb_interface *intf,
}
}

if (!data->intr_ep || !data->bulk_tx_ep || !data->bulk_rx_ep)
if (!data->intr_ep || !data->bulk_tx_ep || !data->bulk_rx_ep) {
kfree(data);
return -ENODEV;
}

if (id->driver_info & BTUSB_AMP) {
data->cmdreq_type = USB_TYPE_CLASS | 0x01;
Expand Down Expand Up @@ -4131,8 +4137,10 @@ static int btusb_probe(struct usb_interface *intf,
data->recv_acl = hci_recv_frame;

hdev = hci_alloc_dev_priv(priv_size);
if (!hdev)
if (!hdev) {
kfree(data);
return -ENOMEM;
}

hdev->bus = HCI_USB;
hci_set_drvdata(hdev, data);
Expand Down Expand Up @@ -4406,6 +4414,7 @@ static int btusb_probe(struct usb_interface *intf,
if (data->reset_gpio)
gpiod_put(data->reset_gpio);
hci_free_dev(hdev);
kfree(data);
return err;
}

Expand Down Expand Up @@ -4454,6 +4463,7 @@ static void btusb_disconnect(struct usb_interface *intf)
}

hci_free_dev(hdev);
kfree(data);
}

#ifdef CONFIG_PM
Expand Down
11 changes: 7 additions & 4 deletions drivers/bluetooth/hci_bcm4377.c
Original file line number Diff line number Diff line change
Expand Up @@ -2416,8 +2416,9 @@ static int bcm4377_probe(struct pci_dev *pdev, const struct pci_device_id *id)
hdev);
}

static int bcm4377_suspend(struct pci_dev *pdev, pm_message_t state)
static int bcm4377_suspend(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct bcm4377_data *bcm4377 = pci_get_drvdata(pdev);
int ret;

Expand All @@ -2431,8 +2432,9 @@ static int bcm4377_suspend(struct pci_dev *pdev, pm_message_t state)
return 0;
}

static int bcm4377_resume(struct pci_dev *pdev)
static int bcm4377_resume(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct bcm4377_data *bcm4377 = pci_get_drvdata(pdev);

iowrite32(BCM4377_BAR0_SLEEP_CONTROL_UNQUIESCE,
Expand All @@ -2441,6 +2443,8 @@ static int bcm4377_resume(struct pci_dev *pdev)
return hci_resume_dev(bcm4377->hdev);
}

static DEFINE_SIMPLE_DEV_PM_OPS(bcm4377_ops, bcm4377_suspend, bcm4377_resume);

static const struct dmi_system_id bcm4377_dmi_board_table[] = {
{
.matches = {
Expand Down Expand Up @@ -2541,8 +2545,7 @@ static struct pci_driver bcm4377_pci_driver = {
.name = "hci_bcm4377",
.id_table = bcm4377_devid_table,
.probe = bcm4377_probe,
.suspend = bcm4377_suspend,
.resume = bcm4377_resume,
.driver.pm = &bcm4377_ops,
};
module_pci_driver(bcm4377_pci_driver);

Expand Down
33 changes: 33 additions & 0 deletions drivers/bluetooth/hci_qca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,39 @@ static void qca_hw_error(struct hci_dev *hdev, u8 code)
skb_queue_purge(&qca->rx_memdump_q);
}

/*
* If the BT chip's bt_en pin is connected to a 3.3V power supply via
* hardware and always stays high, driver cannot control the bt_en pin.
* As a result, during SSR (SubSystem Restart), QCA_SSR_TRIGGERED and
* QCA_IBS_DISABLED flags cannot be cleared, which leads to a reset
* command timeout.
* Add an msleep delay to ensure controller completes the SSR process.
*
* Host will not download the firmware after SSR, controller to remain
* in the IBS_WAKE state, and the host needs to synchronize with it
*
* Since the bluetooth chip has been reset, clear the memdump state.
*/
if (!hci_test_quirk(hu->hdev, HCI_QUIRK_NON_PERSISTENT_SETUP)) {
/*
* When the SSR (SubSystem Restart) duration exceeds 2 seconds,
* it triggers host tx_idle_delay, which sets host TX state
* to sleep. Reset tx_idle_timer after SSR to prevent
* host enter TX IBS_Sleep mode.
*/
mod_timer(&qca->tx_idle_timer, jiffies +
msecs_to_jiffies(qca->tx_idle_delay));

/* Controller reset completion time is 50ms */
msleep(50);

clear_bit(QCA_SSR_TRIGGERED, &qca->flags);
clear_bit(QCA_IBS_DISABLED, &qca->flags);

qca->tx_ibs_state = HCI_IBS_TX_AWAKE;
qca->memdump_state = QCA_MEMDUMP_IDLE;
}

clear_bit(QCA_HW_ERROR_EVENT, &qca->flags);
}

Expand Down
Loading