diff mbox series

[RFC] Bluetooth: Add parameter to hci_set_aosp_capable

Message ID 20211014172855.2989669-1-luiz.dentz@gmail.com (mailing list archive)
State Superseded
Delegated to: Luiz Von Dentz
Headers show
Series [RFC] Bluetooth: Add parameter to hci_set_aosp_capable | expand

Checks

Context Check Description
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint success Gitlint PASS
tedd_an/buildkernel success Build Kernel PASS
tedd_an/testrunnersetup success Test Runner Setup PASS
tedd_an/testrunnerl2cap-tester success Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerbnep-tester success Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnermgmt-tester success Total: 468, Passed: 468 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnerrfcomm-tester success Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersco-tester success Total: 12, Passed: 12 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunnersmp-tester success Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
tedd_an/testrunneruserchan-tester success Total: 4, Passed: 4 (100.0%), Failed: 0, Not Run: 0

Commit Message

Luiz Augusto von Dentz Oct. 14, 2021, 5:28 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This makes it simpler for the driver like vhci that has it own setting
to pass it directly to hci_set_aosp_capable.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 drivers/bluetooth/btrtl.c        | 2 +-
 drivers/bluetooth/hci_qca.c      | 2 +-
 drivers/bluetooth/hci_vhci.c     | 2 +-
 drivers/bluetooth/virtio_bt.c    | 2 +-
 include/net/bluetooth/hci_core.h | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

Comments

bluez.test.bot@gmail.com Oct. 14, 2021, 6:16 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=563633

---Test result---

Test Summary:
CheckPatch                    PASS      2.50 seconds
GitLint                       PASS      1.03 seconds
BuildKernel                   PASS      620.14 seconds
TestRunner: Setup             PASS      463.59 seconds
TestRunner: l2cap-tester      PASS      10.42 seconds
TestRunner: bnep-tester       PASS      5.44 seconds
TestRunner: mgmt-tester       PASS      98.43 seconds
TestRunner: rfcomm-tester     PASS      6.81 seconds
TestRunner: sco-tester        PASS      7.05 seconds
TestRunner: smp-tester        PASS      7.03 seconds
TestRunner: userchan-tester   PASS      5.86 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index c2bdd1e6060e..602a022c3fba 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -751,7 +751,7 @@  void btrtl_set_quirks(struct hci_dev *hdev, struct btrtl_device_info *btrtl_dev)
 	case CHIP_ID_8852A:
 		set_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks);
 		set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, &hdev->quirks);
-		hci_set_aosp_capable(hdev);
+		hci_set_aosp_capable(hdev, true);
 		break;
 	default:
 		rtl_dev_dbg(hdev, "Central-peripheral role not enabled.");
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index dd768a8ed7cb..fc212225fe63 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1730,7 +1730,7 @@  static int qca_setup(struct hci_uart *hu)
 	if (qca_is_wcn399x(soc_type) ||
 	    qca_is_wcn6750(soc_type)) {
 		set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
-		hci_set_aosp_capable(hdev);
+		hci_set_aosp_capable(hdev, true);
 
 		ret = qca_read_soc_version(hdev, &ver, soc_type);
 		if (ret)
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index 74c0eb28c422..9e67517b6cef 100644
--- a/drivers/bluetooth/hci_vhci.c
+++ b/drivers/bluetooth/hci_vhci.c
@@ -264,7 +264,7 @@  static int vhci_setup(struct hci_dev *hdev)
 	struct vhci_data *vhci = hci_get_drvdata(hdev);
 
 	hci_set_msft_opcode(hdev, vhci->msft_opcode);
-	hci_set_aosp_capable(hdev);
+	hci_set_aosp_capable(hdev, vhci->aosp_capable);
 
 	return 0;
 }
diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c
index 57908ce4fae8..f5e2003c26e6 100644
--- a/drivers/bluetooth/virtio_bt.c
+++ b/drivers/bluetooth/virtio_bt.c
@@ -343,7 +343,7 @@  static int virtbt_probe(struct virtio_device *vdev)
 	}
 
 	if (virtio_has_feature(vdev, VIRTIO_BT_F_AOSP_EXT))
-		hci_set_aosp_capable(hdev);
+		hci_set_aosp_capable(hdev, true);
 
 	if (hci_register_dev(hdev) < 0) {
 		hci_free_dev(hdev);
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index dd8840e70e25..d007b487d4c1 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -1279,10 +1279,10 @@  static inline void hci_set_msft_opcode(struct hci_dev *hdev, __u16 opcode)
 #endif
 }
 
-static inline void hci_set_aosp_capable(struct hci_dev *hdev)
+static inline void hci_set_aosp_capable(struct hci_dev *hdev, bool enable)
 {
 #if IS_ENABLED(CONFIG_BT_AOSPEXT)
-	hdev->aosp_capable = true;
+	hdev->aosp_capable = enable;
 #endif
 }