Bluetooth: Introduce force_bredr_smp debugfs option for testing
Subsystems (2)
Marcel Holtmann
maintainerPATCH 1/4 Bluetooth: Introduce force_bredr_smp debugfs option for testing
Testing cross-transport pairing that starts on BR/EDR is only valid when using a controller with BR/EDR Secure Connections. Devices will indicate this by providing BR/EDR SMP fixed channel over L2CAP. To allow testing of this feature on Bluetooth 4.0 controller or controllers without the BR/EDR Secure Connections features, introduce a force_bredr_smp debugfs option that allows faking the required AES connection.
--- include/net/bluetooth/hci.h | 1 + net/bluetooth/l2cap_core.c | 2 +- net/bluetooth/smp.c | 78 ++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 76 insertions(+), 5 deletions(-)
include/net/bluetooth/hci.h +1 -0
@@ -174,6 +174,7 @@ enum {HCI_DUT_MODE ,HCI_FORCE_SC ,HCI_FORCE_LESC , +HCI_FORCE_BREDR_SMP , HCI_FORCE_STATIC_ADDR, };
net/bluetooth/l2cap_core.c +1 -1
@@ -6968,7 +6968,7 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon)if (test_bit (HCI_LE_ENABLED , &hcon->hdev->dev_flags) && (bredr_sc_enabled (hcon->hdev) || -test_bit (HCI_FORCE_LESC , &hcon->hdev->dbg_flags))) +test_bit (HCI_FORCE_BREDR_SMP , &hcon->hdev->dbg_flags))) conn->local_fixed_chan |=L2CAP_FC_SMP_BREDR ;mutex_init (&conn->ident_lock);
net/bluetooth/smp.c +74 -4
109 lines not on this page · raw message
Signature · 1 line
2.1.0
Hi Marcel,
Quoted 7 lines · Marcel Holtmann
Testing cross-transport pairing that starts on BR/EDR is only valid when using a controller with BR/EDR Secure Connections. Devices will indicate this by providing BR/EDR SMP fixed channel over L2CAP. To allow testing of this feature on Bluetooth 4.0 controller or controllers without the BR/EDR Secure Connections features, introduce a
force_bredr_smpdebugfs option that allows faking the required AES connection.
Quoted 6 lines
Signed-off-by Marcel Holtmann <[email protected]>--- include/net/bluetooth/hci.h | 1 + net/bluetooth/l2cap_core.c | 2 +- net/bluetooth/smp.c | 78 ++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 76 insertions(+), 5 deletions(-)
All four patches in this set have been applied to bluetooth-next. Thanks.
Johan