Linux bluetooth development
 help / color / mirror / Atom feed
From: Sai Teja Aluvala <aluvala.sai.teja@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: kiran.k@intel.com, chethan.tumkur.narayan@intel.com,
	Sai Teja Aluvala <aluvala.sai.teja@intel.com>
Subject: [PATCH v1 0/1] emulator: add generic HW rfkill test tool
Date: Wed, 30 Sep 2026 13:12:38 +0530	[thread overview]
Message-ID: <cover.1790752800.git.aluvala.sai.teja@intel.com> (raw)


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

             reply	other threads:[~2026-09-30  7:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  7:42 Sai Teja Aluvala [this message]
2026-09-30  7:42 ` [PATCH v1 1/1] emulator: add generic HW rfkill test tool 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1790752800.git.aluvala.sai.teja@intel.com \
    --to=aluvala.sai.teja@intel.com \
    --cc=chethan.tumkur.narayan@intel.com \
    --cc=kiran.k@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox