Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v1 0/1] emulator: add generic HW rfkill test tool
@ 2026-09-30  7:42 Sai Teja Aluvala
  2026-09-30  7:42 ` [PATCH v1 1/1] " Sai Teja Aluvala
  0 siblings, 1 reply; 7+ messages in thread
From: Sai Teja Aluvala @ 2026-09-30  7:42 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: kiran.k, chethan.tumkur.narayan, Sai Teja Aluvala


This patch adds emulator/hci_rfkill, a testing utility for the generic
Bluetooth hardware-rfkill path.

The tool operates on an hciN device and:

  - writes Y/N to the kernel force_hw_rfkill debugfs entry;
  - reads back the debugfs hardware-rfkill state;
  - verifies the corresponding /sys/class/rfkill hardware state;
  - supports enable-only, disable-only, and toggle modes;
  - optionally restores the adapter's original up/down state.

The tool is built only under TESTING and is not installed as a production
utility.

This tests the generic net/bluetooth rfkill notification and state
handling. It does not test vendor-specific hardware interrupt, doorbell,
or register-read logic. For example, the Intel PCIe interrupt/doorbell
path must still be tested with the corresponding kernel driver and
hardware or transport-level emulation.

Dependency:

  This tool requires the separate Bluetooth kernel series:

    [PATCH v1 0/4] Bluetooth: add hardware rfkill handling and test hook

  In particular, that series adds the Bluetooth kernel debugfs interface:

    /sys/kernel/debug/bluetooth/hciN/force_hw_rfkill

  The Bluetooth kernel series is submitted to bluetooth-next and itself
  depends on the separate RFKILL helper submitted to wireless-next.
  Its cover-thread lore link is:

    https://lore.kernel.org/linux-bluetooth/cover.1790752799.git.aluvala.sai.teja@intel.com/

Patch:

  1. emulator: add generic HW rfkill test tool

Changes in v1:
  - Initial version.

The patch has been prepared against bluez/master.

Sai Teja Aluvala (1):
  emulator: add generic HW rfkill test tool

 Makefile.tools        |   3 +
 emulator/hci_rfkill.c | 478 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 481 insertions(+)
 create mode 100644 emulator/hci_rfkill.c

-- 
2.53.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-01  1:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-30  7:42 [PATCH v1 0/1] emulator: add generic HW rfkill test tool Sai Teja Aluvala
2026-09-30  7:42 ` [PATCH v1 1/1] " Sai Teja Aluvala
2026-09-30 12:53   ` Luiz Augusto von Dentz
2026-09-30 14:41     ` Aluvala Sai Teja
2026-09-30 14:59       ` Luiz Augusto von Dentz
2026-10-01  1:56         ` Aluvala Sai Teja
2026-09-30 15:12   ` bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox